@vendure/admin-ui 1.0.2 → 1.0.3

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.
@@ -12,5 +12,5 @@
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function K(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function Q(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function X(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ee(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function te(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ee(arguments[t]));return e}function ne(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create;var re,oe,ie,ae,se,le,ce,ue,pe,de,me,ge,he,fe,ye,ve,Ce,be,Se,Ie,Te,De,Ae=o.gql(re||(re=ne(["\n fragment Role on Role {\n id\n createdAt\n updatedAt\n code\n description\n permissions\n channels {\n id\n code\n token\n }\n }\n"],["\n fragment Role on Role {\n id\n createdAt\n updatedAt\n code\n description\n permissions\n channels {\n id\n code\n token\n }\n }\n"]))),Ee=o.gql(oe||(oe=ne(["\n fragment Administrator on Administrator {\n id\n createdAt\n updatedAt\n firstName\n lastName\n emailAddress\n user {\n id\n identifier\n lastLogin\n roles {\n ...Role\n }\n }\n }\n ","\n"],["\n fragment Administrator on Administrator {\n id\n createdAt\n updatedAt\n firstName\n lastName\n emailAddress\n user {\n id\n identifier\n lastLogin\n roles {\n ...Role\n }\n }\n }\n ","\n"])),Ae),Re=o.gql(ie||(ie=ne(["\n query GetAdministrators($options: AdministratorListOptions) {\n administrators(options: $options) {\n items {\n ...Administrator\n }\n totalItems\n }\n }\n ","\n"],["\n query GetAdministrators($options: AdministratorListOptions) {\n administrators(options: $options) {\n items {\n ...Administrator\n }\n totalItems\n }\n }\n ","\n"])),Ee),Pe=o.gql(ae||(ae=ne(["\n query GetActiveAdministrator {\n activeAdministrator {\n ...Administrator\n }\n }\n ","\n"],["\n query GetActiveAdministrator {\n activeAdministrator {\n ...Administrator\n }\n }\n ","\n"])),Ee),Oe=o.gql(se||(se=ne(["\n query GetAdministrator($id: ID!) {\n administrator(id: $id) {\n ...Administrator\n }\n }\n ","\n"],["\n query GetAdministrator($id: ID!) {\n administrator(id: $id) {\n ...Administrator\n }\n }\n ","\n"])),Ee),ke=o.gql(le||(le=ne(["\n mutation CreateAdministrator($input: CreateAdministratorInput!) {\n createAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation CreateAdministrator($input: CreateAdministratorInput!) {\n createAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"])),Ee),we=o.gql(ce||(ce=ne(["\n mutation UpdateAdministrator($input: UpdateAdministratorInput!) {\n updateAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation UpdateAdministrator($input: UpdateAdministratorInput!) {\n updateAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"])),Ee),xe=o.gql(ue||(ue=ne(["\n mutation UpdateActiveAdministrator($input: UpdateActiveAdministratorInput!) {\n updateActiveAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation UpdateActiveAdministrator($input: UpdateActiveAdministratorInput!) {\n updateActiveAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"])),Ee),Fe=o.gql(pe||(pe=ne(["\n mutation DeleteAdministrator($id: ID!) {\n deleteAdministrator(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteAdministrator($id: ID!) {\n deleteAdministrator(id: $id) {\n result\n message\n }\n }\n"]))),$e=o.gql(de||(de=ne(["\n query GetRoles($options: RoleListOptions) {\n roles(options: $options) {\n items {\n ...Role\n }\n totalItems\n }\n }\n ","\n"],["\n query GetRoles($options: RoleListOptions) {\n roles(options: $options) {\n items {\n ...Role\n }\n totalItems\n }\n }\n ","\n"])),Ae),_e=o.gql(me||(me=ne(["\n query GetRole($id: ID!) {\n role(id: $id) {\n ...Role\n }\n }\n ","\n"],["\n query GetRole($id: ID!) {\n role(id: $id) {\n ...Role\n }\n }\n ","\n"])),Ae),Me=o.gql(ge||(ge=ne(["\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n ...Role\n }\n }\n ","\n"],["\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n ...Role\n }\n }\n ","\n"])),Ae),Le=o.gql(he||(he=ne(["\n mutation UpdateRole($input: UpdateRoleInput!) {\n updateRole(input: $input) {\n ...Role\n }\n }\n ","\n"],["\n mutation UpdateRole($input: UpdateRoleInput!) {\n updateRole(input: $input) {\n ...Role\n }\n }\n ","\n"])),Ae),Ne=o.gql(fe||(fe=ne(["\n mutation DeleteRole($id: ID!) {\n deleteRole(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteRole($id: ID!) {\n deleteRole(id: $id) {\n result\n message\n }\n }\n"]))),Ue=o.gql(ye||(ye=ne(["\n mutation AssignRoleToAdministrator($administratorId: ID!, $roleId: ID!) {\n assignRoleToAdministrator(administratorId: $administratorId, roleId: $roleId) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation AssignRoleToAdministrator($administratorId: ID!, $roleId: ID!) {\n assignRoleToAdministrator(administratorId: $administratorId, roleId: $roleId) {\n ...Administrator\n }\n }\n ","\n"])),Ee),qe=function(){function e(e){this.baseDataService=e}return e.prototype.getAdministrators=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(Re,{options:{take:e,skip:t}})},e.prototype.getActiveAdministrator=function(e){return void 0===e&&(e="cache-first"),this.baseDataService.query(Pe,{},e)},e.prototype.getAdministrator=function(e){return this.baseDataService.query(Oe,{id:e})},e.prototype.createAdministrator=function(e){return this.baseDataService.mutate(ke,{input:e})},e.prototype.updateAdministrator=function(e){return this.baseDataService.mutate(we,{input:e})},e.prototype.updateActiveAdministrator=function(e){return this.baseDataService.mutate(xe,{input:e})},e.prototype.deleteAdministrator=function(e){return this.baseDataService.mutate(Fe,{id:e})},e.prototype.getRoles=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query($e,{options:{take:e,skip:t}})},e.prototype.getRole=function(e){return this.baseDataService.query(_e,{id:e})},e.prototype.createRole=function(e){return this.baseDataService.mutate(Me,{input:e})},e.prototype.updateRole=function(e){return this.baseDataService.mutate(Le,{input:e})},e.prototype.deleteRole=function(e){return this.baseDataService.mutate(Ne,{id:e})},e}(),Ge=o.gql(ve||(ve=ne(["\n fragment ConfigurableOperation on ConfigurableOperation {\n args {\n name\n value\n }\n code\n }\n"],["\n fragment ConfigurableOperation on ConfigurableOperation {\n args {\n name\n value\n }\n code\n }\n"]))),Ve=o.gql(Ce||(Ce=ne(["\n fragment ConfigurableOperationDef on ConfigurableOperationDefinition {\n args {\n name\n type\n required\n defaultValue\n list\n ui\n label\n }\n code\n description\n }\n"],["\n fragment ConfigurableOperationDef on ConfigurableOperationDefinition {\n args {\n name\n type\n required\n defaultValue\n list\n ui\n label\n }\n code\n description\n }\n"]))),je=o.gql(be||(be=ne(["\n fragment ErrorResult on ErrorResult {\n errorCode\n message\n }\n"],["\n fragment ErrorResult on ErrorResult {\n errorCode\n message\n }\n"]))),Be=o.gql(Se||(Se=ne(["\n fragment CurrentUser on CurrentUser {\n id\n identifier\n channels {\n id\n code\n token\n permissions\n }\n }\n"],["\n fragment CurrentUser on CurrentUser {\n id\n identifier\n channels {\n id\n code\n token\n permissions\n }\n }\n"]))),He=o.gql(Ie||(Ie=ne(["\n mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean!) {\n login(username: $username, password: $password, rememberMe: $rememberMe) {\n ...CurrentUser\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean!) {\n login(username: $username, password: $password, rememberMe: $rememberMe) {\n ...CurrentUser\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Be,je),ze=o.gql(Te||(Te=ne(["\n mutation LogOut {\n logout {\n success\n }\n }\n"],["\n mutation LogOut {\n logout {\n success\n }\n }\n"]))),We=o.gql(De||(De=ne(["\n query GetCurrentUser {\n me {\n ...CurrentUser\n }\n }\n ","\n"],["\n query GetCurrentUser {\n me {\n ...CurrentUser\n }\n }\n ","\n"])),Be),Ze=function(){function e(e){this.baseDataService=e}return e.prototype.currentUser=function(){return this.baseDataService.query(We)},e.prototype.attemptLogin=function(e,t,n){return this.baseDataService.mutate(He,{username:e,password:t,rememberMe:n})},e.prototype.logOut=function(){return this.baseDataService.mutate(ze)},e}(),Ye=function(){function e(e){this.location=e}return e.prototype.set=function(e,t){var n=this.keyName(e);localStorage.setItem(n,JSON.stringify(t))},e.prototype.setForCurrentLocation=function(e,t){var n=this.getLocationBasedKey(e);this.set(n,t)},e.prototype.setForSession=function(e,t){var n=this.keyName(e);sessionStorage.setItem(n,JSON.stringify(t))},e.prototype.get=function(e){var t,n=this.keyName(e),r=sessionStorage.getItem(n)||localStorage.getItem(n);try{t=JSON.parse(r||"null")}catch(t){console.error('Could not parse the localStorage value for "'+e+'" ('+r+")")}return t},e.prototype.getForCurrentLocation=function(e){var t=this.getLocationBasedKey(e);return this.get(t)},e.prototype.remove=function(e){var t=this.keyName(e);sessionStorage.removeItem(t),localStorage.removeItem(t)},e.prototype.getLocationBasedKey=function(e){return e+this.location.path()},e.prototype.keyName=function(e){return"vnd_"+e},e}();Ye.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Ye(t.ɵɵinject(n.Location))},token:Ye,providedIn:"root"}),Ye.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ye.ctorParameters=function(){return[{type:n.Location}]};var Je,Ke,Qe,Xe,et,tt,nt,rt,ot,it,at,st,lt,ct,ut,pt,dt,mt,gt,ht,ft,yt,vt,Ct,bt,St,It,Tt,Dt,At,Et,Rt,Pt,Ot,kt,wt,xt,Ft,$t,_t,Mt,Lt,Nt,Ut,qt,Gt,Vt,jt,Bt,Ht,zt,Wt,Zt,Yt,Jt,Kt,Qt,Xt,en,tn,nn,rn,on,an,sn,ln,cn,un,pn,dn,mn,gn,hn,fn,yn=o.gql(Je||(Je=ne(["\n mutation RequestStarted {\n requestStarted @client\n }\n"],["\n mutation RequestStarted {\n requestStarted @client\n }\n"]))),vn=o.gql(Ke||(Ke=ne(["\n mutation RequestCompleted {\n requestCompleted @client\n }\n"],["\n mutation RequestCompleted {\n requestCompleted @client\n }\n"]))),Cn=o.gql(Qe||(Qe=ne(["\n fragment UserStatus on UserStatus {\n username\n isLoggedIn\n loginTime\n activeChannelId\n permissions\n channels {\n id\n code\n token\n permissions\n }\n }\n"],["\n fragment UserStatus on UserStatus {\n username\n isLoggedIn\n loginTime\n activeChannelId\n permissions\n channels {\n id\n code\n token\n permissions\n }\n }\n"]))),bn=o.gql(Xe||(Xe=ne(["\n mutation SetAsLoggedIn($input: UserStatusInput!) {\n setAsLoggedIn(input: $input) @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation SetAsLoggedIn($input: UserStatusInput!) {\n setAsLoggedIn(input: $input) @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),Sn=o.gql(et||(et=ne(["\n mutation SetAsLoggedOut {\n setAsLoggedOut @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation SetAsLoggedOut {\n setAsLoggedOut @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),In=o.gql(tt||(tt=ne(["\n mutation SetUiLanguage($languageCode: LanguageCode!) {\n setUiLanguage(languageCode: $languageCode) @client\n }\n"],["\n mutation SetUiLanguage($languageCode: LanguageCode!) {\n setUiLanguage(languageCode: $languageCode) @client\n }\n"]))),Tn=o.gql(nt||(nt=ne(["\n mutation SetUiTheme($theme: String!) {\n setUiTheme(theme: $theme) @client\n }\n"],["\n mutation SetUiTheme($theme: String!) {\n setUiTheme(theme: $theme) @client\n }\n"]))),Dn=o.gql(rt||(rt=ne(["\n query GetNetworkStatus {\n networkStatus @client {\n inFlightRequests\n }\n }\n"],["\n query GetNetworkStatus {\n networkStatus @client {\n inFlightRequests\n }\n }\n"]))),An=o.gql(ot||(ot=ne(["\n query GetUserStatus {\n userStatus @client {\n ...UserStatus\n }\n }\n ","\n"],["\n query GetUserStatus {\n userStatus @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),En=o.gql(it||(it=ne(["\n query GetUiState {\n uiState @client {\n language\n theme\n }\n }\n"],["\n query GetUiState {\n uiState @client {\n language\n theme\n }\n }\n"]))),Rn=o.gql(at||(at=ne(["\n query GetClientState {\n networkStatus @client {\n inFlightRequests\n }\n userStatus @client {\n ...UserStatus\n }\n uiState @client {\n language\n theme\n }\n }\n ","\n"],["\n query GetClientState {\n networkStatus @client {\n inFlightRequests\n }\n userStatus @client {\n ...UserStatus\n }\n uiState @client {\n language\n theme\n }\n }\n ","\n"])),Cn),Pn=o.gql(st||(st=ne(["\n mutation SetActiveChannel($channelId: ID!) {\n setActiveChannel(channelId: $channelId) @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation SetActiveChannel($channelId: ID!) {\n setActiveChannel(channelId: $channelId) @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),On=o.gql(lt||(lt=ne(["\n mutation UpdateUserChannels($channels: [CurrentUserChannelInput!]!) {\n updateUserChannels(channels: $channels) @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation UpdateUserChannels($channels: [CurrentUserChannelInput!]!) {\n updateUserChannels(channels: $channels) @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),kn=function(){function e(e,t){this.queryRef=e,this.apollo=t,this.completed$=new c.Subject,this.valueChanges=e.valueChanges}return e.prototype.refetchOnChannelChange=function(){var e=this,t=this.apollo.watchQuery({query:An}).valueChanges,n=t.pipe(r.map((function(e){return e.data.userStatus.activeChannelId})),r.filter(l.notNullOrUndefined),r.distinctUntilChanged(),r.skip(1),r.takeUntil(this.completed$)),o=t.pipe(r.map((function(e){return e.data.userStatus.isLoggedIn})),r.distinctUntilChanged(),r.skip(1),r.filter((function(e){return!e})),r.takeUntil(this.completed$));return this.valueChanges=c.merge(n,this.queryRef.valueChanges).pipe(r.tap((function(t){"string"==typeof t&&new Promise((function(e){return setTimeout(e,50)})).then((function(){return e.queryRef.refetch()}))})),r.filter((function(e){return"string"!=typeof e})),r.takeUntil(o),r.takeUntil(this.completed$)),this.queryRef.valueChanges=this.valueChanges,this},Object.defineProperty(e.prototype,"single$",{get:function(){var e=this;return this.valueChanges.pipe(r.filter((function(e){return e.networkStatus===s.NetworkStatus.ready})),r.take(1),r.map((function(e){return e.data})),r.finalize((function(){e.completed$.next(),e.completed$.complete()})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stream$",{get:function(){var e=this;return this.valueChanges.pipe(r.filter((function(e){return e.networkStatus===s.NetworkStatus.ready})),r.map((function(e){return e.data})),r.finalize((function(){e.completed$.next(),e.completed$.complete()})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return this.queryRef},enumerable:!1,configurable:!0}),e.prototype.mapSingle=function(e){return this.single$.pipe(r.map(e))},e.prototype.mapStream=function(e){return this.stream$.pipe(r.map(e))},e}(),wn=o.gql(ct||(ct=ne(["\n fragment Country on Country {\n id\n createdAt\n updatedAt\n code\n name\n enabled\n translations {\n id\n languageCode\n name\n }\n }\n"],["\n fragment Country on Country {\n id\n createdAt\n updatedAt\n code\n name\n enabled\n translations {\n id\n languageCode\n name\n }\n }\n"]))),xn=o.gql(ut||(ut=ne(["\n query GetCountryList($options: CountryListOptions) {\n countries(options: $options) {\n items {\n id\n code\n name\n enabled\n }\n totalItems\n }\n }\n"],["\n query GetCountryList($options: CountryListOptions) {\n countries(options: $options) {\n items {\n id\n code\n name\n enabled\n }\n totalItems\n }\n }\n"]))),Fn=o.gql(pt||(pt=ne(["\n query GetAvailableCountries {\n countries(options: { filter: { enabled: { eq: true } } }) {\n items {\n id\n code\n name\n enabled\n }\n }\n }\n"],["\n query GetAvailableCountries {\n countries(options: { filter: { enabled: { eq: true } } }) {\n items {\n id\n code\n name\n enabled\n }\n }\n }\n"]))),$n=o.gql(dt||(dt=ne(["\n query GetCountry($id: ID!) {\n country(id: $id) {\n ...Country\n }\n }\n ","\n"],["\n query GetCountry($id: ID!) {\n country(id: $id) {\n ...Country\n }\n }\n ","\n"])),wn),_n=o.gql(mt||(mt=ne(["\n mutation CreateCountry($input: CreateCountryInput!) {\n createCountry(input: $input) {\n ...Country\n }\n }\n ","\n"],["\n mutation CreateCountry($input: CreateCountryInput!) {\n createCountry(input: $input) {\n ...Country\n }\n }\n ","\n"])),wn),Mn=o.gql(gt||(gt=ne(["\n mutation UpdateCountry($input: UpdateCountryInput!) {\n updateCountry(input: $input) {\n ...Country\n }\n }\n ","\n"],["\n mutation UpdateCountry($input: UpdateCountryInput!) {\n updateCountry(input: $input) {\n ...Country\n }\n }\n ","\n"])),wn),Ln=o.gql(ht||(ht=ne(["\n mutation DeleteCountry($id: ID!) {\n deleteCountry(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCountry($id: ID!) {\n deleteCountry(id: $id) {\n result\n message\n }\n }\n"]))),Nn=o.gql(ft||(ft=ne(["\n fragment Zone on Zone {\n id\n name\n members {\n ...Country\n }\n }\n ","\n"],["\n fragment Zone on Zone {\n id\n name\n members {\n ...Country\n }\n }\n ","\n"])),wn),Un=o.gql(yt||(yt=ne(["\n query GetZones {\n zones {\n id\n createdAt\n updatedAt\n name\n members {\n createdAt\n updatedAt\n id\n name\n code\n enabled\n }\n }\n }\n"],["\n query GetZones {\n zones {\n id\n createdAt\n updatedAt\n name\n members {\n createdAt\n updatedAt\n id\n name\n code\n enabled\n }\n }\n }\n"]))),qn=o.gql(vt||(vt=ne(["\n query GetZone($id: ID!) {\n zone(id: $id) {\n ...Zone\n }\n }\n ","\n"],["\n query GetZone($id: ID!) {\n zone(id: $id) {\n ...Zone\n }\n }\n ","\n"])),Nn),Gn=o.gql(Ct||(Ct=ne(["\n mutation CreateZone($input: CreateZoneInput!) {\n createZone(input: $input) {\n ...Zone\n }\n }\n ","\n"],["\n mutation CreateZone($input: CreateZoneInput!) {\n createZone(input: $input) {\n ...Zone\n }\n }\n ","\n"])),Nn),Vn=o.gql(bt||(bt=ne(["\n mutation UpdateZone($input: UpdateZoneInput!) {\n updateZone(input: $input) {\n ...Zone\n }\n }\n ","\n"],["\n mutation UpdateZone($input: UpdateZoneInput!) {\n updateZone(input: $input) {\n ...Zone\n }\n }\n ","\n"])),Nn),jn=o.gql(St||(St=ne(["\n mutation DeleteZone($id: ID!) {\n deleteZone(id: $id) {\n message\n result\n }\n }\n"],["\n mutation DeleteZone($id: ID!) {\n deleteZone(id: $id) {\n message\n result\n }\n }\n"]))),Bn=o.gql(It||(It=ne(["\n mutation AddMembersToZone($zoneId: ID!, $memberIds: [ID!]!) {\n addMembersToZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"],["\n mutation AddMembersToZone($zoneId: ID!, $memberIds: [ID!]!) {\n addMembersToZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"])),Nn),Hn=o.gql(Tt||(Tt=ne(["\n mutation RemoveMembersFromZone($zoneId: ID!, $memberIds: [ID!]!) {\n removeMembersFromZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"],["\n mutation RemoveMembersFromZone($zoneId: ID!, $memberIds: [ID!]!) {\n removeMembersFromZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"])),Nn),zn=o.gql(Dt||(Dt=ne(["\n fragment TaxCategory on TaxCategory {\n id\n createdAt\n updatedAt\n name\n isDefault\n }\n"],["\n fragment TaxCategory on TaxCategory {\n id\n createdAt\n updatedAt\n name\n isDefault\n }\n"]))),Wn=o.gql(At||(At=ne(["\n query GetTaxCategories {\n taxCategories {\n ...TaxCategory\n }\n }\n ","\n"],["\n query GetTaxCategories {\n taxCategories {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Zn=o.gql(Et||(Et=ne(["\n query GetTaxCategory($id: ID!) {\n taxCategory(id: $id) {\n ...TaxCategory\n }\n }\n ","\n"],["\n query GetTaxCategory($id: ID!) {\n taxCategory(id: $id) {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Yn=o.gql(Rt||(Rt=ne(["\n mutation CreateTaxCategory($input: CreateTaxCategoryInput!) {\n createTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"],["\n mutation CreateTaxCategory($input: CreateTaxCategoryInput!) {\n createTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Jn=o.gql(Pt||(Pt=ne(["\n mutation UpdateTaxCategory($input: UpdateTaxCategoryInput!) {\n updateTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"],["\n mutation UpdateTaxCategory($input: UpdateTaxCategoryInput!) {\n updateTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Kn=o.gql(Ot||(Ot=ne(["\n mutation DeleteTaxCategory($id: ID!) {\n deleteTaxCategory(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteTaxCategory($id: ID!) {\n deleteTaxCategory(id: $id) {\n result\n message\n }\n }\n"]))),Qn=o.gql(kt||(kt=ne(["\n fragment TaxRate on TaxRate {\n id\n createdAt\n updatedAt\n name\n enabled\n value\n category {\n id\n name\n }\n zone {\n id\n name\n }\n customerGroup {\n id\n name\n }\n }\n"],["\n fragment TaxRate on TaxRate {\n id\n createdAt\n updatedAt\n name\n enabled\n value\n category {\n id\n name\n }\n zone {\n id\n name\n }\n customerGroup {\n id\n name\n }\n }\n"]))),Xn=o.gql(wt||(wt=ne(["\n query GetTaxRateList($options: TaxRateListOptions) {\n taxRates(options: $options) {\n items {\n ...TaxRate\n }\n totalItems\n }\n }\n ","\n"],["\n query GetTaxRateList($options: TaxRateListOptions) {\n taxRates(options: $options) {\n items {\n ...TaxRate\n }\n totalItems\n }\n }\n ","\n"])),Qn),er=o.gql(xt||(xt=ne(["\n query GetTaxRate($id: ID!) {\n taxRate(id: $id) {\n ...TaxRate\n }\n }\n ","\n"],["\n query GetTaxRate($id: ID!) {\n taxRate(id: $id) {\n ...TaxRate\n }\n }\n ","\n"])),Qn),tr=o.gql(Ft||(Ft=ne(["\n mutation CreateTaxRate($input: CreateTaxRateInput!) {\n createTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"],["\n mutation CreateTaxRate($input: CreateTaxRateInput!) {\n createTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"])),Qn),nr=o.gql($t||($t=ne(["\n mutation UpdateTaxRate($input: UpdateTaxRateInput!) {\n updateTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"],["\n mutation UpdateTaxRate($input: UpdateTaxRateInput!) {\n updateTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"])),Qn),rr=o.gql(_t||(_t=ne(["\n mutation DeleteTaxRate($id: ID!) {\n deleteTaxRate(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteTaxRate($id: ID!) {\n deleteTaxRate(id: $id) {\n result\n message\n }\n }\n"]))),or=o.gql(Mt||(Mt=ne(["\n fragment Channel on Channel {\n id\n createdAt\n updatedAt\n code\n token\n pricesIncludeTax\n currencyCode\n defaultLanguageCode\n defaultShippingZone {\n id\n name\n }\n defaultTaxZone {\n id\n name\n }\n }\n"],["\n fragment Channel on Channel {\n id\n createdAt\n updatedAt\n code\n token\n pricesIncludeTax\n currencyCode\n defaultLanguageCode\n defaultShippingZone {\n id\n name\n }\n defaultTaxZone {\n id\n name\n }\n }\n"]))),ir=o.gql(Lt||(Lt=ne(["\n query GetChannels {\n channels {\n ...Channel\n }\n }\n ","\n"],["\n query GetChannels {\n channels {\n ...Channel\n }\n }\n ","\n"])),or),ar=o.gql(Nt||(Nt=ne(["\n query GetChannel($id: ID!) {\n channel(id: $id) {\n ...Channel\n }\n }\n ","\n"],["\n query GetChannel($id: ID!) {\n channel(id: $id) {\n ...Channel\n }\n }\n ","\n"])),or),sr=o.gql(Ut||(Ut=ne(["\n query GetActiveChannel {\n activeChannel {\n ...Channel\n }\n }\n ","\n"],["\n query GetActiveChannel {\n activeChannel {\n ...Channel\n }\n }\n ","\n"])),or),lr=o.gql(qt||(qt=ne(["\n mutation CreateChannel($input: CreateChannelInput!) {\n createChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreateChannel($input: CreateChannelInput!) {\n createChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"])),or,je),cr=o.gql(Gt||(Gt=ne(["\n mutation UpdateChannel($input: UpdateChannelInput!) {\n updateChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation UpdateChannel($input: UpdateChannelInput!) {\n updateChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"])),or,je),ur=o.gql(Vt||(Vt=ne(["\n mutation DeleteChannel($id: ID!) {\n deleteChannel(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteChannel($id: ID!) {\n deleteChannel(id: $id) {\n result\n message\n }\n }\n"]))),pr=o.gql(jt||(jt=ne(["\n fragment PaymentMethod on PaymentMethod {\n id\n createdAt\n updatedAt\n name\n code\n description\n enabled\n checker {\n ...ConfigurableOperation\n }\n handler {\n ...ConfigurableOperation\n }\n }\n ","\n"],["\n fragment PaymentMethod on PaymentMethod {\n id\n createdAt\n updatedAt\n name\n code\n description\n enabled\n checker {\n ...ConfigurableOperation\n }\n handler {\n ...ConfigurableOperation\n }\n }\n ","\n"])),Ge),dr=o.gql(Bt||(Bt=ne(["\n query GetPaymentMethodList($options: PaymentMethodListOptions!) {\n paymentMethods(options: $options) {\n items {\n ...PaymentMethod\n }\n totalItems\n }\n }\n ","\n"],["\n query GetPaymentMethodList($options: PaymentMethodListOptions!) {\n paymentMethods(options: $options) {\n items {\n ...PaymentMethod\n }\n totalItems\n }\n }\n ","\n"])),pr),mr=o.gql(Ht||(Ht=ne(["\n query GetPaymentMethodOperations {\n paymentMethodEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n paymentMethodHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetPaymentMethodOperations {\n paymentMethodEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n paymentMethodHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),gr=o.gql(zt||(zt=ne(["\n query GetPaymentMethod($id: ID!) {\n paymentMethod(id: $id) {\n ...PaymentMethod\n }\n }\n ","\n"],["\n query GetPaymentMethod($id: ID!) {\n paymentMethod(id: $id) {\n ...PaymentMethod\n }\n }\n ","\n"])),pr),hr=o.gql(Wt||(Wt=ne(["\n mutation CreatePaymentMethod($input: CreatePaymentMethodInput!) {\n createPaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"],["\n mutation CreatePaymentMethod($input: CreatePaymentMethodInput!) {\n createPaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"])),pr),fr=o.gql(Zt||(Zt=ne(["\n mutation UpdatePaymentMethod($input: UpdatePaymentMethodInput!) {\n updatePaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"],["\n mutation UpdatePaymentMethod($input: UpdatePaymentMethodInput!) {\n updatePaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"])),pr),yr=o.gql(Yt||(Yt=ne(["\n mutation DeletePaymentMethod($id: ID!, $force: Boolean) {\n deletePaymentMethod(id: $id, force: $force) {\n result\n message\n }\n }\n"],["\n mutation DeletePaymentMethod($id: ID!, $force: Boolean) {\n deletePaymentMethod(id: $id, force: $force) {\n result\n message\n }\n }\n"]))),vr=o.gql(Jt||(Jt=ne(["\n fragment GlobalSettings on GlobalSettings {\n id\n availableLanguages\n trackInventory\n outOfStockThreshold\n serverConfig {\n permissions {\n name\n description\n assignable\n }\n orderProcess {\n name\n }\n }\n }\n"],["\n fragment GlobalSettings on GlobalSettings {\n id\n availableLanguages\n trackInventory\n outOfStockThreshold\n serverConfig {\n permissions {\n name\n description\n assignable\n }\n orderProcess {\n name\n }\n }\n }\n"]))),Cr=o.gql(Kt||(Kt=ne(["\n query GetGlobalSettings {\n globalSettings {\n ...GlobalSettings\n }\n }\n ","\n"],["\n query GetGlobalSettings {\n globalSettings {\n ...GlobalSettings\n }\n }\n ","\n"])),vr),br=o.gql(Qt||(Qt=ne(["\n mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {\n updateGlobalSettings(input: $input) {\n ...GlobalSettings\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {\n updateGlobalSettings(input: $input) {\n ...GlobalSettings\n ...ErrorResult\n }\n }\n ","\n ","\n"])),vr,je),Sr=o.gql(Xt||(Xt=ne(["\n fragment CustomFieldConfig on CustomField {\n name\n type\n list\n description {\n languageCode\n value\n }\n label {\n languageCode\n value\n }\n readonly\n }\n"],["\n fragment CustomFieldConfig on CustomField {\n name\n type\n list\n description {\n languageCode\n value\n }\n label {\n languageCode\n value\n }\n readonly\n }\n"]))),Ir=o.gql(en||(en=ne(["\n fragment StringCustomField on StringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n options {\n label {\n languageCode\n value\n }\n value\n }\n }\n ","\n"],["\n fragment StringCustomField on StringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n options {\n label {\n languageCode\n value\n }\n value\n }\n }\n ","\n"])),Sr),Tr=o.gql(tn||(tn=ne(["\n fragment LocaleStringCustomField on LocaleStringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n }\n ","\n"],["\n fragment LocaleStringCustomField on LocaleStringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n }\n ","\n"])),Sr),Dr=o.gql(nn||(nn=ne(["\n fragment BooleanCustomField on BooleanCustomFieldConfig {\n ...CustomFieldConfig\n }\n ","\n"],["\n fragment BooleanCustomField on BooleanCustomFieldConfig {\n ...CustomFieldConfig\n }\n ","\n"])),Sr),Ar=o.gql(rn||(rn=ne(["\n fragment IntCustomField on IntCustomFieldConfig {\n ...CustomFieldConfig\n intMin: min\n intMax: max\n intStep: step\n }\n ","\n"],["\n fragment IntCustomField on IntCustomFieldConfig {\n ...CustomFieldConfig\n intMin: min\n intMax: max\n intStep: step\n }\n ","\n"])),Sr),Er=o.gql(on||(on=ne(["\n fragment FloatCustomField on FloatCustomFieldConfig {\n ...CustomFieldConfig\n floatMin: min\n floatMax: max\n floatStep: step\n }\n ","\n"],["\n fragment FloatCustomField on FloatCustomFieldConfig {\n ...CustomFieldConfig\n floatMin: min\n floatMax: max\n floatStep: step\n }\n ","\n"])),Sr),Rr=o.gql(an||(an=ne(["\n fragment DateTimeCustomField on DateTimeCustomFieldConfig {\n ...CustomFieldConfig\n datetimeMin: min\n datetimeMax: max\n datetimeStep: step\n }\n ","\n"],["\n fragment DateTimeCustomField on DateTimeCustomFieldConfig {\n ...CustomFieldConfig\n datetimeMin: min\n datetimeMax: max\n datetimeStep: step\n }\n ","\n"])),Sr),Pr=o.gql(sn||(sn=ne(["\n fragment RelationCustomField on RelationCustomFieldConfig {\n ...CustomFieldConfig\n entity\n scalarFields\n }\n ","\n"],["\n fragment RelationCustomField on RelationCustomFieldConfig {\n ...CustomFieldConfig\n entity\n scalarFields\n }\n ","\n"])),Sr),Or=o.gql(ln||(ln=ne(["\n fragment CustomFields on CustomField {\n ... on StringCustomFieldConfig {\n ...StringCustomField\n }\n ... on LocaleStringCustomFieldConfig {\n ...LocaleStringCustomField\n }\n ... on BooleanCustomFieldConfig {\n ...BooleanCustomField\n }\n ... on IntCustomFieldConfig {\n ...IntCustomField\n }\n ... on FloatCustomFieldConfig {\n ...FloatCustomField\n }\n ... on DateTimeCustomFieldConfig {\n ...DateTimeCustomField\n }\n ... on RelationCustomFieldConfig {\n ...RelationCustomField\n }\n }\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n"],["\n fragment CustomFields on CustomField {\n ... on StringCustomFieldConfig {\n ...StringCustomField\n }\n ... on LocaleStringCustomFieldConfig {\n ...LocaleStringCustomField\n }\n ... on BooleanCustomFieldConfig {\n ...BooleanCustomField\n }\n ... on IntCustomFieldConfig {\n ...IntCustomField\n }\n ... on FloatCustomFieldConfig {\n ...FloatCustomField\n }\n ... on DateTimeCustomFieldConfig {\n ...DateTimeCustomField\n }\n ... on RelationCustomFieldConfig {\n ...RelationCustomField\n }\n }\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n"])),Ir,Tr,Dr,Ar,Er,Rr,Pr),kr=o.gql(cn||(cn=ne(["\n query GetServerConfig {\n globalSettings {\n id\n serverConfig {\n orderProcess {\n name\n to\n }\n permittedAssetTypes\n permissions {\n name\n description\n assignable\n }\n customFieldConfig {\n Address {\n ...CustomFields\n }\n Administrator {\n ...CustomFields\n }\n Asset {\n ...CustomFields\n }\n Channel {\n ...CustomFields\n }\n Collection {\n ...CustomFields\n }\n Customer {\n ...CustomFields\n }\n Facet {\n ...CustomFields\n }\n FacetValue {\n ...CustomFields\n }\n Fulfillment {\n ...CustomFields\n }\n GlobalSettings {\n ...CustomFields\n }\n Order {\n ...CustomFields\n }\n OrderLine {\n ...CustomFields\n }\n Product {\n ...CustomFields\n }\n ProductOption {\n ...CustomFields\n }\n ProductOptionGroup {\n ...CustomFields\n }\n ProductVariant {\n ...CustomFields\n }\n ShippingMethod {\n ...CustomFields\n }\n User {\n ...CustomFields\n }\n }\n }\n }\n }\n ","\n"],["\n query GetServerConfig {\n globalSettings {\n id\n serverConfig {\n orderProcess {\n name\n to\n }\n permittedAssetTypes\n permissions {\n name\n description\n assignable\n }\n customFieldConfig {\n Address {\n ...CustomFields\n }\n Administrator {\n ...CustomFields\n }\n Asset {\n ...CustomFields\n }\n Channel {\n ...CustomFields\n }\n Collection {\n ...CustomFields\n }\n Customer {\n ...CustomFields\n }\n Facet {\n ...CustomFields\n }\n FacetValue {\n ...CustomFields\n }\n Fulfillment {\n ...CustomFields\n }\n GlobalSettings {\n ...CustomFields\n }\n Order {\n ...CustomFields\n }\n OrderLine {\n ...CustomFields\n }\n Product {\n ...CustomFields\n }\n ProductOption {\n ...CustomFields\n }\n ProductOptionGroup {\n ...CustomFields\n }\n ProductVariant {\n ...CustomFields\n }\n ShippingMethod {\n ...CustomFields\n }\n User {\n ...CustomFields\n }\n }\n }\n }\n }\n ","\n"])),Or),wr=o.gql(un||(un=ne(["\n fragment JobInfo on Job {\n id\n createdAt\n startedAt\n settledAt\n queueName\n state\n isSettled\n progress\n duration\n data\n result\n error\n }\n"],["\n fragment JobInfo on Job {\n id\n createdAt\n startedAt\n settledAt\n queueName\n state\n isSettled\n progress\n duration\n data\n result\n error\n }\n"]))),xr=o.gql(pn||(pn=ne(["\n query GetJobInfo($id: ID!) {\n job(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"],["\n query GetJobInfo($id: ID!) {\n job(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"])),wr),Fr=o.gql(dn||(dn=ne(["\n query GetAllJobs($options: JobListOptions) {\n jobs(options: $options) {\n items {\n ...JobInfo\n }\n totalItems\n }\n }\n ","\n"],["\n query GetAllJobs($options: JobListOptions) {\n jobs(options: $options) {\n items {\n ...JobInfo\n }\n totalItems\n }\n }\n ","\n"])),wr),$r=o.gql(mn||(mn=ne(["\n query GetJobsById($ids: [ID!]!) {\n jobsById(jobIds: $ids) {\n ...JobInfo\n }\n }\n ","\n"],["\n query GetJobsById($ids: [ID!]!) {\n jobsById(jobIds: $ids) {\n ...JobInfo\n }\n }\n ","\n"])),wr),_r=o.gql(gn||(gn=ne(["\n query GetJobQueueList {\n jobQueues {\n name\n running\n }\n }\n"],["\n query GetJobQueueList {\n jobQueues {\n name\n running\n }\n }\n"]))),Mr=o.gql(hn||(hn=ne(["\n mutation CancelJob($id: ID!) {\n cancelJob(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"],["\n mutation CancelJob($id: ID!) {\n cancelJob(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"])),wr),Lr=o.gql(fn||(fn=ne(["\n mutation Reindex {\n reindex {\n ...JobInfo\n }\n }\n ","\n"],["\n mutation Reindex {\n reindex {\n ...JobInfo\n }\n }\n ","\n"])),wr);function Nr(e){return e.init()}var Ur=function(){function e(e){this.injector=e,this._serverConfig={}}return Object.defineProperty(e.prototype,"baseDataService",{get:function(){return this.injector.get(eo)},enumerable:!1,configurable:!0}),e.prototype.init=function(){var e=this;return function(){return e.getServerConfig()}},e.prototype.getServerConfig=function(){var e=this;return this.baseDataService.query(kr).single$.toPromise().then((function(t){e._serverConfig=t.globalSettings.serverConfig}),(function(e){}))},e.prototype.getAvailableLanguages=function(){return this.baseDataService.query(Cr,{},"cache-first").mapSingle((function(e){return e.globalSettings.availableLanguages}))},e.prototype.refreshGlobalSettings=function(){return this.baseDataService.query(Cr,{},"network-only").single$},e.prototype.getCustomFieldsFor=function(e){return this.serverConfig.customFieldConfig[e]||[]},e.prototype.getOrderProcessStates=function(){return this.serverConfig.orderProcess},e.prototype.getPermittedAssetTypes=function(){return this.serverConfig.permittedAssetTypes},e.prototype.getPermissionDefinitions=function(){return this.serverConfig.permissions},Object.defineProperty(e.prototype,"serverConfig",{get:function(){return this._serverConfig},enumerable:!1,configurable:!0}),e}();function qr(e,t){var n,r,o=e.definitions.filter(Gr);try{for(var i=X(o),a=i.next();!a.done;a=i.next()){var s=a.value,l=s.typeCondition.name.value;"OrderAddress"===l&&(l="Address");var c=t[l];if(c&&c.length){s.selectionSet.selections.push({name:{kind:u.Kind.NAME,value:"customFields"},kind:u.Kind.FIELD,selectionSet:{kind:u.Kind.SELECTION_SET,selections:c.map((function(e){return Object.assign({kind:u.Kind.FIELD,name:{kind:u.Kind.NAME,value:e.name}},"relation"===e.type?{selectionSet:{kind:u.Kind.SELECTION_SET,selections:e.scalarFields.map((function(e){return{kind:u.Kind.FIELD,name:{kind:u.Kind.NAME,value:e}}}))}}:{})}))}});var p=c.filter((function(e){return"localeString"===e.type})),d=s.selectionSet.selections.filter(Vr).find((function(e){return"translations"===e.name.value}));p.length&&d&&d.selectionSet&&d.selectionSet.selections.push({name:{kind:u.Kind.NAME,value:"customFields"},kind:u.Kind.FIELD,selectionSet:{kind:u.Kind.SELECTION_SET,selections:p.map((function(e){return{kind:u.Kind.FIELD,name:{kind:u.Kind.NAME,value:e.name}}}))}})}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}function Gr(e){return e.kind===u.Kind.FRAGMENT_DEFINITION}function Vr(e){return e.kind===u.Kind.FIELD}Ur.decorators=[{type:t.Injectable}],Ur.ctorParameters=function(){return[{type:t.Injector}]};var jr=/Create([A-Za-z]+)Input/,Br=/Update([A-Za-z]+)Input/;function Hr(e){var t,n,r=u.getOperationAST(e,null);if(r&&r.variableDefinitions)try{for(var o=X(r.variableDefinitions),i=o.next();!i.done;i=o.next()){var a=zr(i.value.type).name.value;if("UpdateActiveAdministratorInput"===a)return"Administrator";var s=a.match(jr);if(s)return s[1];var l=a.match(Br);if(l)return l[1]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}function zr(e){return"NonNullType"===e.kind||"ListType"===e.kind?zr(e.type):e}function Wr(e,t){return e.input&&Zr(e.input,t),Zr(e,t)}function Zr(e,t){var n,r,o,i;try{for(var a=X(t),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.readonly)if("localeString"===l.type){if(Jr(e))try{for(var c=(o=void 0,X(e.translations)),u=c.next();!u.done;u=c.next()){var p=u.value;Yr(p)&&void 0!==p.customFields[l.name]&&delete p.customFields[l.name]}}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}else Yr(e)&&void 0!==e.customFields[l.name]&&delete e.customFields[l.name]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return e}function Yr(e){return null!=e&&e.hasOwnProperty("customFields")}function Jr(e){return null!=e&&e.hasOwnProperty("translations")}function Kr(e,t){return e.input&&Qr(e.input,t),Qr(e,t)}function Qr(e,t){var n,r;try{for(var o=X(t),i=o.next();!i.done;i=o.next()){var a=i.value;if("relation"===a.type&&Xr(e)){var s=e.customFields[a.name];e.customFields.hasOwnProperty(a.name)&&(delete e.customFields[a.name],e.customFields[l.getGraphQlInputName(a)]=a.list&&Array.isArray(s)?s.map((function(e){return null==e?void 0:e.id})):null===s?null:null==s?void 0:s.id)}}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}function Xr(e){return null!=e&&e.hasOwnProperty("customFields")}var eo=function(){function e(e,t,n,r){this.apollo=e,this.httpClient=t,this.localStorageService=n,this.serverConfigService=r}return Object.defineProperty(e.prototype,"customFields",{get:function(){return this.serverConfigService.serverConfig.customFieldConfig||{}},enumerable:!1,configurable:!0}),e.prototype.query=function(e,t,n){void 0===n&&(n="cache-and-network");var r=qr(e,this.customFields),o=this.apollo.watchQuery({query:r,variables:t,fetchPolicy:n});return new kn(o,this.apollo)},e.prototype.mutate=function(e,t,n){var o=qr(e,this.customFields),i=this.prepareCustomFields(e,t);return this.apollo.mutate({mutation:o,variables:i,update:n}).pipe(r.map((function(e){return e.data})))},e.prototype.prepareCustomFields=function(e,t){var n=Hr(e);if(n){var r=this.customFields[n];if(t&&r){var o=a.simpleDeepClone(t);return o=Kr(o=Wr(o,r),r)}}return t},e}();eo.decorators=[{type:t.Injectable}],eo.ctorParameters=function(){return[{type:o.Apollo},{type:i.HttpClient},{type:Ye},{type:Ur}]};var to,no,ro,oo,io,ao,so,lo,co,uo,po,mo,go,ho,fo,yo,vo,Co,bo,So,Io,To,Do,Ao,Eo,Ro,Po,Oo,ko,wo,xo,Fo,$o,_o,Mo,Lo,No,Uo,qo,Go,Vo,jo,Bo,Ho,zo,Wo,Zo,Yo,Jo,Ko,Qo,Xo,ei,ti,ni,ri,oi,ii,ai,si,li,ci,ui,pi,di,mi,gi,hi,fi,yi,vi,Ci,bi,Si,Ii,Ti,Di,Ai,Ei,Ri,Pi,Oi,ki,wi,xi,Fi,$i,_i,Mi,Li,Ni,Ui,qi,Gi,Vi,ji,Bi,Hi,zi,Wi,Zi,Yi,Ji,Ki,Qi,Xi,ea,ta,na,ra,oa,ia,aa,sa,la,ca,ua,pa,da,ma=function(){function e(e){this.baseDataService=e}return e.prototype.startRequest=function(){return this.baseDataService.mutate(yn)},e.prototype.completeRequest=function(){return this.baseDataService.mutate(vn)},e.prototype.getNetworkStatus=function(){return this.baseDataService.query(Dn,{},"cache-first")},e.prototype.loginSuccess=function(e,t,n){return this.baseDataService.mutate(bn,{input:{username:e,loginTime:Date.now().toString(),activeChannelId:t,channels:n}})},e.prototype.logOut=function(){return this.baseDataService.mutate(Sn)},e.prototype.userStatus=function(){return this.baseDataService.query(An,{},"cache-first")},e.prototype.uiState=function(){return this.baseDataService.query(En,{},"cache-first")},e.prototype.setUiLanguage=function(e){return this.baseDataService.mutate(In,{languageCode:e})},e.prototype.setUiTheme=function(e){return this.baseDataService.mutate(Tn,{theme:e})},e.prototype.setActiveChannel=function(e){return this.baseDataService.mutate(Pn,{channelId:e})},e.prototype.updateUserChannels=function(e){return this.baseDataService.mutate(On,{channels:e})},e}(),ga=o.gql(to||(to=ne(["\n fragment Asset on Asset {\n id\n createdAt\n updatedAt\n name\n fileSize\n mimeType\n type\n preview\n source\n width\n height\n focalPoint {\n x\n y\n }\n }\n"],["\n fragment Asset on Asset {\n id\n createdAt\n updatedAt\n name\n fileSize\n mimeType\n type\n preview\n source\n width\n height\n focalPoint {\n x\n y\n }\n }\n"]))),ha=o.gql(no||(no=ne(["\n fragment Tag on Tag {\n id\n value\n }\n"],["\n fragment Tag on Tag {\n id\n value\n }\n"]))),fa=o.gql(ro||(ro=ne(["\n fragment ProductOptionGroup on ProductOptionGroup {\n id\n code\n languageCode\n name\n translations {\n id\n languageCode\n name\n }\n }\n"],["\n fragment ProductOptionGroup on ProductOptionGroup {\n id\n code\n languageCode\n name\n translations {\n id\n languageCode\n name\n }\n }\n"]))),ya=o.gql(oo||(oo=ne(["\n fragment ProductOption on ProductOption {\n id\n code\n languageCode\n name\n groupId\n translations {\n id\n languageCode\n name\n }\n }\n"],["\n fragment ProductOption on ProductOption {\n id\n code\n languageCode\n name\n groupId\n translations {\n id\n languageCode\n name\n }\n }\n"]))),va=o.gql(io||(io=ne(["\n fragment ProductVariant on ProductVariant {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n price\n currencyCode\n priceWithTax\n stockOnHand\n stockAllocated\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n taxRateApplied {\n id\n name\n value\n }\n taxCategory {\n id\n name\n }\n sku\n options {\n ...ProductOption\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n"],["\n fragment ProductVariant on ProductVariant {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n price\n currencyCode\n priceWithTax\n stockOnHand\n stockAllocated\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n taxRateApplied {\n id\n name\n value\n }\n taxCategory {\n id\n name\n }\n sku\n options {\n ...ProductOption\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n"])),ya,ga),Ca=o.gql(ao||(ao=ne(["\n fragment ProductWithVariants on Product {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n description\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n optionGroups {\n ...ProductOptionGroup\n }\n variants {\n ...ProductVariant\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n ","\n"],["\n fragment ProductWithVariants on Product {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n description\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n optionGroups {\n ...ProductOptionGroup\n }\n variants {\n ...ProductVariant\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n ","\n"])),fa,va,ga),ba=o.gql(so||(so=ne(["\n fragment ProductOptionGroupWithOptions on ProductOptionGroup {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n name\n }\n options {\n id\n languageCode\n name\n code\n translations {\n name\n }\n }\n }\n"],["\n fragment ProductOptionGroupWithOptions on ProductOptionGroup {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n name\n }\n options {\n id\n languageCode\n name\n code\n translations {\n name\n }\n }\n }\n"]))),Sa=o.gql(lo||(lo=ne(["\n mutation UpdateProduct($input: UpdateProductInput!) {\n updateProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"],["\n mutation UpdateProduct($input: UpdateProductInput!) {\n updateProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"])),Ca),Ia=o.gql(co||(co=ne(["\n mutation CreateProduct($input: CreateProductInput!) {\n createProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"],["\n mutation CreateProduct($input: CreateProductInput!) {\n createProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"])),Ca),Ta=o.gql(uo||(uo=ne(["\n mutation DeleteProduct($id: ID!) {\n deleteProduct(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteProduct($id: ID!) {\n deleteProduct(id: $id) {\n result\n message\n }\n }\n"]))),Da=o.gql(po||(po=ne(["\n mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {\n createProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"],["\n mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {\n createProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"])),va),Aa=o.gql(mo||(mo=ne(["\n mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {\n updateProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"],["\n mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {\n updateProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"])),va),Ea=o.gql(go||(go=ne(["\n mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {\n createProductOptionGroup(input: $input) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"],["\n mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {\n createProductOptionGroup(input: $input) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"])),ba),Ra=o.gql(ho||(ho=ne(["\n query GetProductOptionGroup($id: ID!) {\n productOptionGroup(id: $id) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"],["\n query GetProductOptionGroup($id: ID!) {\n productOptionGroup(id: $id) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"])),ba),Pa=o.gql(fo||(fo=ne(["\n mutation AddOptionToGroup($input: CreateProductOptionInput!) {\n createProductOption(input: $input) {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n"],["\n mutation AddOptionToGroup($input: CreateProductOptionInput!) {\n createProductOption(input: $input) {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n"]))),Oa=o.gql(yo||(yo=ne(["\n mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {\n addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n }\n"],["\n mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {\n addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n }\n"]))),ka=o.gql(vo||(vo=ne(["\n mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!) {\n removeOptionGroupFromProduct(productId: $productId, optionGroupId: $optionGroupId) {\n ... on Product {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n ...ErrorResult\n }\n }\n ","\n"],["\n mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!) {\n removeOptionGroupFromProduct(productId: $productId, optionGroupId: $optionGroupId) {\n ... on Product {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n ...ErrorResult\n }\n }\n ","\n"])),je),wa=o.gql(Co||(Co=ne(["\n query GetProductWithVariants($id: ID!) {\n product(id: $id) {\n ...ProductWithVariants\n }\n }\n ","\n"],["\n query GetProductWithVariants($id: ID!) {\n product(id: $id) {\n ...ProductWithVariants\n }\n }\n ","\n"])),Ca),xa=o.gql(bo||(bo=ne(["\n query GetProductSimple($id: ID!) {\n product(id: $id) {\n id\n name\n featuredAsset {\n ...Asset\n }\n }\n }\n ","\n"],["\n query GetProductSimple($id: ID!) {\n product(id: $id) {\n id\n name\n featuredAsset {\n ...Asset\n }\n }\n }\n ","\n"])),ga),Fa=o.gql(So||(So=ne(["\n query GetProductList($options: ProductListOptions) {\n products(options: $options) {\n items {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n featuredAsset {\n id\n createdAt\n updatedAt\n preview\n }\n }\n totalItems\n }\n }\n"],["\n query GetProductList($options: ProductListOptions) {\n products(options: $options) {\n items {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n featuredAsset {\n id\n createdAt\n updatedAt\n preview\n }\n }\n totalItems\n }\n }\n"]))),$a=o.gql(Io||(Io=ne(["\n query GetProductOptionGroups($filterTerm: String) {\n productOptionGroups(filterTerm: $filterTerm) {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n options {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n }\n }\n }\n"],["\n query GetProductOptionGroups($filterTerm: String) {\n productOptionGroups(filterTerm: $filterTerm) {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n options {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n }\n }\n }\n"]))),_a=o.gql(To||(To=ne(["\n query GetAssetList($options: AssetListOptions) {\n assets(options: $options) {\n items {\n ...Asset\n tags {\n ...Tag\n }\n }\n totalItems\n }\n }\n ","\n ","\n"],["\n query GetAssetList($options: AssetListOptions) {\n assets(options: $options) {\n items {\n ...Asset\n tags {\n ...Tag\n }\n }\n totalItems\n }\n }\n ","\n ","\n"])),ga,ha),Ma=o.gql(Do||(Do=ne(["\n query GetAsset($id: ID!) {\n asset(id: $id) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"],["\n query GetAsset($id: ID!) {\n asset(id: $id) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"])),ga,ha),La=o.gql(Ao||(Ao=ne(["\n mutation CreateAssets($input: [CreateAssetInput!]!) {\n createAssets(input: $input) {\n ...Asset\n ... on Asset {\n tags {\n ...Tag\n }\n }\n ... on ErrorResult {\n message\n }\n }\n }\n ","\n ","\n"],["\n mutation CreateAssets($input: [CreateAssetInput!]!) {\n createAssets(input: $input) {\n ...Asset\n ... on Asset {\n tags {\n ...Tag\n }\n }\n ... on ErrorResult {\n message\n }\n }\n }\n ","\n ","\n"])),ga,ha),Na=o.gql(Eo||(Eo=ne(["\n mutation UpdateAsset($input: UpdateAssetInput!) {\n updateAsset(input: $input) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"],["\n mutation UpdateAsset($input: UpdateAssetInput!) {\n updateAsset(input: $input) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"])),ga,ha),Ua=o.gql(Ro||(Ro=ne(["\n mutation DeleteAssets($input: DeleteAssetsInput!) {\n deleteAssets(input: $input) {\n result\n message\n }\n }\n"],["\n mutation DeleteAssets($input: DeleteAssetsInput!) {\n deleteAssets(input: $input) {\n result\n message\n }\n }\n"]))),qa=o.gql(Po||(Po=ne(["\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n totalItems\n items {\n enabled\n productId\n productName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n productVariantId\n productVariantName\n productVariantAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n sku\n channelIds\n }\n facetValues {\n count\n facetValue {\n id\n createdAt\n updatedAt\n name\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n }\n }\n }\n"],["\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n totalItems\n items {\n enabled\n productId\n productName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n productVariantId\n productVariantName\n productVariantAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n sku\n channelIds\n }\n facetValues {\n count\n facetValue {\n id\n createdAt\n updatedAt\n name\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n }\n }\n }\n"]))),Ga=o.gql(Oo||(Oo=ne(["\n query ProductSelectorSearch($term: String!, $take: Int!) {\n search(input: { groupByProduct: false, term: $term, take: $take }) {\n items {\n productVariantId\n productVariantName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n price {\n ... on SinglePrice {\n value\n }\n }\n priceWithTax {\n ... on SinglePrice {\n value\n }\n }\n sku\n }\n }\n }\n"],["\n query ProductSelectorSearch($term: String!, $take: Int!) {\n search(input: { groupByProduct: false, term: $term, take: $take }) {\n items {\n productVariantId\n productVariantName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n price {\n ... on SinglePrice {\n value\n }\n }\n priceWithTax {\n ... on SinglePrice {\n value\n }\n }\n sku\n }\n }\n }\n"]))),Va=o.gql(ko||(ko=ne(["\n mutation UpdateProductOption($input: UpdateProductOptionInput!) {\n updateProductOption(input: $input) {\n ...ProductOption\n }\n }\n ","\n"],["\n mutation UpdateProductOption($input: UpdateProductOptionInput!) {\n updateProductOption(input: $input) {\n ...ProductOption\n }\n }\n ","\n"])),ya),ja=o.gql(wo||(wo=ne(["\n mutation DeleteProductVariant($id: ID!) {\n deleteProductVariant(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteProductVariant($id: ID!) {\n deleteProductVariant(id: $id) {\n result\n message\n }\n }\n"]))),Ba=o.gql(xo||(xo=ne(["\n query GetProductVariantOptions($id: ID!) {\n product(id: $id) {\n id\n createdAt\n updatedAt\n name\n optionGroups {\n id\n name\n code\n options {\n ...ProductOption\n }\n }\n variants {\n id\n createdAt\n updatedAt\n enabled\n name\n sku\n price\n stockOnHand\n enabled\n options {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n }\n }\n ","\n"],["\n query GetProductVariantOptions($id: ID!) {\n product(id: $id) {\n id\n createdAt\n updatedAt\n name\n optionGroups {\n id\n name\n code\n options {\n ...ProductOption\n }\n }\n variants {\n id\n createdAt\n updatedAt\n enabled\n name\n sku\n price\n stockOnHand\n enabled\n options {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n }\n }\n ","\n"])),ya),Ha=o.gql(Fo||(Fo=ne(["\n mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {\n assignProductsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {\n assignProductsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),za=o.gql($o||($o=ne(["\n mutation AssignVariantsToChannel($input: AssignProductVariantsToChannelInput!) {\n assignProductVariantsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation AssignVariantsToChannel($input: AssignProductVariantsToChannelInput!) {\n assignProductVariantsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),Wa=o.gql(_o||(_o=ne(["\n mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {\n removeProductsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {\n removeProductsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),Za=o.gql(Mo||(Mo=ne(["\n mutation RemoveVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {\n removeProductVariantsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation RemoveVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {\n removeProductVariantsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),Ya=o.gql(Lo||(Lo=ne(["\n query GetProductVariant($id: ID!) {\n productVariant(id: $id) {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n }\n"],["\n query GetProductVariant($id: ID!) {\n productVariant(id: $id) {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n }\n"]))),Ja=o.gql(No||(No=ne(["\n query GetProductVariantList($options: ProductVariantListOptions!) {\n productVariants(options: $options) {\n items {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n totalItems\n }\n }\n"],["\n query GetProductVariantList($options: ProductVariantListOptions!) {\n productVariants(options: $options) {\n items {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n totalItems\n }\n }\n"]))),Ka=o.gql(Uo||(Uo=ne(["\n query GetTagList($options: TagListOptions) {\n tags(options: $options) {\n items {\n ...Tag\n }\n totalItems\n }\n }\n ","\n"],["\n query GetTagList($options: TagListOptions) {\n tags(options: $options) {\n items {\n ...Tag\n }\n totalItems\n }\n }\n ","\n"])),ha),Qa=o.gql(qo||(qo=ne(["\n query GetTag($id: ID!) {\n tag(id: $id) {\n ...Tag\n }\n }\n ","\n"],["\n query GetTag($id: ID!) {\n tag(id: $id) {\n ...Tag\n }\n }\n ","\n"])),ha),Xa=o.gql(Go||(Go=ne(["\n mutation CreateTag($input: CreateTagInput!) {\n createTag(input: $input) {\n ...Tag\n }\n }\n ","\n"],["\n mutation CreateTag($input: CreateTagInput!) {\n createTag(input: $input) {\n ...Tag\n }\n }\n ","\n"])),ha),es=o.gql(Vo||(Vo=ne(["\n mutation UpdateTag($input: UpdateTagInput!) {\n updateTag(input: $input) {\n ...Tag\n }\n }\n ","\n"],["\n mutation UpdateTag($input: UpdateTagInput!) {\n updateTag(input: $input) {\n ...Tag\n }\n }\n ","\n"])),ha),ts=o.gql(jo||(jo=ne(["\n mutation DeleteTag($id: ID!) {\n deleteTag(id: $id) {\n message\n result\n }\n }\n"],["\n mutation DeleteTag($id: ID!) {\n deleteTag(id: $id) {\n message\n result\n }\n }\n"]))),ns=o.gql(Bo||(Bo=ne(["\n query GetCollectionFilters {\n collectionFilters {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetCollectionFilters {\n collectionFilters {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),rs=o.gql(Ho||(Ho=ne(["\n fragment Collection on Collection {\n id\n createdAt\n updatedAt\n name\n slug\n description\n isPrivate\n languageCode\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n filters {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n parent {\n id\n name\n }\n children {\n id\n name\n }\n }\n ","\n ","\n"],["\n fragment Collection on Collection {\n id\n createdAt\n updatedAt\n name\n slug\n description\n isPrivate\n languageCode\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n filters {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n parent {\n id\n name\n }\n children {\n id\n name\n }\n }\n ","\n ","\n"])),ga,Ge),os=o.gql(zo||(zo=ne(["\n query GetCollectionList($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id\n name\n slug\n description\n isPrivate\n featuredAsset {\n ...Asset\n }\n parent {\n id\n }\n }\n totalItems\n }\n }\n ","\n"],["\n query GetCollectionList($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id\n name\n slug\n description\n isPrivate\n featuredAsset {\n ...Asset\n }\n parent {\n id\n }\n }\n totalItems\n }\n }\n ","\n"])),ga),is=o.gql(Wo||(Wo=ne(["\n query GetCollection($id: ID!) {\n collection(id: $id) {\n ...Collection\n }\n }\n ","\n"],["\n query GetCollection($id: ID!) {\n collection(id: $id) {\n ...Collection\n }\n }\n ","\n"])),rs),as=o.gql(Zo||(Zo=ne(["\n mutation CreateCollection($input: CreateCollectionInput!) {\n createCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"],["\n mutation CreateCollection($input: CreateCollectionInput!) {\n createCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"])),rs),ss=o.gql(Yo||(Yo=ne(["\n mutation UpdateCollection($input: UpdateCollectionInput!) {\n updateCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"],["\n mutation UpdateCollection($input: UpdateCollectionInput!) {\n updateCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"])),rs),ls=o.gql(Jo||(Jo=ne(["\n mutation MoveCollection($input: MoveCollectionInput!) {\n moveCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"],["\n mutation MoveCollection($input: MoveCollectionInput!) {\n moveCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"])),rs),cs=o.gql(Ko||(Ko=ne(["\n mutation DeleteCollection($id: ID!) {\n deleteCollection(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCollection($id: ID!) {\n deleteCollection(id: $id) {\n result\n message\n }\n }\n"]))),us=o.gql(Qo||(Qo=ne(["\n query GetCollectionContents($id: ID!, $options: ProductVariantListOptions) {\n collection(id: $id) {\n id\n name\n productVariants(options: $options) {\n items {\n id\n productId\n name\n }\n totalItems\n }\n }\n }\n"],["\n query GetCollectionContents($id: ID!, $options: ProductVariantListOptions) {\n collection(id: $id) {\n id\n name\n productVariants(options: $options) {\n items {\n id\n productId\n name\n }\n totalItems\n }\n }\n }\n"]))),ps=function(){function e(e){this.baseDataService=e}return e.prototype.getCollectionFilters=function(){return this.baseDataService.query(ns)},e.prototype.getCollections=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(os,{options:{take:e,skip:t}})},e.prototype.getCollection=function(e){return this.baseDataService.query(is,{id:e})},e.prototype.createCollection=function(e){return this.baseDataService.mutate(as,{input:p.pick(e,["translations","parentId","assetIds","featuredAssetId","filters","customFields"])})},e.prototype.updateCollection=function(e){return this.baseDataService.mutate(ss,{input:p.pick(e,["id","isPrivate","translations","assetIds","featuredAssetId","filters","customFields"])})},e.prototype.moveCollection=function(e){var t=this;return c.from(e).pipe(r.concatMap((function(e){return t.baseDataService.mutate(ls,{input:e})})),r.bufferCount(e.length))},e.prototype.deleteCollection=function(e){return this.baseDataService.mutate(cs,{id:e})},e.prototype.getCollectionContents=function(e,t,n,r){void 0===t&&(t=10),void 0===n&&(n=0);var o=r?{name:{contains:r}}:void 0;return this.baseDataService.query(us,{id:e,options:{skip:n,take:t,filter:o}})},e}(),ds=o.gql(Xo||(Xo=ne(["\n fragment Address on Address {\n id\n createdAt\n updatedAt\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country {\n id\n code\n name\n }\n phoneNumber\n defaultShippingAddress\n defaultBillingAddress\n }\n"],["\n fragment Address on Address {\n id\n createdAt\n updatedAt\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country {\n id\n code\n name\n }\n phoneNumber\n defaultShippingAddress\n defaultBillingAddress\n }\n"]))),ms=o.gql(ei||(ei=ne(["\n fragment Customer on Customer {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n phoneNumber\n emailAddress\n user {\n id\n identifier\n verified\n lastLogin\n }\n addresses {\n ...Address\n }\n }\n ","\n"],["\n fragment Customer on Customer {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n phoneNumber\n emailAddress\n user {\n id\n identifier\n verified\n lastLogin\n }\n addresses {\n ...Address\n }\n }\n ","\n"])),ds),gs=o.gql(ti||(ti=ne(["\n query GetCustomerList($options: CustomerListOptions) {\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n emailAddress\n user {\n id\n verified\n }\n }\n totalItems\n }\n }\n"],["\n query GetCustomerList($options: CustomerListOptions) {\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n emailAddress\n user {\n id\n verified\n }\n }\n totalItems\n }\n }\n"]))),hs=o.gql(ni||(ni=ne(["\n query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {\n customer(id: $id) {\n ...Customer\n groups {\n id\n name\n }\n orders(options: $orderListOptions) {\n items {\n id\n code\n state\n total\n currencyCode\n updatedAt\n }\n totalItems\n }\n }\n }\n ","\n"],["\n query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {\n customer(id: $id) {\n ...Customer\n groups {\n id\n name\n }\n orders(options: $orderListOptions) {\n items {\n id\n code\n state\n total\n currencyCode\n updatedAt\n }\n totalItems\n }\n }\n }\n ","\n"])),ms),fs=o.gql(ri||(ri=ne(["\n mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {\n createCustomer(input: $input, password: $password) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {\n createCustomer(input: $input, password: $password) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"])),ms,je),ys=o.gql(oi||(oi=ne(["\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"])),ms,je),vs=o.gql(ii||(ii=ne(["\n mutation DeleteCustomer($id: ID!) {\n deleteCustomer(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCustomer($id: ID!) {\n deleteCustomer(id: $id) {\n result\n message\n }\n }\n"]))),Cs=o.gql(ai||(ai=ne(["\n mutation CreateCustomerAddress($customerId: ID!, $input: CreateAddressInput!) {\n createCustomerAddress(customerId: $customerId, input: $input) {\n ...Address\n }\n }\n ","\n"],["\n mutation CreateCustomerAddress($customerId: ID!, $input: CreateAddressInput!) {\n createCustomerAddress(customerId: $customerId, input: $input) {\n ...Address\n }\n }\n ","\n"])),ds),bs=o.gql(si||(si=ne(["\n mutation UpdateCustomerAddress($input: UpdateAddressInput!) {\n updateCustomerAddress(input: $input) {\n ...Address\n }\n }\n ","\n"],["\n mutation UpdateCustomerAddress($input: UpdateAddressInput!) {\n updateCustomerAddress(input: $input) {\n ...Address\n }\n }\n ","\n"])),ds),Ss=o.gql(li||(li=ne(["\n mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {\n createCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {\n createCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Is=o.gql(ci||(ci=ne(["\n mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {\n updateCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {\n updateCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Ts=o.gql(ui||(ui=ne(["\n mutation DeleteCustomerGroup($id: ID!) {\n deleteCustomerGroup(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCustomerGroup($id: ID!) {\n deleteCustomerGroup(id: $id) {\n result\n message\n }\n }\n"]))),Ds=o.gql(pi||(pi=ne(["\n query GetCustomerGroups($options: CustomerGroupListOptions) {\n customerGroups(options: $options) {\n items {\n id\n createdAt\n updatedAt\n name\n }\n totalItems\n }\n }\n"],["\n query GetCustomerGroups($options: CustomerGroupListOptions) {\n customerGroups(options: $options) {\n items {\n id\n createdAt\n updatedAt\n name\n }\n totalItems\n }\n }\n"]))),As=o.gql(di||(di=ne(["\n query GetCustomerGroupWithCustomers($id: ID!, $options: CustomerListOptions) {\n customerGroup(id: $id) {\n id\n createdAt\n updatedAt\n name\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n emailAddress\n firstName\n lastName\n }\n totalItems\n }\n }\n }\n"],["\n query GetCustomerGroupWithCustomers($id: ID!, $options: CustomerListOptions) {\n customerGroup(id: $id) {\n id\n createdAt\n updatedAt\n name\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n emailAddress\n firstName\n lastName\n }\n totalItems\n }\n }\n }\n"]))),Es=o.gql(mi||(mi=ne(["\n mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {\n addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {\n addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Rs=o.gql(gi||(gi=ne(["\n mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {\n removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {\n removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Ps=o.gql(hi||(hi=ne(["\n query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {\n customer(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"],["\n query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {\n customer(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"]))),Os=o.gql(fi||(fi=ne(["\n mutation AddNoteToCustomer($input: AddNoteToCustomerInput!) {\n addNoteToCustomer(input: $input) {\n id\n }\n }\n"],["\n mutation AddNoteToCustomer($input: AddNoteToCustomerInput!) {\n addNoteToCustomer(input: $input) {\n id\n }\n }\n"]))),ks=o.gql(yi||(yi=ne(["\n mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {\n updateCustomerNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"],["\n mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {\n updateCustomerNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"]))),ws=o.gql(vi||(vi=ne(["\n mutation DeleteCustomerNote($id: ID!) {\n deleteCustomerNote(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCustomerNote($id: ID!) {\n deleteCustomerNote(id: $id) {\n result\n message\n }\n }\n"]))),xs=function(){function e(e){this.baseDataService=e}return e.prototype.getCustomerList=function(e,t,n){void 0===e&&(e=10),void 0===t&&(t=0);var r=n?{filter:{emailAddress:{contains:n}}}:{};return this.baseDataService.query(gs,{options:Object.assign({take:e,skip:t},r)})},e.prototype.getCustomer=function(e,t){return this.baseDataService.query(hs,{id:e,orderListOptions:t})},e.prototype.createCustomer=function(e,t){return this.baseDataService.mutate(fs,{input:e,password:t})},e.prototype.updateCustomer=function(e){return this.baseDataService.mutate(ys,{input:e})},e.prototype.deleteCustomer=function(e){return this.baseDataService.mutate(vs,{id:e})},e.prototype.createCustomerAddress=function(e,t){return this.baseDataService.mutate(Cs,{customerId:e,input:t})},e.prototype.updateCustomerAddress=function(e){return this.baseDataService.mutate(bs,{input:e})},e.prototype.createCustomerGroup=function(e){return this.baseDataService.mutate(Ss,{input:e})},e.prototype.updateCustomerGroup=function(e){return this.baseDataService.mutate(Is,{input:e})},e.prototype.deleteCustomerGroup=function(e){return this.baseDataService.mutate(Ts,{id:e})},e.prototype.getCustomerGroupList=function(e){return this.baseDataService.query(Ds,{options:e})},e.prototype.getCustomerGroupWithCustomers=function(e,t){return this.baseDataService.query(As,{id:e,options:t})},e.prototype.addCustomersToGroup=function(e,t){return this.baseDataService.mutate(Es,{groupId:e,customerIds:t})},e.prototype.removeCustomersFromGroup=function(e,t){return this.baseDataService.mutate(Rs,{groupId:e,customerIds:t})},e.prototype.getCustomerHistory=function(e,t){return this.baseDataService.query(Ps,{id:e,options:t})},e.prototype.addNoteToCustomer=function(e,t){return this.baseDataService.mutate(Os,{input:{note:t,isPublic:!1,id:e}})},e.prototype.updateCustomerNote=function(e){return this.baseDataService.mutate(ks,{input:e})},e.prototype.deleteCustomerNote=function(e){return this.baseDataService.mutate(ws,{id:e})},e}(),Fs=o.gql(Ci||(Ci=ne(["\n fragment FacetValue on FacetValue {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n languageCode\n name\n }\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n fragment FacetValue on FacetValue {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n languageCode\n name\n }\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),$s=o.gql(bi||(bi=ne(["\n fragment FacetWithValues on Facet {\n id\n createdAt\n updatedAt\n languageCode\n isPrivate\n code\n name\n translations {\n id\n languageCode\n name\n }\n values {\n ...FacetValue\n }\n }\n ","\n"],["\n fragment FacetWithValues on Facet {\n id\n createdAt\n updatedAt\n languageCode\n isPrivate\n code\n name\n translations {\n id\n languageCode\n name\n }\n values {\n ...FacetValue\n }\n }\n ","\n"])),Fs),_s=o.gql(Si||(Si=ne(["\n mutation CreateFacet($input: CreateFacetInput!) {\n createFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"],["\n mutation CreateFacet($input: CreateFacetInput!) {\n createFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"])),$s),Ms=o.gql(Ii||(Ii=ne(["\n mutation UpdateFacet($input: UpdateFacetInput!) {\n updateFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"],["\n mutation UpdateFacet($input: UpdateFacetInput!) {\n updateFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"])),$s),Ls=o.gql(Ti||(Ti=ne(["\n mutation DeleteFacet($id: ID!, $force: Boolean) {\n deleteFacet(id: $id, force: $force) {\n result\n message\n }\n }\n"],["\n mutation DeleteFacet($id: ID!, $force: Boolean) {\n deleteFacet(id: $id, force: $force) {\n result\n message\n }\n }\n"]))),Ns=o.gql(Di||(Di=ne(["\n mutation CreateFacetValues($input: [CreateFacetValueInput!]!) {\n createFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"],["\n mutation CreateFacetValues($input: [CreateFacetValueInput!]!) {\n createFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"])),Fs),Us=o.gql(Ai||(Ai=ne(["\n mutation UpdateFacetValues($input: [UpdateFacetValueInput!]!) {\n updateFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"],["\n mutation UpdateFacetValues($input: [UpdateFacetValueInput!]!) {\n updateFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"])),Fs),qs=o.gql(Ei||(Ei=ne(["\n mutation DeleteFacetValues($ids: [ID!]!, $force: Boolean) {\n deleteFacetValues(ids: $ids, force: $force) {\n result\n message\n }\n }\n"],["\n mutation DeleteFacetValues($ids: [ID!]!, $force: Boolean) {\n deleteFacetValues(ids: $ids, force: $force) {\n result\n message\n }\n }\n"]))),Gs=o.gql(Ri||(Ri=ne(["\n query GetFacetList($options: FacetListOptions) {\n facets(options: $options) {\n items {\n ...FacetWithValues\n }\n totalItems\n }\n }\n ","\n"],["\n query GetFacetList($options: FacetListOptions) {\n facets(options: $options) {\n items {\n ...FacetWithValues\n }\n totalItems\n }\n }\n ","\n"])),$s),Vs=o.gql(Pi||(Pi=ne(["\n query GetFacetWithValues($id: ID!) {\n facet(id: $id) {\n ...FacetWithValues\n }\n }\n ","\n"],["\n query GetFacetWithValues($id: ID!) {\n facet(id: $id) {\n ...FacetWithValues\n }\n }\n ","\n"])),$s),js=function(){function e(e){this.baseDataService=e}return e.prototype.getFacets=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(Gs,{options:{take:e,skip:t}})},e.prototype.getAllFacets=function(){return this.baseDataService.query(Gs,{})},e.prototype.getFacet=function(e){return this.baseDataService.query(Vs,{id:e})},e.prototype.createFacet=function(e){var t={input:p.pick(e,["code","isPrivate","translations","values","customFields"])};return this.baseDataService.mutate(_s,t)},e.prototype.updateFacet=function(e){var t={input:p.pick(e,["id","code","isPrivate","translations","customFields"])};return this.baseDataService.mutate(Ms,t)},e.prototype.deleteFacet=function(e,t){return this.baseDataService.mutate(Ls,{id:e,force:t})},e.prototype.createFacetValues=function(e){var t={input:e.map(p.pick(["facetId","code","translations","customFields"]))};return this.baseDataService.mutate(Ns,t)},e.prototype.updateFacetValues=function(e){var t={input:e.map(p.pick(["id","code","translations","customFields"]))};return this.baseDataService.mutate(Us,t)},e.prototype.deleteFacetValues=function(e,t){return this.baseDataService.mutate(qs,{ids:e,force:t})},e}(),Bs=o.gql(Oi||(Oi=ne(["\n fragment Discount on Discount {\n adjustmentSource\n amount\n amountWithTax\n description\n type\n }\n"],["\n fragment Discount on Discount {\n adjustmentSource\n amount\n amountWithTax\n description\n type\n }\n"]))),Hs=o.gql(ki||(ki=ne(["\n fragment Refund on Refund {\n id\n state\n items\n shipping\n adjustment\n transactionId\n paymentId\n }\n"],["\n fragment Refund on Refund {\n id\n state\n items\n shipping\n adjustment\n transactionId\n paymentId\n }\n"]))),zs=o.gql(wi||(wi=ne(["\n fragment OrderAddress on OrderAddress {\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country\n countryCode\n phoneNumber\n }\n"],["\n fragment OrderAddress on OrderAddress {\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country\n countryCode\n phoneNumber\n }\n"]))),Ws=o.gql(xi||(xi=ne(["\n fragment Order on Order {\n id\n createdAt\n updatedAt\n orderPlacedAt\n code\n state\n nextStates\n total\n currencyCode\n customer {\n id\n firstName\n lastName\n }\n shippingLines {\n shippingMethod {\n name\n }\n }\n }\n"],["\n fragment Order on Order {\n id\n createdAt\n updatedAt\n orderPlacedAt\n code\n state\n nextStates\n total\n currencyCode\n customer {\n id\n firstName\n lastName\n }\n shippingLines {\n shippingMethod {\n name\n }\n }\n }\n"]))),Zs=o.gql(Fi||(Fi=ne(["\n fragment Fulfillment on Fulfillment {\n id\n state\n nextStates\n createdAt\n updatedAt\n method\n orderItems {\n id\n }\n trackingCode\n }\n"],["\n fragment Fulfillment on Fulfillment {\n id\n state\n nextStates\n createdAt\n updatedAt\n method\n orderItems {\n id\n }\n trackingCode\n }\n"]))),Ys=o.gql($i||($i=ne(["\n fragment OrderLine on OrderLine {\n id\n featuredAsset {\n preview\n }\n productVariant {\n id\n name\n sku\n trackInventory\n stockOnHand\n }\n discounts {\n ...Discount\n }\n unitPrice\n unitPriceWithTax\n proratedUnitPrice\n proratedUnitPriceWithTax\n quantity\n items {\n id\n unitPrice\n unitPriceWithTax\n taxRate\n refundId\n cancelled\n fulfillment {\n ...Fulfillment\n }\n }\n linePrice\n lineTax\n linePriceWithTax\n discountedLinePrice\n discountedLinePriceWithTax\n }\n"],["\n fragment OrderLine on OrderLine {\n id\n featuredAsset {\n preview\n }\n productVariant {\n id\n name\n sku\n trackInventory\n stockOnHand\n }\n discounts {\n ...Discount\n }\n unitPrice\n unitPriceWithTax\n proratedUnitPrice\n proratedUnitPriceWithTax\n quantity\n items {\n id\n unitPrice\n unitPriceWithTax\n taxRate\n refundId\n cancelled\n fulfillment {\n ...Fulfillment\n }\n }\n linePrice\n lineTax\n linePriceWithTax\n discountedLinePrice\n discountedLinePriceWithTax\n }\n"]))),Js=o.gql(_i||(_i=ne(["\n fragment OrderDetail on Order {\n id\n createdAt\n updatedAt\n code\n state\n nextStates\n active\n customer {\n id\n firstName\n lastName\n }\n lines {\n ...OrderLine\n }\n surcharges {\n id\n sku\n description\n price\n priceWithTax\n taxRate\n }\n discounts {\n ...Discount\n }\n promotions {\n id\n couponCode\n }\n subTotal\n subTotalWithTax\n total\n totalWithTax\n currencyCode\n shipping\n shippingWithTax\n shippingLines {\n shippingMethod {\n id\n code\n name\n fulfillmentHandlerCode\n description\n }\n }\n taxSummary {\n description\n taxBase\n taxRate\n taxTotal\n }\n shippingAddress {\n ...OrderAddress\n }\n billingAddress {\n ...OrderAddress\n }\n payments {\n id\n createdAt\n transactionId\n amount\n method\n state\n nextStates\n errorMessage\n metadata\n refunds {\n id\n createdAt\n state\n items\n adjustment\n total\n paymentId\n reason\n transactionId\n method\n metadata\n orderItems {\n id\n }\n }\n }\n fulfillments {\n ...Fulfillment\n }\n modifications {\n id\n createdAt\n isSettled\n priceChange\n note\n payment {\n id\n amount\n }\n orderItems {\n id\n }\n refund {\n id\n paymentId\n total\n }\n surcharges {\n id\n }\n }\n }\n ","\n ","\n ","\n ","\n"],["\n fragment OrderDetail on Order {\n id\n createdAt\n updatedAt\n code\n state\n nextStates\n active\n customer {\n id\n firstName\n lastName\n }\n lines {\n ...OrderLine\n }\n surcharges {\n id\n sku\n description\n price\n priceWithTax\n taxRate\n }\n discounts {\n ...Discount\n }\n promotions {\n id\n couponCode\n }\n subTotal\n subTotalWithTax\n total\n totalWithTax\n currencyCode\n shipping\n shippingWithTax\n shippingLines {\n shippingMethod {\n id\n code\n name\n fulfillmentHandlerCode\n description\n }\n }\n taxSummary {\n description\n taxBase\n taxRate\n taxTotal\n }\n shippingAddress {\n ...OrderAddress\n }\n billingAddress {\n ...OrderAddress\n }\n payments {\n id\n createdAt\n transactionId\n amount\n method\n state\n nextStates\n errorMessage\n metadata\n refunds {\n id\n createdAt\n state\n items\n adjustment\n total\n paymentId\n reason\n transactionId\n method\n metadata\n orderItems {\n id\n }\n }\n }\n fulfillments {\n ...Fulfillment\n }\n modifications {\n id\n createdAt\n isSettled\n priceChange\n note\n payment {\n id\n amount\n }\n orderItems {\n id\n }\n refund {\n id\n paymentId\n total\n }\n surcharges {\n id\n }\n }\n }\n ","\n ","\n ","\n ","\n"])),Bs,zs,Zs,Ys),Ks=o.gql(Mi||(Mi=ne(["\n query GetOrderList($options: OrderListOptions) {\n orders(options: $options) {\n items {\n ...Order\n }\n totalItems\n }\n }\n ","\n"],["\n query GetOrderList($options: OrderListOptions) {\n orders(options: $options) {\n items {\n ...Order\n }\n totalItems\n }\n }\n ","\n"])),Ws),Qs=o.gql(Li||(Li=ne(["\n query GetOrder($id: ID!) {\n order(id: $id) {\n ...OrderDetail\n }\n }\n ","\n"],["\n query GetOrder($id: ID!) {\n order(id: $id) {\n ...OrderDetail\n }\n }\n ","\n"])),Js),Xs=o.gql(Ni||(Ni=ne(["\n mutation SettlePayment($id: ID!) {\n settlePayment(id: $id) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on SettlePaymentError {\n paymentErrorMessage\n }\n ... on PaymentStateTransitionError {\n transitionError\n }\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"],["\n mutation SettlePayment($id: ID!) {\n settlePayment(id: $id) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on SettlePaymentError {\n paymentErrorMessage\n }\n ... on PaymentStateTransitionError {\n transitionError\n }\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"])),je),el=o.gql(Ui||(Ui=ne(["\n mutation TransitionPaymentToState($id: ID!, $state: String!) {\n transitionPaymentToState(id: $id, state: $state) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on PaymentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"],["\n mutation TransitionPaymentToState($id: ID!, $state: String!) {\n transitionPaymentToState(id: $id, state: $state) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on PaymentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"])),je),tl=o.gql(qi||(qi=ne(["\n mutation CreateFulfillment($input: FulfillOrderInput!) {\n addFulfillmentToOrder(input: $input) {\n ...Fulfillment\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreateFulfillment($input: FulfillOrderInput!) {\n addFulfillmentToOrder(input: $input) {\n ...Fulfillment\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Zs,je),nl=o.gql(Gi||(Gi=ne(["\n mutation CancelOrder($input: CancelOrderInput!) {\n cancelOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CancelOrder($input: CancelOrderInput!) {\n cancelOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Js,je),rl=o.gql(Vi||(Vi=ne(["\n mutation RefundOrder($input: RefundOrderInput!) {\n refundOrder(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation RefundOrder($input: RefundOrderInput!) {\n refundOrder(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Hs,je),ol=o.gql(ji||(ji=ne(["\n mutation SettleRefund($input: SettleRefundInput!) {\n settleRefund(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation SettleRefund($input: SettleRefundInput!) {\n settleRefund(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Hs,je),il=o.gql(Bi||(Bi=ne(["\n query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {\n order(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"],["\n query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {\n order(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"]))),al=o.gql(Hi||(Hi=ne(["\n mutation AddNoteToOrder($input: AddNoteToOrderInput!) {\n addNoteToOrder(input: $input) {\n id\n }\n }\n"],["\n mutation AddNoteToOrder($input: AddNoteToOrderInput!) {\n addNoteToOrder(input: $input) {\n id\n }\n }\n"]))),sl=o.gql(zi||(zi=ne(["\n mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {\n updateOrderNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"],["\n mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {\n updateOrderNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"]))),ll=o.gql(Wi||(Wi=ne(["\n mutation DeleteOrderNote($id: ID!) {\n deleteOrderNote(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteOrderNote($id: ID!) {\n deleteOrderNote(id: $id) {\n result\n message\n }\n }\n"]))),cl=o.gql(Zi||(Zi=ne(["\n mutation TransitionOrderToState($id: ID!, $state: String!) {\n transitionOrderToState(id: $id, state: $state) {\n ...Order\n ...ErrorResult\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"],["\n mutation TransitionOrderToState($id: ID!, $state: String!) {\n transitionOrderToState(id: $id, state: $state) {\n ...Order\n ...ErrorResult\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"])),Ws,je),ul=o.gql(Yi||(Yi=ne(["\n mutation UpdateOrderCustomFields($input: UpdateOrderInput!) {\n setOrderCustomFields(input: $input) {\n ...Order\n }\n }\n ","\n"],["\n mutation UpdateOrderCustomFields($input: UpdateOrderInput!) {\n setOrderCustomFields(input: $input) {\n ...Order\n }\n }\n ","\n"])),Ws),pl=o.gql(Ji||(Ji=ne(["\n mutation TransitionFulfillmentToState($id: ID!, $state: String!) {\n transitionFulfillmentToState(id: $id, state: $state) {\n ...Fulfillment\n ...ErrorResult\n ... on FulfillmentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"],["\n mutation TransitionFulfillmentToState($id: ID!, $state: String!) {\n transitionFulfillmentToState(id: $id, state: $state) {\n ...Fulfillment\n ...ErrorResult\n ... on FulfillmentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"])),Zs,je),dl=o.gql(Ki||(Ki=ne(["\n query GetOrderSummary($start: DateTime!, $end: DateTime!) {\n orders(options: { filter: { orderPlacedAt: { between: { start: $start, end: $end } } } }) {\n totalItems\n items {\n id\n total\n currencyCode\n }\n }\n }\n"],["\n query GetOrderSummary($start: DateTime!, $end: DateTime!) {\n orders(options: { filter: { orderPlacedAt: { between: { start: $start, end: $end } } } }) {\n totalItems\n items {\n id\n total\n currencyCode\n }\n }\n }\n"]))),ml=o.gql(Qi||(Qi=ne(["\n mutation ModifyOrder($input: ModifyOrderInput!) {\n modifyOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation ModifyOrder($input: ModifyOrderInput!) {\n modifyOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Js,je),gl=o.gql(Xi||(Xi=ne(["\n mutation AddManualPayment($input: ManualPaymentInput!) {\n addManualPaymentToOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation AddManualPayment($input: ManualPaymentInput!) {\n addManualPaymentToOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Js,je),hl=function(){function e(e){this.baseDataService=e}return e.prototype.getOrders=function(e){return void 0===e&&(e={take:10}),this.baseDataService.query(Ks,{options:e})},e.prototype.getOrder=function(e){return this.baseDataService.query(Qs,{id:e})},e.prototype.getOrderHistory=function(e,t){return this.baseDataService.query(il,{id:e,options:t})},e.prototype.settlePayment=function(e){return this.baseDataService.mutate(Xs,{id:e})},e.prototype.transitionPaymentToState=function(e,t){return this.baseDataService.mutate(el,{id:e,state:t})},e.prototype.createFulfillment=function(e){return this.baseDataService.mutate(tl,{input:e})},e.prototype.transitionFulfillmentToState=function(e,t){return this.baseDataService.mutate(pl,{id:e,state:t})},e.prototype.cancelOrder=function(e){return this.baseDataService.mutate(nl,{input:e})},e.prototype.refundOrder=function(e){return this.baseDataService.mutate(rl,{input:e})},e.prototype.settleRefund=function(e,t){return this.baseDataService.mutate(ol,{input:e})},e.prototype.addNoteToOrder=function(e){return this.baseDataService.mutate(al,{input:e})},e.prototype.updateOrderNote=function(e){return this.baseDataService.mutate(sl,{input:e})},e.prototype.deleteOrderNote=function(e){return this.baseDataService.mutate(ll,{id:e})},e.prototype.transitionToState=function(e,t){return this.baseDataService.mutate(cl,{id:e,state:t})},e.prototype.updateOrderCustomFields=function(e){return this.baseDataService.mutate(ul,{input:e})},e.prototype.getOrderSummary=function(e,t){return this.baseDataService.query(dl,{start:e.toISOString(),end:t.toISOString()})},e.prototype.modifyOrder=function(e){return this.baseDataService.mutate(ml,{input:e})},e.prototype.addManualPaymentToOrder=function(e){return this.baseDataService.mutate(gl,{input:e})},e}();e.JobState=void 0,(ea=e.JobState||(e.JobState={})).PENDING="PENDING",ea.RUNNING="RUNNING",ea.COMPLETED="COMPLETED",ea.RETRYING="RETRYING",ea.FAILED="FAILED",ea.CANCELLED="CANCELLED",e.StockMovementType=void 0,(ta=e.StockMovementType||(e.StockMovementType={})).ADJUSTMENT="ADJUSTMENT",ta.ALLOCATION="ALLOCATION",ta.RELEASE="RELEASE",ta.SALE="SALE",ta.CANCELLATION="CANCELLATION",ta.RETURN="RETURN",e.AssetType=void 0,(na=e.AssetType||(e.AssetType={})).IMAGE="IMAGE",na.VIDEO="VIDEO",na.BINARY="BINARY",e.GlobalFlag=void 0,(ra=e.GlobalFlag||(e.GlobalFlag={})).TRUE="TRUE",ra.FALSE="FALSE",ra.INHERIT="INHERIT",e.AdjustmentType=void 0,(oa=e.AdjustmentType||(e.AdjustmentType={})).PROMOTION="PROMOTION",oa.DISTRIBUTED_ORDER_PROMOTION="DISTRIBUTED_ORDER_PROMOTION",e.DeletionResult=void 0,(ia=e.DeletionResult||(e.DeletionResult={})).DELETED="DELETED",ia.NOT_DELETED="NOT_DELETED",e.Permission=void 0,(aa=e.Permission||(e.Permission={})).Authenticated="Authenticated",aa.CreateAdministrator="CreateAdministrator",aa.CreateAsset="CreateAsset",aa.CreateCatalog="CreateCatalog",aa.CreateChannel="CreateChannel",aa.CreateCollection="CreateCollection",aa.CreateCountry="CreateCountry",aa.CreateCustomer="CreateCustomer",aa.CreateCustomerGroup="CreateCustomerGroup",aa.CreateFacet="CreateFacet",aa.CreateOrder="CreateOrder",aa.CreatePaymentMethod="CreatePaymentMethod",aa.CreateProduct="CreateProduct",aa.CreatePromotion="CreatePromotion",aa.CreateSettings="CreateSettings",aa.CreateShippingMethod="CreateShippingMethod",aa.CreateSystem="CreateSystem",aa.CreateTag="CreateTag",aa.CreateTaxCategory="CreateTaxCategory",aa.CreateTaxRate="CreateTaxRate",aa.CreateZone="CreateZone",aa.DeleteAdministrator="DeleteAdministrator",aa.DeleteAsset="DeleteAsset",aa.DeleteCatalog="DeleteCatalog",aa.DeleteChannel="DeleteChannel",aa.DeleteCollection="DeleteCollection",aa.DeleteCountry="DeleteCountry",aa.DeleteCustomer="DeleteCustomer",aa.DeleteCustomerGroup="DeleteCustomerGroup",aa.DeleteFacet="DeleteFacet",aa.DeleteOrder="DeleteOrder",aa.DeletePaymentMethod="DeletePaymentMethod",aa.DeleteProduct="DeleteProduct",aa.DeletePromotion="DeletePromotion",aa.DeleteSettings="DeleteSettings",aa.DeleteShippingMethod="DeleteShippingMethod",aa.DeleteSystem="DeleteSystem",aa.DeleteTag="DeleteTag",aa.DeleteTaxCategory="DeleteTaxCategory",aa.DeleteTaxRate="DeleteTaxRate",aa.DeleteZone="DeleteZone",aa.Owner="Owner",aa.Placeholder="Placeholder",aa.Public="Public",aa.ReadAdministrator="ReadAdministrator",aa.ReadAsset="ReadAsset",aa.ReadCatalog="ReadCatalog",aa.ReadChannel="ReadChannel",aa.ReadCollection="ReadCollection",aa.ReadCountry="ReadCountry",aa.ReadCustomer="ReadCustomer",aa.ReadCustomerGroup="ReadCustomerGroup",aa.ReadFacet="ReadFacet",aa.ReadOrder="ReadOrder",aa.ReadPaymentMethod="ReadPaymentMethod",aa.ReadProduct="ReadProduct",aa.ReadPromotion="ReadPromotion",aa.ReadSettings="ReadSettings",aa.ReadShippingMethod="ReadShippingMethod",aa.ReadSystem="ReadSystem",aa.ReadTag="ReadTag",aa.ReadTaxCategory="ReadTaxCategory",aa.ReadTaxRate="ReadTaxRate",aa.ReadZone="ReadZone",aa.SuperAdmin="SuperAdmin",aa.UpdateAdministrator="UpdateAdministrator",aa.UpdateAsset="UpdateAsset",aa.UpdateCatalog="UpdateCatalog",aa.UpdateChannel="UpdateChannel",aa.UpdateCollection="UpdateCollection",aa.UpdateCountry="UpdateCountry",aa.UpdateCustomer="UpdateCustomer",aa.UpdateCustomerGroup="UpdateCustomerGroup",aa.UpdateFacet="UpdateFacet",aa.UpdateGlobalSettings="UpdateGlobalSettings",aa.UpdateOrder="UpdateOrder",aa.UpdatePaymentMethod="UpdatePaymentMethod",aa.UpdateProduct="UpdateProduct",aa.UpdatePromotion="UpdatePromotion",aa.UpdateSettings="UpdateSettings",aa.UpdateShippingMethod="UpdateShippingMethod",aa.UpdateSystem="UpdateSystem",aa.UpdateTag="UpdateTag",aa.UpdateTaxCategory="UpdateTaxCategory",aa.UpdateTaxRate="UpdateTaxRate",aa.UpdateZone="UpdateZone",e.SortOrder=void 0,(sa=e.SortOrder||(e.SortOrder={})).ASC="ASC",sa.DESC="DESC",e.ErrorCode=void 0,(la=e.ErrorCode||(e.ErrorCode={})).UNKNOWN_ERROR="UNKNOWN_ERROR",la.MIME_TYPE_ERROR="MIME_TYPE_ERROR",la.LANGUAGE_NOT_AVAILABLE_ERROR="LANGUAGE_NOT_AVAILABLE_ERROR",la.CHANNEL_DEFAULT_LANGUAGE_ERROR="CHANNEL_DEFAULT_LANGUAGE_ERROR",la.SETTLE_PAYMENT_ERROR="SETTLE_PAYMENT_ERROR",la.EMPTY_ORDER_LINE_SELECTION_ERROR="EMPTY_ORDER_LINE_SELECTION_ERROR",la.ITEMS_ALREADY_FULFILLED_ERROR="ITEMS_ALREADY_FULFILLED_ERROR",la.INVALID_FULFILLMENT_HANDLER_ERROR="INVALID_FULFILLMENT_HANDLER_ERROR",la.CREATE_FULFILLMENT_ERROR="CREATE_FULFILLMENT_ERROR",la.INSUFFICIENT_STOCK_ON_HAND_ERROR="INSUFFICIENT_STOCK_ON_HAND_ERROR",la.MULTIPLE_ORDER_ERROR="MULTIPLE_ORDER_ERROR",la.CANCEL_ACTIVE_ORDER_ERROR="CANCEL_ACTIVE_ORDER_ERROR",la.PAYMENT_ORDER_MISMATCH_ERROR="PAYMENT_ORDER_MISMATCH_ERROR",la.REFUND_ORDER_STATE_ERROR="REFUND_ORDER_STATE_ERROR",la.NOTHING_TO_REFUND_ERROR="NOTHING_TO_REFUND_ERROR",la.ALREADY_REFUNDED_ERROR="ALREADY_REFUNDED_ERROR",la.QUANTITY_TOO_GREAT_ERROR="QUANTITY_TOO_GREAT_ERROR",la.REFUND_STATE_TRANSITION_ERROR="REFUND_STATE_TRANSITION_ERROR",la.PAYMENT_STATE_TRANSITION_ERROR="PAYMENT_STATE_TRANSITION_ERROR",la.FULFILLMENT_STATE_TRANSITION_ERROR="FULFILLMENT_STATE_TRANSITION_ERROR",la.ORDER_MODIFICATION_STATE_ERROR="ORDER_MODIFICATION_STATE_ERROR",la.NO_CHANGES_SPECIFIED_ERROR="NO_CHANGES_SPECIFIED_ERROR",la.PAYMENT_METHOD_MISSING_ERROR="PAYMENT_METHOD_MISSING_ERROR",la.REFUND_PAYMENT_ID_MISSING_ERROR="REFUND_PAYMENT_ID_MISSING_ERROR",la.MANUAL_PAYMENT_STATE_ERROR="MANUAL_PAYMENT_STATE_ERROR",la.PRODUCT_OPTION_IN_USE_ERROR="PRODUCT_OPTION_IN_USE_ERROR",la.MISSING_CONDITIONS_ERROR="MISSING_CONDITIONS_ERROR",la.NATIVE_AUTH_STRATEGY_ERROR="NATIVE_AUTH_STRATEGY_ERROR",la.INVALID_CREDENTIALS_ERROR="INVALID_CREDENTIALS_ERROR",la.ORDER_STATE_TRANSITION_ERROR="ORDER_STATE_TRANSITION_ERROR",la.EMAIL_ADDRESS_CONFLICT_ERROR="EMAIL_ADDRESS_CONFLICT_ERROR",la.ORDER_LIMIT_ERROR="ORDER_LIMIT_ERROR",la.NEGATIVE_QUANTITY_ERROR="NEGATIVE_QUANTITY_ERROR",la.INSUFFICIENT_STOCK_ERROR="INSUFFICIENT_STOCK_ERROR",e.LogicalOperator=void 0,(ca=e.LogicalOperator||(e.LogicalOperator={})).AND="AND",ca.OR="OR",e.CurrencyCode=void 0,(ua=e.CurrencyCode||(e.CurrencyCode={})).AED="AED",ua.AFN="AFN",ua.ALL="ALL",ua.AMD="AMD",ua.ANG="ANG",ua.AOA="AOA",ua.ARS="ARS",ua.AUD="AUD",ua.AWG="AWG",ua.AZN="AZN",ua.BAM="BAM",ua.BBD="BBD",ua.BDT="BDT",ua.BGN="BGN",ua.BHD="BHD",ua.BIF="BIF",ua.BMD="BMD",ua.BND="BND",ua.BOB="BOB",ua.BRL="BRL",ua.BSD="BSD",ua.BTN="BTN",ua.BWP="BWP",ua.BYN="BYN",ua.BZD="BZD",ua.CAD="CAD",ua.CDF="CDF",ua.CHF="CHF",ua.CLP="CLP",ua.CNY="CNY",ua.COP="COP",ua.CRC="CRC",ua.CUC="CUC",ua.CUP="CUP",ua.CVE="CVE",ua.CZK="CZK",ua.DJF="DJF",ua.DKK="DKK",ua.DOP="DOP",ua.DZD="DZD",ua.EGP="EGP",ua.ERN="ERN",ua.ETB="ETB",ua.EUR="EUR",ua.FJD="FJD",ua.FKP="FKP",ua.GBP="GBP",ua.GEL="GEL",ua.GHS="GHS",ua.GIP="GIP",ua.GMD="GMD",ua.GNF="GNF",ua.GTQ="GTQ",ua.GYD="GYD",ua.HKD="HKD",ua.HNL="HNL",ua.HRK="HRK",ua.HTG="HTG",ua.HUF="HUF",ua.IDR="IDR",ua.ILS="ILS",ua.INR="INR",ua.IQD="IQD",ua.IRR="IRR",ua.ISK="ISK",ua.JMD="JMD",ua.JOD="JOD",ua.JPY="JPY",ua.KES="KES",ua.KGS="KGS",ua.KHR="KHR",ua.KMF="KMF",ua.KPW="KPW",ua.KRW="KRW",ua.KWD="KWD",ua.KYD="KYD",ua.KZT="KZT",ua.LAK="LAK",ua.LBP="LBP",ua.LKR="LKR",ua.LRD="LRD",ua.LSL="LSL",ua.LYD="LYD",ua.MAD="MAD",ua.MDL="MDL",ua.MGA="MGA",ua.MKD="MKD",ua.MMK="MMK",ua.MNT="MNT",ua.MOP="MOP",ua.MRU="MRU",ua.MUR="MUR",ua.MVR="MVR",ua.MWK="MWK",ua.MXN="MXN",ua.MYR="MYR",ua.MZN="MZN",ua.NAD="NAD",ua.NGN="NGN",ua.NIO="NIO",ua.NOK="NOK",ua.NPR="NPR",ua.NZD="NZD",ua.OMR="OMR",ua.PAB="PAB",ua.PEN="PEN",ua.PGK="PGK",ua.PHP="PHP",ua.PKR="PKR",ua.PLN="PLN",ua.PYG="PYG",ua.QAR="QAR",ua.RON="RON",ua.RSD="RSD",ua.RUB="RUB",ua.RWF="RWF",ua.SAR="SAR",ua.SBD="SBD",ua.SCR="SCR",ua.SDG="SDG",ua.SEK="SEK",ua.SGD="SGD",ua.SHP="SHP",ua.SLL="SLL",ua.SOS="SOS",ua.SRD="SRD",ua.SSP="SSP",ua.STN="STN",ua.SVC="SVC",ua.SYP="SYP",ua.SZL="SZL",ua.THB="THB",ua.TJS="TJS",ua.TMT="TMT",ua.TND="TND",ua.TOP="TOP",ua.TRY="TRY",ua.TTD="TTD",ua.TWD="TWD",ua.TZS="TZS",ua.UAH="UAH",ua.UGX="UGX",ua.USD="USD",ua.UYU="UYU",ua.UZS="UZS",ua.VES="VES",ua.VND="VND",ua.VUV="VUV",ua.WST="WST",ua.XAF="XAF",ua.XCD="XCD",ua.XOF="XOF",ua.XPF="XPF",ua.YER="YER",ua.ZAR="ZAR",ua.ZMW="ZMW",ua.ZWL="ZWL",e.HistoryEntryType=void 0,(pa=e.HistoryEntryType||(e.HistoryEntryType={})).CUSTOMER_REGISTERED="CUSTOMER_REGISTERED",pa.CUSTOMER_VERIFIED="CUSTOMER_VERIFIED",pa.CUSTOMER_DETAIL_UPDATED="CUSTOMER_DETAIL_UPDATED",pa.CUSTOMER_ADDED_TO_GROUP="CUSTOMER_ADDED_TO_GROUP",pa.CUSTOMER_REMOVED_FROM_GROUP="CUSTOMER_REMOVED_FROM_GROUP",pa.CUSTOMER_ADDRESS_CREATED="CUSTOMER_ADDRESS_CREATED",pa.CUSTOMER_ADDRESS_UPDATED="CUSTOMER_ADDRESS_UPDATED",pa.CUSTOMER_ADDRESS_DELETED="CUSTOMER_ADDRESS_DELETED",pa.CUSTOMER_PASSWORD_UPDATED="CUSTOMER_PASSWORD_UPDATED",pa.CUSTOMER_PASSWORD_RESET_REQUESTED="CUSTOMER_PASSWORD_RESET_REQUESTED",pa.CUSTOMER_PASSWORD_RESET_VERIFIED="CUSTOMER_PASSWORD_RESET_VERIFIED",pa.CUSTOMER_EMAIL_UPDATE_REQUESTED="CUSTOMER_EMAIL_UPDATE_REQUESTED",pa.CUSTOMER_EMAIL_UPDATE_VERIFIED="CUSTOMER_EMAIL_UPDATE_VERIFIED",pa.CUSTOMER_NOTE="CUSTOMER_NOTE",pa.ORDER_STATE_TRANSITION="ORDER_STATE_TRANSITION",pa.ORDER_PAYMENT_TRANSITION="ORDER_PAYMENT_TRANSITION",pa.ORDER_FULFILLMENT="ORDER_FULFILLMENT",pa.ORDER_CANCELLATION="ORDER_CANCELLATION",pa.ORDER_REFUND_TRANSITION="ORDER_REFUND_TRANSITION",pa.ORDER_FULFILLMENT_TRANSITION="ORDER_FULFILLMENT_TRANSITION",pa.ORDER_NOTE="ORDER_NOTE",pa.ORDER_COUPON_APPLIED="ORDER_COUPON_APPLIED",pa.ORDER_COUPON_REMOVED="ORDER_COUPON_REMOVED",pa.ORDER_MODIFIED="ORDER_MODIFIED",e.LanguageCode=void 0,(da=e.LanguageCode||(e.LanguageCode={})).af="af",da.ak="ak",da.am="am",da.ar="ar",da.as="as",da.az="az",da.be="be",da.bg="bg",da.bm="bm",da.bn="bn",da.bo="bo",da.br="br",da.bs="bs",da.ca="ca",da.ce="ce",da.co="co",da.cs="cs",da.cu="cu",da.cy="cy",da.da="da",da.de="de",da.de_AT="de_AT",da.de_CH="de_CH",da.dz="dz",da.ee="ee",da.el="el",da.en="en",da.en_AU="en_AU",da.en_CA="en_CA",da.en_GB="en_GB",da.en_US="en_US",da.eo="eo",da.es="es",da.es_ES="es_ES",da.es_MX="es_MX",da.et="et",da.eu="eu",da.fa="fa",da.fa_AF="fa_AF",da.ff="ff",da.fi="fi",da.fo="fo",da.fr="fr",da.fr_CA="fr_CA",da.fr_CH="fr_CH",da.fy="fy",da.ga="ga",da.gd="gd",da.gl="gl",da.gu="gu",da.gv="gv",da.ha="ha",da.he="he",da.hi="hi",da.hr="hr",da.ht="ht",da.hu="hu",da.hy="hy",da.ia="ia",da.id="id",da.ig="ig",da.ii="ii",da.is="is",da.it="it",da.ja="ja",da.jv="jv",da.ka="ka",da.ki="ki",da.kk="kk",da.kl="kl",da.km="km",da.kn="kn",da.ko="ko",da.ks="ks",da.ku="ku",da.kw="kw",da.ky="ky",da.la="la",da.lb="lb",da.lg="lg",da.ln="ln",da.lo="lo",da.lt="lt",da.lu="lu",da.lv="lv",da.mg="mg",da.mi="mi",da.mk="mk",da.ml="ml",da.mn="mn",da.mr="mr",da.ms="ms",da.mt="mt",da.my="my",da.nb="nb",da.nd="nd",da.ne="ne",da.nl="nl",da.nl_BE="nl_BE",da.nn="nn",da.ny="ny",da.om="om",da.or="or",da.os="os",da.pa="pa",da.pl="pl",da.ps="ps",da.pt="pt",da.pt_BR="pt_BR",da.pt_PT="pt_PT",da.qu="qu",da.rm="rm",da.rn="rn",da.ro="ro",da.ro_MD="ro_MD",da.ru="ru",da.rw="rw",da.sa="sa",da.sd="sd",da.se="se",da.sg="sg",da.si="si",da.sk="sk",da.sl="sl",da.sm="sm",da.sn="sn",da.so="so",da.sq="sq",da.sr="sr",da.st="st",da.su="su",da.sv="sv",da.sw="sw",da.sw_CD="sw_CD",da.ta="ta",da.te="te",da.tg="tg",da.th="th",da.ti="ti",da.tk="tk",da.to="to",da.tr="tr",da.tt="tt",da.ug="ug",da.uk="uk",da.ur="ur",da.uz="uz",da.vi="vi",da.vo="vo",da.wo="wo",da.xh="xh",da.yi="yi",da.yo="yo",da.zh="zh",da.zh_Hans="zh_Hans",da.zh_Hant="zh_Hant",da.zu="zu";var fl,yl,vl,Cl,bl,Sl,Il,Tl,Dl,Al,El,Rl,Pl,Ol,kl,wl,xl=function(){function t(e){this.baseDataService=e}return t.prototype.searchProducts=function(e,t,n){return void 0===t&&(t=10),void 0===n&&(n=0),this.baseDataService.query(qa,{input:{term:e,take:t,skip:n,groupByProduct:!0}})},t.prototype.productSelectorSearch=function(e,t){return this.baseDataService.query(Ga,{take:t,term:e})},t.prototype.reindex=function(){return this.baseDataService.mutate(Lr)},t.prototype.getProducts=function(e){return this.baseDataService.query(Fa,{options:e})},t.prototype.getProduct=function(e){return this.baseDataService.query(wa,{id:e})},t.prototype.getProductSimple=function(e){return this.baseDataService.query(xa,{id:e})},t.prototype.getProductVariants=function(e){return this.baseDataService.query(Ja,{options:e})},t.prototype.getProductVariant=function(e){return this.baseDataService.query(Ya,{id:e})},t.prototype.getProductVariantsOptions=function(e){return this.baseDataService.query(Ba,{id:e})},t.prototype.getProductOptionGroup=function(e){return this.baseDataService.query(Ra,{id:e})},t.prototype.createProduct=function(e){var t={input:p.pick(e,["enabled","translations","customFields","assetIds","featuredAssetId","facetValueIds"])};return this.baseDataService.mutate(Ia,t)},t.prototype.updateProduct=function(e){var t={input:p.pick(e,["id","enabled","translations","customFields","assetIds","featuredAssetId","facetValueIds"])};return this.baseDataService.mutate(Sa,t)},t.prototype.deleteProduct=function(e){return this.baseDataService.mutate(Ta,{id:e})},t.prototype.createProductVariants=function(e){return this.baseDataService.mutate(Da,{input:e})},t.prototype.updateProductVariants=function(e){var t={input:e.map(p.pick(["id","enabled","translations","sku","price","taxCategoryId","facetValueIds","featuredAssetId","assetIds","trackInventory","outOfStockThreshold","useGlobalOutOfStockThreshold","stockOnHand","customFields"]))};return this.baseDataService.mutate(Aa,t)},t.prototype.deleteProductVariant=function(e){return this.baseDataService.mutate(ja,{id:e})},t.prototype.createProductOptionGroups=function(e){var t={input:e};return this.baseDataService.mutate(Ea,t)},t.prototype.addOptionGroupToProduct=function(e){return this.baseDataService.mutate(Oa,e)},t.prototype.addOptionToGroup=function(e){return this.baseDataService.mutate(Pa,{input:e})},t.prototype.removeOptionGroupFromProduct=function(e){return this.baseDataService.mutate(ka,e)},t.prototype.updateProductOption=function(e){return this.baseDataService.mutate(Va,{input:p.pick(e,["id","code","translations","customFields"])})},t.prototype.getProductOptionGroups=function(e){return this.baseDataService.query($a,{filterTerm:e})},t.prototype.getAssetList=function(t,n){return void 0===t&&(t=10),void 0===n&&(n=0),this.baseDataService.query(_a,{options:{skip:n,take:t,sort:{createdAt:e.SortOrder.DESC}}})},t.prototype.getAsset=function(e){return this.baseDataService.query(Ma,{id:e})},t.prototype.createAssets=function(e){return this.baseDataService.mutate(La,{input:e.map((function(e){return{file:e}}))})},t.prototype.updateAsset=function(e){return this.baseDataService.mutate(Na,{input:e})},t.prototype.deleteAssets=function(e,t){return this.baseDataService.mutate(Ua,{input:{assetIds:e,force:t}})},t.prototype.assignProductsToChannel=function(e){return this.baseDataService.mutate(Ha,{input:e})},t.prototype.removeProductsFromChannel=function(e){return this.baseDataService.mutate(Wa,{input:e})},t.prototype.assignVariantsToChannel=function(e){return this.baseDataService.mutate(za,{input:e})},t.prototype.removeVariantsFromChannel=function(e){return this.baseDataService.mutate(Za,{input:e})},t.prototype.getTag=function(e){return this.baseDataService.query(Qa,{id:e})},t.prototype.getTagList=function(e){return this.baseDataService.query(Ka,{options:e})},t.prototype.createTag=function(e){return this.baseDataService.mutate(Xa,{input:e})},t.prototype.updateTag=function(e){return this.baseDataService.mutate(es,{input:e})},t.prototype.deleteTag=function(e){return this.baseDataService.mutate(ts,{id:e})},t}(),Fl=o.gql(fl||(fl=ne(["\n fragment Promotion on Promotion {\n id\n createdAt\n updatedAt\n name\n enabled\n couponCode\n perCustomerUsageLimit\n startsAt\n endsAt\n conditions {\n ...ConfigurableOperation\n }\n actions {\n ...ConfigurableOperation\n }\n }\n ","\n"],["\n fragment Promotion on Promotion {\n id\n createdAt\n updatedAt\n name\n enabled\n couponCode\n perCustomerUsageLimit\n startsAt\n endsAt\n conditions {\n ...ConfigurableOperation\n }\n actions {\n ...ConfigurableOperation\n }\n }\n ","\n"])),Ge),$l=o.gql(yl||(yl=ne(["\n query GetPromotionList($options: PromotionListOptions) {\n promotions(options: $options) {\n items {\n ...Promotion\n }\n totalItems\n }\n }\n ","\n"],["\n query GetPromotionList($options: PromotionListOptions) {\n promotions(options: $options) {\n items {\n ...Promotion\n }\n totalItems\n }\n }\n ","\n"])),Fl),_l=o.gql(vl||(vl=ne(["\n query GetPromotion($id: ID!) {\n promotion(id: $id) {\n ...Promotion\n }\n }\n ","\n"],["\n query GetPromotion($id: ID!) {\n promotion(id: $id) {\n ...Promotion\n }\n }\n ","\n"])),Fl),Ml=o.gql(Cl||(Cl=ne(["\n query GetAdjustmentOperations {\n promotionConditions {\n ...ConfigurableOperationDef\n }\n promotionActions {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetAdjustmentOperations {\n promotionConditions {\n ...ConfigurableOperationDef\n }\n promotionActions {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),Ll=o.gql(bl||(bl=ne(["\n mutation CreatePromotion($input: CreatePromotionInput!) {\n createPromotion(input: $input) {\n ...Promotion\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreatePromotion($input: CreatePromotionInput!) {\n createPromotion(input: $input) {\n ...Promotion\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Fl,je),Nl=o.gql(Sl||(Sl=ne(["\n mutation UpdatePromotion($input: UpdatePromotionInput!) {\n updatePromotion(input: $input) {\n ...Promotion\n }\n }\n ","\n"],["\n mutation UpdatePromotion($input: UpdatePromotionInput!) {\n updatePromotion(input: $input) {\n ...Promotion\n }\n }\n ","\n"])),Fl),Ul=o.gql(Il||(Il=ne(["\n mutation DeletePromotion($id: ID!) {\n deletePromotion(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeletePromotion($id: ID!) {\n deletePromotion(id: $id) {\n result\n message\n }\n }\n"]))),ql=function(){function e(e){this.baseDataService=e}return e.prototype.getPromotions=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query($l,{options:{take:e,skip:t}})},e.prototype.getPromotion=function(e){return this.baseDataService.query(_l,{id:e})},e.prototype.getPromotionActionsAndConditions=function(){return this.baseDataService.query(Ml)},e.prototype.createPromotion=function(e){return this.baseDataService.mutate(Ll,{input:e})},e.prototype.updatePromotion=function(e){return this.baseDataService.mutate(Nl,{input:e})},e.prototype.deletePromotion=function(e){return this.baseDataService.mutate(Ul,{id:e})},e}(),Gl=function(){function t(e){this.baseDataService=e}return t.prototype.getCountries=function(e,t,n){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(xn,{options:{take:e,skip:t,filter:{name:n?{contains:n}:null}}})},t.prototype.getAvailableCountries=function(){return this.baseDataService.query(Fn)},t.prototype.getCountry=function(e){return this.baseDataService.query($n,{id:e})},t.prototype.createCountry=function(e){return this.baseDataService.mutate(_n,{input:p.pick(e,["code","enabled","translations"])})},t.prototype.updateCountry=function(e){return this.baseDataService.mutate(Mn,{input:p.pick(e,["id","code","enabled","translations"])})},t.prototype.deleteCountry=function(e){return this.baseDataService.mutate(Ln,{id:e})},t.prototype.getZones=function(){return this.baseDataService.query(Un)},t.prototype.getZone=function(e){return this.baseDataService.query(Un,{id:e})},t.prototype.createZone=function(e){return this.baseDataService.mutate(Gn,{input:e})},t.prototype.updateZone=function(e){return this.baseDataService.mutate(Vn,{input:e})},t.prototype.deleteZone=function(e){return this.baseDataService.mutate(jn,{id:e})},t.prototype.addMembersToZone=function(e,t){return this.baseDataService.mutate(Bn,{zoneId:e,memberIds:t})},t.prototype.removeMembersFromZone=function(e,t){return this.baseDataService.mutate(Hn,{zoneId:e,memberIds:t})},t.prototype.getTaxCategories=function(){return this.baseDataService.query(Wn)},t.prototype.getTaxCategory=function(e){return this.baseDataService.query(Zn,{id:e})},t.prototype.createTaxCategory=function(e){return this.baseDataService.mutate(Yn,{input:e})},t.prototype.updateTaxCategory=function(e){return this.baseDataService.mutate(Jn,{input:e})},t.prototype.deleteTaxCategory=function(e){return this.baseDataService.mutate(Kn,{id:e})},t.prototype.getTaxRates=function(e,t,n){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(Xn,{options:{take:e,skip:t}},n)},t.prototype.getTaxRate=function(e){return this.baseDataService.query(er,{id:e})},t.prototype.createTaxRate=function(e){return this.baseDataService.mutate(tr,{input:e})},t.prototype.updateTaxRate=function(e){return this.baseDataService.mutate(nr,{input:e})},t.prototype.deleteTaxRate=function(e){return this.baseDataService.mutate(rr,{id:e})},t.prototype.getChannels=function(){return this.baseDataService.query(ir)},t.prototype.getChannel=function(e){return this.baseDataService.query(ar,{id:e})},t.prototype.getActiveChannel=function(e){return this.baseDataService.query(sr,{},e)},t.prototype.createChannel=function(e){return this.baseDataService.mutate(lr,{input:e})},t.prototype.updateChannel=function(e){return this.baseDataService.mutate(cr,{input:e})},t.prototype.deleteChannel=function(e){return this.baseDataService.mutate(ur,{id:e})},t.prototype.getPaymentMethods=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(dr,{options:{skip:t,take:e}})},t.prototype.getPaymentMethod=function(e){return this.baseDataService.query(gr,{id:e})},t.prototype.createPaymentMethod=function(e){return this.baseDataService.mutate(hr,{input:e})},t.prototype.updatePaymentMethod=function(e){return this.baseDataService.mutate(fr,{input:e})},t.prototype.deletePaymentMethod=function(e,t){return this.baseDataService.mutate(yr,{id:e,force:t})},t.prototype.getPaymentMethodOperations=function(){return this.baseDataService.query(mr)},t.prototype.getGlobalSettings=function(e){return this.baseDataService.query(Cr,void 0,e)},t.prototype.updateGlobalSettings=function(e){return this.baseDataService.mutate(br,{input:e})},t.prototype.getJob=function(e){return this.baseDataService.query(xr,{id:e})},t.prototype.pollJobs=function(e){return this.baseDataService.query($r,{ids:e})},t.prototype.getAllJobs=function(e){return this.baseDataService.query(Fr,{options:e})},t.prototype.getJobQueues=function(){return this.baseDataService.query(_r)},t.prototype.getRunningJobs=function(){return this.baseDataService.query(Fr,{options:{filter:{state:{eq:e.JobState.RUNNING}}}})},t.prototype.cancelJob=function(e){return this.baseDataService.mutate(Mr,{id:e})},t}(),Vl=o.gql(Tl||(Tl=ne(["\n fragment ShippingMethod on ShippingMethod {\n id\n createdAt\n updatedAt\n code\n name\n description\n fulfillmentHandlerCode\n checker {\n ...ConfigurableOperation\n }\n calculator {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n description\n }\n }\n ","\n"],["\n fragment ShippingMethod on ShippingMethod {\n id\n createdAt\n updatedAt\n code\n name\n description\n fulfillmentHandlerCode\n checker {\n ...ConfigurableOperation\n }\n calculator {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n description\n }\n }\n ","\n"])),Ge),jl=o.gql(Dl||(Dl=ne(["\n query GetShippingMethodList($options: ShippingMethodListOptions) {\n shippingMethods(options: $options) {\n items {\n ...ShippingMethod\n }\n totalItems\n }\n }\n ","\n"],["\n query GetShippingMethodList($options: ShippingMethodListOptions) {\n shippingMethods(options: $options) {\n items {\n ...ShippingMethod\n }\n totalItems\n }\n }\n ","\n"])),Vl),Bl=o.gql(Al||(Al=ne(["\n query GetShippingMethod($id: ID!) {\n shippingMethod(id: $id) {\n ...ShippingMethod\n }\n }\n ","\n"],["\n query GetShippingMethod($id: ID!) {\n shippingMethod(id: $id) {\n ...ShippingMethod\n }\n }\n ","\n"])),Vl),Hl=o.gql(El||(El=ne(["\n query GetShippingMethodOperations {\n shippingEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n shippingCalculators {\n ...ConfigurableOperationDef\n }\n fulfillmentHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetShippingMethodOperations {\n shippingEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n shippingCalculators {\n ...ConfigurableOperationDef\n }\n fulfillmentHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),zl=o.gql(Rl||(Rl=ne(["\n mutation CreateShippingMethod($input: CreateShippingMethodInput!) {\n createShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"],["\n mutation CreateShippingMethod($input: CreateShippingMethodInput!) {\n createShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"])),Vl),Wl=o.gql(Pl||(Pl=ne(["\n mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {\n updateShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"],["\n mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {\n updateShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"])),Vl),Zl=o.gql(Ol||(Ol=ne(["\n mutation DeleteShippingMethod($id: ID!) {\n deleteShippingMethod(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteShippingMethod($id: ID!) {\n deleteShippingMethod(id: $id) {\n result\n message\n }\n }\n"]))),Yl=o.gql(kl||(kl=ne(["\n query TestShippingMethod($input: TestShippingMethodInput!) {\n testShippingMethod(input: $input) {\n eligible\n quote {\n price\n priceWithTax\n metadata\n }\n }\n }\n"],["\n query TestShippingMethod($input: TestShippingMethodInput!) {\n testShippingMethod(input: $input) {\n eligible\n quote {\n price\n priceWithTax\n metadata\n }\n }\n }\n"]))),Jl=o.gql(wl||(wl=ne(["\n query TestEligibleShippingMethods($input: TestEligibleShippingMethodsInput!) {\n testEligibleShippingMethods(input: $input) {\n id\n name\n code\n description\n price\n priceWithTax\n metadata\n }\n }\n"],["\n query TestEligibleShippingMethods($input: TestEligibleShippingMethodsInput!) {\n testEligibleShippingMethods(input: $input) {\n id\n name\n code\n description\n price\n priceWithTax\n metadata\n }\n }\n"]))),Kl=function(){function e(e){this.baseDataService=e}return e.prototype.getShippingMethods=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(jl,{options:{take:e,skip:t}})},e.prototype.getShippingMethod=function(e){return this.baseDataService.query(Bl,{id:e})},e.prototype.getShippingMethodOperations=function(){return this.baseDataService.query(Hl)},e.prototype.createShippingMethod=function(e){var t={input:p.pick(e,["code","checker","calculator","fulfillmentHandler","customFields","translations"])};return this.baseDataService.mutate(zl,t)},e.prototype.updateShippingMethod=function(e){var t={input:p.pick(e,["id","code","checker","calculator","fulfillmentHandler","customFields","translations"])};return this.baseDataService.mutate(Wl,t)},e.prototype.deleteShippingMethod=function(e){return this.baseDataService.mutate(Zl,{id:e})},e.prototype.testShippingMethod=function(e){return this.baseDataService.query(Yl,{input:e})},e.prototype.testEligibleShippingMethods=function(e){return this.baseDataService.query(Jl,{input:e})},e}(),Ql=function(){function e(e){this.baseDataService=e,this.promotion=new ql(e),this.administrator=new qe(e),this.auth=new Ze(e),this.collection=new ps(e),this.product=new xl(e),this.client=new ma(e),this.facet=new js(e),this.order=new hl(e),this.settings=new Gl(e),this.customer=new xs(e),this.shippingMethod=new Kl(e)}return e.prototype.query=function(e,t,n){return void 0===n&&(n="cache-and-network"),this.baseDataService.query(e,t,n)},e.prototype.mutate=function(e,t,n){return this.baseDataService.mutate(e,t,n)},e}();Ql.decorators=[{type:t.Injectable}],Ql.ctorParameters=function(){return[{type:eo}]};var Xl,ec=function(){function e(e,t){this.dataService=e,this.document=t,this._document=t}return e.prototype.ngOnInit=function(){var e=this;this.loading$=this.dataService.client.getNetworkStatus().stream$.pipe(r.map((function(e){return 0<e.networkStatus.inFlightRequests}))),this.dataService.client.uiState().mapStream((function(e){return e.uiState.theme})).subscribe((function(t){var n;null===(n=e._document)||void 0===n||n.body.setAttribute("data-theme",t)}))},e}();function tc(){if(!Xl)throw new Error("vendure ui config not loaded");return Xl}function nc(){return tc().defaultLanguage}ec.decorators=[{type:t.Component,args:[{selector:"vdr-root",template:'<div class="progress loop" [class.visible]="loading$ | async"></div>\r\n<router-outlet></router-outlet>\r\n<vdr-overlay-host></vdr-overlay-host>\r\n',styles:[".progress{position:absolute;overflow:hidden;height:4px;background-color:var(--color-grey-500);opacity:0;transition:opacity .1s}.progress.visible{opacity:1}"]}]}],ec.ctorParameters=function(){return[{type:Ql},{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]};var rc=function(){function e(e,t,n){this.localStorageService=e,this.dataService=t,this.serverConfigService=n}return e.prototype.logIn=function(e,t,n){var o=this;return this.dataService.auth.attemptLogin(e,t,n).pipe(r.switchMap((function(e){return"CurrentUser"===e.login.__typename&&o.setChannelToken(e.login.channels),o.serverConfigService.getServerConfig().then((function(){return e.login}))})),r.switchMap((function(t){if("CurrentUser"===t.__typename){var n=o.getActiveChannel(t.channels).id;return o.dataService.client.loginSuccess(e,n,t.channels).pipe(r.map((function(){return t})))}return c.of(t)})))},e.prototype.logOut=function(){var e=this;return this.dataService.client.userStatus().single$.pipe(r.switchMap((function(t){return t.userStatus.isLoggedIn?e.dataService.client.logOut().pipe(r.mergeMap((function(){return e.dataService.auth.logOut()}))):[]})),r.mapTo(!0))},e.prototype.checkAuthenticatedStatus=function(){var e=this;return this.dataService.client.userStatus().single$.pipe(r.mergeMap((function(t){return t.userStatus.isLoggedIn?c.of(!0):e.validateAuthToken()})))},e.prototype.validateAuthToken=function(){var e=this;return this.dataService.auth.currentUser().single$.pipe(r.mergeMap((function(t){if(!t.me)return c.of(!1);e.setChannelToken(t.me.channels);var n=e.getActiveChannel(t.me.channels).id;return e.dataService.client.loginSuccess(t.me.identifier,n,t.me.channels)})),r.mapTo(!0),r.catchError((function(e){return c.of(!1)})))},e.prototype.getActiveChannel=function(e){var t=this.localStorageService.get("activeChannelToken");if(t){var n=e.find((function(e){return e.token===t}));if(n)return n}return e.find((function(e){return e.code===y.DEFAULT_CHANNEL_CODE}))||e[0]},e.prototype.setChannelToken=function(e){this.localStorageService.set("activeChannelToken",this.getActiveChannel(e).token)},e}();rc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new rc(t.ɵɵinject(Ye),t.ɵɵinject(Ql),t.ɵɵinject(Ur))},token:rc,providedIn:"root"}),rc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],rc.ctorParameters=function(){return[{type:Ye},{type:Ql},{type:Ur}]};var oc=function(){function e(e){this.ngxTranslate=e,this._availableLanguages=[]}return Object.defineProperty(e.prototype,"availableLanguages",{get:function(){return te(this._availableLanguages)},enumerable:!1,configurable:!0}),e.prototype.setDefaultLanguage=function(e){this.ngxTranslate.setDefaultLang(e)},e.prototype.setLanguage=function(e){this.ngxTranslate.use(e)},e.prototype.setAvailableLanguages=function(e){this._availableLanguages=e},e.prototype.translate=function(e,t){return this.ngxTranslate.instant(e,t)},e}();oc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new oc(t.ɵɵinject(g.TranslateService))},token:oc,providedIn:"root"}),oc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],oc.ctorParameters=function(){return[{type:g.TranslateService}]};var ic=function(){function e(){this.titleTemplateRef$=new c.Subject,this.buttonsTemplateRef$=new c.Subject}return e.prototype.onCreate=function(e){var t=this;if(e.resolveWith=function(e){t.closeModal(e)},this.options&&this.options.locals)for(var n in this.options.locals)e[n]=this.options.locals[n]},e.prototype.registerTitleTemplate=function(e){this.titleTemplateRef$.next(e)},e.prototype.registerButtonsTemplate=function(e){this.buttonsTemplateRef$.next(e)},e.prototype.modalOpenChange=function(e){!1===e&&this.closeModal()},e}();ic.decorators=[{type:t.Component,args:[{selector:"vdr-modal-dialog",template:'<clr-modal\r\n [clrModalOpen]="true"\r\n (clrModalOpenChange)="modalOpenChange($event)"\r\n [clrModalClosable]="options?.closable"\r\n [clrModalSize]="options?.size"\r\n [ngClass]="\'modal-valign-\' + (options?.verticalAlign || \'center\')"\r\n>\r\n <h3 class="modal-title"><ng-container *ngTemplateOutlet="(titleTemplateRef$ | async)"></ng-container></h3>\r\n <div class="modal-body">\r\n <vdr-dialog-component-outlet\r\n [component]="childComponentType"\r\n (create)="onCreate($event)"\r\n ></vdr-dialog-component-outlet>\r\n </div>\r\n <div class="modal-footer">\r\n <ng-container *ngTemplateOutlet="(buttonsTemplateRef$ | async)"></ng-container>\r\n </div>\r\n</clr-modal>\r\n',styles:["::ng-deep clr-modal.modal-valign-top .modal{justify-content:flex-start}::ng-deep clr-modal.modal-valign-bottom .modal{justify-content:flex-end}.modal-body{display:flex;flex-direction:column}"]}]}];var ac=function(){this.title="",this.body="",this.translationVars={},this.buttons=[]};ac.decorators=[{type:t.Component,args:[{selector:"vdr-simple-dialog",template:'<ng-template vdrDialogTitle>{{ title | translate:translationVars }}</ng-template>\r\n{{ body | translate:translationVars }}\r\n<ng-template vdrDialogButtons>\r\n <ng-container *ngFor="let button of buttons">\r\n <button\r\n class="btn"\r\n [class.btn-primary]="button.type === \'primary\'"\r\n [class.btn-danger]="button.type === \'danger\'"\r\n (click)="resolveWith(button.returnValue)"\r\n >\r\n {{ button.label | translate:translationVars }}\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var sc=function(){function e(){this.promiseResolveFns=[]}return e.prototype.registerHostView=function(e){this.hostView=e,0<this.promiseResolveFns.length&&this.resolveHostView()},e.prototype.getHostView=function(){var e=this;return new Promise((function(t){e.promiseResolveFns.push(t),void 0!==e.hostView&&e.resolveHostView()}))},e.prototype.resolveHostView=function(){var e=this;this.promiseResolveFns.forEach((function(t){return t(e.hostView)})),this.promiseResolveFns=[]},e}();sc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new sc},token:sc,providedIn:"root"}),sc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var lc=function(){function e(e,t){this.componentFactoryResolver=e,this.overlayHostService=t}return e.prototype.fromComponent=function(e,t){var n=this.componentFactoryResolver.resolveComponentFactory(ic);return c.from(this.overlayHostService.getHostView()).pipe(r.mergeMap((function(r){var o=r.createComponent(n),i=o.instance;return i.childComponentType=e,i.options=t,new c.Observable((function(e){i.closeModal=function(t){o.destroy(),e.next(t),e.complete()}}))})))},e.prototype.dialog=function(e){return this.fromComponent(ac,{locals:e})},e}();lc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new lc(t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(sc))},token:lc,providedIn:"root"}),lc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],lc.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:sc}]};var cc=function(){function e(){this.availableLanguages=[]}return e.prototype.setLanguage=function(e){this.resolveWith(e)},e}();cc.decorators=[{type:t.Component,args:[{selector:"vdr-ui-language-switcher",template:"<ng-template vdrDialogTitle>{{ 'common.select-display-language' | translate }}</ng-template>\r\n\r\n<div *ngFor=\"let code of availableLanguages\" >\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setLanguage(code)\">\r\n <clr-icon [attr.shape]=\"code === currentLanguage ? 'dot-circle' : 'circle'\"></clr-icon>\r\n {{ code | uppercase }} ({{ 'lang.' + code | translate }})\r\n </button>\r\n</div>\r\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var uc=function(){function e(e,t,n,r,o,i){this.authService=e,this.dataService=t,this.router=n,this.i18nService=r,this.modalService=o,this.localStorageService=i,this.availableLanguages=[]}return e.prototype.ngOnInit=function(){this.userName$=this.dataService.client.userStatus().single$.pipe(r.map((function(e){return e.userStatus.username}))),this.uiLanguage$=this.dataService.client.uiState().stream$.pipe(r.map((function(e){return e.uiState.language}))),this.availableLanguages=this.i18nService.availableLanguages},e.prototype.selectUiLanguage=function(){var e=this;this.uiLanguage$.pipe(r.take(1),r.switchMap((function(t){return e.modalService.fromComponent(cc,{closable:!0,size:"sm",locals:{availableLanguages:e.availableLanguages,currentLanguage:t}})})),r.switchMap((function(t){return t?e.dataService.client.setUiLanguage(t):c.EMPTY}))).subscribe((function(t){t.setUiLanguage&&(e.i18nService.setLanguage(t.setUiLanguage),e.localStorageService.set("uiLanguageCode",t.setUiLanguage))}))},e.prototype.logOut=function(){var e=this;this.authService.logOut().subscribe((function(){var t=tc().loginUrl;t?window.location.href=t:e.router.navigate(["/login"])}))},e}();uc.decorators=[{type:t.Component,args:[{selector:"vdr-app-shell",template:'<clr-main-container>\r\n <clr-header>\r\n <div class="branding">\r\n <a [routerLink]="[\'/\']"><img src="assets/logo-75px.png" class="logo" /></a>\r\n </div>\r\n <div class="header-nav"></div>\r\n <div class="header-actions">\r\n <vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher>\r\n <vdr-user-menu [userName]="userName$ | async"\r\n [uiLanguage]="uiLanguage$ | async"\r\n [availableLanguages]="availableLanguages"\r\n (selectUiLanguage)="selectUiLanguage()"\r\n (logOut)="logOut()"></vdr-user-menu>\r\n </div>\r\n </clr-header>\r\n <nav class="subnav"><vdr-breadcrumb></vdr-breadcrumb></nav>\r\n\r\n <div class="content-container">\r\n <div class="content-area"><router-outlet></router-outlet></div>\r\n <vdr-main-nav></vdr-main-nav>\r\n </div>\r\n</clr-main-container>\r\n',styles:[".branding{min-width:0}.logo{width:60px}@media screen and (min-width:768px){vdr-breadcrumb{margin-left:10.8rem}}.header-actions{align-items:center}.content-area{position:relative}"]}]}],uc.ctorParameters=function(){return[{type:rc},{type:Ql},{type:f.Router},{type:oc},{type:lc},{type:Ye}]};var pc=function(){function e(e,t,n){var o=this;this.router=e,this.route=t,this.dataService=n,this.destroy$=new c.Subject,this.breadcrumbs$=this.router.events.pipe(r.filter((function(e){return e instanceof f.NavigationEnd})),r.takeUntil(this.destroy$),r.startWith(!0),r.switchMap((function(){return o.generateBreadcrumbs(o.route.root)})))}return e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.generateBreadcrumbs=function(e){var t=this,n=this.assembleBreadcrumbParts(e).map((function(e){var n=e.value$,o=e.path;return n.pipe(r.map((function(e){return mc(e)?{label:e.label,link:t.normalizeRelativeLinks(e.link,o)}:function(e){return Array.isArray(e)&&mc(e[0])}(e)?e.map((function(e){return{label:e.label,link:t.normalizeRelativeLinks(e.link,o)}})):{label:e,link:"/"+o.join("/")}})))}));return c.combineLatest(n).pipe(r.map((function(e){return v.flatten(e)})))},e.prototype.assembleBreadcrumbParts=function(e){var t=this,n=[],r=[],o=e;do{var i=o.children;o=null,i.forEach((function(e){if(e.outlet===f.PRIMARY_OUTLET){var i=e.snapshot,a=e.routeConfig&&e.routeConfig.data&&e.routeConfig.data.breadcrumb;if(r.push(i.url.map((function(e){return e.path})).join("/")),a){"function"==typeof a&&(a=a(i.data,i.params,t.dataService));var s=dc(a)?a:c.of(a);n.push({value$:s,path:r.slice()})}o=e}}))}while(o);return n},e.prototype.normalizeRelativeLinks=function(e,t){var n=e.slice();return"./"===n[0]&&(n[0]=t.join("/")),"../"===n[0]&&(n[0]=t.slice(0,-1).join("/")),n.filter((function(e){return""!==e}))},e}();function dc(e){return e instanceof c.Observable}function mc(e){return e.hasOwnProperty("label")&&e.hasOwnProperty("link")}pc.decorators=[{type:t.Component,args:[{selector:"vdr-breadcrumb",template:'<nav role="navigation">\r\n <ul class="breadcrumbs">\r\n <li *ngFor="let breadcrumb of (breadcrumbs$ | async); let isLast = last">\r\n <a [routerLink]="breadcrumb.link" *ngIf="!isLast">{{ breadcrumb.label | translate }}</a>\r\n <ng-container *ngIf="isLast">{{ breadcrumb.label | translate }}</ng-container>\r\n </li>\r\n </ul>\r\n</nav>\r\n',styles:['@charset "UTF-8";:host{display:block;padding:0 1rem}.breadcrumbs{list-style-type:none}.breadcrumbs li{font-size:16px;display:inline-block;margin-right:10px}.breadcrumbs li:not(:last-child):after{content:"›";top:0;color:var(--color-grey-400);margin-left:10px}']}]}],pc.ctorParameters=function(){return[{type:f.Router},{type:f.ActivatedRoute},{type:Ql}]};var gc=function(){function e(e,t){this.dataService=e,this.localStorageService=t,this.displayFilterThreshold=10,this.filterControl=new C.FormControl("")}return e.prototype.ngOnInit=function(){var e=this.dataService.client.userStatus().mapStream((function(e){return e.userStatus.channels})),t=this.filterControl.valueChanges.pipe(r.startWith(""));this.channels$=c.combineLatest(e,t).pipe(r.map((function(e){var t=ee(e,2),n=t[0],r=t[1];return r?n.filter((function(e){return e.code.toLocaleLowerCase().includes(r.toLocaleLowerCase())})):n}))),this.channelCount$=e.pipe(r.map((function(e){return e.length})));var n=this.dataService.client.userStatus().mapStream((function(e){return e.userStatus.channels.find((function(t){return t.id===e.userStatus.activeChannelId}))})).pipe(r.filter(l.notNullOrUndefined));this.activeChannelCode$=n.pipe(r.map((function(e){return e.code})))},e.prototype.setActiveChannel=function(e){var t=this;this.dataService.client.setActiveChannel(e).subscribe((function(n){var r=n.setActiveChannel.channels.find((function(t){return t.id===e}));r&&t.localStorageService.set("activeChannelToken",r.token),t.filterControl.patchValue("")}))},e}();function hc(){var e=tc(),t=e.apiHost,n=e.apiPort;e.adminApiPath,e.tokenMethod;return""+("auto"===t?location.protocol+"//"+location.hostname:t)+(n?"auto"===n?""===location.port?"":":"+location.port:":"+n:"")}gc.decorators=[{type:t.Component,args:[{selector:"vdr-channel-switcher",template:'<ng-container>\r\n <vdr-dropdown>\r\n <button class="btn btn-link active-channel" vdrDropdownTrigger>\r\n <vdr-channel-badge [channelCode]="activeChannelCode$ | async"></vdr-channel-badge>\r\n <span class="active-channel">{{\r\n activeChannelCode$ | async | channelCodeToLabel | translate\r\n }}</span>\r\n <span class="trigger"><clr-icon shape="caret down"></clr-icon></span>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition="bottom-right">\r\n <input\r\n *ngIf="((channelCount$ | async) || 0) >= displayFilterThreshold"\r\n [formControl]="filterControl"\r\n type="text"\r\n class="ml2 mr2"\r\n [placeholder]="\'common.filter\' | translate"\r\n />\r\n <button\r\n *ngFor="let channel of channels$ | async"\r\n type="button"\r\n vdrDropdownItem\r\n (click)="setActiveChannel(channel.id)"\r\n >\r\n <vdr-channel-badge [channelCode]="channel.code"></vdr-channel-badge>\r\n {{ channel.code | channelCodeToLabel | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.active-channel{color:var(--color-grey-200)}.active-channel clr-icon{color:#fff}"]}]}],gc.ctorParameters=function(){return[{type:Ql},{type:Ye}]};var fc=function(){function e(e){var t=this;this.httpClient=e,this.pollingDelayMs=6e4,this._refresh=new c.Subject,this.healthCheckEndpoint=hc()+"/health";var n=this._refresh.pipe(r.throttleTime(1e3)),o=c.merge(c.timer(0,this.pollingDelayMs),n).pipe(r.switchMap((function(){return t.checkHealth()})),r.shareReplay(1));this.status$=o.pipe(r.map((function(e){return e.status}))),this.details$=o.pipe(r.map((function(e){return Object.keys(e.details).map((function(t){return{key:t,result:e.details[t]}}))}))),this.lastCheck$=o.pipe(r.map((function(e){return e.lastChecked})))}return e.prototype.refresh=function(){this._refresh.next()},e.prototype.checkHealth=function(){return this.httpClient.get(this.healthCheckEndpoint).pipe(r.catchError((function(e){return c.of(e.error)})),r.map((function(e){return Object.assign(Object.assign({},e),{lastChecked:new Date})})))},e}();fc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new fc(t.ɵɵinject(i.HttpClient))},token:fc,providedIn:"root"}),fc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],fc.ctorParameters=function(){return[{type:i.HttpClient}]};var yc=function(){function t(e){var t=this;this.dataService=e,this.updateJob$=new c.Subject,this.onCompleteHandlers=new Map,this.checkForJobs(),this.activeJobs$=this.updateJob$.pipe(r.scan((function(e,n){return t.handleJob(e,n)}),new Map),r.map((function(e){return Array.from(e.values())})),r.debounceTime(500),r.shareReplay(1)),this.subscription=this.activeJobs$.pipe(r.switchMap((function(e){return e.length?c.interval(2500).pipe(r.mapTo(e)):c.of([])}))).subscribe((function(e){e.length&&t.dataService.settings.pollJobs(e.map((function(e){return e.id}))).single$.subscribe((function(e){e.jobsById.forEach((function(e){t.updateJob$.next(e)}))}))}))}return t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.checkForJobs=function(t){var n=this;void 0===t&&(t=1e3),c.timer(t).pipe(r.switchMap((function(){return n.dataService.client.userStatus().mapSingle((function(e){return e.userStatus}))})),r.switchMap((function(t){return t.permissions.includes(e.Permission.ReadSettings)&&t.isLoggedIn?n.dataService.settings.getRunningJobs().single$:c.EMPTY}))).subscribe((function(e){return e.jobs.items.forEach((function(e){return n.updateJob$.next(e)}))}))},t.prototype.addJob=function(e,t){var n=this;this.dataService.settings.getJob(e).single$.subscribe((function(r){var o=r.job;o&&(n.updateJob$.next(o),t&&n.onCompleteHandlers.set(e,t))}))},t.prototype.handleJob=function(t,n){switch(n.state){case e.JobState.RUNNING:case e.JobState.PENDING:t.set(n.id,n);break;case e.JobState.COMPLETED:case e.JobState.FAILED:case e.JobState.CANCELLED:t.delete(n.id);var r=this.onCompleteHandlers.get(n.id);r&&(r(n),this.onCompleteHandlers.delete(n.id))}return t},t}();yc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new yc(t.ɵɵinject(Ql))},token:yc,providedIn:"root"}),yc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],yc.ctorParameters=function(){return[{type:Ql}]};var vc=function(){function t(){this.sectionBadges={},this.initialNavMenuConfig$=new c.BehaviorSubject([]),this.addedNavMenuSections=[],this.addedNavMenuItems=[],this.addedActionBarItems=[],this.setupStreams()}return t.prototype.defineNavMenuSections=function(e){this.initialNavMenuConfig$.next(e)},t.prototype.addNavMenuSection=function(e,t){this.addedNavMenuSections.push({config:e,before:t})},t.prototype.addNavMenuItem=function(e,t,n){this.addedNavMenuItems.push({config:e,sectionId:t,before:n})},t.prototype.addActionBarItem=function(t){this.addedActionBarItems.push(Object.assign({requiresPermission:e.Permission.Authenticated},t))},t.prototype.getRouterLink=function(e,t){return"function"==typeof e.routerLink?e.routerLink(t):Array.isArray(e.routerLink)?e.routerLink:null},t.prototype.setupStreams=function(){var t=this,n=c.of(this.addedNavMenuSections),o=c.of(this.addedNavMenuItems),i=c.combineLatest(this.initialNavMenuConfig$,n).pipe(r.map((function(t){var n,r,o=ee(t,2),i=o[0],a=o[1],s=function(t,n){t.requiresPermission||(t.requiresPermission=e.Permission.Authenticated);var r=i.findIndex((function(e){return e.id===t.id}));-1<r&&(i[r]=t);var o=i.findIndex((function(e){return e.id===n}));-1<o?(-1<r&&i.splice(r,1),i.splice(o,0,t)):-1===r&&i.push(t)};try{for(var l=X(a),c=l.next();!c.done;c=l.next()){var u=c.value;s(u.config,u.before)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return i})),r.shareReplay(1));this.navMenuConfig$=c.combineLatest(i,o).pipe(r.map((function(e){var n,o,i,a,s=ee(e,2),u=s[0],p=s[1],d=function(e){var t=u.find((function(t){return t.id===e.sectionId}));if(t){var n=e.config,r=(e.sectionId,e.before),o=t.items.findIndex((function(e){return e.id===n.id}));-1<o&&(t.items[o]=n);var i=t.items.findIndex((function(e){return e.id===r}));-1<i?(-1<o&&t.items.splice(o,1),t.items.splice(i,0,n)):-1===o&&t.items.push(n)}else console.error('Could not add menu item "'+e.config.id+'", section "'+e.sectionId+'" does not exist')};try{for(var m=X(p),g=m.next();!g.done;g=m.next()){d(g.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}try{for(var h=X(u),f=h.next();!f.done;f=h.next()){var y=f.value,v=y.items.map((function(e){return e.statusBadge})).filter(l.notNullOrUndefined);t.sectionBadges[y.id]=c.combineLatest(v).pipe(r.map((function(e){var t=e.filter((function(e){return e.propagateToSection}));if(0===t.length)return"none";var n=t.map((function(e){return e.type}));return n.includes("error")?"error":n.includes("warning")?"warning":n.includes("info")?"info":"none"})))}}catch(e){i={error:e}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}return u}))),this.actionBarConfig$=c.of(this.addedActionBarItems)},t}();vc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new vc},token:vc,providedIn:"root"}),vc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],vc.ctorParameters=function(){return[]};var Cc=function(){function t(e,t,n,r,o,i){this.route=e,this.router=t,this.navBuilderService=n,this.healthCheckService=r,this.jobQueueService=o,this.dataService=i}return t.prototype.shouldDisplayLink=function(e){return!!this.userPermissions&&(!e.requiresPermission||("string"==typeof e.requiresPermission?this.userPermissions.includes(e.requiresPermission):"function"==typeof e.requiresPermission?e.requiresPermission(this.userPermissions):void 0))},t.prototype.ngOnInit=function(){var e=this;this.defineNavMenu(),this.subscription=this.dataService.client.userStatus().mapStream((function(t){var n=t.userStatus;e.userPermissions=n.permissions})).subscribe()},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.getRouterLink=function(e){return this.navBuilderService.getRouterLink(e,this.route)},t.prototype.defineNavMenu=function(){function t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n,r;try{for(var o=X(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(t.includes(a))return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}}this.navBuilderService.defineNavMenuSections([{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadProduct,e.Permission.ReadFacet,e.Permission.ReadCollection,e.Permission.ReadAsset),id:"catalog",label:b.marker("nav.catalog"),items:[{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadProduct),id:"products",label:b.marker("nav.products"),icon:"library",routerLink:["/catalog","products"]},{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadFacet),id:"facets",label:b.marker("nav.facets"),icon:"tag",routerLink:["/catalog","facets"]},{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadCollection),id:"collections",label:b.marker("nav.collections"),icon:"folder-open",routerLink:["/catalog","collections"]},{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadAsset),id:"assets",label:b.marker("nav.assets"),icon:"image-gallery",routerLink:["/catalog","assets"]}]},{id:"sales",label:b.marker("nav.sales"),requiresPermission:t(e.Permission.ReadOrder),items:[{requiresPermission:t(e.Permission.ReadOrder),id:"orders",label:b.marker("nav.orders"),routerLink:["/orders"],icon:"shopping-cart"}]},{id:"customers",label:b.marker("nav.customers"),requiresPermission:t(e.Permission.ReadCustomer,e.Permission.ReadCustomerGroup),items:[{requiresPermission:t(e.Permission.ReadCustomer),id:"customers",label:b.marker("nav.customers"),routerLink:["/customer","customers"],icon:"user"},{requiresPermission:t(e.Permission.ReadCustomerGroup),id:"customer-groups",label:b.marker("nav.customer-groups"),routerLink:["/customer","groups"],icon:"users"}]},{id:"marketing",label:b.marker("nav.marketing"),requiresPermission:t(e.Permission.ReadPromotion),items:[{requiresPermission:t(e.Permission.ReadPromotion),id:"promotions",label:b.marker("nav.promotions"),routerLink:["/marketing","promotions"],icon:"asterisk"}]},{id:"settings",label:b.marker("nav.settings"),requiresPermission:t(e.Permission.ReadSettings,e.Permission.ReadChannel,e.Permission.ReadAdministrator,e.Permission.ReadShippingMethod,e.Permission.ReadPaymentMethod,e.Permission.ReadTaxCategory,e.Permission.ReadTaxRate,e.Permission.ReadCountry,e.Permission.ReadZone,e.Permission.UpdateGlobalSettings),collapsible:!0,collapsedByDefault:!0,items:[{requiresPermission:t(e.Permission.ReadChannel),id:"channels",label:b.marker("nav.channels"),routerLink:["/settings","channels"],icon:"layers"},{requiresPermission:t(e.Permission.ReadAdministrator),id:"administrators",label:b.marker("nav.administrators"),routerLink:["/settings","administrators"],icon:"administrator"},{requiresPermission:t(e.Permission.ReadAdministrator),id:"roles",label:b.marker("nav.roles"),routerLink:["/settings","roles"],icon:"users"},{requiresPermission:t(e.Permission.ReadShippingMethod),id:"shipping-methods",label:b.marker("nav.shipping-methods"),routerLink:["/settings","shipping-methods"],icon:"truck"},{requiresPermission:t(e.Permission.ReadPaymentMethod),id:"payment-methods",label:b.marker("nav.payment-methods"),routerLink:["/settings","payment-methods"],icon:"credit-card"},{requiresPermission:t(e.Permission.ReadTaxCategory),id:"tax-categories",label:b.marker("nav.tax-categories"),routerLink:["/settings","tax-categories"],icon:"view-list"},{requiresPermission:t(e.Permission.ReadTaxRate),id:"tax-rates",label:b.marker("nav.tax-rates"),routerLink:["/settings","tax-rates"],icon:"calculator"},{requiresPermission:t(e.Permission.ReadCountry),id:"countries",label:b.marker("nav.countries"),routerLink:["/settings","countries"],icon:"flag"},{requiresPermission:t(e.Permission.ReadZone),id:"zones",label:b.marker("nav.zones"),routerLink:["/settings","zones"],icon:"world"},{requiresPermission:t(e.Permission.UpdateGlobalSettings),id:"global-settings",label:b.marker("nav.global-settings"),routerLink:["/settings","global-settings"],icon:"cog"}]},{id:"system",label:b.marker("nav.system"),requiresPermission:e.Permission.ReadSystem,collapsible:!0,collapsedByDefault:!0,items:[{id:"job-queue",label:b.marker("nav.job-queue"),routerLink:["/system","jobs"],icon:"tick-chart",statusBadge:this.jobQueueService.activeJobs$.pipe(r.startWith([]),r.map((function(e){return{type:0===e.length?"none":"info",propagateToSection:e.length>0}})))},{id:"system-status",label:b.marker("nav.system-status"),routerLink:["/system","system-status"],icon:"rack-server",statusBadge:this.healthCheckService.status$.pipe(r.map((function(e){return{type:"ok"===e?"success":"error",propagateToSection:"error"===e}})))}]}])},t}();Cc.decorators=[{type:t.Component,args:[{selector:"vdr-main-nav",template:'<nav class="sidenav" [clr-nav-level]="2">\r\n <section class="sidenav-content">\r\n <ng-container *ngFor="let section of navBuilderService.navMenuConfig$ | async">\r\n <section\r\n class="nav-group"\r\n [attr.data-section-id]="section.id"\r\n [class.collapsible]="section.collapsible"\r\n *ngIf="shouldDisplayLink(section)"\r\n >\r\n <ng-container *ngIf="navBuilderService.sectionBadges[section.id] | async as sectionBadge">\r\n <div *ngIf="sectionBadge !== \'none\'" class="status-badge" [class]="sectionBadge"></div>\r\n </ng-container>\r\n <input [id]="section.id" type="checkbox" [checked]="section.collapsedByDefault" />\r\n <label [for]="section.id">{{ section.label | translate }}</label>\r\n <ul class="nav-list">\r\n <ng-container *ngFor="let item of section.items">\r\n <li *ngIf="shouldDisplayLink(item)">\r\n <a\r\n class="nav-link"\r\n [attr.data-item-id]="section.id"\r\n [routerLink]="getRouterLink(item)"\r\n routerLinkActive="active"\r\n >\r\n <ng-container *ngIf="item.statusBadge | async as itemBadge">\r\n <div\r\n *ngIf="itemBadge.type !== \'none\'"\r\n class="status-badge"\r\n [class]="itemBadge.type"\r\n ></div>\r\n </ng-container>\r\n <clr-icon [attr.shape]="item.icon || \'block\'" size="20"></clr-icon>\r\n {{ item.label | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </section>\r\n </ng-container>\r\n </section>\r\n</nav>\r\n',styles:[":host{order:-1;background-color:var(--clr-nav-background-color)}nav.sidenav{height:100%;width:10.8rem;border-right-color:var(--clr-sidenav-border-color)}.nav-list clr-icon{margin-right:12px}.nav-group,.nav-link{position:relative}.status-badge{width:10px;height:10px;position:absolute;border-radius:50%;border:1px solid var(--color-component-border-100)}.status-badge.info{background-color:var(--color-primary-600)}.status-badge.success{background-color:var(--color-success-500)}.status-badge.warning{background-color:var(--color-warning-500)}.status-badge.error{background-color:var(--color-error-400)}.nav-group .status-badge{left:10px;top:6px}.nav-link .status-badge{left:25px;top:3px}"]}]}],Cc.ctorParameters=function(){return[{type:f.ActivatedRoute},{type:f.Router},{type:vc},{type:fc},{type:yc},{type:Ql}]};var bc=function(){function e(){this.offsetTop=0,this.message="",this.translationVars={},this.type="info",this.isVisible=!0,this.onClickFn=function(){}}return e.prototype.registerOnClickFn=function(e){this.onClickFn=e},e.prototype.onClick=function(){this.isVisible&&this.onClickFn()},e.prototype.fadeOut=function(){return this.isVisible=!1,new Promise((function(e){return setTimeout(e,1e3)}))},e.prototype.getHeight=function(){return this.wrapper?this.wrapper.nativeElement.getBoundingClientRect().height:0},e.prototype.getIcon=function(){switch(this.type){case"info":return"info-circle";case"success":return"check-circle";case"error":return"exclamation-circle";case"warning":return"exclamation-triangle"}},e.prototype.stringifyMessage=function(e){return"string"==typeof e?e:JSON.stringify(e,null,2)},e}();bc.decorators=[{type:t.Component,args:[{selector:"vdr-notification",template:'<div\r\n class="notification-wrapper"\r\n #wrapper\r\n [style.top.px]="offsetTop"\r\n [ngClass]="{\r\n visible: isVisible,\r\n info: type === \'info\',\r\n success: type === \'success\',\r\n error: type === \'error\',\r\n warning: type === \'warning\'\r\n }"\r\n>\r\n <clr-icon [attr.shape]="getIcon()" size="24"></clr-icon>\r\n {{ stringifyMessage(message) | translate: translationVars }}\r\n</div>\r\n',styles:["@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:.95}}@keyframes fadeIn{0%{opacity:0}to{opacity:.95}}:host{position:relative;z-index:1050}:host>.notification-wrapper{display:block;position:fixed;z-index:1001;top:0;right:10px;border-radius:3px;max-width:98vw;word-wrap:break-word;padding:10px;background-color:var(--color-grey-500);color:#fff;transition:opacity 1s,top .3s;opacity:0;white-space:pre-line}:host>.notification-wrapper.success{background-color:var(--color-success-500)}:host>.notification-wrapper.error{background-color:var(--color-error-500)}:host>.notification-wrapper.warning{background-color:var(--color-warning-500)}:host>.notification-wrapper.info{background-color:var(--color-secondary-500)}:host>.notification-wrapper.visible{opacity:.95;-webkit-animation:fadeIn .3s .3s backwards;animation:fadeIn .3s .3s backwards}"]}]}],bc.propDecorators={wrapper:[{type:t.ViewChild,args:["wrapper",{static:!0}]}],onClick:[{type:t.HostListener,args:["click"]}]};var Sc=function(e,t){t.registerHostView(e)};Sc.decorators=[{type:t.Component,args:[{selector:"vdr-overlay-host",template:"\x3c!-- --\x3e"}]}],Sc.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:sc}]};var Ic=function(){function e(e,t){this.dataService=e,this.localStorageService=t}return e.prototype.ngOnInit=function(){this.activeTheme$=this.dataService.client.uiState().mapStream((function(e){return e.uiState.theme}))},e.prototype.toggleTheme=function(e){var t=this,n="default"===e?"dark":"default";this.dataService.client.setUiTheme(n).subscribe((function(){t.localStorageService.set("activeTheme",n)}))},e}();Ic.decorators=[{type:t.Component,args:[{selector:"vdr-theme-switcher",template:'<button *ngIf="activeTheme$ | async as activeTheme" class="theme-toggle" (click)="toggleTheme(activeTheme)">\r\n <span>{{ \'common.theme\' | translate }}</span>\r\n <div class="theme-icon default" [class.active]="activeTheme === \'default\'">\r\n <clr-icon shape="sun" class="is-solid"></clr-icon>\r\n </div>\r\n <div class="theme-icon dark" [class.active]="activeTheme === \'dark\'">\r\n <clr-icon shape="moon" class="is-solid"></clr-icon>\r\n </div>\r\n</button>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-flex;justify-content:center;align-items:center}button.theme-toggle{position:relative;padding-left:20px;border:none;background:transparent;color:var(--clr-dropdown-item-color);cursor:pointer}.theme-icon{position:absolute;top:0;left:6px;z-index:0;opacity:.2;color:var(--color-text-300);transition:opacity .3s,left .3s}.theme-icon.active{z-index:1;left:0;opacity:1}.theme-icon.default.active{color:#d6ae3f}.theme-icon.dark.active{color:#ffdf3a}"]}]}],Ic.ctorParameters=function(){return[{type:Ql},{type:Ye}]};var Tc=function(){this.userName="",this.availableLanguages=[],this.logOut=new t.EventEmitter,this.selectUiLanguage=new t.EventEmitter};Tc.decorators=[{type:t.Component,args:[{selector:"vdr-user-menu",template:'<vdr-dropdown>\r\n <button class="btn btn-link trigger" vdrDropdownTrigger>\r\n <span class="user-name">{{ userName }}</span>\r\n <clr-icon shape="user" size="24"></clr-icon>\r\n <clr-icon shape="caret down"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition="bottom-right">\r\n <a [routerLink]="[\'/settings\', \'profile\']" vdrDropdownItem>\r\n <clr-icon shape="user" class="is-solid"></clr-icon> {{ \'settings.profile\' | translate }}\r\n </a>\r\n <ng-container *ngIf="1 < availableLanguages.length">\r\n <button\r\n type="button"\r\n vdrDropdownItem\r\n (click)="selectUiLanguage.emit()"\r\n [title]="\'common.select-display-language\' | translate"\r\n >\r\n <clr-icon shape="language"></clr-icon> {{ \'lang.\' + uiLanguage | translate }}\r\n </button>\r\n </ng-container>\r\n <div class="dropdown-item">\r\n <vdr-theme-switcher></vdr-theme-switcher>\r\n </div>\r\n <div class="dropdown-divider"></div>\r\n <button type="button" vdrDropdownItem (click)="logOut.emit()">\r\n <clr-icon shape="logout"></clr-icon> {{ \'common.log-out\' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',styles:[":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.user-name{color:var(--color-grey-200);margin-right:12px}@media screen and (max-width:768px){.user-name{display:none}}.trigger clr-icon{color:#fff}"]}]}],Tc.propDecorators={userName:[{type:t.Input}],availableLanguages:[{type:t.Input}],uiLanguage:[{type:t.Input}],logOut:[{type:t.Output}],selectUiLanguage:[{type:t.Output}]};var Dc={possibleTypes:{CreateAssetResult:["Asset","MimeTypeError"],NativeAuthenticationResult:["CurrentUser","InvalidCredentialsError","NativeAuthStrategyError"],AuthenticationResult:["CurrentUser","InvalidCredentialsError"],CreateChannelResult:["Channel","LanguageNotAvailableError"],UpdateChannelResult:["Channel","LanguageNotAvailableError"],CreateCustomerResult:["Customer","EmailAddressConflictError"],UpdateCustomerResult:["Customer","EmailAddressConflictError"],UpdateGlobalSettingsResult:["GlobalSettings","ChannelDefaultLanguageError"],TransitionOrderToStateResult:["Order","OrderStateTransitionError"],SettlePaymentResult:["Payment","SettlePaymentError","PaymentStateTransitionError","OrderStateTransitionError"],AddFulfillmentToOrderResult:["Fulfillment","EmptyOrderLineSelectionError","ItemsAlreadyFulfilledError","InsufficientStockOnHandError","InvalidFulfillmentHandlerError","FulfillmentStateTransitionError","CreateFulfillmentError"],CancelOrderResult:["Order","EmptyOrderLineSelectionError","QuantityTooGreatError","MultipleOrderError","CancelActiveOrderError","OrderStateTransitionError"],RefundOrderResult:["Refund","QuantityTooGreatError","NothingToRefundError","OrderStateTransitionError","MultipleOrderError","PaymentOrderMismatchError","RefundOrderStateError","AlreadyRefundedError","RefundStateTransitionError"],SettleRefundResult:["Refund","RefundStateTransitionError"],TransitionFulfillmentToStateResult:["Fulfillment","FulfillmentStateTransitionError"],TransitionPaymentToStateResult:["Payment","PaymentStateTransitionError"],ModifyOrderResult:["Order","NoChangesSpecifiedError","OrderModificationStateError","PaymentMethodMissingError","RefundPaymentIdMissingError","OrderLimitError","NegativeQuantityError","InsufficientStockError"],AddManualPaymentToOrderResult:["Order","ManualPaymentStateError"],RemoveOptionGroupFromProductResult:["Product","ProductOptionInUseError"],CreatePromotionResult:["Promotion","MissingConditionsError"],UpdatePromotionResult:["Promotion","MissingConditionsError"],StockMovement:["StockAdjustment","Allocation","Sale","Cancellation","Return","Release"],StockMovementItem:["StockAdjustment","Allocation","Sale","Cancellation","Return","Release"],PaginatedList:["AdministratorList","CustomerGroupList","JobList","PaymentMethodList","AssetList","CollectionList","ProductVariantList","CountryList","CustomerList","FacetList","HistoryEntryList","OrderList","ProductList","PromotionList","RoleList","ShippingMethodList","TagList","TaxRateList"],Node:["Administrator","Asset","Collection","Customer","Facet","HistoryEntry","Job","Order","Fulfillment","Payment","OrderModification","PaymentMethod","Product","ProductVariant","StockAdjustment","Allocation","Sale","Cancellation","Return","Release","Address","Channel","Country","CustomerGroup","FacetValue","OrderItem","OrderLine","Refund","Surcharge","ProductOptionGroup","ProductOption","Promotion","Role","ShippingMethod","Tag","TaxCategory","TaxRate","User","AuthenticationMethod","Zone"],ErrorResult:["MimeTypeError","LanguageNotAvailableError","ChannelDefaultLanguageError","SettlePaymentError","EmptyOrderLineSelectionError","ItemsAlreadyFulfilledError","InvalidFulfillmentHandlerError","CreateFulfillmentError","InsufficientStockOnHandError","MultipleOrderError","CancelActiveOrderError","PaymentOrderMismatchError","RefundOrderStateError","NothingToRefundError","AlreadyRefundedError","QuantityTooGreatError","RefundStateTransitionError","PaymentStateTransitionError","FulfillmentStateTransitionError","OrderModificationStateError","NoChangesSpecifiedError","PaymentMethodMissingError","RefundPaymentIdMissingError","ManualPaymentStateError","ProductOptionInUseError","MissingConditionsError","NativeAuthStrategyError","InvalidCredentialsError","OrderStateTransitionError","EmailAddressConflictError","OrderLimitError","NegativeQuantityError","InsufficientStockError"],CustomField:["StringCustomFieldConfig","LocaleStringCustomFieldConfig","IntCustomFieldConfig","FloatCustomFieldConfig","BooleanCustomFieldConfig","DateTimeCustomFieldConfig","RelationCustomFieldConfig"],CustomFieldConfig:["StringCustomFieldConfig","LocaleStringCustomFieldConfig","IntCustomFieldConfig","FloatCustomFieldConfig","BooleanCustomFieldConfig","DateTimeCustomFieldConfig","RelationCustomFieldConfig"],SearchResultPrice:["PriceRange","SinglePrice"]}},Ac=function(e){function t(t){var n=e.call(this,(function(e,t){return n.isMutation(e)&&n.jobQueueService.checkForJobs(),t?t(e):null}))||this;return n.injector=t,n}return J(t,e),Object.defineProperty(t.prototype,"jobQueueService",{get:function(){return this._jobQueueService||(this._jobQueueService=this.injector.get(yc)),this._jobQueueService},enumerable:!1,configurable:!0}),t.prototype.isMutation=function(e){return!!e.query.definitions.find((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))},t}(s.ApolloLink);function Ec(e){return{networkStatus:{inFlightRequests:0,__typename:"NetworkStatus"},userStatus:{username:"",isLoggedIn:!1,loginTime:"",activeChannelId:null,permissions:[],channels:[],__typename:"UserStatus"},uiState:{language:e.get("uiLanguageCode")||nc(),theme:e.get("activeTheme")||"default",__typename:"UiState"}}}var Rc=function(e,t,n){return Mc(n.cache,1)},Pc=function(e,t,n){return Mc(n.cache,-1)},Oc=function(e,t,n){var r=n.cache,o=t.input,i=o.username,a=o.loginTime,s=o.channels,l=o.activeChannelId,c={userStatus:{__typename:"UserStatus",username:i,loginTime:a,isLoggedIn:!0,permissions:s.find((function(e){return e.id===l})).permissions,channels:s,activeChannelId:l}};return r.writeQuery({query:An,data:c}),c.userStatus},kc=function(e,t,n){var r={userStatus:{__typename:"UserStatus",username:"",loginTime:"",isLoggedIn:!1,permissions:[],channels:[],activeChannelId:null}};return n.cache.writeQuery({query:An,data:r}),r.userStatus},wc=function(e,t,n){var r=n.cache,o=r.readQuery({query:En}),i={uiState:{__typename:"UiState",language:t.languageCode,theme:o.uiState.theme}};return r.writeQuery({query:En,data:i}),t.languageCode},xc=function(e,t,n){var r=n.cache,o={uiState:{__typename:"UiState",language:r.readQuery({query:En}).uiState.language,theme:t.theme}};return r.writeQuery({query:En,data:o}),t.theme},Fc=function(e,t,n){var r=n.cache,o=r.readQuery({query:An}),i=o.userStatus.channels.find((function(e){return e.id===t.channelId}));if(!i)throw new Error("setActiveChannel: Could not find Channel with ID "+t.channelId);var a=i.permissions,s={userStatus:Object.assign(Object.assign({},o.userStatus),{permissions:a,activeChannelId:i.id})};return r.writeQuery({query:An,data:s}),s.userStatus},$c=function(e,t,n){var r=n.cache,o=r.readQuery({query:An}),i={userStatus:Object.assign(Object.assign({},o.userStatus),{channels:Array.isArray(t.channels)?t.channels:[t.channels]})};return r.writeQuery({query:An,data:i}),i.userStatus},_c={Mutation:{requestStarted:Rc,requestCompleted:Pc,setAsLoggedIn:Oc,setAsLoggedOut:kc,setUiLanguage:wc,setUiTheme:xc,setActiveChannel:Fc,updateUserChannels:$c}};function Mc(e,t){var n=e.readQuery({query:Dn}),r=n?n.networkStatus.inFlightRequests+t:t,o={networkStatus:{__typename:"NetworkStatus",inFlightRequests:r}};return e.writeQuery({query:Dn,data:o}),r}var Lc=function(e){function t(){return e.call(this,(function(e,t){return e.variables&&(e.variables=D.omit(e.variables,["__typename"],!0)),t?t(e):null}))||this}return J(t,e),t}(s.ApolloLink),Nc=function(e){var t=this;this.httpClient=e,this.fetch=function(e,n){var r="string"==typeof e?e:e.url,o="string"==typeof e?n.method?n.method:"GET":e.method;return t.httpClient.request(o,r,{body:n.body,headers:n.headers,observe:"response",responseType:"json",withCredentials:!0}).toPromise().then((function(e){return new Response(JSON.stringify(e.body),{status:e.status,statusText:e.statusText})}))}};Nc.decorators=[{type:t.Injectable}],Nc.ctorParameters=function(){return[{type:i.HttpClient}]};var Uc=function(){function e(e,t,n){this.i18nService=e,this.resolver=t,this.overlayHostService=n,this.openToastRefs=[]}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.overlayHostService.getHostView()},enumerable:!1,configurable:!0}),e.prototype.success=function(e,t){this.notify({message:e,translationVars:t,type:"success"})},e.prototype.info=function(e,t){this.notify({message:e,translationVars:t,type:"info"})},e.prototype.warning=function(e,t){this.notify({message:e,translationVars:t,type:"warning"})},e.prototype.error=function(e,t){this.notify({message:e,translationVars:t,type:"error",duration:2e4})},e.prototype.notify=function(e){this.createToast(e)},e.prototype.createToast=function(e){return K(this,void 0,void 0,(function(){var t,n,r,o,i,a,s=this;return Q(this,(function(l){switch(l.label){case 0:return t=this.resolver.resolveComponentFactory(bc),[4,this.hostView];case 1:return n=l.sent(),r=n.createComponent(t),o=r.instance,i=this.createDismissFunction(r),o.type=e.type||"info",o.message=e.message,o.translationVars=this.translateTranslationVars(e.translationVars||{}),o.registerOnClickFn(i),(!e.duration||0<e.duration)&&(a=setTimeout(i,e.duration||3e3)),this.openToastRefs.unshift({ref:r,timerId:a}),setTimeout((function(){return s.calculatePositions()})),[2]}}))}))},e.prototype.createDismissFunction=function(e){var t=this;return function(){var n=e.instance,r=t.openToastRefs.map((function(e){return e.ref})).indexOf(e);t.openToastRefs[r]&&clearTimeout(t.openToastRefs[r].timerId),n.fadeOut().then((function(){e.destroy(),t.openToastRefs.splice(r,1),t.calculatePositions()}))}},e.prototype.calculatePositions=function(){var e=10;this.openToastRefs.forEach((function(t){var n=t.ref.instance;n.offsetTop=e,e+=n.getHeight()+6}))},e.prototype.translateTranslationVars=function(e){var t,n;try{for(var r=X(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=ee(o.value,2),a=i[0],s=i[1];"string"==typeof s&&(e[a]=this.i18nService.translate(s))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},e}();Uc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Uc(t.ɵɵinject(oc),t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(sc))},token:Uc,providedIn:"root"}),Uc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Uc.ctorParameters=function(){return[{type:oc},{type:t.ComponentFactoryResolver},{type:sc}]};var qc="redirectTo",Gc=function(){function e(e,t,n,r,o){this.dataService=e,this.injector=t,this.authService=n,this.router=r,this.localStorageService=o,this.tokenMethod="cookie",this.tokenMethod=tc().tokenMethod,this.authTokenHeaderKey=tc().authTokenHeaderKey||y.DEFAULT_AUTH_TOKEN_HEADER_KEY}return e.prototype.intercept=function(e,t){var n=this;return this.dataService.client.startRequest().subscribe(),t.handle(e).pipe(r.tap((function(e){e instanceof i.HttpResponse&&(n.checkForAuthToken(e),n.notifyOnError(e),n.dataService.client.completeRequest().subscribe())}),(function(e){e instanceof i.HttpErrorResponse?(n.notifyOnError(e),n.dataService.client.completeRequest().subscribe()):n.displayErrorNotification(e.message)})))},e.prototype.notifyOnError=function(e){var t,n,r,o=this;if(e instanceof i.HttpErrorResponse)if(0===e.status){var a=tc(),s=a.apiHost,l=a.apiPort;this.displayErrorNotification(b.marker("error.could-not-connect-to-server"),{url:s+":"+l})}else 503===e.status&&(null===(t=e.url)||void 0===t?void 0:t.endsWith("/health"))?this.displayErrorNotification(b.marker("error.health-check-failed")):this.displayErrorNotification(this.extractErrorFromHttpResponse(e));else{var c=e.body.errors;if(c&&Array.isArray(c)){var u=null===(r=null===(n=c[0])||void 0===n?void 0:n.extensions)||void 0===r?void 0:r.code;if("FORBIDDEN"===u)this.authService.logOut().subscribe((function(){var e;if(!window.location.pathname.includes("login")){var t=c[0].path.join(" > ");o.displayErrorNotification(b.marker("error.403-forbidden"),{path:t})}o.router.navigate(["/login"],{queryParams:(e={},e.redirectTo=btoa(o.router.url),e)})}));else if("CHANNEL_NOT_FOUND"===u){var p=c.map((function(e){return e.message})).join("\n");this.displayErrorNotification(p),this.localStorageService.remove("activeChannelToken")}else{p=c.map((function(e){return e.message})).join("\n");this.displayErrorNotification(p)}}}},e.prototype.extractErrorFromHttpResponse=function(e){var t=e.error.errors;return Array.isArray(t)?t.map((function(e){return e.message})).join("\n"):e.message},e.prototype.displayErrorNotification=function(e,t){this.injector.get(Uc).error(e,t)},e.prototype.checkForAuthToken=function(e){if("bearer"===this.tokenMethod){var t=e.headers.get(this.authTokenHeaderKey);t&&this.localStorageService.set("authToken",t)}},e}();function Vc(e,t,n){var r=tc(),o=r.adminApiPath,i=r.tokenMethod,a=hc(),l=new s.InMemoryCache({possibleTypes:Dc.possibleTypes,typePolicies:{GlobalSettings:{fields:{serverConfig:{merge:function(e,t){return Object.assign(Object.assign({},e),t)}}}}}});return l.writeQuery({query:Rn,data:Ec(e)}),window.apolloCache=l,{link:I.ApolloLink.from([new Lc,new Ac(n),S.setContext((function(){var t={},n=e.get("activeChannelToken");if(n&&(t["vendure-token"]=n),"bearer"===i){var r=e.get("authToken");r&&(t.authorization="Bearer "+r)}return{headers:t}})),T.createUploadLink({uri:a+"/"+o,fetch:t.fetch})]),cache:l,resolvers:_c}}Gc.decorators=[{type:t.Injectable}],Gc.ctorParameters=function(){return[{type:Ql},{type:t.Injector},{type:rc},{type:f.Router},{type:Ye}]};var jc=Nr,Bc=function(){};Bc.decorators=[{type:t.NgModule,args:[{imports:[i.HttpClientModule],exports:[],declarations:[],providers:[eo,Ql,Nc,Ur,{provide:o.APOLLO_OPTIONS,useFactory:Vc,deps:[Ye,Nc,t.Injector]},{provide:i.HTTP_INTERCEPTORS,useClass:Gc,multi:!0},{provide:t.APP_INITIALIZER,multi:!0,useFactory:jc,deps:[Ur]}]}]}];var Hc=function(){function e(e,t,n){void 0===t&&(t="/assets/i18n/"),void 0===n&&(n=".json"),this.http=e,this.prefix=t,this.suffix=n}return e.prototype.getTranslation=function(e){var t=this;return this.http.get(""+this.prefix+e+this.suffix).pipe(r.map((function(e){return t.process(e)})))},e.prototype.process=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"string"!=typeof r?t[n]=this.process(r):"string"==typeof r&&""===r||(t[n]=e[n])}return t},e}(),zc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.compileTranslations=function(t,n){try{return e.prototype.compileTranslations.call(this,t,n)}catch(e){console.error("There was an error with the "+n+" translations:"),console.log(e),console.log("Check the messageformat docs: https://messageformat.github.io/messageformat/page-guide")}},t}(h.TranslateMessageFormatCompiler);zc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new zc(t.ɵɵinject(h.MESSAGE_FORMAT_CONFIG,8))},token:zc,providedIn:"root"}),zc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var Wc=function(){function e(){this.inputComponentMap=new Map}return e.prototype.registerInputComponent=function(e,t){if(this.inputComponentMap.has(e))throw new Error('Cannot register an InputComponent with the id "'+e+'", as one with that id already exists');this.inputComponentMap.set(e,t)},e.prototype.getInputComponent=function(e){return this.inputComponentMap.get(e)},e}();Wc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Wc},token:Wc,providedIn:"root"}),Wc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var Zc=function(){function e(e,t){this.componentFactoryResolver=e,this.componentRegistryService=t}return e.prototype.registerCustomFieldComponent=function(e,t,n){var r=this.generateId(e,t,!0);this.componentRegistryService.registerInputComponent(r,n)},e.prototype.customFieldComponentExists=function(e,t){var n=this.generateId(e,t,!0);return this.componentRegistryService.getInputComponent(n)?n:void 0},e.prototype.generateId=function(e,t,n){var r=e;return n&&(r+="-customFields"),r+="-"+t},e}();Zc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Zc(t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(Wc))},token:Zc,providedIn:"root"}),Zc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Zc.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:Wc}]};var Yc=function(){};Yc.id="boolean-form-input",Yc.decorators=[{type:t.Component,args:[{selector:"vdr-boolean-form-input",template:'<clr-checkbox-wrapper>\r\n <input\r\n type="checkbox"\r\n clrCheckbox\r\n [formControl]="formControl"\r\n [vdrDisabled]="!!readonly"\r\n />\r\n</clr-checkbox-wrapper>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var Jc=function(e){this.dataService=e,this.currencyCode$=this.dataService.settings.getActiveChannel().mapStream((function(e){return e.activeChannel.currencyCode}))};Jc.id="currency-form-input",Jc.decorators=[{type:t.Component,args:[{selector:"vdr-currency-form-input",template:'<vdr-currency-input\r\n [formControl]="formControl"\r\n [readonly]="readonly"\r\n [currencyCode]="currencyCode$ | async"\r\n></vdr-currency-input>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Jc.ctorParameters=function(){return[{type:Ql}]},Jc.propDecorators={readonly:[{type:t.Input}]};var Kc=function(){function e(e){this.dataService=e}return e.prototype.ngOnInit=function(){this.customerGroups$=this.dataService.customer.getCustomerGroupList({take:1e3}).mapSingle((function(e){return e.customerGroups.items})).pipe(r.startWith([]))},e.prototype.selectGroup=function(e){this.formControl.setValue(e.id)},e}();Kc.id="customer-group-form-input",Kc.decorators=[{type:t.Component,args:[{selector:"vdr-customer-group-form-input",template:'<ng-select\r\n [items]="customerGroups$ | async"\r\n appendTo="body"\r\n [addTag]="false"\r\n [multiple]="false"\r\n bindValue="id"\r\n [clearable]="true"\r\n [searchable]="false"\r\n [ngModel]="formControl.value"\r\n (change)="selectGroup($event)"\r\n>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <vdr-chip [colorFrom]="item.id">{{ item.name }}</vdr-chip>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item="item">\r\n <vdr-chip [colorFrom]="item.id">{{ item.name }}</vdr-chip>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Kc.ctorParameters=function(){return[{type:Ql}]},Kc.propDecorators={readonly:[{type:t.Input}]};var Qc=function(){};Qc.id="date-form-input",Qc.decorators=[{type:t.Component,args:[{selector:"vdr-date-form-input",template:'<vdr-datetime-picker\r\n [formControl]="formControl"\r\n [min]="config?.min"\r\n [max]="config?.max"\r\n [yearRange]="config?.yearRange"\r\n [readonly]="readonly"\r\n>\r\n</vdr-datetime-picker>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Qc.propDecorators={readonly:[{type:t.Input}]};var Xc=function(){function e(e){this.dataService=e,this.isListInput=!0}return e.prototype.ngOnInit=function(){this.facets$=this.dataService.facet.getAllFacets().mapSingle((function(e){return e.facets.items})).pipe(r.shareReplay(1))},e}();Xc.id="facet-value-form-input",Xc.decorators=[{type:t.Component,args:[{selector:"vdr-facet-value-form-input",template:'<vdr-facet-value-selector\r\n *ngIf="facets$ | async as facets"\r\n [readonly]="readonly"\r\n [facets]="facets"\r\n [formControl]="formControl"\r\n></vdr-facet-value-selector>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Xc.ctorParameters=function(){return[{type:Ql}]};var eu=function(){};eu.id="number-form-input",eu.decorators=[{type:t.Component,args:[{selector:"vdr-number-form-input",template:'<vdr-affixed-input [suffix]="config?.suffix" [prefix]="config?.prefix">\r\n <input\r\n type="number"\r\n [readonly]="readonly"\r\n [min]="config?.min"\r\n [max]="config?.max"\r\n [step]="config?.step"\r\n [formControl]="formControl"\r\n />\r\n</vdr-affixed-input>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],eu.propDecorators={readonly:[{type:t.Input}]};var tu=function(){};tu.id="password-form-input",tu.decorators=[{type:t.Component,args:[{selector:"vdr-password-form-input",template:'<input\r\n type="password"\r\n [readonly]="readonly"\r\n [formControl]="formControl"\r\n/>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var nu=function(){function e(e){this.dataService=e,this.isListInput=!0}return e.prototype.ngOnInit=function(){var e=this;this.formControl.setValidators([function(e){return e.value&&e.value.length?null:{atLeastOne:{length:e.value.length}}}]),this.selection$=this.formControl.valueChanges.pipe(r.startWith(this.formControl.value),r.switchMap((function(t){return Array.isArray(t)&&0<t.length?c.forkJoin(t.map((function(t){return e.dataService.product.getProductVariant(t).mapSingle((function(e){return e.productVariant}))}))):c.of([])})),r.map((function(e){return e.filter(l.notNullOrUndefined)})))},e.prototype.addProductVariant=function(e){var t=this.formControl.value;this.formControl.setValue(te(new Set(te(t,[e.productVariantId]))))},e.prototype.removeProductVariant=function(e){var t=this.formControl.value;this.formControl.setValue(t.filter((function(t){return t!==e})))},e}();nu.id="product-selector-form-input",nu.decorators=[{type:t.Component,args:[{selector:"vdr-product-selector-form-input",template:'<ul class="list-unstyled">\r\n <li *ngFor="let variant of selection$ | async" class="variant">\r\n <div class="thumb">\r\n <img [src]="variant.product.featuredAsset | assetPreview: 32" />\r\n </div>\r\n <div class="detail">\r\n <div>{{ variant.name }}</div>\r\n <div class="sku">{{ variant.sku }}</div>\r\n </div>\r\n <div class="flex-spacer"></div>\r\n <button\r\n class="btn btn-link btn-sm btn-warning"\r\n (click)="removeProductVariant(variant.id)"\r\n [title]="\'common.remove-item-from-list\' | translate"\r\n >\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n </li>\r\n</ul>\r\n<vdr-product-selector (productSelected)="addProductVariant($event)"></vdr-product-selector>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".variant{margin-bottom:6px;display:flex;align-items:center;transition:background-color .2s}.variant:hover{background-color:var(--color-component-bg-200)}.thumb{margin-right:6px}.sku{color:var(--color-grey-400);font-size:smaller;line-height:1em}"]}]}],nu.ctorParameters=function(){return[{type:Ql}]};var ru=function(){};ru.id="relation-form-input",ru.decorators=[{type:t.Component,args:[{selector:"vdr-relation-form-input",template:'<div [ngSwitch]="config.entity">\r\n <vdr-relation-asset-input\r\n *ngSwitchCase="\'Asset\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-asset-input>\r\n <vdr-relation-product-input\r\n *ngSwitchCase="\'Product\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-product-input>\r\n <vdr-relation-customer-input\r\n *ngSwitchCase="\'Customer\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-customer-input>\r\n <vdr-relation-product-variant-input\r\n *ngSwitchCase="\'ProductVariant\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-product-variant-input>\r\n <ng-template ngSwitchDefault>\r\n No input component configured for "{{ config.entity }}" type\r\n </ng-template>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;background-color:var(--color-component-bg-200);padding:3px}"]}]}],ru.propDecorators={readonly:[{type:t.Input}]};var ou=function(){};ou.id="select-form-input",ou.decorators=[{type:t.Component,args:[{selector:"vdr-select-form-input",template:'<select clrSelect [formControl]="formControl" [vdrDisabled]="readonly">\r\n <option *ngFor="let option of config.options" [value]="option.value">\r\n {{ (option | customFieldLabel) || option.label || option.value }}\r\n </option>\r\n</select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["select{width:100%}"]}]}],ou.propDecorators={readonly:[{type:t.Input}]};var iu=function(){};iu.id="text-form-input",iu.decorators=[{type:t.Component,args:[{selector:"vdr-text-form-input",template:'<input\r\n type="text"\r\n [readonly]="readonly"\r\n [formControl]="formControl"\r\n/>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var au=[Yc,Jc,Qc,Xc,eu,ou,iu,nu,Kc,tu,ru];function su(e,n){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.registerInputComponent(e,n)}},deps:[Wc]}}function lu(){return au.map((function(e){return su(e.id,e)}))}var cu=function(){function e(e,t,n,r){this.navBuilderService=e,this.route=t,this.dataService=n,this.notificationService=r,this.locationId$=new c.BehaviorSubject("")}return e.prototype.ngOnInit=function(){this.items$=c.combineLatest(this.navBuilderService.actionBarConfig$,this.locationId$).pipe(r.map((function(e){var t=ee(e,2),n=t[0],r=t[1];return n.filter((function(e){return e.locationId===r}))})))},e.prototype.ngOnChanges=function(e){"locationId"in e&&this.locationId$.next(e.locationId.currentValue)},e.prototype.handleClick=function(e,t){"function"==typeof t.onClick&&t.onClick(e,{route:this.route,dataService:this.dataService,notificationService:this.notificationService})},e.prototype.getRouterLink=function(e){return this.navBuilderService.getRouterLink(e,this.route)},e.prototype.getButtonStyles=function(e){var t=["btn"];return e.buttonStyle&&"link"===e.buttonStyle?(t.push("btn-link"),t):(t.push(this.getButtonColorClass(e)),t)},e.prototype.getButtonColorClass=function(e){switch(e.buttonColor){case void 0:case"primary":return"outline"===e.buttonStyle?"btn-outline":"btn-primary";case"success":return"outline"===e.buttonStyle?"btn-success-outline":"btn-success";case"warning":return"outline"===e.buttonStyle?"btn-warning-outline":"btn-warning";default:return l.assertNever(e.buttonColor),""}},e}();cu.decorators=[{type:t.Component,args:[{selector:"vdr-action-bar-items",template:'<ng-container *ngFor="let item of items$ | async">\r\n <button *vdrIfPermissions="item.requiresPermission"\r\n [routerLink]="getRouterLink(item)"\r\n [disabled]="item.disabled ? (item.disabled | async) : false"\r\n (click)="handleClick($event, item)"\r\n [ngClass]="getButtonStyles(item)">\r\n <clr-icon *ngIf="item.icon" [attr.shape]="item.icon"></clr-icon>\r\n {{ item.label | translate }}\r\n </button>\r\n</ng-container>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],cu.ctorParameters=function(){return[{type:vc},{type:f.ActivatedRoute},{type:Ql},{type:Uc}]},cu.propDecorators={locationId:[{type:t.HostBinding,args:["attr.data-location-id"]},{type:t.Input}]};var uu=function(){this.grow=!1};uu.decorators=[{type:t.Component,args:[{selector:"vdr-ab-left",template:"\n <ng-content></ng-content>\n "}]}],uu.propDecorators={grow:[{type:t.Input}]};var pu=function(){this.grow=!1};pu.decorators=[{type:t.Component,args:[{selector:"vdr-ab-right",template:"\n <ng-content></ng-content>\n "}]}],pu.propDecorators={grow:[{type:t.Input}]};var du=function(){};du.decorators=[{type:t.Component,args:[{selector:"vdr-action-bar",template:'<div class="left-content" [class.grow]="left?.grow"><ng-content select="vdr-ab-left"></ng-content></div>\r\n<div class="right-content" [class.grow]="right?.grow"><ng-content select="vdr-ab-right"></ng-content></div>\r\n',styles:[":host{display:flex;justify-content:space-between;align-items:flex-start;background-color:var(--color-component-bg-100);position:sticky;top:-24px;z-index:25;border-bottom:1px solid var(--color-component-border-200)}:host>.grow{flex:1}"]}]}],du.propDecorators={left:[{type:t.ContentChild,args:[uu]}],right:[{type:t.ContentChild,args:[pu]}]};var mu=function(){};mu.decorators=[{type:t.Component,args:[{selector:"vdr-address-form",template:'<form [formGroup]="formGroup">\r\n <clr-input-container>\r\n <label>{{ \'customer.full-name\' | translate }}</label>\r\n <input formControlName="fullName" type="text" clrInput />\r\n </clr-input-container>\r\n\r\n <div class="clr-row">\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.street-line-1\' | translate }}</label>\r\n <input formControlName="streetLine1" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.street-line-2\' | translate }}</label>\r\n <input formControlName="streetLine2" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class="clr-row">\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.city\' | translate }}</label>\r\n <input formControlName="city" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.province\' | translate }}</label>\r\n <input formControlName="province" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class="clr-row">\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.postal-code\' | translate }}</label>\r\n <input formControlName="postalCode" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.country\' | translate }}</label>\r\n <select name="countryCode" formControlName="countryCode" clrInput clrSelect>\r\n <option *ngFor="let country of availableCountries" [value]="country.code">\r\n {{ country.name }}\r\n </option>\r\n </select>\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <clr-input-container>\r\n <label>{{ \'customer.phone-number\' | translate }}</label>\r\n <input formControlName="phoneNumber" type="text" clrInput />\r\n </clr-input-container>\r\n <section formGroupName="customFields" *ngIf="formGroup.get(\'customFields\') as customFieldsGroup">\r\n <label>{{ \'common.custom-fields\' | translate }}</label>\r\n <ng-container *ngFor="let customField of customFields">\r\n <vdr-custom-field-control\r\n entityName="Address"\r\n [customFieldsFormGroup]="customFieldsGroup"\r\n [customField]="customField"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </section>\r\n</form>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],mu.propDecorators={customFields:[{type:t.Input}],formGroup:[{type:t.Input}],availableCountries:[{type:t.Input}]};var gu=function(){};gu.decorators=[{type:t.Component,args:[{selector:"vdr-affixed-input",template:'<div [class.has-prefix]="!!prefix" [class.has-suffix]="!!suffix">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class="affix prefix" *ngIf="prefix">{{ prefix }}</div>\r\n<div class="affix suffix" *ngIf="suffix">{{ suffix }}</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-flex}.affix{color:var(--color-grey-800);display:flex;align-items:center;background-color:var(--color-grey-200);border:1px solid var(--color-component-border-300);top:1px;padding:3px;line-height:.58333rem;transition:border .2s}::ng-deep .has-prefix input{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.prefix{order:-1;border-radius:3px 0 0 3px;border-right:none}::ng-deep .has-suffix input{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.suffix{border-radius:0 3px 3px 0;border-left:none}"]}]}],gu.propDecorators={prefix:[{type:t.Input}],suffix:[{type:t.Input}]};var hu=function(){function e(){this.disabled=!1,this.readonly=!1}return e.prototype.ngOnChanges=function(e){"value"in e&&this.writeValue(e.value.currentValue)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.onInput=function(e){this.onChange(e)},e.prototype.writeValue=function(e){var t=+e;Number.isNaN(t)||(this._value=t)},e}();hu.decorators=[{type:t.Component,args:[{selector:"vdr-percentage-suffix-input",template:'\n <vdr-affixed-input suffix="%">\n <input\n type="number"\n step="1"\n [value]="_value"\n [disabled]="disabled"\n [readonly]="readonly"\n (input)="onInput($event.target.value)"\n (focus)="onTouch()"\n />\n </vdr-affixed-input>\n ',providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:hu,multi:!0}],styles:["\n :host {\n padding: 0;\n }\n "]}]}],hu.propDecorators={disabled:[{type:t.Input}],readonly:[{type:t.Input}],value:[{type:t.Input}]};var fu=function(){function e(e){this.serverConfig=e,this.dropZoneTarget="body",this.uploading=!1,this.selectFiles=new t.EventEmitter,this.dragging=!1,this.overDropZone=!1,this.dropZoneStyle={"width.px":0,"height.px":0,"top.px":0,"left.px":0}}return e.prototype.ngOnInit=function(){this.accept=this.serverConfig.serverConfig.permittedAssetTypes.join(","),this.fitDropZoneToTarget()},e.prototype.onDragEnter=function(){this.dragging=!0,this.fitDropZoneToTarget()},e.prototype.onDragLeave=function(e){e.clientX||e.clientY||(this.dragging=!1)},e.prototype.onDragOver=function(e){e.preventDefault()},e.prototype.onDrop=function(e){e.preventDefault(),this.dragging=!1,this.overDropZone=!1;var t=Array.from(e.dataTransfer?e.dataTransfer.items:[]).map((function(e){return e.getAsFile()})).filter(l.notNullOrUndefined);this.selectFiles.emit(t)},e.prototype.select=function(e){var t=e.target.files;t&&this.selectFiles.emit(Array.from(t))},e.prototype.fitDropZoneToTarget=function(){var e=document.querySelector(this.dropZoneTarget);if(e){var t=e.getBoundingClientRect();this.dropZoneStyle["width.px"]=t.width,this.dropZoneStyle["height.px"]=t.height,this.dropZoneStyle["top.px"]=t.top,this.dropZoneStyle["left.px"]=t.left}},e}();fu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-file-input",template:'<input type="file" class="file-input" #fileInput (change)="select($event)" multiple [accept]="accept" />\r\n<button class="btn btn-primary" (click)="fileInput.click()" [disabled]="uploading">\r\n <ng-container *ngIf="uploading; else selectable">\r\n <clr-spinner clrInline></clr-spinner>\r\n {{ \'asset.uploading\' | translate }}\r\n </ng-container>\r\n <ng-template #selectable>\r\n <clr-icon shape="upload-cloud"></clr-icon>\r\n {{ \'asset.upload-assets\' | translate }}\r\n </ng-template>\r\n</button>\r\n<div\r\n class="drop-zone"\r\n [ngStyle]="dropZoneStyle"\r\n [class.visible]="dragging"\r\n [class.dragging-over]="overDropZone"\r\n (dragenter)="overDropZone = true"\r\n (dragleave)="overDropZone = false"\r\n (dragover)="onDragOver($event)"\r\n (drop)="onDrop($event)"\r\n #dropZone\r\n>\r\n <div class="drop-label" (dragenter)="overDropZone = true">\r\n <clr-icon shape="upload-cloud" size="32"></clr-icon>\r\n {{ \'catalog.drop-files-to-upload\' | translate }}\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".file-input{display:none}.drop-zone{position:fixed;background-color:var(--color-primary-500);border:3px dashed var(--color-component-border-300);opacity:0;visibility:hidden;z-index:1000;transition:opacity .2s,background-color .2s,visibility 0s .2s;display:flex;align-items:center;justify-content:center}.drop-zone.visible{opacity:.3;visibility:visible;transition:opacity .2s,background-color .2s,border .2s,visibility 0s}.drop-zone .drop-label{background-color:hsla(0,0%,100%,.8);border-radius:3px;padding:24px;font-size:32px;pointer-events:none;opacity:.5;transition:opacity .2s}.drop-zone.dragging-over{border-color:#fff;background-color:var(--color-primary-500);opacity:.7;transition:background-color .2s,border .2s}.drop-zone.dragging-over .drop-label{opacity:1}"]}]}],fu.ctorParameters=function(){return[{type:Ur}]},fu.propDecorators={dropZoneTarget:[{type:t.Input}],uploading:[{type:t.Input}],selectFiles:[{type:t.Output}],onDragEnter:[{type:t.HostListener,args:["document:dragenter"]}],onDragLeave:[{type:t.HostListener,args:["document:dragleave",["$event"]]}]};var yu=function(){function e(e){this.dataService=e}return e.prototype.ngOnInit=function(){var e=this;this.assetWithTags$=c.of(this.asset).pipe(r.mergeMap((function(t){return e.hasTags(t)?c.of(t):e.dataService.product.getAsset(t.id).mapSingle((function(e){return e.asset}))})))},e.prototype.hasTags=function(e){return e.hasOwnProperty("tags")},e}();yu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-preview-dialog",template:'<ng-template vdrDialogTitle>\r\n <div class="title-row">\r\n {{ asset.name }}\r\n </div>\r\n</ng-template>\r\n\r\n<vdr-asset-preview\r\n *ngIf="assetWithTags$ | async as assetWithTags"\r\n [asset]="assetWithTags"\r\n (assetChange)="assetChanges = $event"\r\n (editClick)="resolveWith()"\r\n></vdr-asset-preview>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{height:70vh}.update-button.hidden{visibility:hidden}"]}]}],yu.ctorParameters=function(){return[{type:Ql}]};var vu=function(){function e(e){this.modalService=e,this.multiSelect=!1,this.canDelete=!1,this.selectionChange=new t.EventEmitter,this.deleteAssets=new t.EventEmitter,this.selection=[]}return e.prototype.ngOnChanges=function(){var e,t;if(this.assets){var n=function(e){var t=r.assets.find((function(t){return t.id===e.id}));t&&Object.assign(e,t)},r=this;try{for(var o=X(this.selection),i=o.next();!i.done;i=o.next()){n(i.value)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}},e.prototype.toggleSelection=function(e,t){var n,r=this,o=this.selection.findIndex((function(e){return e.id===t.id}));if(this.multiSelect&&e.shiftKey&&1<=this.selection.length){var i=this.selection[this.selection.length-1],a=this.assets.findIndex((function(e){return e.id===i.id})),s=this.assets.findIndex((function(e){return e.id===t.id})),l=s<a?s:a,c=s>a?s+1:a;(n=this.selection).push.apply(n,te(this.assets.slice(l,c).filter((function(e){return!r.selection.find((function(t){return t.id===e.id}))}))))}else-1===o?this.multiSelect&&(e.ctrlKey||e.shiftKey)?this.selection.push(t):this.selection=[t]:this.multiSelect&&e.ctrlKey?this.selection.splice(o,1):1<this.selection.length?this.selection=[t]:this.selection.splice(o,1);this.selection=this.selection.map((function(e){return Object.assign({},e)})),this.selectionChange.emit(this.selection)},e.prototype.isSelected=function(e){return!!this.selection.find((function(t){return t.id===e.id}))},e.prototype.lastSelected=function(){return this.selection[this.selection.length-1]},e.prototype.previewAsset=function(e){this.modalService.fromComponent(yu,{size:"xl",closable:!0,locals:{asset:e}}).subscribe()},e.prototype.entityInfoClick=function(e){e.preventDefault(),e.stopPropagation()},e}();vu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-gallery",template:'<div class="gallery">\r\n <div\r\n class="card"\r\n *ngFor="let asset of assets"\r\n (click)="toggleSelection($event, asset)"\r\n [class.selected]="isSelected(asset)"\r\n >\r\n <div class="card-img">\r\n <div class="selected-checkbox"><clr-icon shape="check-circle" size="32"></clr-icon></div>\r\n <img [src]="asset | assetPreview: \'thumb\'" />\r\n </div>\r\n <div class="detail">\r\n <vdr-entity-info\r\n [entity]="asset"\r\n [small]="true"\r\n (click)="entityInfoClick($event)"\r\n ></vdr-entity-info>\r\n <span [title]="asset.name">{{ asset.name }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div class="info-bar">\r\n <div class="card">\r\n <div class="card-img">\r\n <div class="placeholder" *ngIf="selection.length === 0">\r\n <clr-icon shape="image" size="128"></clr-icon>\r\n <div>{{ \'catalog.no-selection\' | translate }}</div>\r\n </div>\r\n <img\r\n class="preview"\r\n *ngIf="selection.length >= 1"\r\n [src]="lastSelected().preview + \'?preset=medium\'"\r\n />\r\n </div>\r\n <div class="card-block details" *ngIf="selection.length >= 1">\r\n <div class="name">{{ lastSelected().name }}</div>\r\n <div>{{ \'asset.original-asset-size\' | translate }}: {{ lastSelected().fileSize | filesize }}</div>\r\n\r\n <ng-container *ngIf="selection.length === 1">\r\n <vdr-chip *ngFor="let tag of lastSelected().tags" [colorFrom]="tag.value"><clr-icon shape="tag" class="mr2"></clr-icon> {{ tag.value }}</vdr-chip>\r\n <div>\r\n <button (click)="previewAsset(lastSelected())" class="btn btn-link">\r\n <clr-icon shape="eye"></clr-icon> {{ \'asset.preview\' | translate }}\r\n </button>\r\n </div>\r\n <div>\r\n <a [routerLink]="[\'./\', lastSelected().id]" class="btn btn-link">\r\n <clr-icon shape="pencil"></clr-icon> {{ \'common.edit\' | translate }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <div *ngIf="canDelete">\r\n <button (click)="deleteAssets.emit(selection)" class="btn btn-link">\r\n <clr-icon shape="trash" class="is-danger"></clr-icon> {{ \'common.delete\' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="card stack" [class.visible]="selection.length > 1"></div>\r\n <div class="selection-count" [class.visible]="selection.length > 1">\r\n {{ \'asset.assets-selected-count\' | translate: { count: selection.length } }}\r\n <ul>\r\n <li *ngFor="let asset of selection">{{ asset.name }}</li>\r\n </ul>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;overflow:hidden}.gallery{flex:1;display:grid;grid-template-columns:repeat(auto-fill,150px);grid-template-rows:repeat(auto-fill,180px);grid-gap:10px 20px;overflow-y:auto;padding-left:12px;padding-top:12px;padding-bottom:12px}.gallery .card:hover{box-shadow:0 .125rem 0 0 var(--color-primary-500);border:1px solid var(--color-primary-500)}.card{margin-top:0;position:relative}.selected-checkbox{opacity:0;position:absolute;color:var(--color-success-500);background-color:#fff;border-radius:50%;top:-12px;left:-12px;box-shadow:0 5px 5px -4px rgba(0,0,0,.75);transition:opacity .1s}.card.selected{box-shadow:0 .125rem 0 0 var(--color-primary-500);border:1px solid var(--color-primary-500)}.card.selected .selected-checkbox{opacity:1}.detail{font-size:12px;margin:3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.detail vdr-entity-info{height:16px}.info-bar{width:25%;padding:0 6px;overflow-y:auto}.info-bar .card{z-index:1}.info-bar .stack{z-index:0;opacity:0;transform:perspective(500px) translateZ(0) translateY(-16px);height:16px;transition:transform .3s,opacity 0s .3s;background-color:#fff}.info-bar .stack.visible{opacity:1;transform:perspective(500px) translateZ(-44px) translateY(0);background-color:var(--color-component-bg-100);transition:transform .3s,color .3s}.info-bar .selection-count{opacity:0;position:relative;text-align:center;visibility:hidden;transition:opacity .3s,visibility 0s .3s}.info-bar .selection-count.visible{opacity:1;visibility:visible;transition:opacity .3s,visibility 0s}.info-bar .selection-count ul{text-align:left;list-style-type:none;margin-left:12px}.info-bar .selection-count ul li{font-size:12px}.info-bar .placeholder{text-align:center;color:var(--color-grey-300)}.info-bar .preview img{max-width:100%}.info-bar .details{font-size:12px;word-break:break-all}.info-bar .name{line-height:14px;font-weight:700}"]}]}],vu.ctorParameters=function(){return[{type:lc}]},vu.propDecorators={assets:[{type:t.Input}],multiSelect:[{type:t.Input}],canDelete:[{type:t.Input}],selectionChange:[{type:t.Output}],deleteAssets:[{type:t.Output}]};var Cu=function(){function t(e,t){this.dataService=e,this.notificationService=t,this.paginationConfig={currentPage:1,itemsPerPage:25,totalItems:1},this.multiSelect=!0,this.initialTags=[],this.selection=[],this.searchTerm$=new c.BehaviorSubject(void 0),this.filterByTags$=new c.BehaviorSubject(void 0),this.uploading=!1,this.destroy$=new c.Subject}return t.prototype.ngOnInit=function(){var e=this;this.listQuery=this.dataService.product.getAssetList(this.paginationConfig.itemsPerPage,0),this.allTags$=this.dataService.product.getTagList().mapSingle((function(e){return e.tags.items})),this.assets$=this.listQuery.stream$.pipe(r.tap((function(t){return e.paginationConfig.totalItems=t.assets.totalItems})),r.map((function(e){return e.assets.items}))),this.searchTerm$.pipe(r.debounceTime(250),r.takeUntil(this.destroy$)).subscribe((function(){e.fetchPage(e.paginationConfig.currentPage,e.paginationConfig.itemsPerPage)})),this.filterByTags$.pipe(r.debounceTime(100),r.takeUntil(this.destroy$)).subscribe((function(){e.fetchPage(e.paginationConfig.currentPage,e.paginationConfig.itemsPerPage)}))},t.prototype.ngAfterViewInit=function(){var e=this;0<this.initialTags.length&&this.allTags$.pipe(r.take(1),r.map((function(t){return t.filter((function(t){return e.initialTags.includes(t.value)}))})),r.tap((function(t){return e.filterByTags$.next(t)})),r.delay(1)).subscribe((function(t){return e.assetSearchInputComponent.setTags(t)}))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.pageChange=function(e){this.paginationConfig.currentPage=e,this.fetchPage(this.paginationConfig.currentPage,this.paginationConfig.itemsPerPage)},t.prototype.itemsPerPageChange=function(e){this.paginationConfig.itemsPerPage=e,this.fetchPage(this.paginationConfig.currentPage,this.paginationConfig.itemsPerPage)},t.prototype.cancel=function(){this.resolveWith()},t.prototype.select=function(){this.resolveWith(this.selection)},t.prototype.createAssets=function(e){var t=this;e.length&&(this.uploading=!0,this.dataService.product.createAssets(e).pipe(r.finalize((function(){return t.uploading=!1}))).subscribe((function(n){t.fetchPage(t.paginationConfig.currentPage,t.paginationConfig.itemsPerPage),t.notificationService.success(b.marker("asset.notify-create-assets-success"),{count:e.length})})))},t.prototype.fetchPage=function(t,n){var r,o=+n,i=(t-1)*+n,a=this.searchTerm$.value,s=null===(r=this.filterByTags$.value)||void 0===r?void 0:r.map((function(e){return e.value}));this.listQuery.ref.refetch({options:{skip:i,take:o,filter:{name:{contains:a}},sort:{createdAt:e.SortOrder.DESC},tags:s,tagsOperator:e.LogicalOperator.AND}})},t}();Cu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-picker-dialog",template:'<ng-template vdrDialogTitle>\r\n <div class="title-row">\r\n <span>{{ \'asset.select-assets\' | translate }}</span>\r\n <div class="flex-spacer"></div>\r\n <vdr-asset-file-input\r\n class="ml3"\r\n (selectFiles)="createAssets($event)"\r\n [uploading]="uploading"\r\n dropZoneTarget=".modal-content"\r\n ></vdr-asset-file-input>\r\n </div>\r\n</ng-template>\r\n<vdr-asset-search-input\r\n class="mb2"\r\n [tags]="allTags$ | async"\r\n (searchTermChange)="searchTerm$.next($event)"\r\n (tagsChange)="filterByTags$.next($event)"\r\n #assetSearchInputComponent\r\n></vdr-asset-search-input>\r\n<vdr-asset-gallery\r\n [assets]="(assets$ | async)! | paginate: paginationConfig"\r\n [multiSelect]="multiSelect"\r\n (selectionChange)="selection = $event"\r\n></vdr-asset-gallery>\r\n\r\n<div class="paging-controls">\r\n <vdr-items-per-page-controls\r\n [itemsPerPage]="paginationConfig.itemsPerPage"\r\n (itemsPerPageChange)="itemsPerPageChange($event)"\r\n ></vdr-items-per-page-controls>\r\n\r\n <vdr-pagination-controls\r\n [currentPage]="paginationConfig.currentPage"\r\n [itemsPerPage]="paginationConfig.itemsPerPage"\r\n [totalItems]="paginationConfig.totalItems"\r\n (pageChange)="pageChange($event)"\r\n ></vdr-pagination-controls>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type="button" class="btn" (click)="cancel()">{{ \'common.cancel\' | translate }}</button>\r\n <button type="submit" (click)="select()" class="btn btn-primary" [disabled]="selection.length === 0">\r\n {{ \'asset.add-asset-with-count\' | translate: { count: selection.length } }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;flex-direction:column;height:70vh}.title-row{display:flex;align-items:center;justify-content:space-between}vdr-asset-gallery{flex:1}.paging-controls{padding-top:6px;border-top:1px solid var(--color-component-border-100);display:flex;justify-content:space-between;flex-shrink:0}"]}]}],Cu.ctorParameters=function(){return[{type:Ql},{type:Uc}]},Cu.propDecorators={assetSearchInputComponent:[{type:t.ViewChild,args:["assetSearchInputComponent"]}]};var bu=function(){function e(e){this.dataService=e,this.toDelete=[],this.toUpdate=[]}return e.prototype.ngOnInit=function(){this.allTags$=this.dataService.product.getTagList().mapStream((function(e){return e.tags.items}))},e.prototype.toggleDelete=function(e){this.markedAsDeleted(e)?this.toDelete=this.toDelete.filter((function(t){return t!==e})):this.toDelete.push(e)},e.prototype.markedAsDeleted=function(e){return this.toDelete.includes(e)},e.prototype.updateTagValue=function(e,t){var n=this.toUpdate.find((function(t){return t.id===e}));n?n.value=t:this.toUpdate.push({id:e,value:t})},e.prototype.saveChanges=function(){var e,t,n,r,o=this,i=[];try{for(var a=X(this.toDelete),s=a.next();!s.done;s=a.next()){var l=s.value;i.push(this.dataService.product.deleteTag(l))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}try{for(var u=X(this.toUpdate),p=u.next();!p.done;p=u.next()){var d=p.value;this.toDelete.includes(d.id)||i.push(this.dataService.product.updateTag(d))}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return c.forkJoin(i).subscribe((function(){return o.resolveWith(!0)}))},e}();bu.decorators=[{type:t.Component,args:[{selector:"vdr-manage-tags-dialog",template:'<ng-template vdrDialogTitle>\r\n <span>{{ \'common.manage-tags\' | translate }}</span>\r\n</ng-template>\r\n<p class="mt0 mb4">{{ \'common.manage-tags-description\' | translate }}</p>\r\n<ul class="tag-list" *ngFor="let tag of allTags$ | async">\r\n <li class="mb2 p1" [class.to-delete]="markedAsDeleted(tag.id)">\r\n <clr-icon shape="tag" class="is-solid mr2" [style.color]="tag.value | stringToColor"></clr-icon>\r\n <input type="text" (input)="updateTagValue(tag.id, $event.target.value)" [value]="tag.value" />\r\n <button class="icon-button" (click)="toggleDelete(tag.id)">\r\n <clr-icon shape="trash" class="is-danger" [class.is-solid]="markedAsDeleted(tag.id)"></clr-icon>\r\n </button>\r\n </li>\r\n</ul>\r\n<ng-template vdrDialogButtons>\r\n <button type="submit" (click)="resolveWith(false)" class="btn btn-secondary">\r\n {{ \'common.cancel\' | translate }}\r\n </button>\r\n <button\r\n type="submit"\r\n (click)="saveChanges()"\r\n class="btn btn-primary"\r\n [disabled]="!toUpdate.length && !toDelete.length"\r\n >\r\n {{ \'common.update\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".tag-list{list-style-type:none}.tag-list li{display:flex;align-items:center}.tag-list li input{max-width:170px}.tag-list li.to-delete{opacity:.7;background-color:var(--color-component-bg-300)}.tag-list li.to-delete input{background-color:transparent!important}"]}]}],bu.ctorParameters=function(){return[{type:Ql}]};var Su=function(){function e(e,n,r,o,i){this.formBuilder=e,this.dataService=n,this.notificationService=r,this.changeDetector=o,this.modalService=i,this.editable=!1,this.customFields=[],this.assetChange=new t.EventEmitter,this.editClick=new t.EventEmitter,this.size="medium",this.width=0,this.height=0,this.centered=!0,this.settingFocalPoint=!1}return Object.defineProperty(e.prototype,"fpx",{get:function(){return this.asset.focalPoint?this.asset.focalPoint.x:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fpy",{get:function(){return this.asset.focalPoint?this.asset.focalPoint.y:null},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e,t=this;this.asset.focalPoint;this.form=this.formBuilder.group({name:[this.asset.name],tags:[null===(e=this.asset.tags)||void 0===e?void 0:e.map((function(e){return e.value}))]}),this.subscription=this.form.valueChanges.subscribe((function(e){t.assetChange.emit({id:t.asset.id,name:e.name,tags:e.tags})})),this.subscription.add(c.fromEvent(window,"resize").pipe(r.debounceTime(50)).subscribe((function(){t.updateDimensions(),t.changeDetector.markForCheck()})))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.customFieldIsSet=function(e){var t;return!!(null===(t=this.customFieldsForm)||void 0===t?void 0:t.get([e]))},e.prototype.getSourceFileName=function(){var e=this.asset.source.split("/");return e[e.length-1]},e.prototype.onImageLoad=function(){this.updateDimensions(),this.changeDetector.markForCheck()},e.prototype.updateDimensions=function(){var e=this.imageElementRef.nativeElement,t=this.previewDivRef.nativeElement,n=e.naturalWidth,r=e.naturalHeight,o=t.offsetWidth,i=t.offsetHeight;if(this.settingFocalPoint){var a=r/(i-96),s=n/o;if(1<a||1<s){var l=a<s?s:a;return this.width=Math.round(n/l),this.height=Math.round(r/l),void(this.centered=!0)}}this.width=n,this.height=r,this.centered=n<=o&&r<=i},e.prototype.setFocalPointStart=function(){this.sizePriorToSettingFocalPoint=this.size,this.size="medium",this.settingFocalPoint=!0,this.lastFocalPoint=this.asset.focalPoint||{x:.5,y:.5},this.updateDimensions()},e.prototype.removeFocalPoint=function(){var e=this;this.dataService.product.updateAsset({id:this.asset.id,focalPoint:null}).subscribe((function(){e.notificationService.success(b.marker("asset.update-focal-point-success")),e.asset=Object.assign(Object.assign({},e.asset),{focalPoint:null}),e.changeDetector.markForCheck()}),(function(){return e.notificationService.error(b.marker("asset.update-focal-point-error"))}))},e.prototype.onFocalPointChange=function(e){this.lastFocalPoint=e},e.prototype.setFocalPointCancel=function(){this.settingFocalPoint=!1,this.lastFocalPoint=void 0,this.size=this.sizePriorToSettingFocalPoint},e.prototype.setFocalPointEnd=function(){var e=this;if(this.settingFocalPoint=!1,this.size=this.sizePriorToSettingFocalPoint,this.lastFocalPoint){var t=this.lastFocalPoint,n=t.x,r=t.y;this.lastFocalPoint=void 0,this.dataService.product.updateAsset({id:this.asset.id,focalPoint:{x:n,y:r}}).subscribe((function(){e.notificationService.success(b.marker("asset.update-focal-point-success")),e.asset=Object.assign(Object.assign({},e.asset),{focalPoint:{x:n,y:r}}),e.changeDetector.markForCheck()}),(function(){return e.notificationService.error(b.marker("asset.update-focal-point-error"))}))}},e.prototype.manageTags=function(){var e=this;this.modalService.fromComponent(bu,{size:"sm"}).subscribe((function(t){t&&e.notificationService.success(b.marker("common.notify-updated-tags-success"))}))},e}();Su.decorators=[{type:t.Component,args:[{selector:"vdr-asset-preview",template:'<div class="preview-image" #previewDiv [class.centered]="centered">\r\n <div class="image-wrapper">\r\n <vdr-focal-point-control\r\n [width]="width"\r\n [height]="height"\r\n [fpx]="fpx"\r\n [fpy]="fpy"\r\n [editable]="settingFocalPoint"\r\n (focalPointChange)="onFocalPointChange($event)"\r\n >\r\n <img\r\n class="asset-image"\r\n [src]="asset | assetPreview: size"\r\n #imageElement\r\n (load)="onImageLoad()"\r\n />\r\n </vdr-focal-point-control>\r\n <div class="focal-point-info" *ngIf="settingFocalPoint">\r\n <button class="icon-button" (click)="setFocalPointCancel()">\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n <button class="btn btn-primary btn-sm" (click)="setFocalPointEnd()" [disabled]="!lastFocalPoint">\r\n <clr-icon shape="crosshairs"></clr-icon>\r\n {{ \'asset.set-focal-point\' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class="controls" [class.fade]="settingFocalPoint">\r\n <form [formGroup]="form">\r\n <clr-input-container class="name-input" *ngIf="editable">\r\n <label>{{ \'common.name\' | translate }}</label>\r\n <input\r\n clrInput\r\n type="text"\r\n formControlName="name"\r\n [readonly]="!([\'UpdateCatalog\', \'UpdateAsset\'] | hasPermission) || settingFocalPoint"\r\n />\r\n </clr-input-container>\r\n\r\n <vdr-labeled-data [label]="\'common.name\' | translate" *ngIf="!editable">\r\n <span class="elide">\r\n {{ asset.name }}\r\n </span>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.source-file\' | translate">\r\n <a [href]="asset.source" [title]="asset.source" target="_blank" class="elide source-link">{{\r\n getSourceFileName()\r\n }}</a>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.original-asset-size\' | translate">\r\n {{ asset.fileSize | filesize }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.dimensions\' | translate">\r\n {{ asset.width }} x {{ asset.height }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.focal-point\' | translate">\r\n <span *ngIf="fpx"\r\n ><clr-icon shape="crosshairs"></clr-icon> x: {{ fpx | number: \'1.2-2\' }}, y:\r\n {{ fpy | number: \'1.2-2\' }}</span\r\n >\r\n <span *ngIf="!fpx">{{ \'common.not-set\' | translate }}</span>\r\n <br />\r\n <button\r\n class="btn btn-secondary-outline btn-sm"\r\n [disabled]="settingFocalPoint"\r\n (click)="setFocalPointStart()"\r\n >\r\n <ng-container *ngIf="!fpx">{{ \'asset.set-focal-point\' | translate }}</ng-container>\r\n <ng-container *ngIf="fpx">{{ \'asset.update-focal-point\' | translate }}</ng-container>\r\n </button>\r\n <button\r\n class="btn btn-warning-outline btn-sm"\r\n [disabled]="settingFocalPoint"\r\n *ngIf="!!fpx"\r\n (click)="removeFocalPoint()"\r\n >\r\n {{ \'asset.unset-focal-point\' | translate }}\r\n </button>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]="\'common.tags\' | translate">\r\n <ng-container *ngIf="editable">\r\n <vdr-tag-selector formControlName="tags"></vdr-tag-selector>\r\n <button class="btn btn-link btn-sm" (click)="manageTags()">\r\n <clr-icon shape="tags"></clr-icon>\r\n {{ \'common.manage-tags\' | translate }}\r\n </button>\r\n </ng-container>\r\n <div *ngIf="!editable">\r\n <vdr-chip *ngFor="let tag of asset.tags" [colorFrom]="tag.value">\r\n <clr-icon shape="tag" class="mr2"></clr-icon>\r\n {{ tag.value }}</vdr-chip\r\n >\r\n </div>\r\n </vdr-labeled-data>\r\n </form>\r\n <section *ngIf="customFields.length">\r\n <label>{{ \'common.custom-fields\' | translate }}</label>\r\n <ng-container *ngFor="let customField of customFields">\r\n <vdr-custom-field-control\r\n *ngIf="customFieldIsSet(customField.name)"\r\n entityName="Asset"\r\n [compact]="true"\r\n [customFieldsFormGroup]="customFieldsForm"\r\n [customField]="customField"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </section>\r\n <div class="flex-spacer"></div>\r\n <div class="preview-select">\r\n <clr-select-container>\r\n <label>{{ \'asset.preview\' | translate }}</label>\r\n <select clrSelect name="options" [(ngModel)]="size" [disabled]="settingFocalPoint">\r\n <option value="tiny">tiny</option>\r\n <option value="thumb">thumb</option>\r\n <option value="small">small</option>\r\n <option value="medium">medium</option>\r\n <option value="large">large</option>\r\n <option value="">full size</option>\r\n </select>\r\n </clr-select-container>\r\n <div class="asset-detail">{{ width }} x {{ height }}</div>\r\n </div>\r\n <a\r\n *ngIf="!editable"\r\n class="btn btn-link btn-sm"\r\n [routerLink]="[\'/catalog\', \'assets\', asset.id]"\r\n (click)="editClick.emit()"\r\n >\r\n <clr-icon shape="edit"></clr-icon> {{ \'common.edit\' | translate }}\r\n </a>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[':host{display:flex;height:100%}.preview-image{width:100%;height:100%;min-height:60vh;overflow:auto;text-align:center;box-shadow:inset 0 0 5px 0 rgba(0,0,0,.1);background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACuoAAArqAVDM774AAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAK0lEQVQ4T2P4jwP8xgFGNSADqDwGIF0DlMYAUH0YYFQDMoDKYwASNfz/DwB/JvcficphowAAAABJRU5ErkJggg==");flex:1}.preview-image.centered{display:flex;align-items:center;justify-content:center}.preview-image vdr-focal-point-control{position:relative;box-shadow:0 0 10px -3px rgba(0,0,0,.15)}.preview-image .image-wrapper{position:relative}.preview-image .asset-image{width:100%}.preview-image .focal-point-info{position:absolute;display:flex;right:0}.controls{display:flex;flex-direction:column;margin-left:12px;min-width:15vw;max-width:25vw;transition:opacity .3s}.controls.fade{opacity:.5}.controls .name-input{margin-bottom:24px}.controls ::ng-deep .clr-control-container,.controls ::ng-deep .clr-control-container .clr-input{width:100%}.controls .elide{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}.controls .source-link{direction:rtl}.controls .preview-select{display:flex;align-items:center;margin-bottom:12px}.controls .preview-select clr-select-container{margin-right:12px}']}]}],Su.ctorParameters=function(){return[{type:C.FormBuilder},{type:Ql},{type:Uc},{type:t.ChangeDetectorRef},{type:lc}]},Su.propDecorators={asset:[{type:t.Input}],editable:[{type:t.Input}],customFields:[{type:t.Input}],customFieldsForm:[{type:t.Input}],assetChange:[{type:t.Output}],editClick:[{type:t.Output}],imageElementRef:[{type:t.ViewChild,args:["imageElement",{static:!0}]}],previewDivRef:[{type:t.ViewChild,args:["previewDiv",{static:!0}]}]};var Iu=function(){function e(){this._selected=[]}return Object.defineProperty(e.prototype,"value",{get:function(){return this._selected},enumerable:!1,configurable:!0}),e.prototype.select=function(e,t,n){if(e.selected=!0,n||!e.children)if(e.value.label){var r=function(e){return!!e.value.label};this._selected.filter(r).length>0?this._selected=this._selected.filter((function(e){return!r(e)})).concat(e):this._selected.push(e)}else this._selected.push(e)},e.prototype.unselect=function(e,t){this._selected=this._selected.filter((function(t){return t!==e})),e.selected=!1},e.prototype.clear=function(e){this._selected=e?this._selected.filter((function(e){return e.disabled})):[]},e.prototype._setChildrenSelectedState=function(e,t){e.forEach((function(e){return e.selected=t}))},e.prototype._removeChildren=function(e){this._selected=this._selected.filter((function(t){return t.parent!==e}))},e.prototype._removeParent=function(e){this._selected=this._selected.filter((function(t){return t!==e}))},e}();function Tu(){return new Iu}var Du=Tu,Au=function(){function e(){var e=this;this.searchTermChange=new t.EventEmitter,this.tagsChange=new t.EventEmitter,this.lastTerm="",this.lastTagIds=[],this.filterTagResults=function(t,n){return!!e.isTag(n)&&n.value.toLowerCase().startsWith(t.toLowerCase())},this.isTag=function(e){return"object"==typeof e&&!!e&&e.hasOwnProperty("value")}}return e.prototype.setSearchTerm=function(e){var t=this;if(e)this.selectComponent.select({label:e,value:{label:e}});else{var n=this.selectComponent.selectedItems.find((function(e){return!t.isTag(e.value)}));n&&this.selectComponent.unselect(n)}},e.prototype.setTags=function(e){var t=this,n=this.selectComponent.items;this.selectComponent.selectedItems.forEach((function(n){t.isTag(n.value)&&!e.map((function(e){return e.id})).includes(n.id)&&t.selectComponent.unselect(n)})),e.map((function(e){return n.find((function(n){return t.isTag(n)&&n.id===e.id}))})).filter(l.notNullOrUndefined).forEach((function(e){t.selectComponent.selectedItems.find((function(n){var r=n.value;return!!t.isTag(r)&&r.id===e.id}))||t.selectComponent.select({label:"",value:e})}))},e.prototype.onSelectChange=function(e){var t=this;Array.isArray(e)||(e=[e]);var n=e.filter((function(e){return!t.isTag(e)}));if(1<n.length)for(var r=0;r<n.length-1;r++);var o=n[n.length-1],i=o?o.label:"",a=e.filter(this.isTag);i!==this.lastTerm&&(this.searchTermChange.emit(i),this.lastTerm=i),this.lastTagIds.join(",")!==a.map((function(e){return e.id})).join(",")&&(this.tagsChange.emit(a),this.lastTagIds=a.map((function(e){return e.id})))},e.prototype.isSearchHeaderSelected=function(){return-1===this.selectComponent.itemsList.markedIndex},e.prototype.addTagFn=function(e){return{label:e}},e}();Au.decorators=[{type:t.Component,args:[{selector:"vdr-asset-search-input",template:'<ng-select\r\n [addTag]="addTagFn"\r\n [placeholder]="\'catalog.search-asset-name-or-tag\' | translate"\r\n [items]="tags"\r\n [searchFn]="filterTagResults"\r\n [hideSelected]="true"\r\n [multiple]="true"\r\n [markFirst]="false"\r\n (change)="onSelectChange($event)"\r\n #selectComponent\r\n>\r\n <ng-template ng-header-tmp>\r\n <div\r\n class="search-header"\r\n *ngIf="selectComponent.searchTerm"\r\n [class.selected]="isSearchHeaderSelected()"\r\n (click)="selectComponent.selectTag()"\r\n >\r\n {{ \'catalog.search-for-term\' | translate }}: {{ selectComponent.searchTerm }}\r\n </div>\r\n </ng-template>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <ng-container *ngIf="item.value">\r\n <vdr-chip [colorFrom]="item.value" icon="close" (iconClick)="clear(item)"><clr-icon shape="tag" class="mr2"></clr-icon> {{ item.value }}</vdr-chip>\r\n </ng-container>\r\n <ng-container *ngIf="!item.value">\r\n <vdr-chip [icon]="\'times\'" (iconClick)="clear(item)">"{{ item.label || item }}"</vdr-chip>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item="item" let-index="index" let-search="searchTerm">\r\n <ng-container *ngIf="item.value">\r\n <vdr-chip [colorFrom]="item.value"><clr-icon shape="tag" class="mr2"></clr-icon> {{ item.value }}</vdr-chip>\r\n </ng-container>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:k.SELECTION_MODEL_FACTORY,useValue:Du}],styles:[":host{display:block;width:100%}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}ng-select{width:100%;min-width:300px;margin-right:12px}.search-header{padding:8px 10px;border-bottom:1px solid var(--color-component-border-100);cursor:pointer}.search-header.selected,.search-header:hover{background-color:var(--color-component-bg-200)}"]}]}],Au.propDecorators={tags:[{type:t.Input}],searchTermChange:[{type:t.Output}],tagsChange:[{type:t.Output}],selectComponent:[{type:t.ViewChild,args:["selectComponent",{static:!0}]}]};var Eu=function(){function e(e){this.dataService=e,this.multiple=!0,this.includeDefaultChannel=!0,this.disableChannelIds=[],this.value=[],this.disabled=!1}return e.prototype.ngOnInit=function(){var e=this;this.channels$=this.dataService.client.userStatus().single$.pipe(r.map((function(t){return t.userStatus.channels.filter((function(t){return!!e.includeDefaultChannel||t.code!==y.DEFAULT_CHANNEL_CODE}))})),r.tap((function(t){return e.channels=t})))},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){var t,n=this;if(Array.isArray(e))"string"==typeof e[0]?this.value=e.map((function(e){var t;return null===(t=n.channels)||void 0===t?void 0:t.find((function(t){return t.id===e}))})).filter(l.notNullOrUndefined):this.value=e;else if("string"==typeof e){var r=null===(t=this.channels)||void 0===t?void 0:t.find((function(t){return t.id===e}));r&&(this.value=[r])}else e&&e.id&&(this.value=[e])},e.prototype.focussed=function(){this.onTouched&&this.onTouched()},e.prototype.channelIsDisabled=function(e){return this.disableChannelIds.includes(e)},e.prototype.valueChanged=function(e){Array.isArray(e)?this.onChange(e.map((function(e){return e.id}))):this.onChange([e?e.id:void 0])},e.prototype.compareFn=function(e,t){return("string"==typeof e?e:e.id)===("string"==typeof t?t:t.id)},e}();Eu.decorators=[{type:t.Component,args:[{selector:"vdr-channel-assignment-control",template:'<ng-select\r\n appendTo="body"\r\n [addTag]="false"\r\n [multiple]="multiple"\r\n [ngModel]="value"\r\n [clearable]="false"\r\n [searchable]="false"\r\n [disabled]="disabled"\r\n [compareWith]="compareFn"\r\n (focus)="focussed()"\r\n (change)="valueChanged($event)"\r\n>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <span aria-hidden="true" class="ng-value-icon left" (click)="clear(item)"> × </span>\r\n <vdr-channel-badge [channelCode]="item.code"></vdr-channel-badge>\r\n <span class="channel-label">{{ item.code | channelCodeToLabel | translate }}</span>\r\n </ng-template>\r\n <ng-option *ngFor="let item of channels$ | async" [value]="item" [disabled]="channelIsDisabled(item.id)">\r\n <vdr-channel-badge [channelCode]="item.code"></vdr-channel-badge>\r\n {{ item.code | channelCodeToLabel | translate }}\r\n </ng-option>\r\n</ng-select>\r\n\r\n',changeDetection:t.ChangeDetectionStrategy.Default,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:Eu,multi:!0}],styles:[":host{min-width:200px}:host.clr-input{border-bottom:none;padding:0}::ng-deep .ng-option>vdr-channel-badge,::ng-deep .ng-value>vdr-channel-badge{margin-bottom:-1px}::ng-deep .ng-value>vdr-channel-badge{margin-left:6px}.channel-label{margin-right:6px}"]}]}],Eu.ctorParameters=function(){return[{type:Ql}]},Eu.propDecorators={multiple:[{type:t.Input}],includeDefaultChannel:[{type:t.Input}],disableChannelIds:[{type:t.Input}]};var Ru=function(){function e(){}return Object.defineProperty(e.prototype,"isDefaultChannel",{get:function(){return this.channelCode===y.DEFAULT_CHANNEL_CODE},enumerable:!1,configurable:!0}),e}();Ru.decorators=[{type:t.Component,args:[{selector:"vdr-channel-badge",template:'<clr-icon shape="layers" [style.color]="isDefaultChannel ? \'#aaa\' : (channelCode | stringToColor)"></clr-icon>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}button :host{margin-bottom:-1px}clr-icon{margin-right:6px}"]}]}],Ru.propDecorators={channelCode:[{type:t.Input}]};var Pu=function(){this.invert=!1,this.colorFrom="",this.iconClick=new t.EventEmitter};function Ou(e){try{return e?JSON.parse(e):void 0}catch(t){return e}}function ku(e){return Array.isArray(e)?JSON.stringify(e):(null!=e?e:"").toString()}function wu(e){var t;return e.list?[]:null!==(t=e.defaultValue)&&void 0!==t?t:null}function xu(e,t){return e?e.description.replace(/{\s*([a-zA-Z0-9]+)\s*}/gi,(function(n,r){var o=r.toLowerCase(),i=t[o];if(null==i)return"_";var a=i,s=e.args.find((function(e){return e.name===o}));return s&&"int"===s.type&&s.ui&&"currency-form-input"===s.ui.component&&(a=i/100),s&&"datetime"===s.type&&i instanceof Date&&(a=i.toLocaleDateString()),a})):""}Pu.decorators=[{type:t.Component,args:[{selector:"vdr-chip",template:'<div\r\n class="wrapper"\r\n [class.with-background]="!invert && colorFrom"\r\n [style.backgroundColor]="!invert && (colorFrom | stringToColor)"\r\n [style.color]="invert && (colorFrom | stringToColor)"\r\n [style.borderColor]="invert && (colorFrom | stringToColor)"\r\n [ngClass]="colorType"\r\n>\r\n <div class="chip-label"><ng-content></ng-content></div>\r\n <div class="chip-icon" *ngIf="icon">\r\n <button (click)="iconClick.emit($event)">\r\n <clr-icon\r\n [attr.shape]="icon"\r\n [style.color]="invert && (colorFrom | stringToColor)"\r\n [class.is-inverse]="!invert && colorFrom"\r\n ></clr-icon>\r\n </button>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}.wrapper{display:flex;border:1px solid var(--color-component-border-300);border-radius:3px;margin:6px}.wrapper.with-background{color:var(--color-grey-100);border-color:transparent}.wrapper.with-background .chip-label{opacity:.9}.wrapper.warning{border-color:var(--color-chip-warning-border)}.wrapper.warning .chip-label{color:var(--color-chip-warning-text);background-color:var(--color-chip-warning-bg)}.wrapper.success{border-color:var(--color-chip-success-border)}.wrapper.success .chip-label{color:var(--color-chip-success-text);background-color:var(--color-chip-success-bg)}.wrapper.error{border-color:var(--color-chip-error-border)}.wrapper.error .chip-label{color:var(--color-chip-error-text);background-color:var(--color-chip-error-bg)}.chip-label{padding:3px 6px;border-radius:3px;white-space:nowrap;align-items:center}.chip-icon,.chip-label{line-height:1em;display:flex}.chip-icon{border-left:1px solid var(--color-component-border-200);padding:0 3px}.chip-icon button{cursor:pointer;background:none;margin:0;padding:0;border:none}"]}]}],Pu.propDecorators={icon:[{type:t.Input}],invert:[{type:t.Input}],colorFrom:[{type:t.Input}],colorType:[{type:t.Input}],iconClick:[{type:t.Output}]};var Fu=function(){function e(){this.readonly=!1,this.removable=!0,this.remove=new t.EventEmitter,this.argValues={},this.form=new C.FormGroup({})}return e.prototype.interpolateDescription=function(){return this.operationDefinition?xu(this.operationDefinition,this.form.value):""},e.prototype.ngOnChanges=function(e){("operation"in e||"operationDefinition"in e)&&this.createForm()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){e?this.form.disable():this.form.enable()},e.prototype.writeValue=function(e){e&&this.form.patchValue(e)},e.prototype.trackByName=function(e,t){return t.name},e.prototype.getArgDef=function(e){var t;return null===(t=this.operationDefinition)||void 0===t?void 0:t.args.find((function(t){return t.name===e.name}))},e.prototype.createForm=function(){var e,t,n,r,o=this;if(this.operation){if(this.subscription&&this.subscription.unsubscribe(),this.form=new C.FormGroup({}),this.form.__id=Math.random().toString(36).substr(10),this.operation.args){var i=function(e){var t=null===(r=a.operation.args.find((function(t){return t.name===e.name})))||void 0===r?void 0:r.value;void 0===t&&(t=wu(e));var n=e.list?void 0:e.required?C.Validators.required:void 0;a.form.addControl(e.name,new C.FormControl(t,n))},a=this;try{for(var s=X((null===(n=this.operationDefinition)||void 0===n?void 0:n.args)||[]),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}}this.subscription=this.form.valueChanges.subscribe((function(e){o.onChange&&o.onChange({code:o.operation&&o.operation.code,args:e}),o.onTouch&&o.onTouch()}))}},e.prototype.validate=function(e){return this.form.invalid?{required:!0}:null},e}();Fu.decorators=[{type:t.Component,args:[{selector:"vdr-configurable-input",template:'<div class="card" *ngIf="operation">\r\n <div class="card-block">{{ interpolateDescription() }}</div>\r\n <div class="card-block" *ngIf="operation.args?.length">\r\n <form [formGroup]="form" *ngIf="operation" class="operation-inputs">\r\n <div *ngFor="let arg of operation.args; trackBy: trackByName" class="arg-row">\r\n <ng-container *ngIf="form.get(arg.name)">\r\n <label>{{ getArgDef(arg)?.label || (arg.name | sentenceCase) }}</label>\r\n <vdr-dynamic-form-input\r\n [def]="getArgDef(arg)"\r\n [readonly]="readonly"\r\n [control]="form.get(arg.name)"\r\n [formControlName]="arg.name"\r\n ></vdr-dynamic-form-input>\r\n </ng-container>\r\n </div>\r\n </form>\r\n </div>\r\n <div class="card-footer" *ngIf="!readonly && removable">\r\n <button class="btn btn-sm btn-link btn-warning" (click)="remove.emit(operation)">\r\n <clr-icon shape="times"></clr-icon>\r\n {{ \'common.remove\' | translate }}\r\n </button>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:Fu,multi:!0},{provide:C.NG_VALIDATORS,useExisting:t.forwardRef((function(){return Fu})),multi:!0}],styles:[":host{display:block;margin-bottom:12px}:host>.card{margin-top:6px}.operation-inputs{padding-top:0}.operation-inputs .arg-row:not(:last-child){margin-bottom:24px}.operation-inputs .arg-row label{margin-right:6px}.operation-inputs .hidden{display:none}"]}]}],Fu.propDecorators={operation:[{type:t.Input}],operationDefinition:[{type:t.Input}],readonly:[{type:t.Input}],removable:[{type:t.Input}],remove:[{type:t.Output}]};var $u=function(){function e(e,n){this.dataService=e,this.changeDetectorRef=n,this.disabled=!1,this.readonly=!1,this.currencyCode="",this.valueChange=new t.EventEmitter,this.currencyCode$=new c.BehaviorSubject("")}return e.prototype.ngOnInit=function(){var e=this,t=this.dataService.client.uiState().mapStream((function(e){return e.uiState.language})),n=c.combineLatest(t,this.currencyCode$).pipe(r.map((function(e){var t=ee(e,2),n=t[0],r=t[1];if(!r)return"";var o=n.replace(/_/g,"-");return new Intl.NumberFormat(o,{style:"currency",currency:r,currencyDisplay:"symbol"}).format(void 0).indexOf("NaN")>0})));this.prefix$=n.pipe(r.map((function(t){return t?e.currencyCode:""}))),this.suffix$=n.pipe(r.map((function(t){return t?"":e.currencyCode})))},e.prototype.ngOnChanges=function(e){"value"in e&&this.writeValue(e.value.currentValue),"currencyCode"in e&&this.currencyCode$.next(this.currencyCode)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.onInput=function(e){var t=Math.round(100*+e);"function"==typeof this.onChange&&this.onChange(t),this.valueChange.emit(t);var n=Math.abs(Number(this._decimalValue)-Number(e));this._decimalValue=.009<n&&n<.011?this.toNumericString(e):e},e.prototype.onFocus=function(){"function"==typeof this.onTouch&&this.onTouch()},e.prototype.writeValue=function(e){var t=+e;Number.isNaN(t)||(this._decimalValue=this.toNumericString(Math.floor(e)/100))},e.prototype.toNumericString=function(e){return Number(e).toFixed(2)},e}();$u.decorators=[{type:t.Component,args:[{selector:"vdr-currency-input",template:'<vdr-affixed-input\r\n [prefix]="prefix$ | async | localeCurrencyName: \'symbol\'"\r\n [suffix]="suffix$ | async | localeCurrencyName: \'symbol\'"\r\n>\r\n <input\r\n type="number"\r\n step="0.01"\r\n [value]="_decimalValue"\r\n [disabled]="disabled"\r\n [readonly]="readonly"\r\n (input)="onInput($event.target.value)"\r\n (focus)="onFocus()"\r\n />\r\n</vdr-affixed-input>\r\n',providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:$u,multi:!0}],styles:[":host{padding:0;border:none}input{max-width:96px}input[readonly]{background-color:transparent}"]}]}],$u.ctorParameters=function(){return[{type:Ql},{type:t.ChangeDetectorRef}]},$u.propDecorators={disabled:[{type:t.Input}],readonly:[{type:t.Input}],value:[{type:t.Input}],currencyCode:[{type:t.Input}],valueChange:[{type:t.Output}]};var _u=function(){function e(e,t){this.dataService=e,this.customFieldComponentService=t,this.compact=!1,this.showLabel=!0,this.readonly=!1,this.hasCustomControl=!1}return e.prototype.getFieldDefinition=function(){var e=Object.assign({},this.customField),t=this.customFieldComponentService.customFieldComponentExists(this.entityName,this.customField.name);switch(t&&(e.ui={component:t}),e.__typename){case"IntCustomFieldConfig":return Object.assign(Object.assign({},e),{min:e.intMin,max:e.intMax,step:e.intStep});case"FloatCustomFieldConfig":return Object.assign(Object.assign({},e),{min:e.floatMin,max:e.floatMax,step:e.floatStep});case"DateTimeCustomFieldConfig":return Object.assign(Object.assign({},e),{min:e.datetimeMin,max:e.datetimeMax,step:e.datetimeStep});default:return Object.assign({},e)}},e}();_u.decorators=[{type:t.Component,args:[{selector:"vdr-custom-field-control",template:'<div class="clr-form-control" *ngIf="compact">\r\n <label for="basic" class="clr-control-label">{{ customField | customFieldLabel }}</label>\r\n <div class="clr-control-container">\r\n <div class="clr-input-wrapper">\r\n <ng-container *ngTemplateOutlet="inputs"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n<vdr-form-field [label]="customField | customFieldLabel" [for]="customField.name" *ngIf="!compact">\r\n <ng-container *ngTemplateOutlet="inputs"></ng-container>\r\n</vdr-form-field>\r\n\r\n<ng-template #inputs>\r\n <ng-container [formGroup]="formGroup">\r\n <vdr-dynamic-form-input\r\n [formControlName]="customField.name"\r\n [readonly]="readonly || customField.readonly"\r\n [control]="formGroup.get(customField.name)"\r\n [def]="getFieldDefinition()"\r\n >\r\n </vdr-dynamic-form-input>\r\n </ng-container>\r\n</ng-template>\r\n',styles:[":host .toggle-switch{margin-top:0;margin-bottom:0}"]}]}],_u.ctorParameters=function(){return[{type:Ql},{type:Zc}]},_u.propDecorators={entityName:[{type:t.Input}],formGroup:[{type:t.Input,args:["customFieldsFormGroup"]}],customField:[{type:t.Input}],compact:[{type:t.Input}],showLabel:[{type:t.Input}],readonly:[{type:t.Input}],customComponentPlaceholder:[{type:t.ViewChild,args:["customComponentPlaceholder",{read:t.ViewContainerRef}]}]};var Mu=function(){};Mu.decorators=[{type:t.Component,args:[{selector:"vdr-customer-label",template:'<clr-icon shape="user" [class.is-solid]="customer"></clr-icon>\r\n<div *ngIf="customer">\r\n <a [routerLink]="[\'/customer\', \'customers\', customer.id]">\r\n {{ customer.firstName }} {{ customer.lastName }}\r\n </a>\r\n</div>\r\n<div *ngIf="!customer">{{ \'common.guest\' | translate }}</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center}clr-icon{margin-right:6px}"]}]}],Mu.propDecorators={customer:[{type:t.Input}]};var Lu=function(){this.expand=!1};Lu.decorators=[{type:t.Component,args:[{selector:"vdr-dt-column",template:"\n <ng-template><ng-content></ng-content></ng-template>\n "}]}],Lu.propDecorators={expand:[{type:t.Input}],template:[{type:t.ViewChild,args:[t.TemplateRef,{static:!0}]}]};var Nu=function(){function e(){this.allSelectChange=new t.EventEmitter,this.rowSelectChange=new t.EventEmitter,this.pageChange=new t.EventEmitter,this.itemsPerPageChange=new t.EventEmitter}return e.prototype.ngAfterContentInit=function(){this.rowTemplate=this.templateRefs.last},e.prototype.trackByFn=function(e,t){return null!=t.id?t.id:e},e}();Nu.decorators=[{type:t.Component,args:[{selector:"vdr-data-table",template:'<ng-container *ngIf="!items || (items && items.length); else emptyPlaceholder">\r\n <table class="table">\r\n <thead>\r\n <tr>\r\n <th *ngIf="isRowSelectedFn" class="align-middle">\r\n <input\r\n type="checkbox"\r\n clrCheckbox\r\n [checked]="allSelected"\r\n (change)="allSelectChange.emit()"\r\n />\r\n </th>\r\n <th *ngFor="let header of columns?.toArray()" class="left" [class.expand]="header.expand">\r\n <ng-container *ngTemplateOutlet="header.template"></ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor="\r\n let item of items\r\n | paginate\r\n : {\r\n itemsPerPage: itemsPerPage,\r\n currentPage: currentPage,\r\n totalItems: totalItems\r\n };\r\n index as i;\r\n trackBy: trackByFn\r\n "\r\n >\r\n <td *ngIf="isRowSelectedFn" class="align-middle">\r\n <input\r\n type="checkbox"\r\n clrCheckbox\r\n [checked]="isRowSelectedFn(item)"\r\n (change)="rowSelectChange.emit(item)"\r\n />\r\n </td>\r\n <ng-container\r\n *ngTemplateOutlet="rowTemplate; context: { item: item, index: i }"\r\n ></ng-container>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class="table-footer">\r\n <vdr-items-per-page-controls\r\n *ngIf="totalItems"\r\n [itemsPerPage]="itemsPerPage"\r\n (itemsPerPageChange)="itemsPerPageChange.emit($event)"\r\n ></vdr-items-per-page-controls>\r\n\r\n <vdr-pagination-controls\r\n *ngIf="totalItems"\r\n [currentPage]="currentPage"\r\n [itemsPerPage]="itemsPerPage"\r\n [totalItems]="totalItems"\r\n (pageChange)="pageChange.emit($event)"\r\n ></vdr-pagination-controls>\r\n </div>\r\n</ng-container>\r\n<ng-template #emptyPlaceholder>\r\n <vdr-empty-placeholder [emptyStateLabel]="emptyStateLabel"></vdr-empty-placeholder>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[x.PaginationService],styles:[":host{display:block;max-width:100%;overflow:auto}thead th{position:sticky;top:24px;z-index:1}thead th.expand{width:100%}.table-footer{display:flex;align-items:baseline;justify-content:space-between;margin-top:6px}"]}]}],Nu.propDecorators={items:[{type:t.Input}],itemsPerPage:[{type:t.Input}],currentPage:[{type:t.Input}],totalItems:[{type:t.Input}],allSelected:[{type:t.Input}],isRowSelectedFn:[{type:t.Input}],emptyStateLabel:[{type:t.Input}],allSelectChange:[{type:t.Output}],rowSelectChange:[{type:t.Output}],pageChange:[{type:t.Output}],itemsPerPageChange:[{type:t.Output}],columns:[{type:t.ContentChildren,args:[Lu]}],templateRefs:[{type:t.ContentChildren,args:[t.TemplateRef]}]};var Uu={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},qu=[b.marker("datetime.weekday-su"),b.marker("datetime.weekday-mo"),b.marker("datetime.weekday-tu"),b.marker("datetime.weekday-we"),b.marker("datetime.weekday-th"),b.marker("datetime.weekday-fr"),b.marker("datetime.weekday-sa")],Gu=function(){function e(){var e=this;this.selectedDatetime$=new c.BehaviorSubject(null),this.viewingDatetime$=new c.BehaviorSubject(Z.default()),this.min=null,this.max=null,this.jumping=!1,this.selected$=this.selectedDatetime$.pipe(r.map((function(e){return e&&e.toDate()}))),this.viewing$=this.viewingDatetime$.pipe(r.map((function(e){return e.toDate()}))),this.weekStartDayIndex=Uu.mon,this.calendarView$=c.combineLatest(this.viewingDatetime$,this.selectedDatetime$).pipe(r.map((function(t){var n=ee(t,2),r=n[0],o=n[1];return e.generateCalendarView(r,o)})))}return e.prototype.setWeekStartingDay=function(e){this.weekStartDayIndex=Uu[e]},e.prototype.setMin=function(e){"string"==typeof e&&(this.min=Z.default(e))},e.prototype.setMax=function(e){"string"==typeof e&&(this.max=Z.default(e))},e.prototype.selectDatetime=function(e){var t,n=null;null==e||""===e?t=Z.default():(t=Z.default(e),n=Z.default(e)),this.selectedDatetime$.next(n),this.viewingDatetime$.next(t)},e.prototype.selectHour=function(e){var t=(this.selectedDatetime$.value||Z.default()).hour(e);this.selectedDatetime$.next(t),this.viewingDatetime$.next(t)},e.prototype.selectMinute=function(e){var t=(this.selectedDatetime$.value||Z.default()).minute(e);this.selectedDatetime$.next(t),this.viewingDatetime$.next(t)},e.prototype.viewNextMonth=function(){this.jumping=!1;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.add(1,"month"))},e.prototype.viewPrevMonth=function(){this.jumping=!1;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.subtract(1,"month"))},e.prototype.viewToday=function(){this.jumping=!1,this.viewingDatetime$.next(Z.default())},e.prototype.viewJumpDown=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.add(1,"week"))},e.prototype.viewJumpUp=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.subtract(1,"week"))},e.prototype.viewJumpRight=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.add(1,"day"))},e.prototype.viewJumpLeft=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.subtract(1,"day"))},e.prototype.selectToday=function(){this.jumping=!1,this.selectDatetime(Z.default())},e.prototype.selectViewed=function(){this.jumping=!1,this.selectDatetime(this.viewingDatetime$.value)},e.prototype.viewMonth=function(e){this.jumping=!1;var t=this.viewingDatetime$.value;this.viewingDatetime$.next(t.month(e-1))},e.prototype.viewYear=function(e){this.jumping=!1;var t=this.viewingDatetime$.value;this.viewingDatetime$.next(t.year(e))},e.prototype.generateCalendarView=function(e,t){var n=this;if(!e.isValid()||t&&!t.isValid())return[];var r=e.startOf("month"),o=e.endOf("month"),i=Z.default(),a=e.daysInMonth(),s=t&&t.get("date"),l=(r.day()-this.weekStartDayIndex+7)%7,c=[],u=[];if(0<l)for(var p=e.subtract(1,"month"),d=p.daysInMonth(),m=p.isSame(i,"month"),g=function(t){var r=e.subtract(1,"month").date(t);u.push({dayOfMonth:t,selected:!1,inCurrentMonth:!1,isToday:m&&i.get("date")===t,isViewing:!1,disabled:!h.isInBounds(r),select:function(){n.selectDatetime(r)}})},h=this,f=d-l+1;f<=d;f++)g(f);var y=e.isSame(i,"month"),v=function(o){(o+l-1)%7==0&&(c.push(u),u=[]);var a=r.add(o-1,"day"),p=!!t&&t.isSame(e,"month")&&t.isSame(e,"year");u.push({dayOfMonth:o,selected:o===s&&p,inCurrentMonth:!0,isToday:y&&i.get("date")===o,isViewing:C.jumping&&e.date()===o,disabled:!C.isInBounds(a),select:function(){n.selectDatetime(a)}})},C=this;for(f=1;f<=a;f++)v(f);var b=7-(l+a)%7;if(7!==b){var S=e.add(1,"month").isSame(i,"month"),I=function(e){var t=o.add(e,"day");u.push({dayOfMonth:e,selected:!1,inCurrentMonth:!1,isToday:S&&i.get("date")===e,isViewing:!1,disabled:!T.isInBounds(t),select:function(){n.selectDatetime(t)}})},T=this;for(f=1;f<=b;f++)I(f)}return c.push(u),c},e.prototype.isInBounds=function(e){return(!this.min||!this.min.isAfter(e))&&(!this.max||!this.max.isBefore(e))},e}();Gu.decorators=[{type:t.Injectable}],Gu.ctorParameters=function(){return[]};var Vu=function(){function e(e,t){this.changeDetectorRef=e,this.datetimePickerService=t,this.weekStartDay="mon",this.timeGranularityInterval=5,this.min=null,this.max=null,this.readonly=!1,this.disabled=!1,this.weekdays=[]}return e.prototype.ngOnInit=function(){var e=this;this.datetimePickerService.setWeekStartingDay(this.weekStartDay),this.datetimePickerService.setMin(this.min),this.datetimePickerService.setMax(this.max),this.populateYearsSelection(),this.populateWeekdays(),this.populateHours(),this.populateMinutes(),this.calendarView$=this.datetimePickerService.calendarView$,this.current$=this.datetimePickerService.viewing$.pipe(r.map((function(e){return{date:e,month:e.getMonth()+1,year:e.getFullYear()}}))),this.selected$=this.datetimePickerService.selected$,this.selectedHours$=this.selected$.pipe(r.map((function(e){return e&&e.getHours()}))),this.selectedMinutes$=this.selected$.pipe(r.map((function(e){return e&&e.getMinutes()}))),this.subscription=this.datetimePickerService.selected$.subscribe((function(t){e.onChange&&e.onChange(null==t?t:t.toISOString())}))},e.prototype.ngAfterViewInit=function(){var e=this;this.dropdownComponent.onOpenChange((function(t){t&&e.calendarTable.nativeElement.focus()}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.datetimePickerService.selectDatetime(e)},e.prototype.prevMonth=function(){this.datetimePickerService.viewPrevMonth()},e.prototype.nextMonth=function(){this.datetimePickerService.viewNextMonth()},e.prototype.selectToday=function(){this.datetimePickerService.selectToday()},e.prototype.setYear=function(e){var t=e.target;this.datetimePickerService.viewYear(parseInt(t.value,10))},e.prototype.setMonth=function(e){var t=e.target;this.datetimePickerService.viewMonth(parseInt(t.value,10))},e.prototype.selectDay=function(e){e.disabled||e.select()},e.prototype.clearValue=function(){this.datetimePickerService.selectDatetime(null)},e.prototype.handleCalendarKeydown=function(e){switch(e.key){case"ArrowDown":return this.datetimePickerService.viewJumpDown();case"ArrowUp":return this.datetimePickerService.viewJumpUp();case"ArrowRight":return this.datetimePickerService.viewJumpRight();case"ArrowLeft":return this.datetimePickerService.viewJumpLeft();case"Enter":return this.datetimePickerService.selectViewed()}},e.prototype.setHour=function(e){var t=e.target;this.datetimePickerService.selectHour(parseInt(t.value,10))},e.prototype.setMinute=function(e){var t=e.target;this.datetimePickerService.selectMinute(parseInt(t.value,10))},e.prototype.closeDatepicker=function(){this.dropdownComponent.toggleOpen(),this.datetimeInput.nativeElement.focus()},e.prototype.populateYearsSelection=function(){var e,t=null!==(e=this.yearRange)&&void 0!==e?e:10,n=(new Date).getFullYear(),r=this.min&&new Date(this.min).getFullYear()||n-t,o=(this.max&&new Date(this.max).getFullYear()||n+t)-r+1;this.years=Array.from({length:o}).map((function(e,t){return r+t}))},e.prototype.populateWeekdays=function(){for(var e=Uu[this.weekStartDay],t=0;t<7;t++)this.weekdays.push(qu[(t+e+0)%7])},e.prototype.populateHours=function(){this.hours=Array.from({length:24}).map((function(e,t){return t}))},e.prototype.populateMinutes=function(){for(var e=[],t=0;t<60;t+=this.timeGranularityInterval)e.push(t);this.minutes=e},e}();Vu.decorators=[{type:t.Component,args:[{selector:"vdr-datetime-picker",template:'<div class="input-wrapper">\r\n <input\r\n readonly\r\n [ngModel]="selected$ | async | localeDate: \'medium\'"\r\n class="selected-datetime"\r\n (keydown.enter)="dropdownComponent.toggleOpen()"\r\n (keydown.space)="dropdownComponent.toggleOpen()"\r\n #datetimeInput\r\n />\r\n <button class="clear-value-button btn" [class.visible]="!disabled && !readonly && (selected$ | async)" (click)="clearValue()">\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n</div>\r\n<vdr-dropdown #dropdownComponent>\r\n <button class="btn btn-outline calendar-button" vdrDropdownTrigger [disabled]="readonly || disabled">\r\n <clr-icon shape="calendar"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class="datetime-picker" *ngIf="current$ | async as currentView" (keydown.escape)="closeDatepicker()">\r\n <div class="controls">\r\n <div class="selects">\r\n <div class="month-select">\r\n <select\r\n clrSelect\r\n name="month"\r\n [ngModel]="currentView.month"\r\n (change)="setMonth($event)"\r\n >\r\n <option [value]="1">{{ \'datetime.month-jan\' | translate }}</option>\r\n <option [value]="2">{{ \'datetime.month-feb\' | translate }}</option>\r\n <option [value]="3">{{ \'datetime.month-mar\' | translate }}</option>\r\n <option [value]="4">{{ \'datetime.month-apr\' | translate }}</option>\r\n <option [value]="5">{{ \'datetime.month-may\' | translate }}</option>\r\n <option [value]="6">{{ \'datetime.month-jun\' | translate }}</option>\r\n <option [value]="7">{{ \'datetime.month-jul\' | translate }}</option>\r\n <option [value]="8">{{ \'datetime.month-aug\' | translate }}</option>\r\n <option [value]="9">{{ \'datetime.month-sep\' | translate }}</option>\r\n <option [value]="10">{{ \'datetime.month-oct\' | translate }}</option>\r\n <option [value]="11">{{ \'datetime.month-nov\' | translate }}</option>\r\n <option [value]="12">{{ \'datetime.month-dec\' | translate }}</option>\r\n </select>\r\n </div>\r\n <div class="year-select">\r\n <select\r\n clrSelect\r\n name="month"\r\n [ngModel]="currentView.year"\r\n (change)="setYear($event)"\r\n >\r\n <option *ngFor="let year of years" [value]="year">{{ year }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class="control-buttons">\r\n <button\r\n class="btn btn-link btn-sm"\r\n (click)="prevMonth()"\r\n [title]="\'common.view-previous-month\' | translate"\r\n >\r\n <clr-icon shape="caret" dir="left"></clr-icon>\r\n </button>\r\n <button class="btn btn-link btn-sm" (click)="selectToday()" [title]="\'common.select-today\' | translate">\r\n <clr-icon shape="event"></clr-icon>\r\n </button>\r\n <button\r\n class="btn btn-link btn-sm"\r\n (click)="nextMonth()"\r\n [title]="\'common.view-next-month\' | translate"\r\n >\r\n <clr-icon shape="caret" dir="right"></clr-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <table class="calendar-table" #calendarTable tabindex="0" (keydown)="handleCalendarKeydown($event)">\r\n <thead>\r\n <tr>\r\n <td *ngFor="let weekdayName of weekdays">\r\n {{ weekdayName | translate }}\r\n </td>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let week of calendarView$ | async">\r\n <td\r\n *ngFor="let day of week"\r\n class="day-cell"\r\n [class.selected]="day.selected"\r\n [class.today]="day.isToday"\r\n [class.viewing]="day.isViewing"\r\n [class.current-month]="day.inCurrentMonth"\r\n [class.disabled]="day.disabled"\r\n (keydown.enter)="selectDay(day)"\r\n (click)="selectDay(day)"\r\n >\r\n {{ day.dayOfMonth }}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class="time-picker">\r\n <span class="flex-spacer"> {{ \'datetime.time\' | translate }}: </span>\r\n <select clrSelect name="hour" [ngModel]="selectedHours$ | async" (change)="setHour($event)">\r\n <option *ngFor="let hour of hours" [value]="hour">{{ hour | number: \'2.0-0\' }}</option>\r\n </select>\r\n <span>:</span>\r\n <select\r\n clrSelect\r\n name="hour"\r\n [ngModel]="selectedMinutes$ | async"\r\n (change)="setMinute($event)"\r\n >\r\n <option *ngFor="let minute of minutes" [value]="minute">{{\r\n minute | number: \'2.0-0\'\r\n }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[Gu,{provide:C.NG_VALUE_ACCESSOR,useExisting:Vu,multi:!0}],styles:[":host{display:flex;width:100%}.input-wrapper{flex:1;display:flex}input.selected-datetime{flex:1;border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right:none!important}.clear-value-button{margin:0;border-radius:0;border-left:none;border-left-color:var(--color-component-border-200);border-bottom-color:var(--color-component-border-200);border-right-color:var(--color-component-border-200);border-top-color:var(--color-component-border-200);background-color:#fff;color:var(--color-grey-500);display:none}.clear-value-button.visible{display:block}.calendar-button{margin:0;border-top-left-radius:0;border-bottom-left-radius:0}.datetime-picker{margin:0 12px}table.calendar-table{padding:6px}table.calendar-table:focus{outline:1px solid var(--color-primary-500);box-shadow:0 0 1px 2px var(--color-primary-100)}table.calendar-table td{width:24px;text-align:center;border:1px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar-table .day-cell{background-color:var(--color-component-bg-200);color:var(--color-grey-500);cursor:pointer;transition:background-color .1s}table.calendar-table .day-cell.current-month{background-color:#fff;color:var(--color-grey-800)}table.calendar-table .day-cell.selected{background-color:var(--color-primary-500);color:#fff}table.calendar-table .day-cell.viewing:not(.selected){background-color:var(--color-primary-200)}table.calendar-table .day-cell.today{border:1px solid var(--color-component-border-300)}table.calendar-table .day-cell:hover:not(.selected):not(.disabled){background-color:var(--color-primary-100)}table.calendar-table .day-cell.disabled{cursor:default;color:var(--color-grey-300)}.selects{justify-content:space-between;margin-bottom:12px}.control-buttons,.selects{display:flex}.time-picker{display:flex;align-items:baseline;margin-top:12px}"]}]}],Vu.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Gu}]},Vu.propDecorators={yearRange:[{type:t.Input}],weekStartDay:[{type:t.Input}],timeGranularityInterval:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],readonly:[{type:t.Input}],dropdownComponent:[{type:t.ViewChild,args:["dropdownComponent",{static:!0}]}],datetimeInput:[{type:t.ViewChild,args:["datetimeInput",{static:!0}]}],calendarTable:[{type:t.ViewChild,args:["calendarTable"]}]};var ju=function(){function e(){this.isOpen=!1,this.onOpenChangeCallbacks=[],this.manualToggle=!1}return e.prototype.onClick=function(){this.manualToggle||this.toggleOpen()},e.prototype.toggleOpen=function(){var e=this;this.isOpen=!this.isOpen,this.onOpenChangeCallbacks.forEach((function(t){return t(e.isOpen)}))},e.prototype.onOpenChange=function(e){this.onOpenChangeCallbacks.push(e)},e.prototype.setTriggerElement=function(e){this.trigger=e},e}();ju.decorators=[{type:t.Component,args:[{selector:"vdr-dropdown",template:"<ng-content></ng-content>\r\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ju.propDecorators={manualToggle:[{type:t.Input}]};var Bu=function(){function e(e){this.dropdown=e}return e.prototype.onDropdownItemClick=function(e){this.dropdown.onClick()},e}();Bu.decorators=[{type:t.Directive,args:[{selector:"[vdrDropdownItem]",host:{"[class.dropdown-item]":"true"}}]}],Bu.ctorParameters=function(){return[{type:ju}]},Bu.propDecorators={onDropdownItemClick:[{type:t.HostListener,args:["click",["$event"]]}]};var Hu=function(){function e(e,t,n){this.overlay=e,this.viewContainerRef=t,this.dropdown=n,this.position="bottom-left"}return e.prototype.ngOnInit=function(){var e=this;this.dropdown.onOpenChange((function(t){t?e.overlayRef.attach(e.menuPortal):e.overlayRef.detach()}))},e.prototype.ngAfterViewInit=function(){var e=this;this.overlayRef=this.overlay.create({hasBackdrop:!0,backdropClass:"clear-backdrop",positionStrategy:this.getPositionStrategy(),maxHeight:"70vh"}),this.menuPortal=new $.TemplatePortal(this.menuTemplate,this.viewContainerRef),this.backdropClickSub=this.overlayRef.backdropClick().subscribe((function(){e.dropdown.toggleOpen()}))},e.prototype.ngOnDestroy=function(){this.overlayRef&&this.overlayRef.dispose(),this.backdropClickSub&&this.backdropClickSub.unsubscribe()},e.prototype.getPositionStrategy=function(){var e,t=((e={})["top-left"]={originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},e["top-right"]={originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},e["bottom-left"]={originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},e["bottom-right"]={originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},e)[this.position];return this.overlay.position().flexibleConnectedTo(this.dropdown.trigger).withPositions([t,this.invertPosition(t)]).withViewportMargin(12).withPush(!0)},e.prototype.invertPosition=function(e){var t=Object.assign({},e);return t.originY="top"===e.originY?"bottom":"top",t.overlayY="top"===e.overlayY?"bottom":"top",t},e}();Hu.decorators=[{type:t.Component,args:[{selector:"vdr-dropdown-menu",template:'\n <ng-template #menu>\n <div class="dropdown open">\n <div class="dropdown-menu">\n <div class="dropdown-content-wrapper">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </ng-template>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".clear-backdrop{background-color:#ff69b4}.dropdown.open>.dropdown-menu{position:relative;top:0;height:100%;overflow-y:auto}:host{opacity:1;transition:opacity .3s}"]}]}],Hu.ctorParameters=function(){return[{type:E.Overlay},{type:t.ViewContainerRef},{type:ju}]},Hu.propDecorators={position:[{type:t.Input,args:["vdrPosition"]}],menuTemplate:[{type:t.ViewChild,args:["menu",{static:!0}]}]};var zu=function(){function e(e,t){this.dropdown=e,this.elementRef=t,e.setTriggerElement(this.elementRef)}return e.prototype.onDropdownTriggerClick=function(e){this.dropdown.toggleOpen()},e}();zu.decorators=[{type:t.Directive,args:[{selector:"[vdrDropdownTrigger]"}]}],zu.ctorParameters=function(){return[{type:ju},{type:t.ElementRef}]},zu.propDecorators={onDropdownTriggerClick:[{type:t.HostListener,args:["click",["$event"]]}]};var Wu=function(){function e(){this.displayPrivacyControls=!0,this.noteIsPrivate=!0,this.note=""}return e.prototype.confirm=function(){this.resolveWith({note:this.note,isPrivate:this.noteIsPrivate})},e.prototype.cancel=function(){this.resolveWith()},e}();Wu.decorators=[{type:t.Component,args:[{selector:"vdr-edit-note-dialog",template:'<ng-template vdrDialogTitle>\r\n {{ \'common.edit-note\' | translate }}\r\n</ng-template>\r\n\r\n<textarea [(ngModel)]="note" name="note" class="note"></textarea>\r\n<div class="visibility-select" *ngIf="displayPrivacyControls">\r\n <clr-checkbox-wrapper>\r\n <input type="checkbox" clrCheckbox [(ngModel)]="noteIsPrivate" />\r\n <label>{{ \'order.note-is-private\' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf="noteIsPrivate" class="private">\r\n {{ \'order.note-only-visible-to-administrators\' | translate }}\r\n </span>\r\n <span *ngIf="!noteIsPrivate" class="public">\r\n {{ \'order.note-visible-to-customer\' | translate }}\r\n </span>\r\n</div>\r\n<ng-template vdrDialogButtons>\r\n <button type="button" class="btn" (click)="cancel()">{{ \'common.cancel\' | translate }}</button>\r\n <button type="submit" (click)="confirm()" class="btn btn-primary" [disabled]="note.length === 0">\r\n {{ \'common.confirm\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-500)}.visibility-select .private{color:var(--color-success-500)}textarea.note{width:100%;height:72px;border-radius:3px;margin-right:6px}"]}]}];var Zu=function(){};Zu.decorators=[{type:t.Component,args:[{selector:"vdr-empty-placeholder",template:'<div class="empty-state">\r\n <clr-icon shape="bubble-exclamation" size="64"></clr-icon>\r\n <div class="empty-label">\r\n <ng-container *ngIf="emptyStateLabel; else defaultEmptyLabel">{{ emptyStateLabel }}</ng-container>\r\n <ng-template #defaultEmptyLabel>{{ \'common.no-results\' | translate }}</ng-template>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".empty-state{text-align:center;padding:60px;color:var(--color-grey-400);width:100%}.empty-state .empty-label{margin-top:12px;font-size:22px}"]}]}],Zu.propDecorators={emptyStateLabel:[{type:t.Input}]};var Yu=function(){this.small=!1};Yu.decorators=[{type:t.Component,args:[{selector:"vdr-entity-info",template:'<vdr-dropdown *ngIf="entity.id">\r\n <button class="btn btn-icon btn-link info-button" [class.btn-sm]="small" vdrDropdownTrigger>\r\n <clr-icon shape="info-standard"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class="entity-info">\r\n <vdr-labeled-data [label]="\'common.ID\' | translate">\r\n {{ entity.id }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf="entity.createdAt" [label]="\'common.created-at\' | translate">\r\n {{ entity.createdAt | localeDate: \'medium\' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf="entity.updatedAt" [label]="\'common.updated-at\' | translate">\r\n {{ entity.updatedAt | localeDate: \'medium\' }}\r\n </vdr-labeled-data>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".info-button{color:var(--color-icon-button)}.entity-info{margin:0 12px}"]}]}],Yu.propDecorators={small:[{type:t.Input}],entity:[{type:t.Input}]};var Ju=function(){function e(e,t){var n=this;this.dataService=e,this.notificationService=t,this.cancellationMessage$=new c.Subject,this.destroyMessage$=new c.Subject,this.handleMessage=function(e){var t=e.data,o=e.origin;if(n.isExtensionMessage(t)){var i=n.cancellationMessage$.pipe(r.filter((function(e){return e===t.requestId}))),a=c.merge(i,n.destroyMessage$);switch(t.type){case"cancellation":n.cancellationMessage$.next(t.requestId);break;case"destroy":n.destroyMessage$.next();break;case"graphql-query":var s=t.data,p=s.document,d=s.variables,m=s.fetchPolicy;n.dataService.query(u.parse(p),d,m).stream$.pipe(r.takeUntil(a)).subscribe(n.createObserver(t.requestId,o));break;case"graphql-mutation":var g=t.data;p=g.document,d=g.variables;n.dataService.mutate(u.parse(p),d).pipe(r.takeUntil(a)).subscribe(n.createObserver(t.requestId,o));break;case"notification":n.notificationService.notify(t.data);break;default:l.assertNever(t)}}}}return e.prototype.init=function(e){this.extensionWindow=e,window.addEventListener("message",this.handleMessage)},e.prototype.destroy=function(){window.removeEventListener("message",this.handleMessage),this.destroyMessage$.next()},e.prototype.ngOnDestroy=function(){this.destroy()},e.prototype.createObserver=function(e,t){var n=this;return{next:function(r){return n.sendMessage({data:r,error:!1,complete:!1,requestId:e},t)},error:function(r){return n.sendMessage({data:r,error:!0,complete:!1,requestId:e},t)},complete:function(){return n.sendMessage({data:null,error:!1,complete:!0,requestId:e},t)}}},e.prototype.sendMessage=function(e,t){this.extensionWindow.postMessage(e,t)},e.prototype.isExtensionMessage=function(e){return e.hasOwnProperty("type")&&e.hasOwnProperty("data")&&e.hasOwnProperty("requestId")},e}();Ju.decorators=[{type:t.Injectable}],Ju.ctorParameters=function(){return[{type:Ql},{type:Uc}]};var Ku=function(){function e(e,t,n){this.route=e,this.sanitizer=t,this.extensionHostService=n,this.openInIframe=!0,this.extensionWindowIsOpen=!1}return e.prototype.ngOnInit=function(){var e=this.route.snapshot.data;if(!this.isExtensionHostConfig(e.extensionHostConfig))throw new Error("Expected an ExtensionHostConfig object, got "+JSON.stringify(e.extensionHostConfig));this.config=e.extensionHostConfig,this.openInIframe=!this.config.openInNewTab,this.extensionUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.config.extensionUrl||"about:blank")},e.prototype.ngAfterViewInit=function(){if(this.openInIframe){var e=this.extensionFrame.nativeElement.contentWindow;e&&this.extensionHostService.init(e)}},e.prototype.ngOnDestroy=function(){this.extensionWindow&&this.extensionWindow.close()},e.prototype.launchExtensionWindow=function(){var e,t=this,n=window.open(this.config.extensionUrl);n&&(this.extensionHostService.init(n),this.extensionWindowIsOpen=!0,this.extensionWindow=n,function t(n,r){n.closed?(window.clearTimeout(e),r()):e=window.setTimeout((function(){return t(n,r)}),250)}(n,(function(){t.extensionWindowIsOpen=!1,t.extensionHostService.destroy()})))},e.prototype.isExtensionHostConfig=function(e){return e.hasOwnProperty("extensionUrl")},e}();Ku.decorators=[{type:t.Component,args:[{selector:"vdr-extension-host",template:'<ng-template [ngIf]="openInIframe" [ngIfElse]="launchExtension">\r\n <iframe [src]="extensionUrl" #extensionFrame></iframe>\r\n</ng-template>\r\n<ng-template #launchExtension>\r\n <div class="launch-button" [class.launched]="extensionWindowIsOpen">\r\n <div>\r\n <button\r\n class="btn btn-lg btn-primary"\r\n [disabled]="extensionWindowIsOpen"\r\n (click)="launchExtensionWindow()"\r\n >\r\n <clr-icon shape="pop-out"></clr-icon>\r\n {{ \'common.launch-extension\' | translate }}\r\n </button>\r\n <h3 class="window-hint" [class.visible]="extensionWindowIsOpen">\r\n {{ \'common.extension-running-in-separate-window\' | translate }}\r\n </h3>\r\n </div>\r\n </div>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.Default,providers:[Ju],styles:[".launch-button,iframe{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border:none}.launch-button{padding:24px;display:flex;align-items:center;justify-content:center;transition:background-color .3s;text-align:center}.launch-button.launched{background-color:var(--color-component-bg-300)}.window-hint{visibility:hidden;opacity:0;transition:visibility .3s 0,opacity .3s}.window-hint.visible{visibility:visible;opacity:1;transition:visibility 0,opacity .3s}"]}]}],Ku.ctorParameters=function(){return[{type:f.ActivatedRoute},{type:d.DomSanitizer},{type:Ju}]},Ku.propDecorators={extensionFrame:[{type:t.ViewChild,args:["extensionFrame"]}]};var Qu=function(){this.removable=!0,this.displayFacetName=!0,this.remove=new t.EventEmitter};function Xu(e){return e.reduce((function(e,t){return e.concat(t.values)}),[])}Qu.decorators=[{type:t.Component,args:[{selector:"vdr-facet-value-chip",template:'<vdr-chip\r\n [icon]="removable ? \'times\' : undefined"\r\n [colorFrom]="facetValue.facet.name"\r\n (iconClick)="remove.emit()"\r\n [title]="facetValue.facet.name + \' - \' + facetValue.name"\r\n>\r\n <span *ngIf="displayFacetName" class="facet-name">{{ facetValue.facet.name }}</span>\r\n {{ facetValue.name }}\r\n</vdr-chip>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}.facet-name{color:var(--color-grey-100);text-transform:uppercase;font-size:10px;margin-right:3px;height:11px}"]}]}],Qu.propDecorators={facetValue:[{type:t.Input}],removable:[{type:t.Input}],displayFacetName:[{type:t.Input}],remove:[{type:t.Output}]};var ep=function(){function e(e){this.dataService=e,this.selectedValuesChange=new t.EventEmitter,this.readonly=!1,this.facetValues=[],this.disabled=!1,this.toSelectorItem=function(e){return{name:e.name,facetName:e.facet.name,id:e.id,value:e}}}return e.prototype.ngOnInit=function(){this.facetValues=Xu(this.facets).map(this.toSelectorItem)},e.prototype.onChange=function(e){this.readonly||(this.selectedValuesChange.emit(e.map((function(e){return e.value}))),this.onChangeFn&&this.onChangeFn(JSON.stringify(e.map((function(e){return e.id})))))},e.prototype.registerOnChange=function(e){this.onChangeFn=e},e.prototype.registerOnTouched=function(e){this.onTouchFn=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.focus=function(){this.ngSelect.focus()},e.prototype.writeValue=function(e){if("string"==typeof e)try{var t=JSON.parse(e);this.value=t}catch(e){throw e}else if(Array.isArray(e)){e.every((function(e){return"number"==typeof e||"string"==typeof e}))?this.value=e.map((function(e){return e.toString()})):this.value=e.map((function(e){return e.id}))}},e}();ep.decorators=[{type:t.Component,args:[{selector:"vdr-facet-value-selector",template:'<ng-select\r\n [items]="facetValues"\r\n [addTag]="false"\r\n [hideSelected]="true"\r\n bindValue="id"\r\n multiple="true"\r\n appendTo="body"\r\n bindLabel="name"\r\n [disabled]="disabled || readonly"\r\n [ngModel]="value"\r\n (change)="onChange($event)"\r\n>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <vdr-facet-value-chip\r\n [facetValue]="item.value"\r\n [removable]="!readonly"\r\n (remove)="clear(item)"\r\n ></vdr-facet-value-chip>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item="item">\r\n <vdr-facet-value-chip [facetValue]="item.value" [removable]="false"></vdr-facet-value-chip>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:ep,multi:!0}],styles:[":host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}"]}]}],ep.ctorParameters=function(){return[{type:Ql}]},ep.propDecorators={selectedValuesChange:[{type:t.Output}],facets:[{type:t.Input}],readonly:[{type:t.Input}],ngSelect:[{type:t.ViewChild,args:[k.NgSelectComponent]}]};var tp=function(){function e(){this.visible=!1,this.editable=!1,this.fpx=.5,this.fpy=.5,this.focalPointChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"initialPosition",{get:function(){return this.focalPointToOffset(null==this.fpx?.5:this.fpx,null==this.fpy?.5:this.fpy)},enumerable:!1,configurable:!0}),e.prototype.onDragEnded=function(e){var t=this.getCurrentFocalPoint(),n=t.x,r=t.y;this.fpx=n,this.fpy=r,this.focalPointChange.emit({x:n,y:r})},e.prototype.getCurrentFocalPoint=function(){var e=this.dot.nativeElement.getBoundingClientRect(),t=e.left,n=e.top,r=e.width,o=e.height,i=this.frame.nativeElement.getBoundingClientRect(),a=i.left,s=n-i.top+o/2;return{x:(t-a+r/2)/this.width,y:s/this.height}},e.prototype.focalPointToOffset=function(e,t){var n=this.dot.nativeElement.getBoundingClientRect(),r=n.width,o=n.height;return{x:e*this.width-r/2,y:t*this.height-o/2}},e}();tp.decorators=[{type:t.Component,args:[{selector:"vdr-focal-point-control",template:'<ng-content></ng-content>\r\n<div class="frame" #frame [style.width.px]="width" [style.height.px]="height">\r\n <div\r\n #dot\r\n class="dot"\r\n [class.visible]="visible"\r\n [class.editable]="editable"\r\n cdkDrag\r\n [cdkDragDisabled]="!editable"\r\n cdkDragBoundary=".frame"\r\n (cdkDragEnded)="onDragEnded($event)"\r\n [cdkDragFreeDragPosition]="initialPosition"\r\n ></div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{position:relative;display:block}.frame{top:0}.dot,.frame{position:absolute}.dot{width:20px;height:20px;border-radius:50%;border:2px solid #fff;visibility:hidden;transition:opacity .3s;box-shadow:0 0 4px 4px rgba(0,0,0,.42)}.dot.visible{visibility:visible;opacity:.7}.dot.editable{cursor:move;visibility:visible;opacity:1;-webkit-animation:pulse;animation:pulse;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-iteration-count:4;animation-iteration-count:4}@-webkit-keyframes pulse{0%{border-color:#fff}50%{border-color:var(--color-warning-500)}to{border-color:#fff}}@keyframes pulse{0%{border-color:#fff}50%{border-color:var(--color-warning-500)}to{border-color:#fff}}"]}]}],tp.propDecorators={visible:[{type:t.Input}],editable:[{type:t.Input}],width:[{type:t.HostBinding,args:["style.width.px"]},{type:t.Input}],height:[{type:t.HostBinding,args:["style.height.px"]},{type:t.Input}],fpx:[{type:t.Input}],fpy:[{type:t.Input}],focalPointChange:[{type:t.Output}],frame:[{type:t.ViewChild,args:["frame",{static:!0}]}],dot:[{type:t.ViewChild,args:["dot",{static:!0}]}]};var np=function(){function e(e,t){this.elementRef=e,this.formControlName=t}return Object.defineProperty(e.prototype,"valid",{get:function(){return!!this.formControlName&&!!this.formControlName.valid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return!!this.formControlName&&!!this.formControlName.touched},enumerable:!1,configurable:!0}),e.prototype.setReadOnly=function(e){var t=this.elementRef.nativeElement;!function(e){return e.hasOwnProperty("selectedIndex")}(t)?t.readOnly=e:t.disabled=e},e}();np.decorators=[{type:t.Directive,args:[{selector:"input, textarea, select"}]}],np.ctorParameters=function(){return[{type:t.ElementRef},{type:C.NgControl,decorators:[{type:t.Optional}]}]};var rp=function(){function e(){this.errors={},this.readOnlyToggle=!1,this.isReadOnly=!1}return e.prototype.ngOnInit=function(){this.readOnlyToggle&&(this.isReadOnly=!0,this.setReadOnly(!0)),this.isReadOnly=this.readOnlyToggle},e.prototype.setReadOnly=function(e){this.formFieldControl.setReadOnly(e),this.isReadOnly=e},e.prototype.getErrorMessage=function(){var e,t;if(this.formFieldControl&&this.formFieldControl.formControlName){var n=this.formFieldControl.formControlName.errors;if(n)try{for(var r=X(Object.keys(n)),o=r.next();!o.done;o=r.next()){var i=o.value;if(this.errors[i])return this.errors[i]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}}},e}();rp.decorators=[{type:t.Component,args:[{selector:"vdr-form-field",template:'<div\r\n class="form-group"\r\n [class.no-label]="!label"\r\n [class.clr-error]="formFieldControl?.formControlName?.invalid"\r\n>\r\n <label *ngIf="label" [for]="for" class="clr-control-label">\r\n {{ label }}\r\n <vdr-help-tooltip *ngIf="tooltip" [content]="tooltip"></vdr-help-tooltip>\r\n </label>\r\n <label\r\n [for]="for"\r\n aria-haspopup="true"\r\n role="tooltip"\r\n [class.invalid]="formFieldControl?.touched && !formFieldControl?.valid"\r\n class="tooltip tooltip-validation tooltip-sm tooltip-top-left"\r\n >\r\n <div class="input-row" [class.has-toggle]="readOnlyToggle">\r\n <ng-content></ng-content>\r\n <button\r\n *ngIf="readOnlyToggle"\r\n type="button"\r\n [disabled]="!isReadOnly"\r\n [title]="\'common.edit-field\' | translate"\r\n class="btn btn-icon edit-button"\r\n (click)="setReadOnly(false)"\r\n >\r\n <clr-icon shape="edit"></clr-icon>\r\n </button>\r\n </div>\r\n <div class="clr-subtext" *ngIf="getErrorMessage()">{{ getErrorMessage() }}</div>\r\n <span class="tooltip-content">{{ label }} is required.</span>\r\n </label>\r\n</div>\r\n',styles:[':host{display:block}:host .form-group>label:first-child{top:6px}:host .form-group>label:nth-of-type(2){flex:1;max-width:20rem}:host .form-group>label:nth-of-type(2) ::ng-deep>:not(.tooltip-content){width:100%}:host .form-group .tooltip-validation{height:auto}:host .form-group.no-label{margin:-6px 0 0;padding:0;justify-content:center}:host .form-group.no-label>label{position:relative;justify-content:center}:host .form-group.no-label .input-row{justify-content:center}:host .input-row{display:flex}:host .input-row ::ng-deep input{flex:1}:host .input-row ::ng-deep input[disabled]{background-color:var(--color-component-bg-200)}:host .input-row button.edit-button{margin:0;border-radius:0 3px 3px 0}:host .input-row.has-toggle ::ng-deep input{border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right:none}:host .input-row ::ng-deep clr-toggle-wrapper{margin-top:8px}.tooltip.tooltip-validation.invalid:before{position:absolute;content:"";height:.666667rem;width:.666667rem;top:.125rem;right:.25rem;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20version%3D%221.1%22%20viewBox%3D%225%205%2026%2026%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3Cstyle%3E.clr-i-outline%7Bfill%3A%23a32100%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctitle%3Eexclamation-circle-line%3C%2Ftitle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20class%3D%22clr-i-outline%20clr-i-outline-path-1%22%20d%3D%22M18%2C6A12%2C12%2C0%2C1%2C0%2C30%2C18%2C12%2C12%2C0%2C0%2C0%2C18%2C6Zm0%2C22A10%2C10%2C0%2C1%2C1%2C28%2C18%2C10%2C10%2C0%2C0%2C1%2C18%2C28Z%22%3E%3C%2Fpath%3E%3Cpath%20class%3D%22clr-i-outline%20clr-i-outline-path-2%22%20d%3D%22M18%2C20.07a1.3%2C1.3%2C0%2C0%2C1-1.3-1.3v-6a1.3%2C1.3%2C0%2C1%2C1%2C2.6%2C0v6A1.3%2C1.3%2C0%2C0%2C1%2C18%2C20.07Z%22%3E%3C%2Fpath%3E%3Ccircle%20class%3D%22clr-i-outline%20clr-i-outline-path-3%22%20cx%3D%2217.95%22%20cy%3D%2223.02%22%20r%3D%221.5%22%3E%3C%2Fcircle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fsvg%3E);background-repeat:no-repeat;background-size:contain;vertical-align:middle;margin:0}.tooltip .tooltip-content.tooltip-sm,.tooltip.tooltip-sm>.tooltip-content{width:5rem}.tooltip:hover>.tooltip-content{right:12px;margin-bottom:0}.tooltip:not(.invalid):hover>.tooltip-content{display:none}']}]}],rp.propDecorators={label:[{type:t.Input}],for:[{type:t.Input}],tooltip:[{type:t.Input}],errors:[{type:t.Input}],readOnlyToggle:[{type:t.Input}],formFieldControl:[{type:t.ContentChild,args:[np,{static:!0}]}]};var op=function(){};op.decorators=[{type:t.Component,args:[{selector:"vdr-form-item",template:'<div class="form-group">\r\n <label class="clr-control-label">{{ label }}</label>\r\n <div class="content"><ng-content></ng-content></div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host .form-group>.content{flex:1;max-width:20rem}"]}]}],op.propDecorators={label:[{type:t.Input}]};var ip=function(){function e(){}return e.prototype.getCountryName=function(){return this.isAddressFragment(this.address)?this.address.country.name:this.address.country||""},e.prototype.getCustomFields=function(){var e=this.address.customFields;return e?Object.entries(e).filter((function(e){return"__typename"!==ee(e,1)[0]})).map((function(e){var t,n,r=ee(e,2);return{key:r[0],value:null!==(n=null===(t=r[1])||void 0===t?void 0:t.toString())&&void 0!==n?n:"-"}})):[]},e.prototype.isAddressFragment=function(e){return"string"!=typeof e.country},e}();ip.decorators=[{type:t.Component,args:[{selector:"vdr-formatted-address",template:'<ul class="address-lines">\r\n <li *ngIf="address.fullName">{{ address.fullName }}</li>\r\n <li *ngIf="address.streetLine1">{{ address.streetLine1 }}</li>\r\n <li *ngIf="address.streetLine2">{{ address.streetLine2 }}</li>\r\n <li *ngIf="address.city">{{ address.city }}</li>\r\n <li *ngIf="address.province">{{ address.province }}</li>\r\n <li *ngIf="address.postalCode">{{ address.postalCode }}</li>\r\n <li *ngIf="address.country">\r\n <clr-icon shape="world" size="12"></clr-icon>\r\n {{ getCountryName() }}\r\n </li>\r\n <li *ngIf="address.phoneNumber">\r\n <clr-icon shape="phone-handset" size="12"></clr-icon>\r\n {{ address.phoneNumber }}\r\n </li>\r\n <li *ngFor="let customField of getCustomFields()" class="custom-field">\r\n <vdr-labeled-data [label]="customField.key">{{ customField.value }}</vdr-labeled-data>\r\n </li>\r\n</ul>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".address-lines{list-style-type:none;line-height:1.2em}.custom-field{margin-top:6px}"]}]}],ip.propDecorators={address:[{type:t.Input}]};var ap=function(){};ap.decorators=[{type:t.Component,args:[{selector:"vdr-help-tooltip",template:'<clr-tooltip>\r\n <clr-icon clrTooltipTrigger shape="help" size="14"></clr-icon>\r\n <clr-tooltip-content [clrPosition]="position" clrSize="md" *clrIfOpen>\r\n <span>{{ content }}</span>\r\n </clr-tooltip-content>\r\n</clr-tooltip>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ap.propDecorators={content:[{type:t.Input}],position:[{type:t.Input}]};var sp=function(){};sp.decorators=[{type:t.Component,args:[{selector:"vdr-history-entry-detail",template:'<vdr-dropdown>\r\n <button class="btn btn-link btn-sm details-button" vdrDropdownTrigger>\r\n <clr-icon shape="details" size="12"></clr-icon>\r\n {{ \'common.details\' | translate }}\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class="entry-dropdown">\r\n <ng-content></ng-content>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".entry-dropdown{margin:0 12px}.details-button{margin:0}"]}]}];var lp=function(){this.itemsPerPage=10,this.itemsPerPageChange=new t.EventEmitter};lp.decorators=[{type:t.Component,args:[{selector:"vdr-items-per-page-controls",template:'<div class="select">\r\n <select [ngModel]="itemsPerPage" (change)="itemsPerPageChange.emit($event.target.value)">\r\n <option [value]="10">{{ \'common.items-per-page-option\' | translate: { count: 10 } }}</option>\r\n <option [value]="25">{{ \'common.items-per-page-option\' | translate: { count: 25 } }}</option>\r\n <option [value]="50">{{ \'common.items-per-page-option\' | translate: { count: 50 } }}</option>\r\n <option [value]="100">{{ \'common.items-per-page-option\' | translate: { count: 100 } }}</option>\r\n </select>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],lp.propDecorators={itemsPerPage:[{type:t.Input}],itemsPerPageChange:[{type:t.Output}]};var cp=function(){};cp.decorators=[{type:t.Component,args:[{selector:"vdr-labeled-data",template:'<div class="label-title">{{ label }}</div>\r\n<ng-content></ng-content>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;margin-bottom:6px}.label-title{font-size:12px;color:var(--color-text-300);line-height:12px;margin-bottom:-4px}"]}]}],cp.propDecorators={label:[{type:t.Input}]};var up=function(){this.disabled=!1,this.languageCodeChange=new t.EventEmitter};up.decorators=[{type:t.Component,args:[{selector:"vdr-language-selector",template:'<ng-container *ngIf="1 < availableLanguageCodes?.length">\r\n <vdr-dropdown>\r\n <button type="button" class="btn btn-sm btn-link" vdrDropdownTrigger [disabled]="disabled">\r\n <clr-icon shape="world"></clr-icon>\r\n {{ \'common.language\' | translate }}: {{ \'lang.\' + currentLanguageCode | translate | uppercase }}\r\n <clr-icon shape="caret down"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition="bottom-right">\r\n <button\r\n type="button"\r\n *ngFor="let code of availableLanguageCodes"\r\n (click)="languageCodeChange.emit(code)"\r\n vdrDropdownItem\r\n >\r\n {{ \'lang.\' + code | translate }} <span class="code">{{ code }}</span>\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n',styles:[".code{color:var(--color-grey-400)}"]}]}],up.propDecorators={currentLanguageCode:[{type:t.Input}],availableLanguageCodes:[{type:t.Input}],disabled:[{type:t.Input}],languageCodeChange:[{type:t.Output}]};var pp=function(){function e(e,t){this.modal=e,this.templateRef=t}return e.prototype.ngOnInit=function(){var e=this;setTimeout((function(){return e.modal.registerButtonsTemplate(e.templateRef)}))},e}();pp.decorators=[{type:t.Directive,args:[{selector:"[vdrDialogButtons]"}]}],pp.ctorParameters=function(){return[{type:ic},{type:t.TemplateRef}]};var dp=function(){function e(e,n){this.viewContainerRef=e,this.componentFactoryResolver=n,this.create=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this.componentFactoryResolver.resolveComponentFactory(this.component),t=this.viewContainerRef.createComponent(e);this.create.emit(t.instance)},e}();dp.decorators=[{type:t.Component,args:[{selector:"vdr-dialog-component-outlet",template:""}]}],dp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.ComponentFactoryResolver}]},dp.propDecorators={component:[{type:t.Input}],create:[{type:t.Output}]};var mp=function(){function e(e,t){this.modal=e,this.templateRef=t}return e.prototype.ngOnInit=function(){var e=this;setTimeout((function(){return e.modal.registerTitleTemplate(e.templateRef)}))},e}();mp.decorators=[{type:t.Directive,args:[{selector:"[vdrDialogTitle]"}]}],mp.ctorParameters=function(){return[{type:ic},{type:t.TemplateRef}]};var gp=function(){function e(e){this.isArrayItem=!1,this.depth=e?e.depth+1:0}return e.prototype.ngOnInit=function(){this.entries=this.getEntries(this.value),this.expanded=0===this.depth||this.isArrayItem,this.valueIsArray=Object.keys(this.value).every((function(e){return Number.isInteger(+e)}))},e.prototype.isObject=function(e){return"object"==typeof e&&null!==e},e.prototype.getEntries=function(e){return"string"==typeof e?[{key:"",value:e}]:Object.entries(e).map((function(e){var t=ee(e,2);return{key:t[0],value:t[1]}}))},e}();gp.decorators=[{type:t.Component,args:[{selector:"vdr-object-tree",template:'<button class="icon-button" (click)="expanded = !expanded" *ngIf="depth !== 0 && !isArrayItem">\r\n <clr-icon shape="caret" size="12" [dir]="expanded ? \'down\' : \'right\'"></clr-icon>\r\n</button>\r\n<ul\r\n class="object-tree-node"\r\n [ngClass]="\'depth-\' + depth"\r\n [class.array-value]="valueIsArray"\r\n [class.array-item]="isArrayItem"\r\n [class.expanded]="expanded"\r\n>\r\n <li *ngFor="let entry of entries">\r\n <span class="key" *ngIf="entry.key">{{ entry.key }}:</span>\r\n <ng-container *ngIf="isObject(entry.value)">\r\n <vdr-object-tree [value]="entry.value" [isArrayItem]="valueIsArray"></vdr-object-tree>\r\n </ng-container>\r\n <ng-container *ngIf="!isObject(entry.value)">\r\n {{ entry.value }}\r\n </ng-container>\r\n </li>\r\n</ul>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".object-tree-node{list-style-type:none;line-height:16px;font-size:12px;overflow:hidden;max-height:0}.object-tree-node.depth-0{margin-left:0;margin-top:8px}.object-tree-node.depth-1,.object-tree-node.depth-2,.object-tree-node.depth-3,.object-tree-node.depth-4,.object-tree-node.depth-5,.object-tree-node.depth-6{margin-left:6px}.object-tree-node.expanded{max-height:5000px}.object-tree-node.array-item{margin-top:-16px;margin-left:16px}.object-tree-node.array-value.expanded>li+li{margin-top:6px}.key{color:var(--color-text-300)}"]}]}],gp.ctorParameters=function(){return[{type:gp,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},gp.propDecorators={value:[{type:t.Input}],isArrayItem:[{type:t.Input}]};var hp=function(){function e(){}return Object.defineProperty(e.prototype,"chipColorType",{get:function(){switch(this.state){case"AddingItems":case"ArrangingPayment":return"";case"Delivered":return"success";case"Cancelled":return"error";case"PaymentAuthorized":case"PaymentSettled":case"PartiallyDelivered":case"PartiallyShipped":case"Shipped":default:return"warning"}},enumerable:!1,configurable:!0}),e}();hp.decorators=[{type:t.Component,args:[{selector:"vdr-order-state-label",template:'<vdr-chip [ngClass]="state" [colorType]="chipColorType">\r\n <clr-icon shape="success-standard" *ngIf="state === \'Delivered\'" size="12"></clr-icon>\r\n <clr-icon shape="success-standard" *ngIf="state === \'PartiallyDelivered\'" size="12"></clr-icon>\r\n <clr-icon shape="ban" *ngIf="state === \'Cancelled\'" size="12"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n <ng-content></ng-content>\r\n</vdr-chip>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["clr-icon{margin-right:3px}"]}]}],hp.propDecorators={state:[{type:t.Input}]};var fp=function(){this.pageChange=new t.EventEmitter};fp.decorators=[{type:t.Component,args:[{selector:"vdr-pagination-controls",template:'<pagination-template #p="paginationApi" (pageChange)="pageChange.emit($event)">\r\n <ul>\r\n <li class="pagination-previous">\r\n <a *ngIf="!p.isFirstPage()" (click)="p.previous()" (keyup.enter)="p.previous()" tabindex="0">«</a>\r\n <div *ngIf="p.isFirstPage()">«</div>\r\n </li>\r\n\r\n <li *ngFor="let page of p.pages">\r\n <a\r\n (click)="p.setCurrent(page.value)"\r\n (keyup.enter)="p.setCurrent(page.value)"\r\n *ngIf="p.getCurrent() !== page.value"\r\n tabindex="0"\r\n >\r\n {{ page.label }}\r\n </a>\r\n\r\n <div class="current" *ngIf="p.getCurrent() === page.value">{{ page.label }}</div>\r\n </li>\r\n\r\n <li class="pagination-next">\r\n <a *ngIf="!p.isLastPage()" (click)="p.next()" (keyup.enter)="p.next()" tabindex="0">»</a>\r\n <div *ngIf="p.isLastPage()">»</div>\r\n </li>\r\n </ul>\r\n</pagination-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["pagination-template{display:block}pagination-template ul{list-style-type:none;display:flex;justify-content:center}pagination-template li{transition:border-bottom-color .2s}pagination-template li>a{cursor:pointer}pagination-template li>a:focus,pagination-template li>a:hover{border-bottom-color:var(--color-grey-300);text-decoration:none}pagination-template li>a,pagination-template li>div{padding:3px 12px;display:block;border-bottom:3px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}pagination-template li>div.current{border-bottom-color:var(--color-primary-500)}"]}]}],fp.propDecorators={currentPage:[{type:t.Input}],itemsPerPage:[{type:t.Input}],totalItems:[{type:t.Input}],pageChange:[{type:t.Output}]};var yp=function(){function e(e){this.dataService=e,this.searchInput$=new c.Subject,this.searchLoading=!1,this.productSelected=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.initSearchResults()},e.prototype.initSearchResults=function(){var e=this,t=this.searchInput$.pipe(r.debounceTime(200),r.distinctUntilChanged(),r.tap((function(){return e.searchLoading=!0})),r.switchMap((function(t){return t?e.dataService.product.productSelectorSearch(t,10).mapSingle((function(e){return e.search.items})):c.of([])})),r.tap((function(){return e.searchLoading=!1}))),n=this.productSelected.pipe(r.mapTo([]));this.searchResults$=c.concat(c.of([]),c.merge(t,n))},e.prototype.selectResult=function(e){e&&(this.productSelected.emit(e),this.ngSelect.clearModel())},e}();yp.decorators=[{type:t.Component,args:[{selector:"vdr-product-selector",template:'<ng-select\r\n #autoComplete\r\n [items]="searchResults$ | async"\r\n [addTag]="false"\r\n [multiple]="false"\r\n [hideSelected]="true"\r\n [loading]="searchLoading"\r\n [typeahead]="searchInput$"\r\n [appendTo]="\'body\'"\r\n [placeholder]="\'settings.search-by-product-name-or-sku\' | translate"\r\n (change)="selectResult($event)"\r\n>\r\n <ng-template ng-option-tmp let-item="item">\r\n <img [src]="item.productAsset | assetPreview: 32">\r\n {{ item.productVariantName }}\r\n <small class="sku">{{ item.sku }}</small>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}.sku{margin-left:12px;color:var(--color-grey-500)}"]}]}],yp.ctorParameters=function(){return[{type:Ql}]},yp.propDecorators={productSelected:[{type:t.Output}],ngSelect:[{type:t.ViewChild,args:["autoComplete",{static:!0}]}]};var vp=function(){function e(){this.previewLoaded=!1}return e.prototype.ngOnInit=function(){this.form=new C.FormGroup({src:new C.FormControl(this.existing?this.existing.src:"",C.Validators.required),title:new C.FormControl(this.existing?this.existing.title:""),alt:new C.FormControl(this.existing?this.existing.alt:"")})},e.prototype.select=function(){this.resolveWith(this.form.value)},e.prototype.onImageLoad=function(e){this.previewLoaded=!0},e.prototype.onImageError=function(e){this.previewLoaded=!1},e}();vp.decorators=[{type:t.Component,args:[{selector:"vdr-external-image-dialog",template:'<div class="flex">\r\n <form [formGroup]="form" class="flex-spacer" clrForm clrLayout="vertical">\r\n <clr-input-container class="expand">\r\n <label>{{ \'editor.image-src\' | translate }}</label>\r\n <input clrInput type="text" formControlName="src" />\r\n </clr-input-container>\r\n <clr-input-container class="expand">\r\n <label>{{ \'editor.image-title\' | translate }}</label>\r\n <input clrInput type="text" formControlName="title" />\r\n </clr-input-container>\r\n <clr-input-container class="expand">\r\n <label>{{ \'editor.image-alt\' | translate }}</label>\r\n <input clrInput type="text" formControlName="alt" />\r\n </clr-input-container>\r\n </form>\r\n <div class="preview">\r\n <img\r\n [src]="form.get(\'src\')?.value"\r\n [class.visible]="previewLoaded"\r\n (load)="onImageLoad($event)"\r\n (error)="onImageError($event)"\r\n />\r\n <div class="placeholder" *ngIf="!previewLoaded">\r\n <clr-icon shape="image" size="128"></clr-icon>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type="submit" (click)="select()" class="btn btn-primary" [disabled]="form.invalid || !previewLoaded">\r\n {{ \'editor.insert-image\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".preview{display:flex;align-items:center;justify-content:center;max-width:150px;margin-left:12px}.preview img{max-width:100%;display:none}.preview img.visible{display:block}.preview .placeholder{color:var(--color-grey-300)}"]}]}];var Cp=function(){function e(){}return e.prototype.ngOnInit=function(){this.form=new C.FormGroup({href:new C.FormControl(this.existing?this.existing.href:"",C.Validators.required),title:new C.FormControl(this.existing?this.existing.title:"")})},e.prototype.remove=function(){this.resolveWith({title:"",href:""})},e.prototype.select=function(){this.resolveWith(this.form.value)},e}();function bp(e){return z.wrappingInputRule(/^\s*>\s$/,e)}function Sp(e){return z.wrappingInputRule(/^(\d+)\.\s$/,e,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))}function Ip(e){return z.wrappingInputRule(/^\s*([-+*])\s$/,e)}function Tp(e){return z.textblockTypeInputRule(/^```$/,e)}function Dp(e,t){return z.textblockTypeInputRule(new RegExp("^(#{1,"+t+"})\\s$"),e,(function(e){return{level:e[1].length}}))}function Ap(e){var t,n=z.smartQuotes.concat(z.ellipsis,z.emDash);return(t=e.nodes.blockquote)&&n.push(bp(t)),(t=e.nodes.ordered_list)&&n.push(Sp(t)),(t=e.nodes.bullet_list)&&n.push(Ip(t)),(t=e.nodes.code_block)&&n.push(Tp(t)),(t=e.nodes.heading)&&n.push(Dp(t,6)),z.inputRules({rules:n})}Cp.decorators=[{type:t.Component,args:[{selector:"vdr-link-dialog",template:'<form [formGroup]="form">\r\n <vdr-form-field [label]="\'editor.link-href\' | translate" for="href">\r\n <input id="href" type="text" formControlName="href" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]="\'editor.link-title\' | translate" for="title">\r\n <input id="title" type="text" formControlName="title" />\r\n </vdr-form-field>\r\n</form>\r\n<ng-template vdrDialogButtons>\r\n <button type="button" class="btn btn-secondary" (click)="remove()" *ngIf="existing">\r\n <clr-icon shape="unlink"></clr-icon> {{ \'editor.remove-link\' | translate }}\r\n </button>\r\n <button type="submit" (click)="select()" class="btn btn-primary" [disabled]="form.invalid">\r\n {{ \'editor.set-link\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var Ep="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function Rp(e,t){var n,r={};function o(e,n){if(t){var o=t[e];if(!1===o)return;o&&(e=o)}r[e]=n}if(o("Mod-z",N.undo),o("Shift-Mod-z",N.redo),o("Backspace",z.undoInputRule),Ep||o("Mod-y",N.redo),o("Alt-ArrowUp",_.joinUp),o("Alt-ArrowDown",_.joinDown),o("Mod-BracketLeft",_.lift),o("Escape",_.selectParentNode),(n=e.marks.strong)&&(o("Mod-b",_.toggleMark(n)),o("Mod-B",_.toggleMark(n))),(n=e.marks.em)&&(o("Mod-i",_.toggleMark(n)),o("Mod-I",_.toggleMark(n))),(n=e.marks.code)&&o("Mod-`",_.toggleMark(n)),(n=e.nodes.bullet_list)&&o("Shift-Ctrl-8",j.wrapInList(n)),(n=e.nodes.ordered_list)&&o("Shift-Ctrl-9",j.wrapInList(n)),(n=e.nodes.blockquote)&&o("Ctrl->",_.wrapIn(n)),n=e.nodes.hard_break){var i=n,a=_.chainCommands(_.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(i.create()).scrollIntoView()),!0}));o("Mod-Enter",a),o("Shift-Enter",a),Ep&&o("Ctrl-Enter",a)}if((n=e.nodes.list_item)&&(o("Enter",j.splitListItem(n)),o("Mod-[",j.liftListItem(n)),o("Mod-]",j.sinkListItem(n))),(n=e.nodes.paragraph)&&o("Shift-Ctrl-0",_.setBlockType(n)),(n=e.nodes.code_block)&&o("Shift-Ctrl-\\",_.setBlockType(n)),n=e.nodes.heading)for(var s=1;s<=6;s++)o("Shift-Ctrl-"+s,_.setBlockType(n,{level:s}));if(n=e.nodes.horizontal_rule){var l=n;o("Mod-_",(function(e,t){return t(e.tr.replaceSelectionWith(l.create()).scrollIntoView()),!0}))}return r}function Pp(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to;return n.empty?t.isInSet(e.storedMarks||o.marks()):e.doc.rangeHasMark(r,i,t)}function Op(e,t){for(var n=e.selection.$from,r=n.depth;r>=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1}function kp(e,t){return new q.MenuItem({title:"Insert image",label:"Image",class:"",css:"",enable:function(t){return Op(t,e)},run:function(n,r,o){var i;n.selection instanceof B.NodeSelection&&n.selection.node.type===e&&(i=n.selection.node.attrs),t.fromComponent(vp,{closable:!0,locals:{existing:i}}).subscribe((function(t){t&&o.dispatch(o.state.tr.replaceSelectionWith(e.createAndFill(t))),o.focus()}))}})}function wp(e,t,n){var r=e.doc,o=r.resolve(n).marks().find((function(e){return"link"===e.type.name})),i=r.resolve(t).marks().find((function(e){return"link"===e.type.name}));return!!(o&&i&&o.eq(i))}function xp(e,t){return new q.MenuItem({title:"Add or remove link",icon:q.icons.link,class:"",css:"",active:function(t){return Pp(t,e)},enable:function(e){var t=e.selection;return!t.empty||wp(e,t.anchor,t.head)},run:function(n,r,o){var i,a=n.selection,s=n.doc;if(a instanceof B.TextSelection&&wp(n,a.anchor+1,a.head-1)){var l=s.resolve(a.anchor+1).marks().find((function(e){return"link"===e.type.name}));l&&(i=l.attrs)}return t.fromComponent(Cp,{closable:!0,locals:{existing:i}}).subscribe((function(t){var i=n.tr;if(t){var s=a.ranges[0],l=s.$from,c=s.$to;i=i.removeMark(l.pos,c.pos,e),""!==t.href&&(i=i.addMark(l.pos,c.pos,e.create(t)))}r(i.scrollIntoView()),o.focus()})),!0}})}function Fp(e,t){var n={label:t.title,run:e};for(var r in t)n[r]=t[r];return t.enable&&!0!==t.enable||t.select||(n[t.enable?"enable":"select"]=function(t){return e(t)}),new q.MenuItem(n)}function $p(e,t){var n={active:function(t){return Pp(t,e)},enable:!0};for(var r in t)n[r]=t[r];return Fp(_.toggleMark(e),n)}function _p(e,t){return Fp(j.wrapInList(e,t.attrs),t)}function Mp(e,t){var n,r={};if((n=e.marks.strong)&&(r.toggleStrong=$p(n,{title:"Toggle strong style",icon:q.icons.strong})),(n=e.marks.em)&&(r.toggleEm=$p(n,{title:"Toggle emphasis",icon:q.icons.em})),(n=e.marks.code)&&(r.toggleCode=$p(n,{title:"Toggle code font",icon:q.icons.code})),(n=e.marks.link)&&(r.toggleLink=xp(n,t)),(n=e.nodes.image)&&(r.insertImage=kp(n,t)),(n=e.nodes.bullet_list)&&(r.wrapBulletList=_p(n,{title:"Wrap in bullet list",icon:q.icons.bulletList})),(n=e.nodes.ordered_list)&&(r.wrapOrderedList=_p(n,{title:"Wrap in ordered list",icon:q.icons.orderedList})),(n=e.nodes.blockquote)&&(r.wrapBlockQuote=q.wrapItem(n,{title:"Wrap in block quote",icon:q.icons.blockquote})),(n=e.nodes.paragraph)&&(r.makeParagraph=q.blockTypeItem(n,{title:"Change to paragraph",label:"Plain"})),(n=e.nodes.code_block)&&(r.makeCodeBlock=q.blockTypeItem(n,{title:"Change to code block",label:"Code"})),n=e.nodes.heading)for(var o=1;o<=10;o++)r["makeHead"+o]=q.blockTypeItem(n,{title:"Change to heading "+o,label:"Level "+o,attrs:{level:o}});if(n=e.nodes.horizontal_rule){var i=n;r.insertHorizontalRule=new q.MenuItem({title:"Insert horizontal rule",label:"Horizontal rule",class:"",css:"",enable:function(e){return Op(e,i)},run:function(e,t){t(e.tr.replaceSelectionWith(i.create()))}})}var a=function(e){return e.filter((function(e){return e}))};r.insertMenu=new q.Dropdown(a([r.insertImage,r.insertHorizontalRule]),{label:"Insert"}),r.typeMenu=new q.Dropdown(a([r.makeParagraph,r.makeCodeBlock,r.makeHead1&&new q.DropdownSubmenu(a([r.makeHead1,r.makeHead2,r.makeHead3,r.makeHead4,r.makeHead5,r.makeHead6]),{label:"Heading"})]),{label:"Type..."});var s=a([r.toggleStrong,r.toggleEm,r.toggleLink]);return r.inlineMenu=[s],r.blockMenu=[a([r.wrapBulletList,r.wrapOrderedList,r.wrapBlockQuote,q.joinUpItem,q.liftItem,q.selectParentNodeItem])],r.fullMenu=[s].concat([[r.insertMenu,r.typeMenu]],[[q.undoItem,q.redoItem]],r.blockMenu),r}var Lp=function(e,t){if(void 0===e&&(e=null),void 0===t&&(t=null),!e||!t)return!1;var n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(e){return e.type===t}));if(!r)return!1;for(var o=e.index(),i=e.start()+n.offset;o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;return{from:i,to:i+n.node.nodeSize}},Np=new B.Plugin({props:{handleClick:function(e,t){var n=e.state,r=n.doc,o=n.tr,i=n.schema,a=Lp(r.resolve(t),i.marks.link);if(!a)return!1;var s=r.resolve(a.from),l=r.resolve(a.to),c=o.setSelection(new B.TextSelection(s,l));return e.dispatch(c),!0}}}),Up=function(){function e(e){this.modalService=e,this.mySchema=new G.Schema({nodes:j.addListNodes(V.schema.spec.nodes,"paragraph block*","block"),marks:V.schema.spec.marks}),this.enabled=!0}return e.prototype.createEditorView=function(e){var t=this;this.editorView=new H.EditorView(e.element,{state:this.getStateFromText(""),dispatchTransaction:function(n){if(t.enabled&&(t.editorView.updateState(t.editorView.state.apply(n)),n.docChanged)){var r=t.getTextFromState(t.editorView.state);e.onTextInput(r)}},editable:function(){return e.isReadOnly()}})},e.prototype.update=function(e){if(this.editorView){var t=this.getStateFromText(e);document.body.contains(this.editorView.dom)&&this.editorView.updateState(t)}},e.prototype.destroy=function(){this.editorView&&this.editorView.destroy()},e.prototype.setEnabled=function(e){this.editorView&&(this.enabled=e,this.editorView.updateState(this.editorView.state))},e.prototype.getStateFromText=function(e){var t=document.createElement("div");return t.innerHTML=e,B.EditorState.create({doc:G.DOMParser.fromSchema(this.mySchema).parse(t),plugins:this.configurePlugins({schema:this.mySchema,floatingMenu:!1})})},e.prototype.getTextFromState=function(e){var t=document.createElement("div"),n=G.DOMSerializer.fromSchema(this.mySchema).serializeFragment(e.doc.content);return t.appendChild(n),t.innerHTML},e.prototype.configurePlugins=function(e){var t=[Ap(e.schema),U.keymap(Rp(e.schema,e.mapKeys)),U.keymap(_.baseKeymap),M.dropCursor(),L.gapCursor(),Np];return!1!==e.menuBar&&t.push(q.menuBar({floating:!1!==e.floatingMenu,content:e.menuContent||Mp(e.schema,this.modalService).fullMenu})),!1!==e.history&&t.push(N.history()),t.concat(new B.Plugin({props:{attributes:{class:"vdr-prosemirror"}}}))},e}();Up.decorators=[{type:t.Injectable}],Up.ctorParameters=function(){return[{type:lc}]};var qp=function(){function e(e,t){this.changeDetector=e,this.prosemirrorService=t,this._readonly=!1}return Object.defineProperty(e.prototype,"readonly",{set:function(e){this._readonly=!!e,this.prosemirrorService.setEnabled(!this._readonly)},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;this.prosemirrorService.createEditorView({element:this.editorEl.nativeElement,onTextInput:function(t){e.onChange(t),e.changeDetector.markForCheck()},isReadOnly:function(){return!e._readonly}}),this.value&&this.prosemirrorService.update(this.value)},e.prototype.ngOnDestroy=function(){this.prosemirrorService.destroy()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.prosemirrorService.setEnabled(!e)},e.prototype.writeValue=function(e){this.value=e,this.prosemirrorService&&this.prosemirrorService.update(e)},e}();qp.decorators=[{type:t.Component,args:[{selector:"vdr-rich-text-editor",template:'<label class="clr-control-label">{{ label }}</label>\r\n<div #editor></div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:qp,multi:!0},Up],styles:['@charset "UTF-8";::ng-deep .ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;font-variant-ligatures:none}::ng-deep .ProseMirror pre{white-space:pre-wrap}::ng-deep .ProseMirror li{position:relative}::ng-deep .ProseMirror-hideselection ::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection ::selection{background:transparent}::ng-deep .ProseMirror-hideselection ::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection{caret-color:transparent}::ng-deep .ProseMirror-selectednode{outline:2px solid var(--color-primary-500)}::ng-deep li.ProseMirror-selectednode{outline:none}::ng-deep li.ProseMirror-selectednode:after{content:"";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid var(--color-primary-500);pointer-events:none}::ng-deep .ProseMirror-textblock-dropdown{min-width:3em}::ng-deep .ProseMirror-menu{margin:0 -4px;line-height:1}::ng-deep .ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;white-space:pre}::ng-deep .ProseMirror-menuitem{margin-right:3px;display:inline-block}::ng-deep .ProseMirror-menuseparator{border-right:1px solid var(--color-component-border-200);margin-right:3px}::ng-deep .ProseMirror-menu-dropdown,::ng-deep .ProseMirror-menu-dropdown-menu{font-size:90%;white-space:nowrap}::ng-deep .ProseMirror-menu-dropdown{vertical-align:1px;cursor:pointer;position:relative;padding-right:15px}::ng-deep .ProseMirror-menu-dropdown-wrap{padding:1px 0 1px 4px;display:inline-block;position:relative}::ng-deep .ProseMirror-menu-dropdown:after{content:"";border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid;opacity:.6;position:absolute;right:4px;top:calc(50% - 2px)}::ng-deep .ProseMirror-menu-dropdown-menu,::ng-deep .ProseMirror-menu-submenu{position:absolute;background:#fff;color:var(--color-grey-600);border:1px solid var(--color-component-border-200);padding:2px}::ng-deep .ProseMirror-menu-dropdown-menu{z-index:15;min-width:6em}::ng-deep .ProseMirror-menu-dropdown-item{cursor:pointer;padding:2px 8px 2px 4px}::ng-deep .ProseMirror-menu-dropdown-item:hover{background:var(--color-component-bg-100)}::ng-deep .ProseMirror-menu-submenu-wrap{position:relative;margin-right:-4px}::ng-deep .ProseMirror-menu-submenu-label:after{content:"";border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid;opacity:.6;position:absolute;right:4px;top:calc(50% - 4px)}::ng-deep .ProseMirror-menu-submenu{display:none;min-width:4em;left:100%;top:-3px}::ng-deep .ProseMirror-menu-active{background:var(--color-component-bg-100);border-radius:4px}::ng-deep .ProseMirror-menu-disabled{opacity:.3}::ng-deep .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu,::ng-deep .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu{display:block}::ng-deep .ProseMirror-menubar{border-top-left-radius:inherit;border-top-right-radius:inherit;position:relative;min-height:1em;color:var(--color-grey-600);padding:1px 6px;top:0;left:0;right:0;background:var(--color-component-bg-100);z-index:10;box-sizing:border-box;overflow:visible}::ng-deep .ProseMirror-icon{display:inline-block;line-height:.8;vertical-align:-2px;padding:2px 8px;cursor:pointer}::ng-deep .ProseMirror-menu-disabled.ProseMirror-icon{cursor:default}::ng-deep .ProseMirror-icon svg{fill:currentColor;height:1em}::ng-deep .ProseMirror-icon span{vertical-align:text-top}::ng-deep .ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}::ng-deep .ProseMirror-gapcursor:after{content:"";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid #000;-webkit-animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite;animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite}@-webkit-keyframes ProseMirror-cursor-blink{to{visibility:hidden}}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}::ng-deep .ProseMirror-focused .ProseMirror-gapcursor{display:block}::ng-deep .ProseMirror ol,::ng-deep .ProseMirror ul{padding-left:30px;list-style-position:initial}::ng-deep .ProseMirror blockquote{padding-left:1em;border-left:3px solid var(--color-grey-100);margin-left:0;margin-right:0}::ng-deep .ProseMirror-prompt{background:#fff;padding:5px 10px 5px 15px;border:1px solid silver;position:fixed;border-radius:3px;z-index:11;box-shadow:-.5px 2px 5px rgba(0,0,0,.2)}::ng-deep .ProseMirror-prompt h5{margin:0;font-weight:400;font-size:100%;color:var(--color-grey-500)}::ng-deep .ProseMirror-prompt input[type=text],::ng-deep .ProseMirror-prompt textarea{background:var(--color-component-bg-100);border:none;outline:none}::ng-deep .ProseMirror-prompt input[type=text]{padding:0 4px}::ng-deep .ProseMirror-prompt-close{position:absolute;left:2px;top:1px;color:var(--color-grey-400);border:none;background:transparent;padding:0}::ng-deep .ProseMirror-prompt-close:after{content:"✕";font-size:12px}::ng-deep .ProseMirror-invalid{background:var(--color-warning-200);border:1px solid var(--color-warning-300);border-radius:4px;padding:5px 10px;position:absolute;min-width:10em}::ng-deep .ProseMirror-prompt-buttons{margin-top:5px;display:none}::ng-deep #editor,::ng-deep .editor{background:var(--color-form-input-bg);color:#000;background-clip:padding-box;border-radius:4px;border:2px solid rgba(0,0,0,.2);padding:5px 0;margin-bottom:23px}::ng-deep .ProseMirror h1:first-child,::ng-deep .ProseMirror h2:first-child,::ng-deep .ProseMirror h3:first-child,::ng-deep .ProseMirror h4:first-child,::ng-deep .ProseMirror h5:first-child,::ng-deep .ProseMirror h6:first-child,::ng-deep .ProseMirror p:first-child{margin-top:10px}::ng-deep .ProseMirror{padding:4px 8px 4px 14px;line-height:1.2;outline:none}::ng-deep .ProseMirror p{margin-bottom:.5rem;color:var(--color-grey-800)}:host{display:block;max-width:710px;margin-bottom:.5rem}:host.readonly ::ng-deep .ProseMirror-menubar{display:none}::ng-deep .ProseMirror-menubar{position:sticky;top:24px;margin-top:6px;border:1px solid var(--color-component-border-200);border-bottom:none;background-color:var(--color-component-bg-200);color:var(--color-icon-button);padding:6px 12px}::ng-deep .vdr-prosemirror{background:var(--color-form-input-bg);min-height:128px;border:1px solid var(--color-component-border-200);border-radius:0 0 3px 3px;transition:border-color .2s;overflow:auto}::ng-deep .vdr-prosemirror:focus{border-color:var(--color-primary-500)!important;box-shadow:0 0 1px 1px var(--color-primary-100)}::ng-deep .vdr-prosemirror hr{padding:2px 10px;border:none;margin:1em 0}::ng-deep .vdr-prosemirror hr:after{content:"";display:block;height:1px;background-color:silver;line-height:2px}::ng-deep .vdr-prosemirror img{cursor:default;max-width:100%}']}]}],qp.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Up}]},qp.propDecorators={label:[{type:t.Input}],readonly:[{type:t.Input}],_readonly:[{type:t.HostBinding,args:["class.readonly"]}],editorEl:[{type:t.ViewChild,args:["editor",{static:!0}]}]};var Gp=function(){this.size="large",this.selected=!1,this.disabled=!1,this.selectedChange=new t.EventEmitter};Gp.decorators=[{type:t.Component,args:[{selector:"vdr-select-toggle",template:'<div\r\n class="toggle"\r\n [class.disabled]="disabled"\r\n [class.small]="size === \'small\'"\r\n [attr.tabindex]="disabled ? null : 0"\r\n [class.selected]="selected"\r\n (keydown.enter)="selectedChange.emit(!selected)"\r\n (keydown.space)="$event.preventDefault(); selectedChange.emit(!selected)"\r\n (click)="selectedChange.emit(!selected)"\r\n>\r\n <clr-icon shape="check" [attr.size]="size === \'small\' ? 16 : 32"></clr-icon>\r\n</div>\r\n<div class="toggle-label" [class.disabled]="disabled" *ngIf="label" (click)="selectedChange.emit(!selected)">\r\n {{ label }}\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".toggle,:host{display:flex;align-items:center;justify-content:center}.toggle{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;background-color:var(--color-component-bg-100);border:2px solid var(--color-component-border-300);padding:0 6px;border-radius:50%;width:32px;height:32px;color:var(--color-grey-300);transition:background-color .2s,border .2s}.toggle.small{width:24px;height:24px}.toggle:not(.disabled):hover{border-color:var(--color-success-500);background-color:var(--color-success-400);opacity:.9}.toggle.selected{background-color:var(--color-success-500);border-color:var(--color-success-600);color:#fff}.toggle.selected:not(.disabled):hover{background-color:var(--color-success-500);border-color:var(--color-success-400);opacity:.9}.toggle:focus{outline:none;box-shadow:0 0 2px 2px var(--color-primary-500)}.toggle.disabled{cursor:default}.toggle-label{flex:1;margin-left:6px;text-align:left;font-size:12px}.toggle-label:not(.disabled){cursor:pointer}"]}]}],Gp.propDecorators={size:[{type:t.Input}],selected:[{type:t.Input}],disabled:[{type:t.Input}],label:[{type:t.Input}],selectedChange:[{type:t.Output}]};var Vp=function(){this.disabled=!1};Vp.decorators=[{type:t.Component,args:[{selector:"vdr-table-row-action",template:'<ng-container *ngIf="!disabled; else: disabledLink">\r\n <a class="btn btn-link btn-sm" [routerLink]="linkTo">\r\n <clr-icon [attr.shape]="iconShape"></clr-icon>\r\n {{ label }}\r\n </a>\r\n</ng-container>\r\n<ng-template #disabledLink>\r\n <button class="btn btn-link btn-sm" disabled>\r\n <clr-icon [attr.shape]="iconShape"></clr-icon>\r\n {{ label }}\r\n </button>\r\n</ng-template>\r\n',styles:["a.btn{margin:0}"]}]}],Vp.propDecorators={linkTo:[{type:t.Input}],label:[{type:t.Input}],iconShape:[{type:t.Input}],disabled:[{type:t.Input}]};var jp=function(){function e(e){this.dataService=e}return e.prototype.ngOnInit=function(){this.allTags$=this.dataService.product.getTagList().mapStream((function(e){return e.tags.items.map((function(e){return e.value}))}))},e.prototype.addTagFn=function(e){return e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){Array.isArray(e)&&(this._value=e)},e.prototype.valueChanged=function(e){this.onChange(e)},e}();jp.decorators=[{type:t.Component,args:[{selector:"vdr-tag-selector",template:'<ng-select\r\n [addTag]="addTagFn"\r\n [multiple]="true"\r\n [ngModel]="_value"\r\n [clearable]="true"\r\n [searchable]="true"\r\n [disabled]="disabled"\r\n [placeholder]="placeholder"\r\n (change)="valueChanged($event)"\r\n>\r\n <ng-template ng-label-tmp let-tag="item" let-clear="clear">\r\n <vdr-chip [colorFrom]="tag" icon="close" (iconClick)="clear(tag)"><clr-icon shape="tag" class="mr2"></clr-icon> {{ tag }}</vdr-chip>\r\n </ng-template>\r\n <ng-option *ngFor="let tag of allTags$ | async" [value]="tag">\r\n <vdr-chip [colorFrom]="tag"><clr-icon shape="tag" class="mr2"></clr-icon> {{ tag }}</vdr-chip>\r\n </ng-option>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:jp,multi:!0}],styles:[":host{display:block;margin-top:12px;position:relative}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}"]}]}],jp.ctorParameters=function(){return[{type:Ql}]},jp.propDecorators={placeholder:[{type:t.Input}]};var Bp=function(){function e(){this.collapsed=!1,this.expandClick=new t.EventEmitter}return Object.defineProperty(e.prototype,"timelineTitle",{get:function(){return this.collapsed?b.marker("common.expand-entries"):b.marker("common.collapse-entries")},enumerable:!1,configurable:!0}),e.prototype.getIconShape=function(){if(this.iconShape)return"string"==typeof this.iconShape?this.iconShape:this.iconShape[0]},e.prototype.getIconClass=function(){if(this.iconShape)return"string"==typeof this.iconShape?"":this.iconShape[1]},e}();Bp.decorators=[{type:t.Component,args:[{selector:"vdr-timeline-entry",template:'<div\r\n [ngClass]="displayType"\r\n [class.has-custom-icon]="!!iconShape"\r\n class="entry"\r\n [class.last]="isLast === true"\r\n [class.collapsed]="collapsed"\r\n>\r\n <div class="timeline" (click)="expandClick.emit()" [title]="timelineTitle | translate">\r\n <div class="custom-icon">\r\n <clr-icon\r\n *ngIf="iconShape && !collapsed"\r\n [attr.shape]="getIconShape()"\r\n [ngClass]="getIconClass()"\r\n size="24"\r\n ></clr-icon>\r\n </div>\r\n </div>\r\n <div class="entry-body">\r\n <div class="detail">\r\n <div class="time">\r\n {{ createdAt | localeDate: \'short\' }}\r\n </div>\r\n <div class="name">\r\n {{ name }}\r\n </div>\r\n </div>\r\n <div [class.featured-entry]="featured">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[':host{display:block}:host:first-of-type .timeline:before{border-left-color:var(--color-timeline-thread)}:host:first-of-type .entry-body{max-height:none}.entry{display:flex}.timeline{border-left:2px solid var(--color-timeline-thread);padding-bottom:8px;position:relative}.timeline:before{content:"";position:absolute;width:2px;height:32px;left:-2px;border-left:2px solid var(--color-timeline-thread)}.timeline:after{content:"";display:block;border-radius:50%;width:8px;height:8px;background-color:var(--color-component-bg-200);border:1px solid var(--color-component-border-300);position:absolute;left:-5px;top:32px;transition:top .2s;cursor:pointer}.timeline .custom-icon{position:absolute;width:32px;height:32px;left:-17px;top:32px;align-items:center;justify-content:center;border-radius:50%;color:var(--color-primary-600);background-color:var(--color-component-bg-100);border:1px solid var(--color-component-border-200);display:none}.entry.has-custom-icon .timeline:after{display:none}.entry.has-custom-icon .custom-icon{display:flex}.entry.last .timeline{border-left-color:transparent}.entry-body{flex:1;padding-top:24px;padding-left:12px;line-height:16px;margin-left:12px;color:var(--color-text-200);overflow:visible;max-height:100px;transition:max-height .2s,padding-top .2s,opacity .2s .2s}.featured-entry ::ng-deep .title{color:var(--color-text-100);font-size:16px;line-height:26px}.featured-entry ::ng-deep .note-text{color:var(--color-text-100);white-space:pre-wrap}.detail{display:flex;color:var(--color-text-300);font-size:12px}.detail .name{margin-left:12px}.muted .timeline,.muted .timeline .custom-icon{color:var(--color-text-300)}.success .timeline,.success .timeline .custom-icon{color:var(--color-success-400)}.success .timeline:after{background-color:var(--color-success-200);border:1px solid var(--color-success-400)}.error .timeline,.error .timeline .custom-icon{color:var(--color-error-400)}.error .timeline:after{background-color:var(--color-error-200);border:1px solid var(--color-error-400)}.warning .timeline,.warning .timeline .custom-icon{color:var(--color-warning-400)}.warning .timeline:after{background-color:var(--color-warning-200);border:1px solid var(--color-warning-400)}.collapsed .entry-body{max-height:0;overflow:hidden;opacity:0;padding-top:0}.collapsed .timeline{border-left-color:transparent}.collapsed .timeline:after{top:0}']}]}],Bp.propDecorators={displayType:[{type:t.Input}],createdAt:[{type:t.Input}],name:[{type:t.Input}],featured:[{type:t.Input}],iconShape:[{type:t.Input}],isLast:[{type:t.Input}],collapsed:[{type:t.HostBinding,args:["class.collapsed"]},{type:t.Input}],expandClick:[{type:t.Output}]};var Hp=function(){this.readonly=!1};Hp.decorators=[{type:t.Component,args:[{selector:"vdr-title-input",template:'<ng-content></ng-content>\r\n<div class="edit-icon" *ngIf="!readonly">\r\n <clr-icon shape="edit"></clr-icon>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative}:host ::ng-deep input{font-size:18px;color:var(--clr-p1-color);max-width:100%}:host ::ng-deep input:not(:focus){border-color:transparent!important;background-color:transparent!important}:host ::ng-deep input:focus{background-color:var(--clr-global-app-background)}:host ::ng-deep .clr-control-container{max-width:100%}:host ::ng-deep .clr-input-wrapper{max-width:100%!important}:host .edit-icon{position:absolute;right:8px;top:6px;color:var(--color-grey-300);opacity:0;transition:opacity .2s}:host:hover ::ng-deep input:not(:focus){background-color:var(--color-component-bg-200)!important}:host:hover .edit-icon{opacity:1}:host.readonly .edit-icon{display:none}:host.readonly:hover ::ng-deep input:not(:focus){background-color:var(--color-grey-200)!important}"]}]}],Hp.propDecorators={readonly:[{type:t.HostBinding,args:["class.readonly"]},{type:t.Input}]};var zp=function(){function e(e,t){this.formControlName=e,this.formControl=t}return Object.defineProperty(e.prototype,"disabled",{set:function(e){var t,n,r,o=null!==(n=null===(t=this.formControlName)||void 0===t?void 0:t.control)&&void 0!==n?n:null===(r=this.formControl)||void 0===r?void 0:r.form;o&&(!1==!!e?o.enable({emitEvent:!1}):o.disable({emitEvent:!1}))},enumerable:!1,configurable:!0}),e}();zp.decorators=[{type:t.Directive,args:[{selector:"[vdrDisabled]"}]}],zp.ctorParameters=function(){return[{type:C.FormControlName,decorators:[{type:t.Optional}]},{type:C.FormControlDirective,decorators:[{type:t.Optional}]}]},zp.propDecorators={disabled:[{type:t.Input,args:["vdrDisabled"]}]};var Wp=function(){function e(e,t,n){this._viewContainer=e,this.updateViewFn=n,this.updateArgs$=new c.BehaviorSubject([]),this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}return e.prototype.ngOnInit=function(){var e=this;this.subscription=this.updateArgs$.pipe(r.switchMap((function(t){return e.updateViewFn.apply(e,te(t))}))).subscribe((function(t){t?e.showThen():e.showElse()}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.setElseTemplate=function(e){this.assertTemplate("vdrIfPermissionsElse",e),this._elseTemplateRef=e,this._elseViewRef=null},e.prototype.showThen=function(){this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef)))},e.prototype.showElse=function(){this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef)))},e.prototype.assertTemplate=function(e,t){if(!!(t&&!t.createEmbeddedView))throw new Error(e+" must be a TemplateRef, but received '"+t+"'.")},e}();Wp.decorators=[{type:t.Directive}],Wp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Function}]};var Zp=function(e){function t(t,n,o,i){var a=e.call(this,t,n,(function(){return a.dataService.client.userStatus().mapStream((function(e){var t=e.userStatus;return a.defaultChannelIsActive(t)})).pipe(r.tap((function(){return a.changeDetectorRef.markForCheck()})))}))||this;return a.dataService=o,a.changeDetectorRef=i,a}return J(t,e),Object.defineProperty(t.prototype,"vdrIfMultichannelElse",{set:function(e){this.setElseTemplate(e)},enumerable:!1,configurable:!0}),t.prototype.defaultChannelIsActive=function(e){var t=e.channels.find((function(e){return e.code===y.DEFAULT_CHANNEL_CODE}));return!(!t||e.activeChannelId!==t.id)},t}(Wp);Zp.decorators=[{type:t.Directive,args:[{selector:"[vdrIfDefaultChannelActive]"}]}],Zp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Ql},{type:t.ChangeDetectorRef}]},Zp.propDecorators={vdrIfMultichannelElse:[{type:t.Input}]};var Yp=function(e){function t(t,n,r){var o=e.call(this,t,n,(function(){return o.dataService.client.userStatus().mapStream((function(e){return 1<e.userStatus.channels.length}))}))||this;return o.dataService=r,o}return J(t,e),Object.defineProperty(t.prototype,"vdrIfMultichannelElse",{set:function(e){this.setElseTemplate(e)},enumerable:!1,configurable:!0}),t}(Wp);Yp.decorators=[{type:t.Directive,args:[{selector:"[vdrIfMultichannel]"}]}],Yp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Ql}]},Yp.propDecorators={vdrIfMultichannelElse:[{type:t.Input}]};var Jp=function(e){function t(t,n,o,i){var a=e.call(this,t,n,(function(e){return null==e?c.of(!0):e?a.dataService.client.userStatus().mapStream((function(t){var n,r,o=t.userStatus;try{for(var i=X(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(o.permissions.includes(s))return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1})).pipe(r.tap((function(){return a.changeDetectorRef.markForCheck()}))):c.of(!1)}))||this;return a.dataService=o,a.changeDetectorRef=i,a.permissionToCheck=["__initial_value__"],a}return J(t,e),Object.defineProperty(t.prototype,"vdrIfPermissions",{set:function(e){this.permissionToCheck=e&&(Array.isArray(e)?e:[e])||null,this.updateArgs$.next([this.permissionToCheck])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vdrIfPermissionsElse",{set:function(e){this.setElseTemplate(e),this.updateArgs$.next([this.permissionToCheck])},enumerable:!1,configurable:!0}),t}(Wp);Jp.decorators=[{type:t.Directive,args:[{selector:"[vdrIfPermissions]"}]}],Jp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Ql},{type:t.ChangeDetectorRef}]},Jp.propDecorators={vdrIfPermissions:[{type:t.Input}],vdrIfPermissionsElse:[{type:t.Input}]};var Kp=function(){function e(e,t,n,r){this.componentRegistryService=e,this.componentFactoryResolver=t,this.changeDetectorRef=n,this.injector=r,this.renderAsList=!1,this.listItems=[],this.listId=1,this.listFormArray=new C.FormArray([]),this.renderList$=new c.Subject,this.destroy$=new c.Subject}return e.prototype.ngOnInit=function(){var e=this.getInputComponentConfig(this.def).component,t=this.componentRegistryService.getInputComponent(e);if(t)this.componentType=t;else{console.error('No form input component registered with the id "'+e+'". Using the default input instead.');var n=this.componentRegistryService.getInputComponent(this.getInputComponentConfig(Object.assign(Object.assign({},this.def),{ui:void 0})).component);n&&(this.componentType=n)}},e.prototype.ngAfterViewInit=function(){var e,t=this;if(this.componentType){var n=this.componentFactoryResolver.resolveComponentFactory(this.componentType),o=n.create(this.injector),i=null!==(e=o.instance.isListInput)&&void 0!==e&&e;if(o.destroy(),!1===this.def.list&&i)throw new Error("The "+this.componentType.name+" component is a list input, but the definition for "+this.def.name+" does not expect a list");if(this.renderAsList=this.def.list&&!i,this.renderAsList){var a,s=function(e){e.length&&(a&&a.unsubscribe(),t.listFormArray=new C.FormArray([]),t.listItems.forEach((function(e){var t;return null===(t=e.componentRef)||void 0===t?void 0:t.destroy()})),e.forEach((function(e,r){var o,i=null===(o=t.listItems)||void 0===o?void 0:o[r];i&&(t.listFormArray.push(i.control),i.componentRef=t.renderInputComponent(n,e,i.control))})),a=t.listFormArray.valueChanges.pipe(r.takeUntil(t.destroy$)).subscribe((function(e){t.control.markAsTouched(),t.control.markAsDirty(),t.onChange(e),t.control.patchValue(e,{emitEvent:!1})})))};this.listItemContainers.changes.pipe(r.take(1)).subscribe((function(e){return s(t.listItemContainers)})),this.renderList$.pipe(r.switchMap((function(){return t.listItemContainers.changes.pipe(r.take(1))})),r.takeUntil(this.destroy$)).subscribe((function(){s(t.listItemContainers)}))}else this.singleComponentRef=this.renderInputComponent(n,this.singleViewContainer,this.control)}setTimeout((function(){return t.changeDetectorRef.markForCheck()}))},e.prototype.ngOnChanges=function(e){var t,n;if(this.listItems)try{for(var r=X(this.listItems),o=r.next();!o.done;o=r.next()){var i=o.value;i.componentRef&&this.updateBindings(e,i.componentRef)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.singleComponentRef&&this.updateBindings(e,this.singleComponentRef)},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.updateBindings=function(e,n){"def"in e&&(n.instance.config=this.isConfigArgDef(this.def)?this.def.ui:this.def),"readonly"in e&&(n.instance.readonly=this.readonly),n.injector.get(t.ChangeDetectorRef).markForCheck()},e.prototype.trackById=function(e,t){return t.id},e.prototype.addListItem=function(){var e;this.listItems||(this.listItems=[]),this.listItems.push({id:this.listId++,control:new C.FormControl(null!==(e=this.def.defaultValue)&&void 0!==e?e:null)}),this.renderList$.next()},e.prototype.moveListItem=function(e){this.listItems&&(A.moveItemInArray(this.listItems,e.previousIndex,e.currentIndex),this.listFormArray.removeAt(e.previousIndex),this.listFormArray.insert(e.currentIndex,e.item.data.control),this.renderList$.next())},e.prototype.removeListItem=function(e){var t;if(this.listItems){var n=this.listItems.findIndex((function(t){return t===e}));null===(t=e.componentRef)||void 0===t||t.destroy(),this.listFormArray.removeAt(n),this.listItems=this.listItems.filter((function(t){return t!==e})),this.renderList$.next()}},e.prototype.renderInputComponent=function(e,n,r){var o=n.createComponent(e),i=o.instance;return i.config=a.simpleDeepClone(this.isConfigArgDef(this.def)?this.def.ui:this.def),i.formControl=r,i.readonly=this.readonly,o.injector.get(t.ChangeDetectorRef).markForCheck(),o},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.writeValue=function(e){var t=this;Array.isArray(e)?e.length===this.listItems.length?e.forEach((function(e,n){var r;(null===(r=t.listItems[n])||void 0===r?void 0:r.control).patchValue(Ou(e),{emitEvent:!1})})):(this.listItems=e.map((function(e){return{id:t.listId++,control:new C.FormControl(Ou(e))}})),this.renderList$.next()):(this.listItems=[],this.renderList$.next()),this.changeDetectorRef.markForCheck()},e.prototype.getInputComponentConfig=function(e){var t;if(this.hasUiConfig(e)&&e.ui.component)return e.ui;var n=null==e?void 0:e.type;switch(n){case"string":case"localeString":return!(!this.isConfigArgDef(e)||!(null===(t=e.ui)||void 0===t?void 0:t.options))||!!e.options?{component:"select-form-input"}:{component:"text-form-input"};case"int":case"float":return{component:"number-form-input"};case"boolean":return{component:"boolean-form-input"};case"datetime":return{component:"date-form-input"};case"ID":return{component:"text-form-input"};case"relation":return{component:"relation-form-input"};default:l.assertNever(n)}},e.prototype.isConfigArgDef=function(e){var t;return"ConfigArgDefinition"===(null===(t=e)||void 0===t?void 0:t.__typename)},e.prototype.hasUiConfig=function(e){var t,n;return"object"==typeof e&&"string"==typeof(null===(n=null===(t=e)||void 0===t?void 0:t.ui)||void 0===n?void 0:n.component)},e}();Kp.decorators=[{type:t.Component,args:[{selector:"vdr-dynamic-form-input",template:'<ng-container *ngIf="!renderAsList; else list">\r\n <ng-container #single></ng-container>\r\n</ng-container>\r\n<ng-template #list>\r\n <div class="list-container" cdkDropList (cdkDropListDropped)="moveListItem($event)">\r\n <div class="list-item-row" *ngFor="let item of listItems; trackBy: trackById" cdkDrag [cdkDragData]="item">\r\n <ng-container #listItem></ng-container>\r\n <button class="btn btn-link btn-sm btn-warning" (click)="removeListItem(item)" [title]="\'common.remove-item-from-list\' | translate">\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n <div class="flex-spacer"></div>\r\n <div class="drag-handle" cdkDragHandle *ngIf="!readonly">\r\n <clr-icon shape="drag-handle" size="24"></clr-icon>\r\n </div>\r\n </div>\r\n <button class="btn btn-secondary btn-sm" (click)="addListItem()">\r\n <clr-icon shape="plus"></clr-icon> {{ \'common.add-item-to-list\' | translate }}\r\n </button>\r\n </div>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:Kp,multi:!0}],styles:[".list-container{border:1px solid var(--color-component-border-200);border-radius:3px;padding:12px}.list-item-row{font-size:13px;display:flex;align-items:center;margin:3px 0}.drag-placeholder{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{font-size:13px;background-color:var(--color-component-bg-100);opacity:.8;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder{opacity:.1}.cdk-drag-animating,.cdk-drop-list-dragging .list-item-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}]}],Kp.ctorParameters=function(){return[{type:Wc},{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef},{type:t.Injector}]},Kp.propDecorators={def:[{type:t.Input}],readonly:[{type:t.Input}],control:[{type:t.Input}],singleViewContainer:[{type:t.ViewChild,args:["single",{read:t.ViewContainerRef}]}],listItemContainers:[{type:t.ViewChildren,args:["listItem",{read:t.ViewContainerRef}]}]};var Qp=function(){function e(e,t){this.modalService=e,this.dataService=t}return e.prototype.ngOnInit=function(){var e=this;this.asset$=this.parentFormControl.valueChanges.pipe(r.startWith(this.parentFormControl.value),r.map((function(e){return null==e?void 0:e.id})),r.distinctUntilChanged(),r.switchMap((function(t){return t?e.dataService.product.getAsset(t).mapStream((function(e){return e.asset||void 0})):c.of(void 0)})))},e.prototype.selectAsset=function(){var e=this;this.modalService.fromComponent(Cu,{size:"xl",locals:{multiSelect:!1}}).subscribe((function(t){t&&t.length&&(e.parentFormControl.setValue(t[0]),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e.prototype.previewAsset=function(e){this.modalService.fromComponent(yu,{size:"xl",closable:!0,locals:{asset:e}}).subscribe()},e}();Qp.decorators=[{type:t.Component,args:[{selector:"vdr-relation-asset-input",template:'<vdr-relation-card\r\n (select)="selectAsset()"\r\n (remove)="remove()"\r\n placeholderIcon="image"\r\n [entity]="asset$ | async"\r\n [selectLabel]="\'asset.select-asset\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview let-asset="entity">\r\n <img\r\n class="preview"\r\n [title]="\'asset.preview\' | translate"\r\n [src]="asset | assetPreview: \'tiny\'"\r\n (click)="previewAsset(asset)"\r\n />\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-asset="entity">\r\n <div class="name" [title]="asset.name">\r\n {{ asset.name }}\r\n </div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".preview{cursor:pointer}.detail{flex:1}.detail,.name{overflow:hidden}.name{white-space:nowrap;text-overflow:ellipsis}"]}]}],Qp.ctorParameters=function(){return[{type:lc},{type:Ql}]},Qp.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}]};var Xp=function(){};Xp.decorators=[{type:t.Component,args:[{selector:"vdr-relation-selector-dialog",template:'<ng-template vdrDialogTitle>{{ title | translate }}</ng-template>\r\n<ng-container [ngTemplateOutlet]="selectorTemplate" [ngTemplateOutletContext]="{ select: resolveWith }"></ng-container>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var ed=function(){function e(e,t){this.modalService=e,this.dataService=t,this.searchControl=new C.FormControl(""),this.searchTerm$=new c.Subject}return Object.defineProperty(e.prototype,"customer",{get:function(){return this.parentFormControl.value},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.results$=this.searchTerm$.pipe(r.debounceTime(200),r.switchMap((function(t){return e.dataService.customer.getCustomerList(10,0,t).mapSingle((function(e){return e.customers.items}))})))},e.prototype.selectCustomer=function(){var e=this;this.modalService.fromComponent(Xp,{size:"md",closable:!0,locals:{title:b.marker("customer.select-customer"),selectorTemplate:this.template}}).subscribe((function(t){t&&(e.parentFormControl.setValue(t),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e}();ed.decorators=[{type:t.Component,args:[{selector:"vdr-relation-customer-input",template:'<vdr-relation-card\r\n (select)="selectCustomer()"\r\n (remove)="remove()"\r\n placeholderIcon="user"\r\n [entity]="customer"\r\n [selectLabel]="\'customer.select-customer\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview>\r\n <div class="placeholder">\r\n <clr-icon shape="user" class="is-solid" size="50"></clr-icon>\r\n </div>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-c="entity">\r\n <div class="">\r\n <a [routerLink]="[\'/customer/customers\', c.id]">{{ c.firstName }} {{ c.lastName }}</a>\r\n </div>\r\n <div class="">{{ c.emailAddress }}</div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select="select">\r\n <ng-select [items]="results$ | async" [typeahead]="searchTerm$" appendTo="body" (change)="select($event)">\r\n <ng-template ng-option-tmp let-item="item">\r\n <b>{{ item.emailAddress }}</b>\r\n {{ item.firstName }} {{ item.lastName }}\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ed.ctorParameters=function(){return[{type:lc},{type:Ql}]},ed.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}],template:[{type:t.ViewChild,args:["selector"]}]};var td=function(){function e(e,t){this.modalService=e,this.dataService=t,this.searchControl=new C.FormControl(""),this.searchTerm$=new c.Subject}return e.prototype.ngOnInit=function(){var e=this;this.productVariant$=this.parentFormControl.valueChanges.pipe(r.startWith(this.parentFormControl.value),r.map((function(e){return null==e?void 0:e.id})),r.distinctUntilChanged(),r.switchMap((function(t){return t?e.dataService.product.getProductVariant(t).mapStream((function(e){return e.productVariant||void 0})):c.of(void 0)}))),this.results$=this.searchTerm$.pipe(r.debounceTime(200),r.switchMap((function(t){return e.dataService.product.getProductVariants(Object.assign(Object.assign({},t?{filter:{name:{contains:t}}}:{}),{take:10})).mapSingle((function(e){return e.productVariants.items}))})))},e.prototype.selectProductVariant=function(){var e=this;this.modalService.fromComponent(Xp,{size:"md",closable:!0,locals:{title:b.marker("catalog.select-product-variant"),selectorTemplate:this.template}}).subscribe((function(t){t&&(e.parentFormControl.setValue(t),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e}();td.decorators=[{type:t.Component,args:[{selector:"vdr-relation-product-variant-input",template:'<vdr-relation-card\r\n (select)="selectProductVariant()"\r\n (remove)="remove()"\r\n placeholderIcon="library"\r\n [entity]="productVariant$ | async"\r\n [selectLabel]="\'catalog.select-product-variant\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview let-variant="entity">\r\n <img\r\n *ngIf="variant.featuredAsset || variant.product.featuredAsset as asset; else placeholder"\r\n [src]="asset | assetPreview: \'tiny\'"\r\n />\r\n <ng-template #placeholder>\r\n <div class="placeholder" *ngIf="!variant.featuredAsset">\r\n <clr-icon shape="image" size="50"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-variant="entity">\r\n <a [routerLink]="[\'/catalog/products\', variant.product.id, { tab: \'variants\' }]">{{ variant.name }}</a>\r\n <div class="">{{ variant.sku }}</div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select="select">\r\n <ng-select [items]="results$ | async" [typeahead]="searchTerm$" appendTo="body" (change)="select($event)">\r\n <ng-template ng-option-tmp let-item="item">\r\n <img\r\n *ngIf="item.featuredAsset || item.product.featuredAsset as asset"\r\n [src]="asset | assetPreview: 32"\r\n />\r\n {{ item.name }}\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".placeholder{color:var(--color-grey-300)}"]}]}],td.ctorParameters=function(){return[{type:lc},{type:Ql}]},td.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}],template:[{type:t.ViewChild,args:["selector"]}]};var nd=function(){function e(e,t){this.modalService=e,this.dataService=t,this.searchControl=new C.FormControl(""),this.searchTerm$=new c.Subject}return e.prototype.ngOnInit=function(){var e=this;this.product$=this.parentFormControl.valueChanges.pipe(r.startWith(this.parentFormControl.value),r.map((function(e){return null==e?void 0:e.id})),r.distinctUntilChanged(),r.switchMap((function(t){return t?e.dataService.product.getProductSimple(t).mapStream((function(e){return e.product||void 0})):c.of(void 0)}))),this.results$=this.searchTerm$.pipe(r.debounceTime(200),r.switchMap((function(t){return e.dataService.product.getProducts(Object.assign(Object.assign({},t?{filter:{name:{contains:t}}}:{}),{take:10})).mapSingle((function(e){return e.products.items}))})))},e.prototype.selectProduct=function(){var e=this;this.modalService.fromComponent(Xp,{size:"md",closable:!0,locals:{title:b.marker("catalog.select-product"),selectorTemplate:this.template}}).subscribe((function(t){t&&(e.parentFormControl.setValue(t),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e}();nd.decorators=[{type:t.Component,args:[{selector:"vdr-relation-product-input",template:'<vdr-relation-card\r\n (select)="selectProduct()"\r\n (remove)="remove()"\r\n placeholderIcon="library"\r\n [entity]="product$ | async"\r\n [selectLabel]="\'catalog.select-product\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview let-product="entity">\r\n <img *ngIf="product.featuredAsset" [src]="product.featuredAsset | assetPreview: \'tiny\'" />\r\n <div class="placeholder" *ngIf="!product.featuredAsset">\r\n <clr-icon shape="image" size="50"></clr-icon>\r\n </div>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-product="entity">\r\n <a [routerLink]="[\'/catalog/products\', product.id]">{{ product.name }}</a>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select="select">\r\n <ng-select [items]="results$ | async" [typeahead]="searchTerm$" appendTo="body" (change)="select($event)">\r\n <ng-template ng-option-tmp let-item="item">\r\n <img [src]="item.featuredAsset | assetPreview: 32" />\r\n {{ item.name }}\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".placeholder{color:var(--color-grey-300)}"]}]}],nd.ctorParameters=function(){return[{type:lc},{type:Ql}]},nd.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}],template:[{type:t.ViewChild,args:["selector"]}]};var rd=function(){};rd.decorators=[{type:t.Directive,args:[{selector:"[vdrRelationCardPreview]"}]}];var od=function(){};od.decorators=[{type:t.Directive,args:[{selector:"[vdrRelationCardDetail]"}]}];var id=function(){this.removable=!0,this.select=new t.EventEmitter,this.remove=new t.EventEmitter};id.decorators=[{type:t.Component,args:[{selector:"vdr-relation-card",template:'<div class="flex">\r\n <ng-container *ngIf="entity; else placeholder">\r\n <div class="preview">\r\n <ng-container *ngTemplateOutlet="previewTemplate; context: { entity: entity }"></ng-container>\r\n </div>\r\n <div class="detail">\r\n <div class="pl3">\r\n <ng-container *ngTemplateOutlet="detailTemplate; context: { entity: entity }"></ng-container>\r\n </div>\r\n <button *ngIf="!readonly" class="btn btn-sm btn-link" (click)="select.emit()">\r\n <clr-icon shape="link"></clr-icon> {{ \'common.change-selection\' | translate }}\r\n </button>\r\n <button *ngIf="!readonly && removable" class="btn btn-sm btn-link" (click)="remove.emit()">\r\n <clr-icon shape="times"></clr-icon> {{ \'common.remove\' | translate }}\r\n </button>\r\n </div>\r\n </ng-container>\r\n <ng-template #placeholder>\r\n <div class="preview">\r\n <div class="placeholder" (click)="!readonly && select.emit()">\r\n <clr-icon [attr.shape]="placeholderIcon" size="50"></clr-icon>\r\n </div>\r\n </div>\r\n <div class="detail">\r\n <div class="pl3 not-set">{{ \'common.not-set\' | translate }}</div>\r\n <button *ngIf="!readonly" class="btn btn-sm btn-link" (click)="select.emit()">\r\n <clr-icon shape="link"></clr-icon> {{ selectLabel }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;min-width:300px}.not-set,.placeholder{color:var(--color-grey-300)}.detail{flex:1}.detail,.name{overflow:hidden}.name{white-space:nowrap;text-overflow:ellipsis}"]}]}],id.propDecorators={entity:[{type:t.Input}],placeholderIcon:[{type:t.Input}],selectLabel:[{type:t.Input}],readonly:[{type:t.Input}],removable:[{type:t.Input}],select:[{type:t.Output}],remove:[{type:t.Output}],previewTemplate:[{type:t.ContentChild,args:[rd,{read:t.TemplateRef}]}],detailTemplate:[{type:t.ContentChild,args:[od,{read:t.TemplateRef}]}]};var ad=function(){function e(){}return e.prototype.transform=function(e,t){if(void 0===t&&(t="thumb"),!e)return"";if(!e.preview||"string"!=typeof e.preview)throw new Error("Expected an Asset, got "+JSON.stringify(e));var n=e.focalPoint?"&fpx="+e.focalPoint.x+"&fpy="+e.focalPoint.y:"";return Number.isNaN(Number(t))?e.preview+"?preset="+t+n:e.preview+"?w="+t+"&h="+t+n},e}();ad.decorators=[{type:t.Pipe,args:[{name:"assetPreview"}]}];var sd=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e===y.DEFAULT_CHANNEL_CODE?b.marker("common.default-channel"):e},e}();sd.decorators=[{type:t.Pipe,args:[{name:"channelCodeToLabel"}]}];var ld=function(){function e(e){var t=this;this.dataService=e,this.subscription=e.client.uiState().stream$.subscribe((function(e){t.uiLanguageCode=e.uiState.language}))}return e.prototype.transform=function(e){var t=this;if(!e)return e;var n=e.label,r=this.isCustomFieldConfig(e)?e.name:e.value;if(n){var o=n.find((function(e){return e.languageCode===t.uiLanguageCode}));return o?o.value:n[0].value}return r},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.isCustomFieldConfig=function(e){return e.hasOwnProperty("name")},e}();ld.decorators=[{type:t.Pipe,args:[{name:"customFieldLabel",pure:!1}]}],ld.ctorParameters=function(){return[{type:Ql}]};var cd=function(){function e(e){this.i18nService=e}return e.prototype.transform=function(e){if(e<1e3)return this.i18nService.translate(b.marker("datetime.duration-milliseconds"),{ms:e});if(e<6e4){var t=+(e/1e3).toFixed(1);return this.i18nService.translate(b.marker("datetime.duration-seconds"),{s:t})}var n=Math.floor(e/6e4),r=Math.round(e%6e4/1e3).toString().padStart(2,"0");return this.i18nService.translate(b.marker("datetime.duration-minutes:seconds"),{m:n,s:r})},e}();cd.decorators=[{type:t.Pipe,args:[{name:"duration"}]}],cd.ctorParameters=function(){return[{type:oc}]};var ud=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=!0),"number"!=typeof e&&"string"!=typeof e?e:function(e,t){var n=t?1e3:1024;if(Math.abs(e)<n)return e+" B";var r=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=-1;do{e/=n,++o}while(Math.abs(e)>=n&&o<r.length-1);return e.toFixed(1)+" "+r[o]}(e,!0===t)},e}();ud.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var pd=function(){function e(e,t){this.dataService=e,this.changeDetectorRef=t,this.hasPermission=!1,this.lastPermissions=null,this.currentPermissions$=this.dataService.client.userStatus().mapStream((function(e){return e.userStatus.permissions}))}return e.prototype.transform=function(e){var t=this,n=Array.isArray(e)?e:[e],r=n.join(",");return this.lastPermissions!==r&&(this.lastPermissions=r,this.hasPermission=!1,this.dispose(),this.subscription=this.currentPermissions$.subscribe((function(e){t.hasPermission=t.checkPermissions(e,n),t.changeDetectorRef.markForCheck()}))),this.hasPermission},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.checkPermissions=function(e,t){var n,r;try{for(var o=X(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(e.includes(a))return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},e}();pd.decorators=[{type:t.Pipe,args:[{name:"hasPermission",pure:!1}]}],pd.ctorParameters=function(){return[{type:Ql},{type:t.ChangeDetectorRef}]};var dd=function(){function e(e,t){var n=this;e&&t&&(this.subscription=e.client.uiState().mapStream((function(e){return e.uiState.language})).subscribe((function(e){n.locale=e.replace(/_/g,"-"),t.markForCheck()})))}return e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();dd.decorators=[{type:t.Injectable}],dd.ctorParameters=function(){return[{type:Ql},{type:t.ChangeDetectorRef}]};var md=function(e){function t(t,n){return e.call(this,t,n)||this}return J(t,e),t.prototype.transform=function(e,t,n){var r;if(void 0===t&&(t="full"),null==e||""===e)return"";if("string"!=typeof e)return'Invalid currencyCode "'+e+'"';var o="",i="",a="string"==typeof n?n:null!==(r=this.locale)&&void 0!==r?r:"en";return"full"!==t&&"name"!==t||(o=new Intl.NumberFormat(a,{style:"currency",currency:e,currencyDisplay:"name"}).format(void 0).replace(/\s*NaN\s*/,"")),"full"!==t&&"symbol"!==t||(i=new Intl.NumberFormat(a,{style:"currency",currency:e,currencyDisplay:"symbol"}).format(void 0).replace(/\s*NaN\s*/,"")),"full"===t?o+" ("+i+")":"name"===t?o:i},t}(dd);md.decorators=[{type:t.Pipe,args:[{name:"localeCurrencyName",pure:!1}]}],md.ctorParameters=function(){return[{type:Ql,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Optional}]}]};var gd=function(e){function t(t,n){return e.call(this,t,n)||this}return J(t,e),t.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ee(t,2),o=r[0],i=r[1];if("number"==typeof e&&"string"==typeof o){var a="string"==typeof i?i:this.locale,s=e/100;return new Intl.NumberFormat(a,{style:"currency",currency:o}).format(s)}return e},t}(dd);gd.decorators=[{type:t.Pipe,args:[{name:"localeCurrency",pure:!1}]}],gd.ctorParameters=function(){return[{type:Ql,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Optional}]}]};var hd=function(e){function t(t,n){return e.call(this,t,n)||this}return J(t,e),t.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ee(t,2),o=r[0],i=r[1];if(this.locale||"string"==typeof i){var a="string"==typeof i?i:this.locale,s=e instanceof Date?e:"string"==typeof e?new Date(e):void 0;if(s){var l=this.getOptionsForFormat("string"==typeof o?o:"medium");return new Intl.DateTimeFormat(a,l).format(s)}}},t.prototype.getOptionsForFormat=function(e){switch(e){case"medium":return{month:"short",year:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};case"mediumTime":return{hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};case"longDate":return{year:"numeric",month:"long",day:"numeric"};case"short":return{day:"numeric",month:"numeric",year:"2-digit",hour:"numeric",minute:"numeric",hour12:!0};default:return}},t}(dd);hd.decorators=[{type:t.Pipe,args:[{name:"localeDate",pure:!1}]}],hd.ctorParameters=function(){return[{type:Ql,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Optional}]}]};var fd=function(){function e(){}return e.prototype.transform=function(e){if("string"==typeof e){var t=void 0;return(t=function(e){return/^[a-zA-Z]+[A-Z][a-zA-Z]+$/.test(e)}(e)?e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase():e.toLowerCase()).charAt(0).toUpperCase()+t.slice(1)}return e},e}();fd.decorators=[{type:t.Pipe,args:[{name:"sentenceCase"}]}];var yd=function(){function e(){}return e.prototype.transform=function(e,t){return e.slice().sort((function(e,n){var r=t?e[t]:e,o=t?n[t]:n;return r===o?0:null==r?1:null==o?-1:r>o?1:-1}))},e}();yd.decorators=[{type:t.Pipe,args:[{name:"sort"}]}];var vd=function(){function e(){this.stateI18nTokens={Created:b.marker("state.created"),AddingItems:b.marker("state.adding-items"),ArrangingPayment:b.marker("state.arranging-payment"),PaymentAuthorized:b.marker("state.payment-authorized"),PaymentSettled:b.marker("state.payment-settled"),PartiallyShipped:b.marker("state.partially-shipped"),Shipped:b.marker("state.shipped"),PartiallyDelivered:b.marker("state.partially-delivered"),Authorized:b.marker("state.authorized"),Delivered:b.marker("state.delivered"),Cancelled:b.marker("state.cancelled"),Pending:b.marker("state.pending"),Settled:b.marker("state.settled"),Failed:b.marker("state.failed"),Error:b.marker("state.error"),Declined:b.marker("state.declined"),Modifying:b.marker("state.modifying"),ArrangingAdditionalPayment:b.marker("state.arranging-additional-payment")}}return e.prototype.transform=function(e){if("string"==typeof e&&e.length){var t=this.stateI18nTokens[e];return t||"state."+e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/ +/g,"-").toLowerCase()}return e},e}();function Cd(e){if(!e||""===e)return"var(--color-component-bg-100)";var t=["#10893E","#107C10","#7E735F","#2F5646","#498205","#847545","#744DA9","#018574","#486860","#525E54","#647C64","#567C73","#8764B8","#515C6B","#4A5459","#69797E","#0063B1","#0078D7","#2D7D9A","#7A7574","#767676"];return t[e.split("").reduce((function(e,t,n){return e+Math.round(t.charCodeAt(0)*Math.log(n+2))}),0)%t.length]}vd.decorators=[{type:t.Pipe,args:[{name:"stateI18nToken"}]}];var bd=function(){function e(){}return e.prototype.transform=function(e){return Cd(e)},e}();bd.decorators=[{type:t.Pipe,args:[{name:"stringToColor",pure:!0}]}];var Sd=function(){function e(e){this.i18nService=e}return e.prototype.transform=function(e,t){var n,r,o=Z.default(e),i=Z.default(t||new Date).diff(o,"second"),a=[[60,b.marker("datetime.ago-seconds")],[3600,b.marker("datetime.ago-minutes")],[86400,b.marker("datetime.ago-hours")],[31536e3,b.marker("datetime.ago-days")],[Number.MAX_SAFE_INTEGER,b.marker("datetime.ago-years")]],s=1;try{for(var l=X(a),c=l.next();!c.done;c=l.next()){var u=ee(c.value,2),p=u[0],d=u[1];if(i<p){var m=Math.max(0,Math.floor(i/s));return this.i18nService.translate(d,{count:m})}s=p}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return o.format()},e}();Sd.decorators=[{type:t.Pipe,args:[{name:"timeAgo",pure:!1}]}],Sd.ctorParameters=function(){return[{type:oc}]};var Id=function(){function e(e,t){this.modalService=e,this.router=t}return e.prototype.canDeactivate=function(e,t,n,o){return!!e.canDeactivate()||this.modalService.dialog({title:b.marker("common.confirm-navigation"),body:b.marker("common.there-are-unsaved-changes"),buttons:[{type:"danger",label:b.marker("common.discard-changes"),returnValue:!0},{type:"primary",label:b.marker("common.cancel-navigation"),returnValue:!1}]}).pipe(r.map((function(e){return!!e})))},e}();Id.decorators=[{type:t.Injectable}],Id.ctorParameters=function(){return[{type:lc},{type:f.Router}]};var Td=[R.ClarityModule,n.CommonModule,C.FormsModule,C.ReactiveFormsModule,f.RouterModule,k.NgSelectModule,x.NgxPaginationModule,g.TranslateModule,E.OverlayModule,A.DragDropModule],Dd=[du,uu,pu,Su,yu,Au,Fu,gu,Pu,$u,md,Mu,_u,Nu,Lu,ep,lp,fp,Vp,Qu,ud,rp,np,op,ic,hu,dp,pp,mp,Gp,up,qp,ac,Hp,fd,ju,Hu,yd,zu,Bu,hp,ip,cp,bd,gp,Jp,Yp,pd,cu,zp,fu,vu,Cu,Yu,Vu,Ru,Eu,sd,Zp,Ku,ld,tp,ad,Cp,vp,Sd,cd,Zu,Bp,sp,Wu,nu,vd,yp,ap,Kc,mu,hd,gd,jp],Ad=[iu,tu,eu,Qc,Jc,Yc,ou,Xc,Kp,ru,Qp,nd,td,ed,rd,od,Xp],Ed=function(){};Ed.decorators=[{type:t.NgModule,args:[{imports:[Td],exports:te(Td,Dd,Ad),declarations:te(Dd,Ad,[bu,Xp,id]),providers:[lc,Id],schemas:[t.CUSTOM_ELEMENTS_SCHEMA]}]}];var Rd=function(){function e(e,t,n){this.i18nService=e,this.localStorageService=t,this.titleService=n,this.initUiLanguages(),this.initUiTitle()}return e.prototype.initUiLanguages=function(){var e=nc(),t=this.localStorageService.get("uiLanguageCode"),n=tc().availableLanguages;if(!n.includes(e))throw new Error('The defaultLanguage "'+e+'" must be one of the availableLanguages ['+n.map((function(e){return'"'+e+'"'})).join(", ")+"]");var r=t&&n.includes(t)?t:e;this.localStorageService.set("uiLanguageCode",r),this.i18nService.setLanguage(r),this.i18nService.setDefaultLanguage(e),this.i18nService.setAvailableLanguages(n||[e])},e.prototype.initUiTitle=function(){var e=tc().brand||"VendureAdmin";this.titleService.setTitle(e)},e}();function Pd(e,t){var n=t.getBaseHrefFromDOM();return new Hc(e,n+"i18n-messages/")}function Od(){var e=tc().availableLanguages,t=nc(),n=e.filter((function(e){return e!==t}));return{locales:te([t],n)}}Rd.decorators=[{type:t.NgModule,args:[{imports:[d.BrowserModule,Bc,Ed,m.BrowserAnimationsModule,g.TranslateModule.forRoot({loader:{provide:g.TranslateLoader,useFactory:Pd,deps:[i.HttpClient,n.PlatformLocation]},compiler:{provide:g.TranslateCompiler,useClass:zc}})],providers:[{provide:h.MESSAGE_FORMAT_CONFIG,useFactory:Od},lu(),d.Title],exports:[Ed,Sc],declarations:[uc,Tc,Cc,pc,Sc,bc,cc,gc,Ic]}]}],Rd.ctorParameters=function(){return[{type:oc},{type:Ye},{type:d.Title}]};var kd=function(){};kd.decorators=[{type:t.NgModule,args:[{imports:[Ed,Rd],declarations:[ec],exports:[ec]}]}];var wd=function(){function e(e,t,n,r){this.route=e,this.router=t,this.serverConfigService=n,this.dataService=r,this.destroy$=new c.Subject}return e.prototype.init=function(){var e=this;this.entity$=this.route.data.pipe(r.switchMap((function(t){return t.entity.pipe(r.takeUntil(e.destroy$))})),r.tap((function(t){return e.id=t.id})),r.shareReplay(1)),this.isNew$=this.entity$.pipe(r.map((function(e){return""===e.id})),r.shareReplay(1)),this.languageCode$=this.route.paramMap.pipe(r.map((function(e){return e.get("lang")})),r.switchMap((function(t){return t?c.of(t):e.dataService.settings.getActiveChannel().mapSingle((function(e){return e.activeChannel.defaultLanguageCode}))})),r.distinctUntilChanged(),r.shareReplay(1)),this.availableLanguages$=this.serverConfigService.getAvailableLanguages(),c.combineLatest(this.entity$,this.languageCode$).pipe(r.takeUntil(this.destroy$)).subscribe((function(t){var n=ee(t,2),r=n[0],o=n[1];e.setFormValues(r,o),e.detailForm.markAsPristine()}))},e.prototype.destroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.setLanguage=function(e){this.setQueryParam("lang",e)},e.prototype.canDeactivate=function(){return this.detailForm&&this.detailForm.pristine},e.prototype.getCustomFieldConfig=function(e){return this.serverConfigService.getCustomFieldsFor(e)},e.prototype.setQueryParam=function(e,t){var n;this.router.navigate(["./",Object.assign(Object.assign({},this.route.snapshot.params),(n={},n[e]=t,n))],{relativeTo:this.route,queryParamsHandling:"merge"})},e}();var xd=function(){function e(e,t,n){this.router=e,this.emptyEntity=t,this.entityStream=n}return e.prototype.resolve=function(e,t){var n=e.paramMap.get("id"),o=this.router.events.pipe(r.filter((function(e){return e instanceof f.ActivationStart})));if("create"===n)return c.of(c.of(this.emptyEntity));var i=this.entityStream(n||"").pipe(r.takeUntil(o),r.filter(l.notNullOrUndefined),r.shareReplay(1));return i.pipe(r.take(1),r.map((function(){return i})))},e}(),Fd=function(){function e(e,t){this.router=e,this.route=t,this.destroy$=new c.Subject,this.onPageChangeFn=function(e,t){return{options:{skip:e,take:t}}},this.refresh$=new c.BehaviorSubject(void 0),this.defaults={take:10,skip:0}}return e.prototype.setQueryFn=function(e,t,n,r){this.listQueryFn=e,this.mappingFn=t,n&&(this.onPageChangeFn=n),r&&(this.defaults=r)},e.prototype.ngOnInit=function(){var e=this;if(!this.listQueryFn)throw new Error("No listQueryFn has been defined. Please call super.setQueryFn() in the constructor.");this.listQuery=this.listQueryFn(this.defaults.take,this.defaults.skip);this.result$=this.listQuery.stream$.pipe(r.shareReplay(1)),this.items$=this.result$.pipe(r.map((function(t){return e.mappingFn(t).items}))),this.totalItems$=this.result$.pipe(r.map((function(t){return e.mappingFn(t).totalItems}))),this.currentPage$=this.route.queryParamMap.pipe(r.map((function(e){return e.get("page")})),r.map((function(e){return e?+e:1})),r.distinctUntilChanged()),this.itemsPerPage$=this.route.queryParamMap.pipe(r.map((function(e){return e.get("perPage")})),r.map((function(t){return t?+t:e.defaults.take})),r.distinctUntilChanged()),c.combineLatest(this.currentPage$,this.itemsPerPage$,this.refresh$).pipe(r.takeUntil(this.destroy$)).subscribe((function(t){var n=ee(t,3),r=n[0],o=n[1],i=(n[2],o),a=(r-1)*o;e.listQuery.ref.refetch(e.onPageChangeFn(a,i))}))},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.listQuery.completed$.next()},e.prototype.setPageNumber=function(e){this.setQueryParam("page",e,{replaceUrl:!0})},e.prototype.setItemsPerPage=function(e){this.setQueryParam("perPage",e,{replaceUrl:!0})},e.prototype.refresh=function(){this.refresh$.next(void 0)},e.prototype.setQueryParam=function(e,t,n){"string"==typeof e&&((r={})[e]=t);var r,o,i,a=null!==(i="string"==typeof e?n:t)&&void 0!==i?i:{};this.router.navigate(["./"],Object.assign({queryParams:"string"==typeof e?(o={},o[e]=t,o):e,relativeTo:this.route,queryParamsHandling:"merge"},a))},e}();function $d(e,t){return((null==e?void 0:e.translations)||[]).find((function(e){return e.languageCode===t}))}function _d(e){switch(e){case"localeString":case"string":return"";case"boolean":return!1;case"float":case"int":return 0;case"datetime":return new Date;case"relation":return null;default:l.assertNever(e)}}function Md(e,t){var n=Object.assign({},e);return Object.keys(n).forEach((function(e){t.hasOwnProperty(e)&&(n[e]=t[e])})),n}Fd.decorators=[{type:t.Directive}],Fd.ctorParameters=function(){return[{type:f.Router},{type:f.ActivatedRoute}]},b.marker("lang.af"),b.marker("lang.ak"),b.marker("lang.sq"),b.marker("lang.am"),b.marker("lang.ar"),b.marker("lang.hy"),b.marker("lang.as"),b.marker("lang.az"),b.marker("lang.bm"),b.marker("lang.bn"),b.marker("lang.eu"),b.marker("lang.be"),b.marker("lang.bs"),b.marker("lang.br"),b.marker("lang.bg"),b.marker("lang.my"),b.marker("lang.ca"),b.marker("lang.ce"),b.marker("lang.zh"),b.marker("lang.zh_Hans"),b.marker("lang.zh_Hant"),b.marker("lang.cu"),b.marker("lang.kw"),b.marker("lang.co"),b.marker("lang.hr"),b.marker("lang.cs"),b.marker("lang.da"),b.marker("lang.nl"),b.marker("lang.nl_BE"),b.marker("lang.dz"),b.marker("lang.en"),b.marker("lang.en_AU"),b.marker("lang.en_CA"),b.marker("lang.en_GB"),b.marker("lang.en_US"),b.marker("lang.eo"),b.marker("lang.et"),b.marker("lang.ee"),b.marker("lang.fo"),b.marker("lang.fi"),b.marker("lang.fr"),b.marker("lang.fr_CA"),b.marker("lang.fr_CH"),b.marker("lang.ff"),b.marker("lang.gl"),b.marker("lang.lg"),b.marker("lang.ka"),b.marker("lang.de"),b.marker("lang.de_AT"),b.marker("lang.de_CH"),b.marker("lang.el"),b.marker("lang.gu"),b.marker("lang.ht"),b.marker("lang.ha"),b.marker("lang.he"),b.marker("lang.hi"),b.marker("lang.hu"),b.marker("lang.is"),b.marker("lang.ig"),b.marker("lang.id"),b.marker("lang.ia"),b.marker("lang.ga"),b.marker("lang.it"),b.marker("lang.ja"),b.marker("lang.jv"),b.marker("lang.kl"),b.marker("lang.kn"),b.marker("lang.ks"),b.marker("lang.kk"),b.marker("lang.km"),b.marker("lang.ki"),b.marker("lang.rw"),b.marker("lang.ko"),b.marker("lang.ku"),b.marker("lang.ky"),b.marker("lang.lo"),b.marker("lang.la"),b.marker("lang.lv"),b.marker("lang.ln"),b.marker("lang.lt"),b.marker("lang.lu"),b.marker("lang.lb"),b.marker("lang.mk"),b.marker("lang.mg"),b.marker("lang.ms"),b.marker("lang.ml"),b.marker("lang.mt"),b.marker("lang.gv"),b.marker("lang.mi"),b.marker("lang.mr"),b.marker("lang.mn"),b.marker("lang.ne"),b.marker("lang.nd"),b.marker("lang.se"),b.marker("lang.nb"),b.marker("lang.nn"),b.marker("lang.ny"),b.marker("lang.or"),b.marker("lang.om"),b.marker("lang.os"),b.marker("lang.ps"),b.marker("lang.fa"),b.marker("lang.fa_AF"),b.marker("lang.pl"),b.marker("lang.pt"),b.marker("lang.pt_BR"),b.marker("lang.pt_PT"),b.marker("lang.pa"),b.marker("lang.qu"),b.marker("lang.ro"),b.marker("lang.ro_MD"),b.marker("lang.rm"),b.marker("lang.rn"),b.marker("lang.ru"),b.marker("lang.sm"),b.marker("lang.sg"),b.marker("lang.sa"),b.marker("lang.gd"),b.marker("lang.sr"),b.marker("lang.sn"),b.marker("lang.ii"),b.marker("lang.sd"),b.marker("lang.si"),b.marker("lang.sk"),b.marker("lang.sl"),b.marker("lang.so"),b.marker("lang.st"),b.marker("lang.es"),b.marker("lang.es_ES"),b.marker("lang.es_MX"),b.marker("lang.su"),b.marker("lang.sw"),b.marker("lang.sw_CD"),b.marker("lang.sv"),b.marker("lang.tg"),b.marker("lang.ta"),b.marker("lang.tt"),b.marker("lang.te"),b.marker("lang.th"),b.marker("lang.bo"),b.marker("lang.ti"),b.marker("lang.to"),b.marker("lang.tr"),b.marker("lang.tk"),b.marker("lang.uk"),b.marker("lang.ur"),b.marker("lang.ug"),b.marker("lang.uz"),b.marker("lang.vi"),b.marker("lang.vo"),b.marker("lang.cy"),b.marker("lang.fy"),b.marker("lang.wo"),b.marker("lang.xh"),b.marker("lang.yi"),b.marker("lang.yo"),b.marker("lang.zu");var Ld=function(){function e(){this.registry=new Map,this.layoutDef=[]}return e.prototype.registerWidget=function(e,t){if(this.registry.has(e))throw new Error('A dashboard widget with the id "'+e+'" already exists');this.registry.set(e,t)},e.prototype.getAvailableIds=function(e){return te(this.registry.entries()).filter((function(t){var n,r,o=ee(t,2),i=(o[0],o[1]);return!i.requiresPermissions||(n=i.requiresPermissions,r=e,n.every((function(e){return r.includes(e)})))})).map((function(e){return ee(e,1)[0]}))},e.prototype.getWidgetById=function(e){if(!this.registry.has(e))throw new Error('No widget was found with the id "'+e+'"');return this.registry.get(e)},e.prototype.setDefaultLayout=function(e){this.layoutDef=e},e.prototype.getDefaultLayout=function(){return this.layoutDef},e.prototype.getWidgetLayout=function(e){var t=this,n=(e||this.layoutDef).map((function(e){var n=e.id,r=e.width,o=t.registry.get(n);return o?{id:n,config:o,width:t.getValidWidth(n,o,r)}:t.idNotFound(n)})).filter(l.notNullOrUndefined);return this.buildLayout(n)},e.prototype.idNotFound=function(e){console.error('No dashboard widget was found with the id "'+e+'"\nAvailable ids: '+te(this.registry.keys()).map((function(e){return'"'+e+'"'})).join(", "))},e.prototype.getValidWidth=function(e,t,n){var r,o=n,i=(null===(r=t.supportedWidths)||void 0===r?void 0:r.length)?t.supportedWidths:[3,4,6,8,12];if(!i.includes(n)){var a=i.sort((function(e,t){return e-t})),s=i[a.length-1];console.error('The "'+e+'" widget does not support the specified width ('+n+").\nSupported widths are: ["+a.join(", ")+"].\nUsing ("+s+") instead."),o=s}return o},e.prototype.buildLayout=function(e){var t,n,r=[],o=[];try{for(var i=X(e),a=i.next();!a.done;a=i.next()){var s=a.value,l=s.id,c=s.config,u=s.width;12<o.reduce((function(e,t){return e+t.width}),0)+u&&(r.push(o),o=[]),o.push({id:l,config:c,width:u})}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r.push(o),r},e}();Ld.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Ld},token:Ld,providedIn:"root"}),Ld.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var Nd=function(){function e(e,t){this.router=e,this.authService=t,this.externalLoginUrl=tc().loginUrl}return e.prototype.canActivate=function(e){var t=this;return this.authService.checkAuthenticatedStatus().pipe(r.tap((function(e){e||(t.externalLoginUrl?window.location.href=t.externalLoginUrl:t.router.navigate(["/login"]))})))},e}();Nd.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Nd(t.ɵɵinject(f.Router),t.ɵɵinject(rc))},token:Nd,providedIn:"root"}),Nd.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Nd.ctorParameters=function(){return[{type:f.Router},{type:rc}]};var Ud=function(e){this.extensionUrl=e.extensionUrl,this.openInNewTab=null!=e.openInNewTab&&e.openInNewTab};e.ADDRESS_FRAGMENT=ds,e.ADD_CUSTOMERS_TO_GROUP=Es,e.ADD_MANUAL_PAYMENT_TO_ORDER=gl,e.ADD_MEMBERS_TO_ZONE=Bn,e.ADD_NOTE_TO_CUSTOMER=Os,e.ADD_NOTE_TO_ORDER=al,e.ADD_OPTION_GROUP_TO_PRODUCT=Oa,e.ADD_OPTION_TO_GROUP=Pa,e.ADMINISTRATOR_FRAGMENT=Ee,e.ADMIN_UI_VERSION="1.0.2",e.ALL_CUSTOM_FIELDS_FRAGMENT=Or,e.ASSET_FRAGMENT=ga,e.ASSIGN_PRODUCTS_TO_CHANNEL=Ha,e.ASSIGN_ROLE_TO_ADMINISTRATOR=Ue,e.ASSIGN_VARIANTS_TO_CHANNEL=za,e.ATTEMPT_LOGIN=He,e.AUTH_REDIRECT_PARAM=qc,e.ActionBarComponent=du,e.ActionBarItemsComponent=cu,e.ActionBarLeftComponent=uu,e.ActionBarRightComponent=pu,e.AddressFormComponent=mu,e.AdministratorDataService=qe,e.AffixedInputComponent=gu,e.AppComponent=ec,e.AppComponentModule=kd,e.AppShellComponent=uc,e.AssetFileInputComponent=fu,e.AssetGalleryComponent=vu,e.AssetPickerDialogComponent=Cu,e.AssetPreviewComponent=Su,e.AssetPreviewDialogComponent=yu,e.AssetPreviewPipe=ad,e.AssetSearchInputComponent=Au,e.AuthDataService=Ze,e.AuthGuard=Nd,e.AuthService=rc,e.BOOLEAN_CUSTOM_FIELD_FRAGMENT=Dr,e.BaseDataService=eo,e.BaseDetailComponent=wd,e.BaseEntityResolver=xd,e.BaseListComponent=Fd,e.BooleanFormInputComponent=Yc,e.BreadcrumbComponent=pc,e.CANCEL_JOB=Mr,e.CANCEL_ORDER=nl,e.CHANNEL_FRAGMENT=or,e.COLLECTION_FRAGMENT=rs,e.CONFIGURABLE_OPERATION_DEF_FRAGMENT=Ve,e.CONFIGURABLE_OPERATION_FRAGMENT=Ge,e.COUNTRY_FRAGMENT=wn,e.CREATE_ADMINISTRATOR=ke,e.CREATE_ASSETS=La,e.CREATE_CHANNEL=lr,e.CREATE_COLLECTION=as,e.CREATE_COUNTRY=_n,e.CREATE_CUSTOMER=fs,e.CREATE_CUSTOMER_ADDRESS=Cs,e.CREATE_CUSTOMER_GROUP=Ss,e.CREATE_FACET=_s,e.CREATE_FACET_VALUES=Ns,e.CREATE_FULFILLMENT=tl,e.CREATE_PAYMENT_METHOD=hr,e.CREATE_PRODUCT=Ia,e.CREATE_PRODUCT_OPTION_GROUP=Ea,e.CREATE_PRODUCT_VARIANTS=Da,e.CREATE_PROMOTION=Ll,e.CREATE_ROLE=Me,e.CREATE_SHIPPING_METHOD=zl,e.CREATE_TAG=Xa,e.CREATE_TAX_CATEGORY=Yn,e.CREATE_TAX_RATE=tr,e.CREATE_ZONE=Gn,e.CURRENT_USER_FRAGMENT=Be,e.CUSTOMER_FRAGMENT=ms,e.CUSTOM_FIELD_CONFIG_FRAGMENT=Sr,e.CanDeactivateDetailGuard=Id,e.ChannelAssignmentControlComponent=Eu,e.ChannelBadgeComponent=Ru,e.ChannelLabelPipe=sd,e.ChannelSwitcherComponent=gc,e.CheckJobsLink=Ac,e.ChipComponent=Pu,e.ClientDataService=ma,e.CollectionDataService=ps,e.ComponentRegistryService=Wc,e.ConfigurableInputComponent=Fu,e.CoreModule=Rd,e.CurrencyFormInputComponent=Jc,e.CurrencyInputComponent=$u,e.CustomFieldComponentService=Zc,e.CustomFieldControlComponent=_u,e.CustomFieldLabelPipe=ld,e.CustomHttpTranslationLoader=Hc,e.CustomerDataService=xs,e.CustomerGroupFormInputComponent=Kc,e.CustomerLabelComponent=Mu,e.DATE_TIME_CUSTOM_FIELD_FRAGMENT=Rr,e.DELETE_ADMINISTRATOR=Fe,e.DELETE_ASSETS=Ua,e.DELETE_CHANNEL=ur,e.DELETE_COLLECTION=cs,e.DELETE_COUNTRY=Ln,e.DELETE_CUSTOMER=vs,e.DELETE_CUSTOMER_GROUP=Ts,e.DELETE_CUSTOMER_NOTE=ws,e.DELETE_FACET=Ls,e.DELETE_FACET_VALUES=qs,e.DELETE_ORDER_NOTE=ll,e.DELETE_PAYMENT_METHOD=yr,e.DELETE_PRODUCT=Ta,e.DELETE_PRODUCT_VARIANT=ja,e.DELETE_PROMOTION=Ul,e.DELETE_ROLE=Ne,e.DELETE_SHIPPING_METHOD=Zl,e.DELETE_TAG=ts,e.DELETE_TAX_CATEGORY=Kn,e.DELETE_TAX_RATE=rr,e.DELETE_ZONE=jn,e.DISCOUNT_FRAGMENT=Bs,e.DashboardWidgetService=Ld,e.DataModule=Bc,e.DataService=Ql,e.DataTableColumnComponent=Lu,e.DataTableComponent=Nu,e.DateFormInputComponent=Qc,e.DatetimePickerComponent=Vu,e.DatetimePickerService=Gu,e.DefaultInterceptor=Gc,e.DialogButtonsDirective=pp,e.DialogComponentOutletComponent=dp,e.DialogTitleDirective=mp,e.DisabledDirective=zp,e.DropdownComponent=ju,e.DropdownItemDirective=Bu,e.DropdownMenuComponent=Hu,e.DropdownTriggerDirective=zu,e.DurationPipe=cd,e.DynamicFormInputComponent=Kp,e.ERROR_RESULT_FRAGMENT=je,e.EditNoteDialogComponent=Wu,e.EmptyPlaceholderComponent=Zu,e.EntityInfoComponent=Yu,e.ExtensionHostComponent=Ku,e.ExtensionHostConfig=Ud,e.ExtensionHostService=Ju,e.ExternalImageDialogComponent=vp,e.FACET_VALUE_FRAGMENT=Fs,e.FACET_WITH_VALUES_FRAGMENT=$s,e.FLOAT_CUSTOM_FIELD_FRAGMENT=Er,e.FULFILLMENT_FRAGMENT=Zs,e.FacetDataService=js,e.FacetValueChipComponent=Qu,e.FacetValueFormInputComponent=Xc,e.FacetValueSelectorComponent=ep,e.FetchAdapter=Nc,e.FileSizePipe=ud,e.FocalPointControlComponent=tp,e.FormFieldComponent=rp,e.FormFieldControlDirective=np,e.FormItemComponent=op,e.FormattedAddressComponent=ip,e.GET_ACTIVE_ADMINISTRATOR=Pe,e.GET_ACTIVE_CHANNEL=sr,e.GET_ADJUSTMENT_OPERATIONS=Ml,e.GET_ADMINISTRATOR=Oe,e.GET_ADMINISTRATORS=Re,e.GET_ASSET=Ma,e.GET_ASSET_LIST=_a,e.GET_AVAILABLE_COUNTRIES=Fn,e.GET_CHANNEL=ar,e.GET_CHANNELS=ir,e.GET_CLIENT_STATE=Rn,e.GET_COLLECTION=is,e.GET_COLLECTION_CONTENTS=us,e.GET_COLLECTION_FILTERS=ns,e.GET_COLLECTION_LIST=os,e.GET_COUNTRY=$n,e.GET_COUNTRY_LIST=xn,e.GET_CURRENT_USER=We,e.GET_CUSTOMER=hs,e.GET_CUSTOMER_GROUPS=Ds,e.GET_CUSTOMER_GROUP_WITH_CUSTOMERS=As,e.GET_CUSTOMER_HISTORY=Ps,e.GET_CUSTOMER_LIST=gs,e.GET_FACET_LIST=Gs,e.GET_FACET_WITH_VALUES=Vs,e.GET_GLOBAL_SETTINGS=Cr,e.GET_JOBS_BY_ID=$r,e.GET_JOBS_LIST=Fr,e.GET_JOB_INFO=xr,e.GET_JOB_QUEUE_LIST=_r,e.GET_NEWTORK_STATUS=Dn,e.GET_ORDER=Qs,e.GET_ORDERS_LIST=Ks,e.GET_ORDER_HISTORY=il,e.GET_ORDER_SUMMARY=dl,e.GET_PAYMENT_METHOD=gr,e.GET_PAYMENT_METHOD_LIST=dr,e.GET_PAYMENT_METHOD_OPERATIONS=mr,e.GET_PRODUCT_LIST=Fa,e.GET_PRODUCT_OPTION_GROUP=Ra,e.GET_PRODUCT_OPTION_GROUPS=$a,e.GET_PRODUCT_SIMPLE=xa,e.GET_PRODUCT_VARIANT=Ya,e.GET_PRODUCT_VARIANT_LIST=Ja,e.GET_PRODUCT_VARIANT_OPTIONS=Ba,e.GET_PRODUCT_WITH_VARIANTS=wa,e.GET_PROMOTION=_l,e.GET_PROMOTION_LIST=$l,e.GET_ROLE=_e,e.GET_ROLES=$e,e.GET_SERVER_CONFIG=kr,e.GET_SHIPPING_METHOD=Bl,e.GET_SHIPPING_METHOD_LIST=jl,e.GET_SHIPPING_METHOD_OPERATIONS=Hl,e.GET_TAG=Qa,e.GET_TAG_LIST=Ka,e.GET_TAX_CATEGORIES=Wn,e.GET_TAX_CATEGORY=Zn,e.GET_TAX_RATE=er,e.GET_TAX_RATE_LIST=Xn,e.GET_UI_STATE=En,e.GET_USER_STATUS=An,e.GET_ZONE=qn,e.GET_ZONES=Un,e.GLOBAL_SETTINGS_FRAGMENT=vr,e.HasPermissionPipe=pd,e.HealthCheckService=fc,e.HelpTooltipComponent=ap,e.HistoryEntryDetailComponent=sp,e.HttpLoaderFactory=Pd,e.I18nService=oc,e.INT_CUSTOM_FIELD_FRAGMENT=Ar,e.IfDefaultChannelActiveDirective=Zp,e.IfDirectiveBase=Wp,e.IfMultichannelDirective=Yp,e.IfPermissionsDirective=Jp,e.InjectableTranslateMessageFormatCompiler=zc,e.ItemsPerPageControlsComponent=lp,e.JOB_INFO_FRAGMENT=wr,e.JobQueueService=yc,e.LOCALE_STRING_CUSTOM_FIELD_FRAGMENT=Tr,e.LOG_OUT=ze,e.LabeledDataComponent=cp,e.LanguageSelectorComponent=up,e.LinkDialogComponent=Cp,e.LocalStorageService=Ye,e.LocaleBasePipe=dd,e.LocaleCurrencyNamePipe=md,e.LocaleCurrencyPipe=gd,e.LocaleDatePipe=hd,e.MODIFY_ORDER=ml,e.MOVE_COLLECTION=ls,e.MainNavComponent=Cc,e.ManageTagsDialogComponent=bu,e.ModalDialogComponent=ic,e.ModalService=lc,e.NavBuilderService=vc,e.NotificationComponent=bc,e.NotificationService=Uc,e.NumberFormInputComponent=eu,e.ORDER_ADDRESS_FRAGMENT=zs,e.ORDER_DETAIL_FRAGMENT=Js,e.ORDER_FRAGMENT=Ws,e.ORDER_LINE_FRAGMENT=Ys,e.ObjectTreeComponent=gp,e.OmitTypenameLink=Lc,e.OrderDataService=hl,e.OrderStateLabelComponent=hp,e.OverlayHostComponent=Sc,e.OverlayHostService=sc,e.PAYMENT_METHOD_FRAGMENT=pr,e.PRODUCT_OPTION_FRAGMENT=ya,e.PRODUCT_OPTION_GROUP_FRAGMENT=fa,e.PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT=ba,e.PRODUCT_SELECTOR_SEARCH=Ga,e.PRODUCT_VARIANT_FRAGMENT=va,e.PRODUCT_WITH_VARIANTS_FRAGMENT=Ca,e.PROMOTION_FRAGMENT=Fl,e.PaginationControlsComponent=fp,e.PasswordFormInputComponent=tu,e.PercentageSuffixInputComponent=hu,e.ProductDataService=xl,e.ProductSelectorComponent=yp,e.ProductSelectorFormInputComponent=nu,e.PromotionDataService=ql,e.ProsemirrorService=Up,e.QueryResult=kn,e.REFUND_FRAGMENT=Hs,e.REFUND_ORDER=rl,e.REINDEX=Lr,e.RELATION_CUSTOM_FIELD_FRAGMENT=Pr,e.REMOVE_CUSTOMERS_FROM_GROUP=Rs,e.REMOVE_MEMBERS_FROM_ZONE=Hn,e.REMOVE_OPTION_GROUP_FROM_PRODUCT=ka,e.REMOVE_PRODUCTS_FROM_CHANNEL=Wa,e.REMOVE_VARIANTS_FROM_CHANNEL=Za,e.REQUEST_COMPLETED=vn,e.REQUEST_STARTED=yn,e.ROLE_FRAGMENT=Ae,e.RelationAssetInputComponent=Qp,e.RelationCardComponent=id,e.RelationCardDetailDirective=od,e.RelationCardPreviewDirective=rd,e.RelationCustomerInputComponent=ed,e.RelationFormInputComponent=ru,e.RelationProductInputComponent=nd,e.RelationProductVariantInputComponent=td,e.RelationSelectorDialogComponent=Xp,e.RichTextEditorComponent=qp,e.SEARCH_PRODUCTS=qa,e.SETTLE_PAYMENT=Xs,e.SETTLE_REFUND=ol,e.SET_ACTIVE_CHANNEL=Pn,e.SET_AS_LOGGED_IN=bn,e.SET_AS_LOGGED_OUT=Sn,e.SET_UI_LANGUAGE=In,e.SET_UI_THEME=Tn,e.SHIPPING_METHOD_FRAGMENT=Vl,e.STRING_CUSTOM_FIELD_FRAGMENT=Ir,e.SelectFormInputComponent=ou,e.SelectToggleComponent=Gp,e.SentenceCasePipe=fd,e.ServerConfigService=Ur,e.SettingsDataService=Gl,e.SharedModule=Ed,e.ShippingMethodDataService=Kl,e.SimpleDialogComponent=ac,e.SingleSearchSelectionModel=Iu,e.SingleSearchSelectionModelFactory=Tu,e.SortPipe=yd,e.StateI18nTokenPipe=vd,e.StringToColorPipe=bd,e.TAG_FRAGMENT=ha,e.TAX_CATEGORY_FRAGMENT=zn,e.TAX_RATE_FRAGMENT=Qn,e.TEST_ELIGIBLE_SHIPPING_METHODS=Jl,e.TEST_SHIPPING_METHOD=Yl,e.TRANSITION_FULFILLMENT_TO_STATE=pl,e.TRANSITION_ORDER_TO_STATE=cl,e.TRANSITION_PAYMENT_TO_STATE=el,e.TableRowActionComponent=Vp,e.TagSelectorComponent=jp,e.TextFormInputComponent=iu,e.ThemeSwitcherComponent=Ic,e.TimeAgoPipe=Sd,e.TimelineEntryComponent=Bp,e.TitleInputComponent=Hp,e.UPDATE_ACTIVE_ADMINISTRATOR=xe,e.UPDATE_ADMINISTRATOR=we,e.UPDATE_ASSET=Na,e.UPDATE_CHANNEL=cr,e.UPDATE_COLLECTION=ss,e.UPDATE_COUNTRY=Mn,e.UPDATE_CUSTOMER=ys,e.UPDATE_CUSTOMER_ADDRESS=bs,e.UPDATE_CUSTOMER_GROUP=Is,e.UPDATE_CUSTOMER_NOTE=ks,e.UPDATE_FACET=Ms,e.UPDATE_FACET_VALUES=Us,e.UPDATE_GLOBAL_SETTINGS=br,e.UPDATE_ORDER_CUSTOM_FIELDS=ul,e.UPDATE_ORDER_NOTE=sl,e.UPDATE_PAYMENT_METHOD=fr,e.UPDATE_PRODUCT=Sa,e.UPDATE_PRODUCT_OPTION=Va,e.UPDATE_PRODUCT_VARIANTS=Aa,e.UPDATE_PROMOTION=Nl,e.UPDATE_ROLE=Le,e.UPDATE_SHIPPING_METHOD=Wl,e.UPDATE_TAG=es,e.UPDATE_TAX_CATEGORY=Jn,e.UPDATE_TAX_RATE=nr,e.UPDATE_USER_CHANNELS=On,e.UPDATE_ZONE=Vn,e.USER_STATUS_FRAGMENT=Cn,e.UiLanguageSwitcherDialogComponent=cc,e.UserMenuComponent=Tc,e.ZONE_FRAGMENT=Nn,e.addActionBarItem=function(e){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.addActionBarItem(e)}},deps:[vc]}},e.addCustomFields=qr,e.addNavMenuItem=function(e,n,r){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.addNavMenuItem(e,n,r)}},deps:[vc]}},e.addNavMenuSection=function(e,n){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.addNavMenuSection(e,n)}},deps:[vc]}},e.blockQuoteRule=bp,e.buildInputRules=Ap,e.buildKeymap=Rp,e.buildMenuItems=Mp,e.bulletListRule=Ip,e.canInsert=Op,e.clientResolvers=_c,e.codeBlockRule=Tp,e.configurableDefinitionToInstance=function(e){return Object.assign(Object.assign({},e),{args:e.args.map((function(e){return Object.assign(Object.assign({},e),{value:wu(e)})}))})},e.configurableOperationValueIsValid=function(e,t){var n,r;if(!e||!t)return!1;if(e.code!==t.code)return!1;try{for(var o=X(e.args),i=o.next();!i.done;i=o.next()){var a=i.value,s=t.args[a.name];if(a.required&&(null==s||""===s||"0"===s))return!1}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!0},e.createApollo=Vc,e.createResolveData=function(e){return{entity:e}},e.createUpdatedTranslatable=function(e){var t,n,r=e.translatable,o=e.updatedFields,i=e.languageCode,a=e.customFieldConfig,s=e.defaultTranslation,l=$d(r,i)||s||{},c=r.translations.indexOf(l),u=Md(l,o),p={},d={};if(a&&o.hasOwnProperty("customFields")){try{for(var m=X(a),g=m.next();!g.done;g=m.next()){var h=g.value,f=o.customFields[h.name];"localeString"===h.type?d[h.name]=f:p[h.name]=""===f?_d(h.type):f}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}u.customFields=d}var y=Object.assign(Object.assign({},Md(r,o)),{translations:r.translations.slice()});return a&&(y.customFields=p),-1!==c?y.translations.splice(c,1,u):y.translations.push(u),y},e.dayOfWeekIndex=Uu,e.defaultFormInputs=au,e.detailBreadcrumb=function(e){return e.entity.pipe(r.map((function(t){var n="";return n="create"===e.id?"common.create":""+e.getName(t),[{label:e.breadcrumbKey,link:["../",e.route]},{label:n,link:[e.route,e.id]}]})))},e.encodeConfigArgValue=ku,e.findTranslation=$d,e.flattenFacetValues=Xu,e.getAppConfig=tc,e.getClientDefaults=Ec,e.getConfigArgValue=Ou,e.getDefaultConfigArgValue=wu,e.getDefaultUiLanguage=nc,e.getLocales=Od,e.getMarkRange=Lp,e.getServerLocation=hc,e.headingRule=Dp,e.hostExternalFrame=function(e){var t=""===e.path?"full":"prefix";return{path:e.path,pathMatch:t,component:Ku,data:{breadcrumb:[{label:e.breadcrumbLabel,link:["./"]}],extensionHostConfig:new Ud(e)}}},e.initializeServerConfigService=Nr,e.insertImageItem=kp,e.interpolateDescription=xu,e.introspectionResult=Dc,e.isEntityCreateOrUpdateMutation=Hr,e.linkItem=xp,e.linkSelectPlugin=Np,e.loadAppConfig=function(){return fetch("./vendure-ui-config.json").then((function(e){return e.json()})).then((function(e){Xl=e}))},e.markActive=Pp,e.orderedListRule=Sp,e.registerCustomFieldComponent=function(e,n,r){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.registerCustomFieldComponent(e,n,r)}},deps:[Zc]}},e.registerDashboardWidget=function(e,n){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.registerWidget(e,n)}},deps:[Ld]}},e.registerDefaultFormInputs=lu,e.registerFormInputComponent=su,e.removeReadonlyCustomFields=Wr,e.setDashboardWidgetLayout=function(e){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.setDefaultLayout(e)}},deps:[Ld]}},e.stringToColor=Cd,e.toConfigurableOperationInput=function(e,t){return{code:e.code,arguments:Object.values(t.args||{}).map((function(t,n){return{name:e.args[n].name,value:t.hasOwnProperty("value")?ku(t.value):ku(t)}}))}},e.transformRelationCustomFieldInputs=Kr,e.weekDayNames=qu,e.ɵ0=Rc,e.ɵ1=Pc,e.ɵ2=Oc,e.ɵ3=kc,e.ɵ4=wc,e.ɵ5=xc,e.ɵ6=Fc,e.ɵ7=$c,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */function J(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Y(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function K(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function Q(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function X(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ee(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function te(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ee(arguments[t]));return e}function ne(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}Object.create;var re,oe,ie,ae,se,le,ce,ue,pe,de,me,ge,he,fe,ye,ve,Ce,be,Se,Ie,Te,De,Ae=o.gql(re||(re=ne(["\n fragment Role on Role {\n id\n createdAt\n updatedAt\n code\n description\n permissions\n channels {\n id\n code\n token\n }\n }\n"],["\n fragment Role on Role {\n id\n createdAt\n updatedAt\n code\n description\n permissions\n channels {\n id\n code\n token\n }\n }\n"]))),Ee=o.gql(oe||(oe=ne(["\n fragment Administrator on Administrator {\n id\n createdAt\n updatedAt\n firstName\n lastName\n emailAddress\n user {\n id\n identifier\n lastLogin\n roles {\n ...Role\n }\n }\n }\n ","\n"],["\n fragment Administrator on Administrator {\n id\n createdAt\n updatedAt\n firstName\n lastName\n emailAddress\n user {\n id\n identifier\n lastLogin\n roles {\n ...Role\n }\n }\n }\n ","\n"])),Ae),Re=o.gql(ie||(ie=ne(["\n query GetAdministrators($options: AdministratorListOptions) {\n administrators(options: $options) {\n items {\n ...Administrator\n }\n totalItems\n }\n }\n ","\n"],["\n query GetAdministrators($options: AdministratorListOptions) {\n administrators(options: $options) {\n items {\n ...Administrator\n }\n totalItems\n }\n }\n ","\n"])),Ee),Pe=o.gql(ae||(ae=ne(["\n query GetActiveAdministrator {\n activeAdministrator {\n ...Administrator\n }\n }\n ","\n"],["\n query GetActiveAdministrator {\n activeAdministrator {\n ...Administrator\n }\n }\n ","\n"])),Ee),Oe=o.gql(se||(se=ne(["\n query GetAdministrator($id: ID!) {\n administrator(id: $id) {\n ...Administrator\n }\n }\n ","\n"],["\n query GetAdministrator($id: ID!) {\n administrator(id: $id) {\n ...Administrator\n }\n }\n ","\n"])),Ee),ke=o.gql(le||(le=ne(["\n mutation CreateAdministrator($input: CreateAdministratorInput!) {\n createAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation CreateAdministrator($input: CreateAdministratorInput!) {\n createAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"])),Ee),we=o.gql(ce||(ce=ne(["\n mutation UpdateAdministrator($input: UpdateAdministratorInput!) {\n updateAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation UpdateAdministrator($input: UpdateAdministratorInput!) {\n updateAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"])),Ee),xe=o.gql(ue||(ue=ne(["\n mutation UpdateActiveAdministrator($input: UpdateActiveAdministratorInput!) {\n updateActiveAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation UpdateActiveAdministrator($input: UpdateActiveAdministratorInput!) {\n updateActiveAdministrator(input: $input) {\n ...Administrator\n }\n }\n ","\n"])),Ee),Fe=o.gql(pe||(pe=ne(["\n mutation DeleteAdministrator($id: ID!) {\n deleteAdministrator(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteAdministrator($id: ID!) {\n deleteAdministrator(id: $id) {\n result\n message\n }\n }\n"]))),$e=o.gql(de||(de=ne(["\n query GetRoles($options: RoleListOptions) {\n roles(options: $options) {\n items {\n ...Role\n }\n totalItems\n }\n }\n ","\n"],["\n query GetRoles($options: RoleListOptions) {\n roles(options: $options) {\n items {\n ...Role\n }\n totalItems\n }\n }\n ","\n"])),Ae),_e=o.gql(me||(me=ne(["\n query GetRole($id: ID!) {\n role(id: $id) {\n ...Role\n }\n }\n ","\n"],["\n query GetRole($id: ID!) {\n role(id: $id) {\n ...Role\n }\n }\n ","\n"])),Ae),Me=o.gql(ge||(ge=ne(["\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n ...Role\n }\n }\n ","\n"],["\n mutation CreateRole($input: CreateRoleInput!) {\n createRole(input: $input) {\n ...Role\n }\n }\n ","\n"])),Ae),Le=o.gql(he||(he=ne(["\n mutation UpdateRole($input: UpdateRoleInput!) {\n updateRole(input: $input) {\n ...Role\n }\n }\n ","\n"],["\n mutation UpdateRole($input: UpdateRoleInput!) {\n updateRole(input: $input) {\n ...Role\n }\n }\n ","\n"])),Ae),Ne=o.gql(fe||(fe=ne(["\n mutation DeleteRole($id: ID!) {\n deleteRole(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteRole($id: ID!) {\n deleteRole(id: $id) {\n result\n message\n }\n }\n"]))),Ue=o.gql(ye||(ye=ne(["\n mutation AssignRoleToAdministrator($administratorId: ID!, $roleId: ID!) {\n assignRoleToAdministrator(administratorId: $administratorId, roleId: $roleId) {\n ...Administrator\n }\n }\n ","\n"],["\n mutation AssignRoleToAdministrator($administratorId: ID!, $roleId: ID!) {\n assignRoleToAdministrator(administratorId: $administratorId, roleId: $roleId) {\n ...Administrator\n }\n }\n ","\n"])),Ee),qe=function(){function e(e){this.baseDataService=e}return e.prototype.getAdministrators=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(Re,{options:{take:e,skip:t}})},e.prototype.getActiveAdministrator=function(e){return void 0===e&&(e="cache-first"),this.baseDataService.query(Pe,{},e)},e.prototype.getAdministrator=function(e){return this.baseDataService.query(Oe,{id:e})},e.prototype.createAdministrator=function(e){return this.baseDataService.mutate(ke,{input:e})},e.prototype.updateAdministrator=function(e){return this.baseDataService.mutate(we,{input:e})},e.prototype.updateActiveAdministrator=function(e){return this.baseDataService.mutate(xe,{input:e})},e.prototype.deleteAdministrator=function(e){return this.baseDataService.mutate(Fe,{id:e})},e.prototype.getRoles=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query($e,{options:{take:e,skip:t}})},e.prototype.getRole=function(e){return this.baseDataService.query(_e,{id:e})},e.prototype.createRole=function(e){return this.baseDataService.mutate(Me,{input:e})},e.prototype.updateRole=function(e){return this.baseDataService.mutate(Le,{input:e})},e.prototype.deleteRole=function(e){return this.baseDataService.mutate(Ne,{id:e})},e}(),Ge=o.gql(ve||(ve=ne(["\n fragment ConfigurableOperation on ConfigurableOperation {\n args {\n name\n value\n }\n code\n }\n"],["\n fragment ConfigurableOperation on ConfigurableOperation {\n args {\n name\n value\n }\n code\n }\n"]))),Ve=o.gql(Ce||(Ce=ne(["\n fragment ConfigurableOperationDef on ConfigurableOperationDefinition {\n args {\n name\n type\n required\n defaultValue\n list\n ui\n label\n }\n code\n description\n }\n"],["\n fragment ConfigurableOperationDef on ConfigurableOperationDefinition {\n args {\n name\n type\n required\n defaultValue\n list\n ui\n label\n }\n code\n description\n }\n"]))),je=o.gql(be||(be=ne(["\n fragment ErrorResult on ErrorResult {\n errorCode\n message\n }\n"],["\n fragment ErrorResult on ErrorResult {\n errorCode\n message\n }\n"]))),Be=o.gql(Se||(Se=ne(["\n fragment CurrentUser on CurrentUser {\n id\n identifier\n channels {\n id\n code\n token\n permissions\n }\n }\n"],["\n fragment CurrentUser on CurrentUser {\n id\n identifier\n channels {\n id\n code\n token\n permissions\n }\n }\n"]))),He=o.gql(Ie||(Ie=ne(["\n mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean!) {\n login(username: $username, password: $password, rememberMe: $rememberMe) {\n ...CurrentUser\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation AttemptLogin($username: String!, $password: String!, $rememberMe: Boolean!) {\n login(username: $username, password: $password, rememberMe: $rememberMe) {\n ...CurrentUser\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Be,je),ze=o.gql(Te||(Te=ne(["\n mutation LogOut {\n logout {\n success\n }\n }\n"],["\n mutation LogOut {\n logout {\n success\n }\n }\n"]))),We=o.gql(De||(De=ne(["\n query GetCurrentUser {\n me {\n ...CurrentUser\n }\n }\n ","\n"],["\n query GetCurrentUser {\n me {\n ...CurrentUser\n }\n }\n ","\n"])),Be),Ze=function(){function e(e){this.baseDataService=e}return e.prototype.currentUser=function(){return this.baseDataService.query(We)},e.prototype.attemptLogin=function(e,t,n){return this.baseDataService.mutate(He,{username:e,password:t,rememberMe:n})},e.prototype.logOut=function(){return this.baseDataService.mutate(ze)},e}(),Ye=function(){function e(e){this.location=e}return e.prototype.set=function(e,t){var n=this.keyName(e);localStorage.setItem(n,JSON.stringify(t))},e.prototype.setForCurrentLocation=function(e,t){var n=this.getLocationBasedKey(e);this.set(n,t)},e.prototype.setForSession=function(e,t){var n=this.keyName(e);sessionStorage.setItem(n,JSON.stringify(t))},e.prototype.get=function(e){var t,n=this.keyName(e),r=sessionStorage.getItem(n)||localStorage.getItem(n);try{t=JSON.parse(r||"null")}catch(t){console.error('Could not parse the localStorage value for "'+e+'" ('+r+")")}return t},e.prototype.getForCurrentLocation=function(e){var t=this.getLocationBasedKey(e);return this.get(t)},e.prototype.remove=function(e){var t=this.keyName(e);sessionStorage.removeItem(t),localStorage.removeItem(t)},e.prototype.getLocationBasedKey=function(e){return e+this.location.path()},e.prototype.keyName=function(e){return"vnd_"+e},e}();Ye.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Ye(t.ɵɵinject(n.Location))},token:Ye,providedIn:"root"}),Ye.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Ye.ctorParameters=function(){return[{type:n.Location}]};var Je,Ke,Qe,Xe,et,tt,nt,rt,ot,it,at,st,lt,ct,ut,pt,dt,mt,gt,ht,ft,yt,vt,Ct,bt,St,It,Tt,Dt,At,Et,Rt,Pt,Ot,kt,wt,xt,Ft,$t,_t,Mt,Lt,Nt,Ut,qt,Gt,Vt,jt,Bt,Ht,zt,Wt,Zt,Yt,Jt,Kt,Qt,Xt,en,tn,nn,rn,on,an,sn,ln,cn,un,pn,dn,mn,gn,hn,fn,yn=o.gql(Je||(Je=ne(["\n mutation RequestStarted {\n requestStarted @client\n }\n"],["\n mutation RequestStarted {\n requestStarted @client\n }\n"]))),vn=o.gql(Ke||(Ke=ne(["\n mutation RequestCompleted {\n requestCompleted @client\n }\n"],["\n mutation RequestCompleted {\n requestCompleted @client\n }\n"]))),Cn=o.gql(Qe||(Qe=ne(["\n fragment UserStatus on UserStatus {\n username\n isLoggedIn\n loginTime\n activeChannelId\n permissions\n channels {\n id\n code\n token\n permissions\n }\n }\n"],["\n fragment UserStatus on UserStatus {\n username\n isLoggedIn\n loginTime\n activeChannelId\n permissions\n channels {\n id\n code\n token\n permissions\n }\n }\n"]))),bn=o.gql(Xe||(Xe=ne(["\n mutation SetAsLoggedIn($input: UserStatusInput!) {\n setAsLoggedIn(input: $input) @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation SetAsLoggedIn($input: UserStatusInput!) {\n setAsLoggedIn(input: $input) @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),Sn=o.gql(et||(et=ne(["\n mutation SetAsLoggedOut {\n setAsLoggedOut @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation SetAsLoggedOut {\n setAsLoggedOut @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),In=o.gql(tt||(tt=ne(["\n mutation SetUiLanguage($languageCode: LanguageCode!) {\n setUiLanguage(languageCode: $languageCode) @client\n }\n"],["\n mutation SetUiLanguage($languageCode: LanguageCode!) {\n setUiLanguage(languageCode: $languageCode) @client\n }\n"]))),Tn=o.gql(nt||(nt=ne(["\n mutation SetUiTheme($theme: String!) {\n setUiTheme(theme: $theme) @client\n }\n"],["\n mutation SetUiTheme($theme: String!) {\n setUiTheme(theme: $theme) @client\n }\n"]))),Dn=o.gql(rt||(rt=ne(["\n query GetNetworkStatus {\n networkStatus @client {\n inFlightRequests\n }\n }\n"],["\n query GetNetworkStatus {\n networkStatus @client {\n inFlightRequests\n }\n }\n"]))),An=o.gql(ot||(ot=ne(["\n query GetUserStatus {\n userStatus @client {\n ...UserStatus\n }\n }\n ","\n"],["\n query GetUserStatus {\n userStatus @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),En=o.gql(it||(it=ne(["\n query GetUiState {\n uiState @client {\n language\n theme\n }\n }\n"],["\n query GetUiState {\n uiState @client {\n language\n theme\n }\n }\n"]))),Rn=o.gql(at||(at=ne(["\n query GetClientState {\n networkStatus @client {\n inFlightRequests\n }\n userStatus @client {\n ...UserStatus\n }\n uiState @client {\n language\n theme\n }\n }\n ","\n"],["\n query GetClientState {\n networkStatus @client {\n inFlightRequests\n }\n userStatus @client {\n ...UserStatus\n }\n uiState @client {\n language\n theme\n }\n }\n ","\n"])),Cn),Pn=o.gql(st||(st=ne(["\n mutation SetActiveChannel($channelId: ID!) {\n setActiveChannel(channelId: $channelId) @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation SetActiveChannel($channelId: ID!) {\n setActiveChannel(channelId: $channelId) @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),On=o.gql(lt||(lt=ne(["\n mutation UpdateUserChannels($channels: [CurrentUserChannelInput!]!) {\n updateUserChannels(channels: $channels) @client {\n ...UserStatus\n }\n }\n ","\n"],["\n mutation UpdateUserChannels($channels: [CurrentUserChannelInput!]!) {\n updateUserChannels(channels: $channels) @client {\n ...UserStatus\n }\n }\n ","\n"])),Cn),kn=function(){function e(e,t){this.queryRef=e,this.apollo=t,this.completed$=new c.Subject,this.valueChanges=e.valueChanges}return e.prototype.refetchOnChannelChange=function(){var e=this,t=this.apollo.watchQuery({query:An}).valueChanges,n=t.pipe(r.map((function(e){return e.data.userStatus.activeChannelId})),r.filter(l.notNullOrUndefined),r.distinctUntilChanged(),r.skip(1),r.takeUntil(this.completed$)),o=t.pipe(r.map((function(e){return e.data.userStatus.isLoggedIn})),r.distinctUntilChanged(),r.skip(1),r.filter((function(e){return!e})),r.takeUntil(this.completed$));return this.valueChanges=c.merge(n,this.queryRef.valueChanges).pipe(r.tap((function(t){"string"==typeof t&&new Promise((function(e){return setTimeout(e,50)})).then((function(){return e.queryRef.refetch()}))})),r.filter((function(e){return"string"!=typeof e})),r.takeUntil(o),r.takeUntil(this.completed$)),this.queryRef.valueChanges=this.valueChanges,this},Object.defineProperty(e.prototype,"single$",{get:function(){var e=this;return this.valueChanges.pipe(r.filter((function(e){return e.networkStatus===s.NetworkStatus.ready})),r.take(1),r.map((function(e){return e.data})),r.finalize((function(){e.completed$.next(),e.completed$.complete()})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stream$",{get:function(){var e=this;return this.valueChanges.pipe(r.filter((function(e){return e.networkStatus===s.NetworkStatus.ready})),r.map((function(e){return e.data})),r.finalize((function(){e.completed$.next(),e.completed$.complete()})))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ref",{get:function(){return this.queryRef},enumerable:!1,configurable:!0}),e.prototype.mapSingle=function(e){return this.single$.pipe(r.map(e))},e.prototype.mapStream=function(e){return this.stream$.pipe(r.map(e))},e}(),wn=o.gql(ct||(ct=ne(["\n fragment Country on Country {\n id\n createdAt\n updatedAt\n code\n name\n enabled\n translations {\n id\n languageCode\n name\n }\n }\n"],["\n fragment Country on Country {\n id\n createdAt\n updatedAt\n code\n name\n enabled\n translations {\n id\n languageCode\n name\n }\n }\n"]))),xn=o.gql(ut||(ut=ne(["\n query GetCountryList($options: CountryListOptions) {\n countries(options: $options) {\n items {\n id\n code\n name\n enabled\n }\n totalItems\n }\n }\n"],["\n query GetCountryList($options: CountryListOptions) {\n countries(options: $options) {\n items {\n id\n code\n name\n enabled\n }\n totalItems\n }\n }\n"]))),Fn=o.gql(pt||(pt=ne(["\n query GetAvailableCountries {\n countries(options: { filter: { enabled: { eq: true } } }) {\n items {\n id\n code\n name\n enabled\n }\n }\n }\n"],["\n query GetAvailableCountries {\n countries(options: { filter: { enabled: { eq: true } } }) {\n items {\n id\n code\n name\n enabled\n }\n }\n }\n"]))),$n=o.gql(dt||(dt=ne(["\n query GetCountry($id: ID!) {\n country(id: $id) {\n ...Country\n }\n }\n ","\n"],["\n query GetCountry($id: ID!) {\n country(id: $id) {\n ...Country\n }\n }\n ","\n"])),wn),_n=o.gql(mt||(mt=ne(["\n mutation CreateCountry($input: CreateCountryInput!) {\n createCountry(input: $input) {\n ...Country\n }\n }\n ","\n"],["\n mutation CreateCountry($input: CreateCountryInput!) {\n createCountry(input: $input) {\n ...Country\n }\n }\n ","\n"])),wn),Mn=o.gql(gt||(gt=ne(["\n mutation UpdateCountry($input: UpdateCountryInput!) {\n updateCountry(input: $input) {\n ...Country\n }\n }\n ","\n"],["\n mutation UpdateCountry($input: UpdateCountryInput!) {\n updateCountry(input: $input) {\n ...Country\n }\n }\n ","\n"])),wn),Ln=o.gql(ht||(ht=ne(["\n mutation DeleteCountry($id: ID!) {\n deleteCountry(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCountry($id: ID!) {\n deleteCountry(id: $id) {\n result\n message\n }\n }\n"]))),Nn=o.gql(ft||(ft=ne(["\n fragment Zone on Zone {\n id\n name\n members {\n ...Country\n }\n }\n ","\n"],["\n fragment Zone on Zone {\n id\n name\n members {\n ...Country\n }\n }\n ","\n"])),wn),Un=o.gql(yt||(yt=ne(["\n query GetZones {\n zones {\n id\n createdAt\n updatedAt\n name\n members {\n createdAt\n updatedAt\n id\n name\n code\n enabled\n }\n }\n }\n"],["\n query GetZones {\n zones {\n id\n createdAt\n updatedAt\n name\n members {\n createdAt\n updatedAt\n id\n name\n code\n enabled\n }\n }\n }\n"]))),qn=o.gql(vt||(vt=ne(["\n query GetZone($id: ID!) {\n zone(id: $id) {\n ...Zone\n }\n }\n ","\n"],["\n query GetZone($id: ID!) {\n zone(id: $id) {\n ...Zone\n }\n }\n ","\n"])),Nn),Gn=o.gql(Ct||(Ct=ne(["\n mutation CreateZone($input: CreateZoneInput!) {\n createZone(input: $input) {\n ...Zone\n }\n }\n ","\n"],["\n mutation CreateZone($input: CreateZoneInput!) {\n createZone(input: $input) {\n ...Zone\n }\n }\n ","\n"])),Nn),Vn=o.gql(bt||(bt=ne(["\n mutation UpdateZone($input: UpdateZoneInput!) {\n updateZone(input: $input) {\n ...Zone\n }\n }\n ","\n"],["\n mutation UpdateZone($input: UpdateZoneInput!) {\n updateZone(input: $input) {\n ...Zone\n }\n }\n ","\n"])),Nn),jn=o.gql(St||(St=ne(["\n mutation DeleteZone($id: ID!) {\n deleteZone(id: $id) {\n message\n result\n }\n }\n"],["\n mutation DeleteZone($id: ID!) {\n deleteZone(id: $id) {\n message\n result\n }\n }\n"]))),Bn=o.gql(It||(It=ne(["\n mutation AddMembersToZone($zoneId: ID!, $memberIds: [ID!]!) {\n addMembersToZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"],["\n mutation AddMembersToZone($zoneId: ID!, $memberIds: [ID!]!) {\n addMembersToZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"])),Nn),Hn=o.gql(Tt||(Tt=ne(["\n mutation RemoveMembersFromZone($zoneId: ID!, $memberIds: [ID!]!) {\n removeMembersFromZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"],["\n mutation RemoveMembersFromZone($zoneId: ID!, $memberIds: [ID!]!) {\n removeMembersFromZone(zoneId: $zoneId, memberIds: $memberIds) {\n ...Zone\n }\n }\n ","\n"])),Nn),zn=o.gql(Dt||(Dt=ne(["\n fragment TaxCategory on TaxCategory {\n id\n createdAt\n updatedAt\n name\n isDefault\n }\n"],["\n fragment TaxCategory on TaxCategory {\n id\n createdAt\n updatedAt\n name\n isDefault\n }\n"]))),Wn=o.gql(At||(At=ne(["\n query GetTaxCategories {\n taxCategories {\n ...TaxCategory\n }\n }\n ","\n"],["\n query GetTaxCategories {\n taxCategories {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Zn=o.gql(Et||(Et=ne(["\n query GetTaxCategory($id: ID!) {\n taxCategory(id: $id) {\n ...TaxCategory\n }\n }\n ","\n"],["\n query GetTaxCategory($id: ID!) {\n taxCategory(id: $id) {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Yn=o.gql(Rt||(Rt=ne(["\n mutation CreateTaxCategory($input: CreateTaxCategoryInput!) {\n createTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"],["\n mutation CreateTaxCategory($input: CreateTaxCategoryInput!) {\n createTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Jn=o.gql(Pt||(Pt=ne(["\n mutation UpdateTaxCategory($input: UpdateTaxCategoryInput!) {\n updateTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"],["\n mutation UpdateTaxCategory($input: UpdateTaxCategoryInput!) {\n updateTaxCategory(input: $input) {\n ...TaxCategory\n }\n }\n ","\n"])),zn),Kn=o.gql(Ot||(Ot=ne(["\n mutation DeleteTaxCategory($id: ID!) {\n deleteTaxCategory(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteTaxCategory($id: ID!) {\n deleteTaxCategory(id: $id) {\n result\n message\n }\n }\n"]))),Qn=o.gql(kt||(kt=ne(["\n fragment TaxRate on TaxRate {\n id\n createdAt\n updatedAt\n name\n enabled\n value\n category {\n id\n name\n }\n zone {\n id\n name\n }\n customerGroup {\n id\n name\n }\n }\n"],["\n fragment TaxRate on TaxRate {\n id\n createdAt\n updatedAt\n name\n enabled\n value\n category {\n id\n name\n }\n zone {\n id\n name\n }\n customerGroup {\n id\n name\n }\n }\n"]))),Xn=o.gql(wt||(wt=ne(["\n query GetTaxRateList($options: TaxRateListOptions) {\n taxRates(options: $options) {\n items {\n ...TaxRate\n }\n totalItems\n }\n }\n ","\n"],["\n query GetTaxRateList($options: TaxRateListOptions) {\n taxRates(options: $options) {\n items {\n ...TaxRate\n }\n totalItems\n }\n }\n ","\n"])),Qn),er=o.gql(xt||(xt=ne(["\n query GetTaxRate($id: ID!) {\n taxRate(id: $id) {\n ...TaxRate\n }\n }\n ","\n"],["\n query GetTaxRate($id: ID!) {\n taxRate(id: $id) {\n ...TaxRate\n }\n }\n ","\n"])),Qn),tr=o.gql(Ft||(Ft=ne(["\n mutation CreateTaxRate($input: CreateTaxRateInput!) {\n createTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"],["\n mutation CreateTaxRate($input: CreateTaxRateInput!) {\n createTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"])),Qn),nr=o.gql($t||($t=ne(["\n mutation UpdateTaxRate($input: UpdateTaxRateInput!) {\n updateTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"],["\n mutation UpdateTaxRate($input: UpdateTaxRateInput!) {\n updateTaxRate(input: $input) {\n ...TaxRate\n }\n }\n ","\n"])),Qn),rr=o.gql(_t||(_t=ne(["\n mutation DeleteTaxRate($id: ID!) {\n deleteTaxRate(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteTaxRate($id: ID!) {\n deleteTaxRate(id: $id) {\n result\n message\n }\n }\n"]))),or=o.gql(Mt||(Mt=ne(["\n fragment Channel on Channel {\n id\n createdAt\n updatedAt\n code\n token\n pricesIncludeTax\n currencyCode\n defaultLanguageCode\n defaultShippingZone {\n id\n name\n }\n defaultTaxZone {\n id\n name\n }\n }\n"],["\n fragment Channel on Channel {\n id\n createdAt\n updatedAt\n code\n token\n pricesIncludeTax\n currencyCode\n defaultLanguageCode\n defaultShippingZone {\n id\n name\n }\n defaultTaxZone {\n id\n name\n }\n }\n"]))),ir=o.gql(Lt||(Lt=ne(["\n query GetChannels {\n channels {\n ...Channel\n }\n }\n ","\n"],["\n query GetChannels {\n channels {\n ...Channel\n }\n }\n ","\n"])),or),ar=o.gql(Nt||(Nt=ne(["\n query GetChannel($id: ID!) {\n channel(id: $id) {\n ...Channel\n }\n }\n ","\n"],["\n query GetChannel($id: ID!) {\n channel(id: $id) {\n ...Channel\n }\n }\n ","\n"])),or),sr=o.gql(Ut||(Ut=ne(["\n query GetActiveChannel {\n activeChannel {\n ...Channel\n }\n }\n ","\n"],["\n query GetActiveChannel {\n activeChannel {\n ...Channel\n }\n }\n ","\n"])),or),lr=o.gql(qt||(qt=ne(["\n mutation CreateChannel($input: CreateChannelInput!) {\n createChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreateChannel($input: CreateChannelInput!) {\n createChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"])),or,je),cr=o.gql(Gt||(Gt=ne(["\n mutation UpdateChannel($input: UpdateChannelInput!) {\n updateChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation UpdateChannel($input: UpdateChannelInput!) {\n updateChannel(input: $input) {\n ...Channel\n ...ErrorResult\n }\n }\n ","\n ","\n"])),or,je),ur=o.gql(Vt||(Vt=ne(["\n mutation DeleteChannel($id: ID!) {\n deleteChannel(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteChannel($id: ID!) {\n deleteChannel(id: $id) {\n result\n message\n }\n }\n"]))),pr=o.gql(jt||(jt=ne(["\n fragment PaymentMethod on PaymentMethod {\n id\n createdAt\n updatedAt\n name\n code\n description\n enabled\n checker {\n ...ConfigurableOperation\n }\n handler {\n ...ConfigurableOperation\n }\n }\n ","\n"],["\n fragment PaymentMethod on PaymentMethod {\n id\n createdAt\n updatedAt\n name\n code\n description\n enabled\n checker {\n ...ConfigurableOperation\n }\n handler {\n ...ConfigurableOperation\n }\n }\n ","\n"])),Ge),dr=o.gql(Bt||(Bt=ne(["\n query GetPaymentMethodList($options: PaymentMethodListOptions!) {\n paymentMethods(options: $options) {\n items {\n ...PaymentMethod\n }\n totalItems\n }\n }\n ","\n"],["\n query GetPaymentMethodList($options: PaymentMethodListOptions!) {\n paymentMethods(options: $options) {\n items {\n ...PaymentMethod\n }\n totalItems\n }\n }\n ","\n"])),pr),mr=o.gql(Ht||(Ht=ne(["\n query GetPaymentMethodOperations {\n paymentMethodEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n paymentMethodHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetPaymentMethodOperations {\n paymentMethodEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n paymentMethodHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),gr=o.gql(zt||(zt=ne(["\n query GetPaymentMethod($id: ID!) {\n paymentMethod(id: $id) {\n ...PaymentMethod\n }\n }\n ","\n"],["\n query GetPaymentMethod($id: ID!) {\n paymentMethod(id: $id) {\n ...PaymentMethod\n }\n }\n ","\n"])),pr),hr=o.gql(Wt||(Wt=ne(["\n mutation CreatePaymentMethod($input: CreatePaymentMethodInput!) {\n createPaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"],["\n mutation CreatePaymentMethod($input: CreatePaymentMethodInput!) {\n createPaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"])),pr),fr=o.gql(Zt||(Zt=ne(["\n mutation UpdatePaymentMethod($input: UpdatePaymentMethodInput!) {\n updatePaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"],["\n mutation UpdatePaymentMethod($input: UpdatePaymentMethodInput!) {\n updatePaymentMethod(input: $input) {\n ...PaymentMethod\n }\n }\n ","\n"])),pr),yr=o.gql(Yt||(Yt=ne(["\n mutation DeletePaymentMethod($id: ID!, $force: Boolean) {\n deletePaymentMethod(id: $id, force: $force) {\n result\n message\n }\n }\n"],["\n mutation DeletePaymentMethod($id: ID!, $force: Boolean) {\n deletePaymentMethod(id: $id, force: $force) {\n result\n message\n }\n }\n"]))),vr=o.gql(Jt||(Jt=ne(["\n fragment GlobalSettings on GlobalSettings {\n id\n availableLanguages\n trackInventory\n outOfStockThreshold\n serverConfig {\n permissions {\n name\n description\n assignable\n }\n orderProcess {\n name\n }\n }\n }\n"],["\n fragment GlobalSettings on GlobalSettings {\n id\n availableLanguages\n trackInventory\n outOfStockThreshold\n serverConfig {\n permissions {\n name\n description\n assignable\n }\n orderProcess {\n name\n }\n }\n }\n"]))),Cr=o.gql(Kt||(Kt=ne(["\n query GetGlobalSettings {\n globalSettings {\n ...GlobalSettings\n }\n }\n ","\n"],["\n query GetGlobalSettings {\n globalSettings {\n ...GlobalSettings\n }\n }\n ","\n"])),vr),br=o.gql(Qt||(Qt=ne(["\n mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {\n updateGlobalSettings(input: $input) {\n ...GlobalSettings\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation UpdateGlobalSettings($input: UpdateGlobalSettingsInput!) {\n updateGlobalSettings(input: $input) {\n ...GlobalSettings\n ...ErrorResult\n }\n }\n ","\n ","\n"])),vr,je),Sr=o.gql(Xt||(Xt=ne(["\n fragment CustomFieldConfig on CustomField {\n name\n type\n list\n description {\n languageCode\n value\n }\n label {\n languageCode\n value\n }\n readonly\n }\n"],["\n fragment CustomFieldConfig on CustomField {\n name\n type\n list\n description {\n languageCode\n value\n }\n label {\n languageCode\n value\n }\n readonly\n }\n"]))),Ir=o.gql(en||(en=ne(["\n fragment StringCustomField on StringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n options {\n label {\n languageCode\n value\n }\n value\n }\n }\n ","\n"],["\n fragment StringCustomField on StringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n options {\n label {\n languageCode\n value\n }\n value\n }\n }\n ","\n"])),Sr),Tr=o.gql(tn||(tn=ne(["\n fragment LocaleStringCustomField on LocaleStringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n }\n ","\n"],["\n fragment LocaleStringCustomField on LocaleStringCustomFieldConfig {\n ...CustomFieldConfig\n pattern\n }\n ","\n"])),Sr),Dr=o.gql(nn||(nn=ne(["\n fragment BooleanCustomField on BooleanCustomFieldConfig {\n ...CustomFieldConfig\n }\n ","\n"],["\n fragment BooleanCustomField on BooleanCustomFieldConfig {\n ...CustomFieldConfig\n }\n ","\n"])),Sr),Ar=o.gql(rn||(rn=ne(["\n fragment IntCustomField on IntCustomFieldConfig {\n ...CustomFieldConfig\n intMin: min\n intMax: max\n intStep: step\n }\n ","\n"],["\n fragment IntCustomField on IntCustomFieldConfig {\n ...CustomFieldConfig\n intMin: min\n intMax: max\n intStep: step\n }\n ","\n"])),Sr),Er=o.gql(on||(on=ne(["\n fragment FloatCustomField on FloatCustomFieldConfig {\n ...CustomFieldConfig\n floatMin: min\n floatMax: max\n floatStep: step\n }\n ","\n"],["\n fragment FloatCustomField on FloatCustomFieldConfig {\n ...CustomFieldConfig\n floatMin: min\n floatMax: max\n floatStep: step\n }\n ","\n"])),Sr),Rr=o.gql(an||(an=ne(["\n fragment DateTimeCustomField on DateTimeCustomFieldConfig {\n ...CustomFieldConfig\n datetimeMin: min\n datetimeMax: max\n datetimeStep: step\n }\n ","\n"],["\n fragment DateTimeCustomField on DateTimeCustomFieldConfig {\n ...CustomFieldConfig\n datetimeMin: min\n datetimeMax: max\n datetimeStep: step\n }\n ","\n"])),Sr),Pr=o.gql(sn||(sn=ne(["\n fragment RelationCustomField on RelationCustomFieldConfig {\n ...CustomFieldConfig\n entity\n scalarFields\n }\n ","\n"],["\n fragment RelationCustomField on RelationCustomFieldConfig {\n ...CustomFieldConfig\n entity\n scalarFields\n }\n ","\n"])),Sr),Or=o.gql(ln||(ln=ne(["\n fragment CustomFields on CustomField {\n ... on StringCustomFieldConfig {\n ...StringCustomField\n }\n ... on LocaleStringCustomFieldConfig {\n ...LocaleStringCustomField\n }\n ... on BooleanCustomFieldConfig {\n ...BooleanCustomField\n }\n ... on IntCustomFieldConfig {\n ...IntCustomField\n }\n ... on FloatCustomFieldConfig {\n ...FloatCustomField\n }\n ... on DateTimeCustomFieldConfig {\n ...DateTimeCustomField\n }\n ... on RelationCustomFieldConfig {\n ...RelationCustomField\n }\n }\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n"],["\n fragment CustomFields on CustomField {\n ... on StringCustomFieldConfig {\n ...StringCustomField\n }\n ... on LocaleStringCustomFieldConfig {\n ...LocaleStringCustomField\n }\n ... on BooleanCustomFieldConfig {\n ...BooleanCustomField\n }\n ... on IntCustomFieldConfig {\n ...IntCustomField\n }\n ... on FloatCustomFieldConfig {\n ...FloatCustomField\n }\n ... on DateTimeCustomFieldConfig {\n ...DateTimeCustomField\n }\n ... on RelationCustomFieldConfig {\n ...RelationCustomField\n }\n }\n ","\n ","\n ","\n ","\n ","\n ","\n ","\n"])),Ir,Tr,Dr,Ar,Er,Rr,Pr),kr=o.gql(cn||(cn=ne(["\n query GetServerConfig {\n globalSettings {\n id\n serverConfig {\n orderProcess {\n name\n to\n }\n permittedAssetTypes\n permissions {\n name\n description\n assignable\n }\n customFieldConfig {\n Address {\n ...CustomFields\n }\n Administrator {\n ...CustomFields\n }\n Asset {\n ...CustomFields\n }\n Channel {\n ...CustomFields\n }\n Collection {\n ...CustomFields\n }\n Customer {\n ...CustomFields\n }\n Facet {\n ...CustomFields\n }\n FacetValue {\n ...CustomFields\n }\n Fulfillment {\n ...CustomFields\n }\n GlobalSettings {\n ...CustomFields\n }\n Order {\n ...CustomFields\n }\n OrderLine {\n ...CustomFields\n }\n Product {\n ...CustomFields\n }\n ProductOption {\n ...CustomFields\n }\n ProductOptionGroup {\n ...CustomFields\n }\n ProductVariant {\n ...CustomFields\n }\n ShippingMethod {\n ...CustomFields\n }\n User {\n ...CustomFields\n }\n }\n }\n }\n }\n ","\n"],["\n query GetServerConfig {\n globalSettings {\n id\n serverConfig {\n orderProcess {\n name\n to\n }\n permittedAssetTypes\n permissions {\n name\n description\n assignable\n }\n customFieldConfig {\n Address {\n ...CustomFields\n }\n Administrator {\n ...CustomFields\n }\n Asset {\n ...CustomFields\n }\n Channel {\n ...CustomFields\n }\n Collection {\n ...CustomFields\n }\n Customer {\n ...CustomFields\n }\n Facet {\n ...CustomFields\n }\n FacetValue {\n ...CustomFields\n }\n Fulfillment {\n ...CustomFields\n }\n GlobalSettings {\n ...CustomFields\n }\n Order {\n ...CustomFields\n }\n OrderLine {\n ...CustomFields\n }\n Product {\n ...CustomFields\n }\n ProductOption {\n ...CustomFields\n }\n ProductOptionGroup {\n ...CustomFields\n }\n ProductVariant {\n ...CustomFields\n }\n ShippingMethod {\n ...CustomFields\n }\n User {\n ...CustomFields\n }\n }\n }\n }\n }\n ","\n"])),Or),wr=o.gql(un||(un=ne(["\n fragment JobInfo on Job {\n id\n createdAt\n startedAt\n settledAt\n queueName\n state\n isSettled\n progress\n duration\n data\n result\n error\n }\n"],["\n fragment JobInfo on Job {\n id\n createdAt\n startedAt\n settledAt\n queueName\n state\n isSettled\n progress\n duration\n data\n result\n error\n }\n"]))),xr=o.gql(pn||(pn=ne(["\n query GetJobInfo($id: ID!) {\n job(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"],["\n query GetJobInfo($id: ID!) {\n job(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"])),wr),Fr=o.gql(dn||(dn=ne(["\n query GetAllJobs($options: JobListOptions) {\n jobs(options: $options) {\n items {\n ...JobInfo\n }\n totalItems\n }\n }\n ","\n"],["\n query GetAllJobs($options: JobListOptions) {\n jobs(options: $options) {\n items {\n ...JobInfo\n }\n totalItems\n }\n }\n ","\n"])),wr),$r=o.gql(mn||(mn=ne(["\n query GetJobsById($ids: [ID!]!) {\n jobsById(jobIds: $ids) {\n ...JobInfo\n }\n }\n ","\n"],["\n query GetJobsById($ids: [ID!]!) {\n jobsById(jobIds: $ids) {\n ...JobInfo\n }\n }\n ","\n"])),wr),_r=o.gql(gn||(gn=ne(["\n query GetJobQueueList {\n jobQueues {\n name\n running\n }\n }\n"],["\n query GetJobQueueList {\n jobQueues {\n name\n running\n }\n }\n"]))),Mr=o.gql(hn||(hn=ne(["\n mutation CancelJob($id: ID!) {\n cancelJob(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"],["\n mutation CancelJob($id: ID!) {\n cancelJob(jobId: $id) {\n ...JobInfo\n }\n }\n ","\n"])),wr),Lr=o.gql(fn||(fn=ne(["\n mutation Reindex {\n reindex {\n ...JobInfo\n }\n }\n ","\n"],["\n mutation Reindex {\n reindex {\n ...JobInfo\n }\n }\n ","\n"])),wr);function Nr(e){return e.init()}var Ur=function(){function e(e){this.injector=e,this._serverConfig={}}return Object.defineProperty(e.prototype,"baseDataService",{get:function(){return this.injector.get(eo)},enumerable:!1,configurable:!0}),e.prototype.init=function(){var e=this;return function(){return e.getServerConfig()}},e.prototype.getServerConfig=function(){var e=this;return this.baseDataService.query(kr).single$.toPromise().then((function(t){e._serverConfig=t.globalSettings.serverConfig}),(function(e){}))},e.prototype.getAvailableLanguages=function(){return this.baseDataService.query(Cr,{},"cache-first").mapSingle((function(e){return e.globalSettings.availableLanguages}))},e.prototype.refreshGlobalSettings=function(){return this.baseDataService.query(Cr,{},"network-only").single$},e.prototype.getCustomFieldsFor=function(e){return this.serverConfig.customFieldConfig[e]||[]},e.prototype.getOrderProcessStates=function(){return this.serverConfig.orderProcess},e.prototype.getPermittedAssetTypes=function(){return this.serverConfig.permittedAssetTypes},e.prototype.getPermissionDefinitions=function(){return this.serverConfig.permissions},Object.defineProperty(e.prototype,"serverConfig",{get:function(){return this._serverConfig},enumerable:!1,configurable:!0}),e}();function qr(e,t){var n,r,o=e.definitions.filter(Gr);try{for(var i=X(o),a=i.next();!a.done;a=i.next()){var s=a.value,l=s.typeCondition.name.value;"OrderAddress"===l&&(l="Address");var c=t[l];if(c&&c.length){s.selectionSet.selections.push({name:{kind:u.Kind.NAME,value:"customFields"},kind:u.Kind.FIELD,selectionSet:{kind:u.Kind.SELECTION_SET,selections:c.map((function(e){return Object.assign({kind:u.Kind.FIELD,name:{kind:u.Kind.NAME,value:e.name}},"relation"===e.type?{selectionSet:{kind:u.Kind.SELECTION_SET,selections:e.scalarFields.map((function(e){return{kind:u.Kind.FIELD,name:{kind:u.Kind.NAME,value:e}}}))}}:{})}))}});var p=c.filter((function(e){return"localeString"===e.type})),d=s.selectionSet.selections.filter(Vr).find((function(e){return"translations"===e.name.value}));p.length&&d&&d.selectionSet&&d.selectionSet.selections.push({name:{kind:u.Kind.NAME,value:"customFields"},kind:u.Kind.FIELD,selectionSet:{kind:u.Kind.SELECTION_SET,selections:p.map((function(e){return{kind:u.Kind.FIELD,name:{kind:u.Kind.NAME,value:e.name}}}))}})}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e}function Gr(e){return e.kind===u.Kind.FRAGMENT_DEFINITION}function Vr(e){return e.kind===u.Kind.FIELD}Ur.decorators=[{type:t.Injectable}],Ur.ctorParameters=function(){return[{type:t.Injector}]};var jr=/Create([A-Za-z]+)Input/,Br=/Update([A-Za-z]+)Input/;function Hr(e){var t,n,r=u.getOperationAST(e,null);if(r&&r.variableDefinitions)try{for(var o=X(r.variableDefinitions),i=o.next();!i.done;i=o.next()){var a=zr(i.value.type).name.value;if("UpdateActiveAdministratorInput"===a)return"Administrator";var s=a.match(jr);if(s)return s[1];var l=a.match(Br);if(l)return l[1]}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}function zr(e){return"NonNullType"===e.kind||"ListType"===e.kind?zr(e.type):e}function Wr(e,t){return e.input&&Zr(e.input,t),Zr(e,t)}function Zr(e,t){var n,r,o,i;try{for(var a=X(t),s=a.next();!s.done;s=a.next()){var l=s.value;if(l.readonly)if("localeString"===l.type){if(Jr(e))try{for(var c=(o=void 0,X(e.translations)),u=c.next();!u.done;u=c.next()){var p=u.value;Yr(p)&&void 0!==p.customFields[l.name]&&delete p.customFields[l.name]}}catch(e){o={error:e}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(o)throw o.error}}}else Yr(e)&&void 0!==e.customFields[l.name]&&delete e.customFields[l.name]}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return e}function Yr(e){return null!=e&&e.hasOwnProperty("customFields")}function Jr(e){return null!=e&&e.hasOwnProperty("translations")}function Kr(e,t){return e.input&&Qr(e.input,t),Qr(e,t)}function Qr(e,t){var n,r;try{for(var o=X(t),i=o.next();!i.done;i=o.next()){var a=i.value;if("relation"===a.type&&Xr(e)){var s=e.customFields[a.name];e.customFields.hasOwnProperty(a.name)&&(delete e.customFields[a.name],e.customFields[l.getGraphQlInputName(a)]=a.list&&Array.isArray(s)?s.map((function(e){return null==e?void 0:e.id})):null===s?null:null==s?void 0:s.id)}}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return e}function Xr(e){return null!=e&&e.hasOwnProperty("customFields")}var eo=function(){function e(e,t,n,r){this.apollo=e,this.httpClient=t,this.localStorageService=n,this.serverConfigService=r}return Object.defineProperty(e.prototype,"customFields",{get:function(){return this.serverConfigService.serverConfig.customFieldConfig||{}},enumerable:!1,configurable:!0}),e.prototype.query=function(e,t,n){void 0===n&&(n="cache-and-network");var r=qr(e,this.customFields),o=this.apollo.watchQuery({query:r,variables:t,fetchPolicy:n});return new kn(o,this.apollo)},e.prototype.mutate=function(e,t,n){var o=qr(e,this.customFields),i=this.prepareCustomFields(e,t);return this.apollo.mutate({mutation:o,variables:i,update:n}).pipe(r.map((function(e){return e.data})))},e.prototype.prepareCustomFields=function(e,t){var n=Hr(e);if(n){var r=this.customFields[n];if(t&&r){var o=a.simpleDeepClone(t);return o=Kr(o=Wr(o,r),r)}}return t},e}();eo.decorators=[{type:t.Injectable}],eo.ctorParameters=function(){return[{type:o.Apollo},{type:i.HttpClient},{type:Ye},{type:Ur}]};var to,no,ro,oo,io,ao,so,lo,co,uo,po,mo,go,ho,fo,yo,vo,Co,bo,So,Io,To,Do,Ao,Eo,Ro,Po,Oo,ko,wo,xo,Fo,$o,_o,Mo,Lo,No,Uo,qo,Go,Vo,jo,Bo,Ho,zo,Wo,Zo,Yo,Jo,Ko,Qo,Xo,ei,ti,ni,ri,oi,ii,ai,si,li,ci,ui,pi,di,mi,gi,hi,fi,yi,vi,Ci,bi,Si,Ii,Ti,Di,Ai,Ei,Ri,Pi,Oi,ki,wi,xi,Fi,$i,_i,Mi,Li,Ni,Ui,qi,Gi,Vi,ji,Bi,Hi,zi,Wi,Zi,Yi,Ji,Ki,Qi,Xi,ea,ta,na,ra,oa,ia,aa,sa,la,ca,ua,pa,da,ma=function(){function e(e){this.baseDataService=e}return e.prototype.startRequest=function(){return this.baseDataService.mutate(yn)},e.prototype.completeRequest=function(){return this.baseDataService.mutate(vn)},e.prototype.getNetworkStatus=function(){return this.baseDataService.query(Dn,{},"cache-first")},e.prototype.loginSuccess=function(e,t,n){return this.baseDataService.mutate(bn,{input:{username:e,loginTime:Date.now().toString(),activeChannelId:t,channels:n}})},e.prototype.logOut=function(){return this.baseDataService.mutate(Sn)},e.prototype.userStatus=function(){return this.baseDataService.query(An,{},"cache-first")},e.prototype.uiState=function(){return this.baseDataService.query(En,{},"cache-first")},e.prototype.setUiLanguage=function(e){return this.baseDataService.mutate(In,{languageCode:e})},e.prototype.setUiTheme=function(e){return this.baseDataService.mutate(Tn,{theme:e})},e.prototype.setActiveChannel=function(e){return this.baseDataService.mutate(Pn,{channelId:e})},e.prototype.updateUserChannels=function(e){return this.baseDataService.mutate(On,{channels:e})},e}(),ga=o.gql(to||(to=ne(["\n fragment Asset on Asset {\n id\n createdAt\n updatedAt\n name\n fileSize\n mimeType\n type\n preview\n source\n width\n height\n focalPoint {\n x\n y\n }\n }\n"],["\n fragment Asset on Asset {\n id\n createdAt\n updatedAt\n name\n fileSize\n mimeType\n type\n preview\n source\n width\n height\n focalPoint {\n x\n y\n }\n }\n"]))),ha=o.gql(no||(no=ne(["\n fragment Tag on Tag {\n id\n value\n }\n"],["\n fragment Tag on Tag {\n id\n value\n }\n"]))),fa=o.gql(ro||(ro=ne(["\n fragment ProductOptionGroup on ProductOptionGroup {\n id\n code\n languageCode\n name\n translations {\n id\n languageCode\n name\n }\n }\n"],["\n fragment ProductOptionGroup on ProductOptionGroup {\n id\n code\n languageCode\n name\n translations {\n id\n languageCode\n name\n }\n }\n"]))),ya=o.gql(oo||(oo=ne(["\n fragment ProductOption on ProductOption {\n id\n code\n languageCode\n name\n groupId\n translations {\n id\n languageCode\n name\n }\n }\n"],["\n fragment ProductOption on ProductOption {\n id\n code\n languageCode\n name\n groupId\n translations {\n id\n languageCode\n name\n }\n }\n"]))),va=o.gql(io||(io=ne(["\n fragment ProductVariant on ProductVariant {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n price\n currencyCode\n priceWithTax\n stockOnHand\n stockAllocated\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n taxRateApplied {\n id\n name\n value\n }\n taxCategory {\n id\n name\n }\n sku\n options {\n ...ProductOption\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n"],["\n fragment ProductVariant on ProductVariant {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n price\n currencyCode\n priceWithTax\n stockOnHand\n stockAllocated\n trackInventory\n outOfStockThreshold\n useGlobalOutOfStockThreshold\n taxRateApplied {\n id\n name\n value\n }\n taxCategory {\n id\n name\n }\n sku\n options {\n ...ProductOption\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n"])),ya,ga),Ca=o.gql(ao||(ao=ne(["\n fragment ProductWithVariants on Product {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n description\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n optionGroups {\n ...ProductOptionGroup\n }\n variants {\n ...ProductVariant\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n ","\n"],["\n fragment ProductWithVariants on Product {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n description\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n optionGroups {\n ...ProductOptionGroup\n }\n variants {\n ...ProductVariant\n }\n facetValues {\n id\n code\n name\n facet {\n id\n name\n }\n }\n channels {\n id\n code\n }\n }\n ","\n ","\n ","\n"])),fa,va,ga),ba=o.gql(so||(so=ne(["\n fragment ProductOptionGroupWithOptions on ProductOptionGroup {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n name\n }\n options {\n id\n languageCode\n name\n code\n translations {\n name\n }\n }\n }\n"],["\n fragment ProductOptionGroupWithOptions on ProductOptionGroup {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n name\n }\n options {\n id\n languageCode\n name\n code\n translations {\n name\n }\n }\n }\n"]))),Sa=o.gql(lo||(lo=ne(["\n mutation UpdateProduct($input: UpdateProductInput!) {\n updateProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"],["\n mutation UpdateProduct($input: UpdateProductInput!) {\n updateProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"])),Ca),Ia=o.gql(co||(co=ne(["\n mutation CreateProduct($input: CreateProductInput!) {\n createProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"],["\n mutation CreateProduct($input: CreateProductInput!) {\n createProduct(input: $input) {\n ...ProductWithVariants\n }\n }\n ","\n"])),Ca),Ta=o.gql(uo||(uo=ne(["\n mutation DeleteProduct($id: ID!) {\n deleteProduct(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteProduct($id: ID!) {\n deleteProduct(id: $id) {\n result\n message\n }\n }\n"]))),Da=o.gql(po||(po=ne(["\n mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {\n createProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"],["\n mutation CreateProductVariants($input: [CreateProductVariantInput!]!) {\n createProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"])),va),Aa=o.gql(mo||(mo=ne(["\n mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {\n updateProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"],["\n mutation UpdateProductVariants($input: [UpdateProductVariantInput!]!) {\n updateProductVariants(input: $input) {\n ...ProductVariant\n }\n }\n ","\n"])),va),Ea=o.gql(go||(go=ne(["\n mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {\n createProductOptionGroup(input: $input) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"],["\n mutation CreateProductOptionGroup($input: CreateProductOptionGroupInput!) {\n createProductOptionGroup(input: $input) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"])),ba),Ra=o.gql(ho||(ho=ne(["\n query GetProductOptionGroup($id: ID!) {\n productOptionGroup(id: $id) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"],["\n query GetProductOptionGroup($id: ID!) {\n productOptionGroup(id: $id) {\n ...ProductOptionGroupWithOptions\n }\n }\n ","\n"])),ba),Pa=o.gql(fo||(fo=ne(["\n mutation AddOptionToGroup($input: CreateProductOptionInput!) {\n createProductOption(input: $input) {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n"],["\n mutation AddOptionToGroup($input: CreateProductOptionInput!) {\n createProductOption(input: $input) {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n"]))),Oa=o.gql(yo||(yo=ne(["\n mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {\n addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n }\n"],["\n mutation AddOptionGroupToProduct($productId: ID!, $optionGroupId: ID!) {\n addOptionGroupToProduct(productId: $productId, optionGroupId: $optionGroupId) {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n }\n"]))),ka=o.gql(vo||(vo=ne(["\n mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!) {\n removeOptionGroupFromProduct(productId: $productId, optionGroupId: $optionGroupId) {\n ... on Product {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n ...ErrorResult\n }\n }\n ","\n"],["\n mutation RemoveOptionGroupFromProduct($productId: ID!, $optionGroupId: ID!) {\n removeOptionGroupFromProduct(productId: $productId, optionGroupId: $optionGroupId) {\n ... on Product {\n id\n createdAt\n updatedAt\n optionGroups {\n id\n createdAt\n updatedAt\n code\n options {\n id\n createdAt\n updatedAt\n code\n }\n }\n }\n ...ErrorResult\n }\n }\n ","\n"])),je),wa=o.gql(Co||(Co=ne(["\n query GetProductWithVariants($id: ID!) {\n product(id: $id) {\n ...ProductWithVariants\n }\n }\n ","\n"],["\n query GetProductWithVariants($id: ID!) {\n product(id: $id) {\n ...ProductWithVariants\n }\n }\n ","\n"])),Ca),xa=o.gql(bo||(bo=ne(["\n query GetProductSimple($id: ID!) {\n product(id: $id) {\n id\n name\n featuredAsset {\n ...Asset\n }\n }\n }\n ","\n"],["\n query GetProductSimple($id: ID!) {\n product(id: $id) {\n id\n name\n featuredAsset {\n ...Asset\n }\n }\n }\n ","\n"])),ga),Fa=o.gql(So||(So=ne(["\n query GetProductList($options: ProductListOptions) {\n products(options: $options) {\n items {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n featuredAsset {\n id\n createdAt\n updatedAt\n preview\n }\n }\n totalItems\n }\n }\n"],["\n query GetProductList($options: ProductListOptions) {\n products(options: $options) {\n items {\n id\n createdAt\n updatedAt\n enabled\n languageCode\n name\n slug\n featuredAsset {\n id\n createdAt\n updatedAt\n preview\n }\n }\n totalItems\n }\n }\n"]))),$a=o.gql(Io||(Io=ne(["\n query GetProductOptionGroups($filterTerm: String) {\n productOptionGroups(filterTerm: $filterTerm) {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n options {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n }\n }\n }\n"],["\n query GetProductOptionGroups($filterTerm: String) {\n productOptionGroups(filterTerm: $filterTerm) {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n options {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n }\n }\n }\n"]))),_a=o.gql(To||(To=ne(["\n query GetAssetList($options: AssetListOptions) {\n assets(options: $options) {\n items {\n ...Asset\n tags {\n ...Tag\n }\n }\n totalItems\n }\n }\n ","\n ","\n"],["\n query GetAssetList($options: AssetListOptions) {\n assets(options: $options) {\n items {\n ...Asset\n tags {\n ...Tag\n }\n }\n totalItems\n }\n }\n ","\n ","\n"])),ga,ha),Ma=o.gql(Do||(Do=ne(["\n query GetAsset($id: ID!) {\n asset(id: $id) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"],["\n query GetAsset($id: ID!) {\n asset(id: $id) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"])),ga,ha),La=o.gql(Ao||(Ao=ne(["\n mutation CreateAssets($input: [CreateAssetInput!]!) {\n createAssets(input: $input) {\n ...Asset\n ... on Asset {\n tags {\n ...Tag\n }\n }\n ... on ErrorResult {\n message\n }\n }\n }\n ","\n ","\n"],["\n mutation CreateAssets($input: [CreateAssetInput!]!) {\n createAssets(input: $input) {\n ...Asset\n ... on Asset {\n tags {\n ...Tag\n }\n }\n ... on ErrorResult {\n message\n }\n }\n }\n ","\n ","\n"])),ga,ha),Na=o.gql(Eo||(Eo=ne(["\n mutation UpdateAsset($input: UpdateAssetInput!) {\n updateAsset(input: $input) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"],["\n mutation UpdateAsset($input: UpdateAssetInput!) {\n updateAsset(input: $input) {\n ...Asset\n tags {\n ...Tag\n }\n }\n }\n ","\n ","\n"])),ga,ha),Ua=o.gql(Ro||(Ro=ne(["\n mutation DeleteAssets($input: DeleteAssetsInput!) {\n deleteAssets(input: $input) {\n result\n message\n }\n }\n"],["\n mutation DeleteAssets($input: DeleteAssetsInput!) {\n deleteAssets(input: $input) {\n result\n message\n }\n }\n"]))),qa=o.gql(Po||(Po=ne(["\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n totalItems\n items {\n enabled\n productId\n productName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n productVariantId\n productVariantName\n productVariantAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n sku\n channelIds\n }\n facetValues {\n count\n facetValue {\n id\n createdAt\n updatedAt\n name\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n }\n }\n }\n"],["\n query SearchProducts($input: SearchInput!) {\n search(input: $input) {\n totalItems\n items {\n enabled\n productId\n productName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n productVariantId\n productVariantName\n productVariantAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n sku\n channelIds\n }\n facetValues {\n count\n facetValue {\n id\n createdAt\n updatedAt\n name\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n }\n }\n }\n"]))),Ga=o.gql(Oo||(Oo=ne(["\n query ProductSelectorSearch($term: String!, $take: Int!) {\n search(input: { groupByProduct: false, term: $term, take: $take }) {\n items {\n productVariantId\n productVariantName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n price {\n ... on SinglePrice {\n value\n }\n }\n priceWithTax {\n ... on SinglePrice {\n value\n }\n }\n sku\n }\n }\n }\n"],["\n query ProductSelectorSearch($term: String!, $take: Int!) {\n search(input: { groupByProduct: false, term: $term, take: $take }) {\n items {\n productVariantId\n productVariantName\n productAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n price {\n ... on SinglePrice {\n value\n }\n }\n priceWithTax {\n ... on SinglePrice {\n value\n }\n }\n sku\n }\n }\n }\n"]))),Va=o.gql(ko||(ko=ne(["\n mutation UpdateProductOption($input: UpdateProductOptionInput!) {\n updateProductOption(input: $input) {\n ...ProductOption\n }\n }\n ","\n"],["\n mutation UpdateProductOption($input: UpdateProductOptionInput!) {\n updateProductOption(input: $input) {\n ...ProductOption\n }\n }\n ","\n"])),ya),ja=o.gql(wo||(wo=ne(["\n mutation DeleteProductVariant($id: ID!) {\n deleteProductVariant(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteProductVariant($id: ID!) {\n deleteProductVariant(id: $id) {\n result\n message\n }\n }\n"]))),Ba=o.gql(xo||(xo=ne(["\n query GetProductVariantOptions($id: ID!) {\n product(id: $id) {\n id\n createdAt\n updatedAt\n name\n optionGroups {\n id\n name\n code\n options {\n ...ProductOption\n }\n }\n variants {\n id\n createdAt\n updatedAt\n enabled\n name\n sku\n price\n stockOnHand\n enabled\n options {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n }\n }\n ","\n"],["\n query GetProductVariantOptions($id: ID!) {\n product(id: $id) {\n id\n createdAt\n updatedAt\n name\n optionGroups {\n id\n name\n code\n options {\n ...ProductOption\n }\n }\n variants {\n id\n createdAt\n updatedAt\n enabled\n name\n sku\n price\n stockOnHand\n enabled\n options {\n id\n createdAt\n updatedAt\n name\n code\n groupId\n }\n }\n }\n }\n ","\n"])),ya),Ha=o.gql(Fo||(Fo=ne(["\n mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {\n assignProductsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation AssignProductsToChannel($input: AssignProductsToChannelInput!) {\n assignProductsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),za=o.gql($o||($o=ne(["\n mutation AssignVariantsToChannel($input: AssignProductVariantsToChannelInput!) {\n assignProductVariantsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation AssignVariantsToChannel($input: AssignProductVariantsToChannelInput!) {\n assignProductVariantsToChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),Wa=o.gql(_o||(_o=ne(["\n mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {\n removeProductsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation RemoveProductsFromChannel($input: RemoveProductsFromChannelInput!) {\n removeProductsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),Za=o.gql(Mo||(Mo=ne(["\n mutation RemoveVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {\n removeProductVariantsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"],["\n mutation RemoveVariantsFromChannel($input: RemoveProductVariantsFromChannelInput!) {\n removeProductVariantsFromChannel(input: $input) {\n id\n channels {\n id\n code\n }\n }\n }\n"]))),Ya=o.gql(Lo||(Lo=ne(["\n query GetProductVariant($id: ID!) {\n productVariant(id: $id) {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n }\n"],["\n query GetProductVariant($id: ID!) {\n productVariant(id: $id) {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n }\n"]))),Ja=o.gql(No||(No=ne(["\n query GetProductVariantList($options: ProductVariantListOptions!) {\n productVariants(options: $options) {\n items {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n totalItems\n }\n }\n"],["\n query GetProductVariantList($options: ProductVariantListOptions!) {\n productVariants(options: $options) {\n items {\n id\n name\n sku\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n product {\n id\n featuredAsset {\n id\n preview\n focalPoint {\n x\n y\n }\n }\n }\n }\n totalItems\n }\n }\n"]))),Ka=o.gql(Uo||(Uo=ne(["\n query GetTagList($options: TagListOptions) {\n tags(options: $options) {\n items {\n ...Tag\n }\n totalItems\n }\n }\n ","\n"],["\n query GetTagList($options: TagListOptions) {\n tags(options: $options) {\n items {\n ...Tag\n }\n totalItems\n }\n }\n ","\n"])),ha),Qa=o.gql(qo||(qo=ne(["\n query GetTag($id: ID!) {\n tag(id: $id) {\n ...Tag\n }\n }\n ","\n"],["\n query GetTag($id: ID!) {\n tag(id: $id) {\n ...Tag\n }\n }\n ","\n"])),ha),Xa=o.gql(Go||(Go=ne(["\n mutation CreateTag($input: CreateTagInput!) {\n createTag(input: $input) {\n ...Tag\n }\n }\n ","\n"],["\n mutation CreateTag($input: CreateTagInput!) {\n createTag(input: $input) {\n ...Tag\n }\n }\n ","\n"])),ha),es=o.gql(Vo||(Vo=ne(["\n mutation UpdateTag($input: UpdateTagInput!) {\n updateTag(input: $input) {\n ...Tag\n }\n }\n ","\n"],["\n mutation UpdateTag($input: UpdateTagInput!) {\n updateTag(input: $input) {\n ...Tag\n }\n }\n ","\n"])),ha),ts=o.gql(jo||(jo=ne(["\n mutation DeleteTag($id: ID!) {\n deleteTag(id: $id) {\n message\n result\n }\n }\n"],["\n mutation DeleteTag($id: ID!) {\n deleteTag(id: $id) {\n message\n result\n }\n }\n"]))),ns=o.gql(Bo||(Bo=ne(["\n query GetCollectionFilters {\n collectionFilters {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetCollectionFilters {\n collectionFilters {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),rs=o.gql(Ho||(Ho=ne(["\n fragment Collection on Collection {\n id\n createdAt\n updatedAt\n name\n slug\n description\n isPrivate\n languageCode\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n filters {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n parent {\n id\n name\n }\n children {\n id\n name\n }\n }\n ","\n ","\n"],["\n fragment Collection on Collection {\n id\n createdAt\n updatedAt\n name\n slug\n description\n isPrivate\n languageCode\n featuredAsset {\n ...Asset\n }\n assets {\n ...Asset\n }\n filters {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n slug\n description\n }\n parent {\n id\n name\n }\n children {\n id\n name\n }\n }\n ","\n ","\n"])),ga,Ge),os=o.gql(zo||(zo=ne(["\n query GetCollectionList($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id\n name\n slug\n description\n isPrivate\n featuredAsset {\n ...Asset\n }\n parent {\n id\n }\n }\n totalItems\n }\n }\n ","\n"],["\n query GetCollectionList($options: CollectionListOptions) {\n collections(options: $options) {\n items {\n id\n name\n slug\n description\n isPrivate\n featuredAsset {\n ...Asset\n }\n parent {\n id\n }\n }\n totalItems\n }\n }\n ","\n"])),ga),is=o.gql(Wo||(Wo=ne(["\n query GetCollection($id: ID!) {\n collection(id: $id) {\n ...Collection\n }\n }\n ","\n"],["\n query GetCollection($id: ID!) {\n collection(id: $id) {\n ...Collection\n }\n }\n ","\n"])),rs),as=o.gql(Zo||(Zo=ne(["\n mutation CreateCollection($input: CreateCollectionInput!) {\n createCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"],["\n mutation CreateCollection($input: CreateCollectionInput!) {\n createCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"])),rs),ss=o.gql(Yo||(Yo=ne(["\n mutation UpdateCollection($input: UpdateCollectionInput!) {\n updateCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"],["\n mutation UpdateCollection($input: UpdateCollectionInput!) {\n updateCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"])),rs),ls=o.gql(Jo||(Jo=ne(["\n mutation MoveCollection($input: MoveCollectionInput!) {\n moveCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"],["\n mutation MoveCollection($input: MoveCollectionInput!) {\n moveCollection(input: $input) {\n ...Collection\n }\n }\n ","\n"])),rs),cs=o.gql(Ko||(Ko=ne(["\n mutation DeleteCollection($id: ID!) {\n deleteCollection(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCollection($id: ID!) {\n deleteCollection(id: $id) {\n result\n message\n }\n }\n"]))),us=o.gql(Qo||(Qo=ne(["\n query GetCollectionContents($id: ID!, $options: ProductVariantListOptions) {\n collection(id: $id) {\n id\n name\n productVariants(options: $options) {\n items {\n id\n productId\n name\n }\n totalItems\n }\n }\n }\n"],["\n query GetCollectionContents($id: ID!, $options: ProductVariantListOptions) {\n collection(id: $id) {\n id\n name\n productVariants(options: $options) {\n items {\n id\n productId\n name\n }\n totalItems\n }\n }\n }\n"]))),ps=function(){function e(e){this.baseDataService=e}return e.prototype.getCollectionFilters=function(){return this.baseDataService.query(ns)},e.prototype.getCollections=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(os,{options:{take:e,skip:t}})},e.prototype.getCollection=function(e){return this.baseDataService.query(is,{id:e})},e.prototype.createCollection=function(e){return this.baseDataService.mutate(as,{input:p.pick(e,["translations","parentId","assetIds","featuredAssetId","filters","customFields"])})},e.prototype.updateCollection=function(e){return this.baseDataService.mutate(ss,{input:p.pick(e,["id","isPrivate","translations","assetIds","featuredAssetId","filters","customFields"])})},e.prototype.moveCollection=function(e){var t=this;return c.from(e).pipe(r.concatMap((function(e){return t.baseDataService.mutate(ls,{input:e})})),r.bufferCount(e.length))},e.prototype.deleteCollection=function(e){return this.baseDataService.mutate(cs,{id:e})},e.prototype.getCollectionContents=function(e,t,n,r){void 0===t&&(t=10),void 0===n&&(n=0);var o=r?{name:{contains:r}}:void 0;return this.baseDataService.query(us,{id:e,options:{skip:n,take:t,filter:o}})},e}(),ds=o.gql(Xo||(Xo=ne(["\n fragment Address on Address {\n id\n createdAt\n updatedAt\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country {\n id\n code\n name\n }\n phoneNumber\n defaultShippingAddress\n defaultBillingAddress\n }\n"],["\n fragment Address on Address {\n id\n createdAt\n updatedAt\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country {\n id\n code\n name\n }\n phoneNumber\n defaultShippingAddress\n defaultBillingAddress\n }\n"]))),ms=o.gql(ei||(ei=ne(["\n fragment Customer on Customer {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n phoneNumber\n emailAddress\n user {\n id\n identifier\n verified\n lastLogin\n }\n addresses {\n ...Address\n }\n }\n ","\n"],["\n fragment Customer on Customer {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n phoneNumber\n emailAddress\n user {\n id\n identifier\n verified\n lastLogin\n }\n addresses {\n ...Address\n }\n }\n ","\n"])),ds),gs=o.gql(ti||(ti=ne(["\n query GetCustomerList($options: CustomerListOptions) {\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n emailAddress\n user {\n id\n verified\n }\n }\n totalItems\n }\n }\n"],["\n query GetCustomerList($options: CustomerListOptions) {\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n title\n firstName\n lastName\n emailAddress\n user {\n id\n verified\n }\n }\n totalItems\n }\n }\n"]))),hs=o.gql(ni||(ni=ne(["\n query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {\n customer(id: $id) {\n ...Customer\n groups {\n id\n name\n }\n orders(options: $orderListOptions) {\n items {\n id\n code\n state\n total\n currencyCode\n updatedAt\n }\n totalItems\n }\n }\n }\n ","\n"],["\n query GetCustomer($id: ID!, $orderListOptions: OrderListOptions) {\n customer(id: $id) {\n ...Customer\n groups {\n id\n name\n }\n orders(options: $orderListOptions) {\n items {\n id\n code\n state\n total\n currencyCode\n updatedAt\n }\n totalItems\n }\n }\n }\n ","\n"])),ms),fs=o.gql(ri||(ri=ne(["\n mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {\n createCustomer(input: $input, password: $password) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreateCustomer($input: CreateCustomerInput!, $password: String) {\n createCustomer(input: $input, password: $password) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"])),ms,je),ys=o.gql(oi||(oi=ne(["\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation UpdateCustomer($input: UpdateCustomerInput!) {\n updateCustomer(input: $input) {\n ...Customer\n ...ErrorResult\n }\n }\n ","\n ","\n"])),ms,je),vs=o.gql(ii||(ii=ne(["\n mutation DeleteCustomer($id: ID!) {\n deleteCustomer(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCustomer($id: ID!) {\n deleteCustomer(id: $id) {\n result\n message\n }\n }\n"]))),Cs=o.gql(ai||(ai=ne(["\n mutation CreateCustomerAddress($customerId: ID!, $input: CreateAddressInput!) {\n createCustomerAddress(customerId: $customerId, input: $input) {\n ...Address\n }\n }\n ","\n"],["\n mutation CreateCustomerAddress($customerId: ID!, $input: CreateAddressInput!) {\n createCustomerAddress(customerId: $customerId, input: $input) {\n ...Address\n }\n }\n ","\n"])),ds),bs=o.gql(si||(si=ne(["\n mutation UpdateCustomerAddress($input: UpdateAddressInput!) {\n updateCustomerAddress(input: $input) {\n ...Address\n }\n }\n ","\n"],["\n mutation UpdateCustomerAddress($input: UpdateAddressInput!) {\n updateCustomerAddress(input: $input) {\n ...Address\n }\n }\n ","\n"])),ds),Ss=o.gql(li||(li=ne(["\n mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {\n createCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation CreateCustomerGroup($input: CreateCustomerGroupInput!) {\n createCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Is=o.gql(ci||(ci=ne(["\n mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {\n updateCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation UpdateCustomerGroup($input: UpdateCustomerGroupInput!) {\n updateCustomerGroup(input: $input) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Ts=o.gql(ui||(ui=ne(["\n mutation DeleteCustomerGroup($id: ID!) {\n deleteCustomerGroup(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCustomerGroup($id: ID!) {\n deleteCustomerGroup(id: $id) {\n result\n message\n }\n }\n"]))),Ds=o.gql(pi||(pi=ne(["\n query GetCustomerGroups($options: CustomerGroupListOptions) {\n customerGroups(options: $options) {\n items {\n id\n createdAt\n updatedAt\n name\n }\n totalItems\n }\n }\n"],["\n query GetCustomerGroups($options: CustomerGroupListOptions) {\n customerGroups(options: $options) {\n items {\n id\n createdAt\n updatedAt\n name\n }\n totalItems\n }\n }\n"]))),As=o.gql(di||(di=ne(["\n query GetCustomerGroupWithCustomers($id: ID!, $options: CustomerListOptions) {\n customerGroup(id: $id) {\n id\n createdAt\n updatedAt\n name\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n emailAddress\n firstName\n lastName\n }\n totalItems\n }\n }\n }\n"],["\n query GetCustomerGroupWithCustomers($id: ID!, $options: CustomerListOptions) {\n customerGroup(id: $id) {\n id\n createdAt\n updatedAt\n name\n customers(options: $options) {\n items {\n id\n createdAt\n updatedAt\n emailAddress\n firstName\n lastName\n }\n totalItems\n }\n }\n }\n"]))),Es=o.gql(mi||(mi=ne(["\n mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {\n addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation AddCustomersToGroup($groupId: ID!, $customerIds: [ID!]!) {\n addCustomersToGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Rs=o.gql(gi||(gi=ne(["\n mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {\n removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n mutation RemoveCustomersFromGroup($groupId: ID!, $customerIds: [ID!]!) {\n removeCustomersFromGroup(customerGroupId: $groupId, customerIds: $customerIds) {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),Ps=o.gql(hi||(hi=ne(["\n query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {\n customer(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"],["\n query GetCustomerHistory($id: ID!, $options: HistoryEntryListOptions) {\n customer(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"]))),Os=o.gql(fi||(fi=ne(["\n mutation AddNoteToCustomer($input: AddNoteToCustomerInput!) {\n addNoteToCustomer(input: $input) {\n id\n }\n }\n"],["\n mutation AddNoteToCustomer($input: AddNoteToCustomerInput!) {\n addNoteToCustomer(input: $input) {\n id\n }\n }\n"]))),ks=o.gql(yi||(yi=ne(["\n mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {\n updateCustomerNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"],["\n mutation UpdateCustomerNote($input: UpdateCustomerNoteInput!) {\n updateCustomerNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"]))),ws=o.gql(vi||(vi=ne(["\n mutation DeleteCustomerNote($id: ID!) {\n deleteCustomerNote(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteCustomerNote($id: ID!) {\n deleteCustomerNote(id: $id) {\n result\n message\n }\n }\n"]))),xs=function(){function e(e){this.baseDataService=e}return e.prototype.getCustomerList=function(e,t,n){void 0===e&&(e=10),void 0===t&&(t=0);var r=n?{filter:{emailAddress:{contains:n}}}:{};return this.baseDataService.query(gs,{options:Object.assign({take:e,skip:t},r)})},e.prototype.getCustomer=function(e,t){return this.baseDataService.query(hs,{id:e,orderListOptions:t})},e.prototype.createCustomer=function(e,t){return this.baseDataService.mutate(fs,{input:e,password:t})},e.prototype.updateCustomer=function(e){return this.baseDataService.mutate(ys,{input:e})},e.prototype.deleteCustomer=function(e){return this.baseDataService.mutate(vs,{id:e})},e.prototype.createCustomerAddress=function(e,t){return this.baseDataService.mutate(Cs,{customerId:e,input:t})},e.prototype.updateCustomerAddress=function(e){return this.baseDataService.mutate(bs,{input:e})},e.prototype.createCustomerGroup=function(e){return this.baseDataService.mutate(Ss,{input:e})},e.prototype.updateCustomerGroup=function(e){return this.baseDataService.mutate(Is,{input:e})},e.prototype.deleteCustomerGroup=function(e){return this.baseDataService.mutate(Ts,{id:e})},e.prototype.getCustomerGroupList=function(e){return this.baseDataService.query(Ds,{options:e})},e.prototype.getCustomerGroupWithCustomers=function(e,t){return this.baseDataService.query(As,{id:e,options:t})},e.prototype.addCustomersToGroup=function(e,t){return this.baseDataService.mutate(Es,{groupId:e,customerIds:t})},e.prototype.removeCustomersFromGroup=function(e,t){return this.baseDataService.mutate(Rs,{groupId:e,customerIds:t})},e.prototype.getCustomerHistory=function(e,t){return this.baseDataService.query(Ps,{id:e,options:t})},e.prototype.addNoteToCustomer=function(e,t){return this.baseDataService.mutate(Os,{input:{note:t,isPublic:!1,id:e}})},e.prototype.updateCustomerNote=function(e){return this.baseDataService.mutate(ks,{input:e})},e.prototype.deleteCustomerNote=function(e){return this.baseDataService.mutate(ws,{id:e})},e}(),Fs=o.gql(Ci||(Ci=ne(["\n fragment FacetValue on FacetValue {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n languageCode\n name\n }\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n"],["\n fragment FacetValue on FacetValue {\n id\n createdAt\n updatedAt\n languageCode\n code\n name\n translations {\n id\n languageCode\n name\n }\n facet {\n id\n createdAt\n updatedAt\n name\n }\n }\n"]))),$s=o.gql(bi||(bi=ne(["\n fragment FacetWithValues on Facet {\n id\n createdAt\n updatedAt\n languageCode\n isPrivate\n code\n name\n translations {\n id\n languageCode\n name\n }\n values {\n ...FacetValue\n }\n }\n ","\n"],["\n fragment FacetWithValues on Facet {\n id\n createdAt\n updatedAt\n languageCode\n isPrivate\n code\n name\n translations {\n id\n languageCode\n name\n }\n values {\n ...FacetValue\n }\n }\n ","\n"])),Fs),_s=o.gql(Si||(Si=ne(["\n mutation CreateFacet($input: CreateFacetInput!) {\n createFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"],["\n mutation CreateFacet($input: CreateFacetInput!) {\n createFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"])),$s),Ms=o.gql(Ii||(Ii=ne(["\n mutation UpdateFacet($input: UpdateFacetInput!) {\n updateFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"],["\n mutation UpdateFacet($input: UpdateFacetInput!) {\n updateFacet(input: $input) {\n ...FacetWithValues\n }\n }\n ","\n"])),$s),Ls=o.gql(Ti||(Ti=ne(["\n mutation DeleteFacet($id: ID!, $force: Boolean) {\n deleteFacet(id: $id, force: $force) {\n result\n message\n }\n }\n"],["\n mutation DeleteFacet($id: ID!, $force: Boolean) {\n deleteFacet(id: $id, force: $force) {\n result\n message\n }\n }\n"]))),Ns=o.gql(Di||(Di=ne(["\n mutation CreateFacetValues($input: [CreateFacetValueInput!]!) {\n createFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"],["\n mutation CreateFacetValues($input: [CreateFacetValueInput!]!) {\n createFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"])),Fs),Us=o.gql(Ai||(Ai=ne(["\n mutation UpdateFacetValues($input: [UpdateFacetValueInput!]!) {\n updateFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"],["\n mutation UpdateFacetValues($input: [UpdateFacetValueInput!]!) {\n updateFacetValues(input: $input) {\n ...FacetValue\n }\n }\n ","\n"])),Fs),qs=o.gql(Ei||(Ei=ne(["\n mutation DeleteFacetValues($ids: [ID!]!, $force: Boolean) {\n deleteFacetValues(ids: $ids, force: $force) {\n result\n message\n }\n }\n"],["\n mutation DeleteFacetValues($ids: [ID!]!, $force: Boolean) {\n deleteFacetValues(ids: $ids, force: $force) {\n result\n message\n }\n }\n"]))),Gs=o.gql(Ri||(Ri=ne(["\n query GetFacetList($options: FacetListOptions) {\n facets(options: $options) {\n items {\n ...FacetWithValues\n }\n totalItems\n }\n }\n ","\n"],["\n query GetFacetList($options: FacetListOptions) {\n facets(options: $options) {\n items {\n ...FacetWithValues\n }\n totalItems\n }\n }\n ","\n"])),$s),Vs=o.gql(Pi||(Pi=ne(["\n query GetFacetWithValues($id: ID!) {\n facet(id: $id) {\n ...FacetWithValues\n }\n }\n ","\n"],["\n query GetFacetWithValues($id: ID!) {\n facet(id: $id) {\n ...FacetWithValues\n }\n }\n ","\n"])),$s),js=function(){function e(e){this.baseDataService=e}return e.prototype.getFacets=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(Gs,{options:{take:e,skip:t}})},e.prototype.getAllFacets=function(){return this.baseDataService.query(Gs,{})},e.prototype.getFacet=function(e){return this.baseDataService.query(Vs,{id:e})},e.prototype.createFacet=function(e){var t={input:p.pick(e,["code","isPrivate","translations","values","customFields"])};return this.baseDataService.mutate(_s,t)},e.prototype.updateFacet=function(e){var t={input:p.pick(e,["id","code","isPrivate","translations","customFields"])};return this.baseDataService.mutate(Ms,t)},e.prototype.deleteFacet=function(e,t){return this.baseDataService.mutate(Ls,{id:e,force:t})},e.prototype.createFacetValues=function(e){var t={input:e.map(p.pick(["facetId","code","translations","customFields"]))};return this.baseDataService.mutate(Ns,t)},e.prototype.updateFacetValues=function(e){var t={input:e.map(p.pick(["id","code","translations","customFields"]))};return this.baseDataService.mutate(Us,t)},e.prototype.deleteFacetValues=function(e,t){return this.baseDataService.mutate(qs,{ids:e,force:t})},e}(),Bs=o.gql(Oi||(Oi=ne(["\n fragment Discount on Discount {\n adjustmentSource\n amount\n amountWithTax\n description\n type\n }\n"],["\n fragment Discount on Discount {\n adjustmentSource\n amount\n amountWithTax\n description\n type\n }\n"]))),Hs=o.gql(ki||(ki=ne(["\n fragment Refund on Refund {\n id\n state\n items\n shipping\n adjustment\n transactionId\n paymentId\n }\n"],["\n fragment Refund on Refund {\n id\n state\n items\n shipping\n adjustment\n transactionId\n paymentId\n }\n"]))),zs=o.gql(wi||(wi=ne(["\n fragment OrderAddress on OrderAddress {\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country\n countryCode\n phoneNumber\n }\n"],["\n fragment OrderAddress on OrderAddress {\n fullName\n company\n streetLine1\n streetLine2\n city\n province\n postalCode\n country\n countryCode\n phoneNumber\n }\n"]))),Ws=o.gql(xi||(xi=ne(["\n fragment Order on Order {\n id\n createdAt\n updatedAt\n orderPlacedAt\n code\n state\n nextStates\n total\n currencyCode\n customer {\n id\n firstName\n lastName\n }\n shippingLines {\n shippingMethod {\n name\n }\n }\n }\n"],["\n fragment Order on Order {\n id\n createdAt\n updatedAt\n orderPlacedAt\n code\n state\n nextStates\n total\n currencyCode\n customer {\n id\n firstName\n lastName\n }\n shippingLines {\n shippingMethod {\n name\n }\n }\n }\n"]))),Zs=o.gql(Fi||(Fi=ne(["\n fragment Fulfillment on Fulfillment {\n id\n state\n nextStates\n createdAt\n updatedAt\n method\n orderItems {\n id\n }\n trackingCode\n }\n"],["\n fragment Fulfillment on Fulfillment {\n id\n state\n nextStates\n createdAt\n updatedAt\n method\n orderItems {\n id\n }\n trackingCode\n }\n"]))),Ys=o.gql($i||($i=ne(["\n fragment OrderLine on OrderLine {\n id\n featuredAsset {\n preview\n }\n productVariant {\n id\n name\n sku\n trackInventory\n stockOnHand\n }\n discounts {\n ...Discount\n }\n unitPrice\n unitPriceWithTax\n proratedUnitPrice\n proratedUnitPriceWithTax\n quantity\n items {\n id\n unitPrice\n unitPriceWithTax\n taxRate\n refundId\n cancelled\n fulfillment {\n ...Fulfillment\n }\n }\n linePrice\n lineTax\n linePriceWithTax\n discountedLinePrice\n discountedLinePriceWithTax\n }\n"],["\n fragment OrderLine on OrderLine {\n id\n featuredAsset {\n preview\n }\n productVariant {\n id\n name\n sku\n trackInventory\n stockOnHand\n }\n discounts {\n ...Discount\n }\n unitPrice\n unitPriceWithTax\n proratedUnitPrice\n proratedUnitPriceWithTax\n quantity\n items {\n id\n unitPrice\n unitPriceWithTax\n taxRate\n refundId\n cancelled\n fulfillment {\n ...Fulfillment\n }\n }\n linePrice\n lineTax\n linePriceWithTax\n discountedLinePrice\n discountedLinePriceWithTax\n }\n"]))),Js=o.gql(_i||(_i=ne(["\n fragment OrderDetail on Order {\n id\n createdAt\n updatedAt\n code\n state\n nextStates\n active\n customer {\n id\n firstName\n lastName\n }\n lines {\n ...OrderLine\n }\n surcharges {\n id\n sku\n description\n price\n priceWithTax\n taxRate\n }\n discounts {\n ...Discount\n }\n promotions {\n id\n couponCode\n }\n subTotal\n subTotalWithTax\n total\n totalWithTax\n currencyCode\n shipping\n shippingWithTax\n shippingLines {\n shippingMethod {\n id\n code\n name\n fulfillmentHandlerCode\n description\n }\n }\n taxSummary {\n description\n taxBase\n taxRate\n taxTotal\n }\n shippingAddress {\n ...OrderAddress\n }\n billingAddress {\n ...OrderAddress\n }\n payments {\n id\n createdAt\n transactionId\n amount\n method\n state\n nextStates\n errorMessage\n metadata\n refunds {\n id\n createdAt\n state\n items\n adjustment\n total\n paymentId\n reason\n transactionId\n method\n metadata\n orderItems {\n id\n }\n }\n }\n fulfillments {\n ...Fulfillment\n }\n modifications {\n id\n createdAt\n isSettled\n priceChange\n note\n payment {\n id\n amount\n }\n orderItems {\n id\n }\n refund {\n id\n paymentId\n total\n }\n surcharges {\n id\n }\n }\n }\n ","\n ","\n ","\n ","\n"],["\n fragment OrderDetail on Order {\n id\n createdAt\n updatedAt\n code\n state\n nextStates\n active\n customer {\n id\n firstName\n lastName\n }\n lines {\n ...OrderLine\n }\n surcharges {\n id\n sku\n description\n price\n priceWithTax\n taxRate\n }\n discounts {\n ...Discount\n }\n promotions {\n id\n couponCode\n }\n subTotal\n subTotalWithTax\n total\n totalWithTax\n currencyCode\n shipping\n shippingWithTax\n shippingLines {\n shippingMethod {\n id\n code\n name\n fulfillmentHandlerCode\n description\n }\n }\n taxSummary {\n description\n taxBase\n taxRate\n taxTotal\n }\n shippingAddress {\n ...OrderAddress\n }\n billingAddress {\n ...OrderAddress\n }\n payments {\n id\n createdAt\n transactionId\n amount\n method\n state\n nextStates\n errorMessage\n metadata\n refunds {\n id\n createdAt\n state\n items\n adjustment\n total\n paymentId\n reason\n transactionId\n method\n metadata\n orderItems {\n id\n }\n }\n }\n fulfillments {\n ...Fulfillment\n }\n modifications {\n id\n createdAt\n isSettled\n priceChange\n note\n payment {\n id\n amount\n }\n orderItems {\n id\n }\n refund {\n id\n paymentId\n total\n }\n surcharges {\n id\n }\n }\n }\n ","\n ","\n ","\n ","\n"])),Bs,zs,Zs,Ys),Ks=o.gql(Mi||(Mi=ne(["\n query GetOrderList($options: OrderListOptions) {\n orders(options: $options) {\n items {\n ...Order\n }\n totalItems\n }\n }\n ","\n"],["\n query GetOrderList($options: OrderListOptions) {\n orders(options: $options) {\n items {\n ...Order\n }\n totalItems\n }\n }\n ","\n"])),Ws),Qs=o.gql(Li||(Li=ne(["\n query GetOrder($id: ID!) {\n order(id: $id) {\n ...OrderDetail\n }\n }\n ","\n"],["\n query GetOrder($id: ID!) {\n order(id: $id) {\n ...OrderDetail\n }\n }\n ","\n"])),Js),Xs=o.gql(Ni||(Ni=ne(["\n mutation SettlePayment($id: ID!) {\n settlePayment(id: $id) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on SettlePaymentError {\n paymentErrorMessage\n }\n ... on PaymentStateTransitionError {\n transitionError\n }\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"],["\n mutation SettlePayment($id: ID!) {\n settlePayment(id: $id) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on SettlePaymentError {\n paymentErrorMessage\n }\n ... on PaymentStateTransitionError {\n transitionError\n }\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"])),je),el=o.gql(Ui||(Ui=ne(["\n mutation TransitionPaymentToState($id: ID!, $state: String!) {\n transitionPaymentToState(id: $id, state: $state) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on PaymentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"],["\n mutation TransitionPaymentToState($id: ID!, $state: String!) {\n transitionPaymentToState(id: $id, state: $state) {\n ... on Payment {\n id\n transactionId\n amount\n method\n state\n metadata\n }\n ...ErrorResult\n ... on PaymentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n"])),je),tl=o.gql(qi||(qi=ne(["\n mutation CreateFulfillment($input: FulfillOrderInput!) {\n addFulfillmentToOrder(input: $input) {\n ...Fulfillment\n ... on CreateFulfillmentError {\n errorCode\n message\n fulfillmentHandlerError\n }\n ... on FulfillmentStateTransitionError {\n errorCode\n message\n transitionError\n }\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreateFulfillment($input: FulfillOrderInput!) {\n addFulfillmentToOrder(input: $input) {\n ...Fulfillment\n ... on CreateFulfillmentError {\n errorCode\n message\n fulfillmentHandlerError\n }\n ... on FulfillmentStateTransitionError {\n errorCode\n message\n transitionError\n }\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Zs,je),nl=o.gql(Gi||(Gi=ne(["\n mutation CancelOrder($input: CancelOrderInput!) {\n cancelOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CancelOrder($input: CancelOrderInput!) {\n cancelOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Js,je),rl=o.gql(Vi||(Vi=ne(["\n mutation RefundOrder($input: RefundOrderInput!) {\n refundOrder(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation RefundOrder($input: RefundOrderInput!) {\n refundOrder(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Hs,je),ol=o.gql(ji||(ji=ne(["\n mutation SettleRefund($input: SettleRefundInput!) {\n settleRefund(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation SettleRefund($input: SettleRefundInput!) {\n settleRefund(input: $input) {\n ...Refund\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Hs,je),il=o.gql(Bi||(Bi=ne(["\n query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {\n order(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"],["\n query GetOrderHistory($id: ID!, $options: HistoryEntryListOptions) {\n order(id: $id) {\n id\n history(options: $options) {\n totalItems\n items {\n id\n type\n createdAt\n isPublic\n administrator {\n id\n firstName\n lastName\n }\n data\n }\n }\n }\n }\n"]))),al=o.gql(Hi||(Hi=ne(["\n mutation AddNoteToOrder($input: AddNoteToOrderInput!) {\n addNoteToOrder(input: $input) {\n id\n }\n }\n"],["\n mutation AddNoteToOrder($input: AddNoteToOrderInput!) {\n addNoteToOrder(input: $input) {\n id\n }\n }\n"]))),sl=o.gql(zi||(zi=ne(["\n mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {\n updateOrderNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"],["\n mutation UpdateOrderNote($input: UpdateOrderNoteInput!) {\n updateOrderNote(input: $input) {\n id\n data\n isPublic\n }\n }\n"]))),ll=o.gql(Wi||(Wi=ne(["\n mutation DeleteOrderNote($id: ID!) {\n deleteOrderNote(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteOrderNote($id: ID!) {\n deleteOrderNote(id: $id) {\n result\n message\n }\n }\n"]))),cl=o.gql(Zi||(Zi=ne(["\n mutation TransitionOrderToState($id: ID!, $state: String!) {\n transitionOrderToState(id: $id, state: $state) {\n ...Order\n ...ErrorResult\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"],["\n mutation TransitionOrderToState($id: ID!, $state: String!) {\n transitionOrderToState(id: $id, state: $state) {\n ...Order\n ...ErrorResult\n ... on OrderStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"])),Ws,je),ul=o.gql(Yi||(Yi=ne(["\n mutation UpdateOrderCustomFields($input: UpdateOrderInput!) {\n setOrderCustomFields(input: $input) {\n ...Order\n }\n }\n ","\n"],["\n mutation UpdateOrderCustomFields($input: UpdateOrderInput!) {\n setOrderCustomFields(input: $input) {\n ...Order\n }\n }\n ","\n"])),Ws),pl=o.gql(Ji||(Ji=ne(["\n mutation TransitionFulfillmentToState($id: ID!, $state: String!) {\n transitionFulfillmentToState(id: $id, state: $state) {\n ...Fulfillment\n ...ErrorResult\n ... on FulfillmentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"],["\n mutation TransitionFulfillmentToState($id: ID!, $state: String!) {\n transitionFulfillmentToState(id: $id, state: $state) {\n ...Fulfillment\n ...ErrorResult\n ... on FulfillmentStateTransitionError {\n transitionError\n }\n }\n }\n ","\n ","\n"])),Zs,je),dl=o.gql(Ki||(Ki=ne(["\n query GetOrderSummary($start: DateTime!, $end: DateTime!) {\n orders(options: { filter: { orderPlacedAt: { between: { start: $start, end: $end } } } }) {\n totalItems\n items {\n id\n total\n currencyCode\n }\n }\n }\n"],["\n query GetOrderSummary($start: DateTime!, $end: DateTime!) {\n orders(options: { filter: { orderPlacedAt: { between: { start: $start, end: $end } } } }) {\n totalItems\n items {\n id\n total\n currencyCode\n }\n }\n }\n"]))),ml=o.gql(Qi||(Qi=ne(["\n mutation ModifyOrder($input: ModifyOrderInput!) {\n modifyOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation ModifyOrder($input: ModifyOrderInput!) {\n modifyOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Js,je),gl=o.gql(Xi||(Xi=ne(["\n mutation AddManualPayment($input: ManualPaymentInput!) {\n addManualPaymentToOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation AddManualPayment($input: ManualPaymentInput!) {\n addManualPaymentToOrder(input: $input) {\n ...OrderDetail\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Js,je),hl=function(){function e(e){this.baseDataService=e}return e.prototype.getOrders=function(e){return void 0===e&&(e={take:10}),this.baseDataService.query(Ks,{options:e})},e.prototype.getOrder=function(e){return this.baseDataService.query(Qs,{id:e})},e.prototype.getOrderHistory=function(e,t){return this.baseDataService.query(il,{id:e,options:t})},e.prototype.settlePayment=function(e){return this.baseDataService.mutate(Xs,{id:e})},e.prototype.transitionPaymentToState=function(e,t){return this.baseDataService.mutate(el,{id:e,state:t})},e.prototype.createFulfillment=function(e){return this.baseDataService.mutate(tl,{input:e})},e.prototype.transitionFulfillmentToState=function(e,t){return this.baseDataService.mutate(pl,{id:e,state:t})},e.prototype.cancelOrder=function(e){return this.baseDataService.mutate(nl,{input:e})},e.prototype.refundOrder=function(e){return this.baseDataService.mutate(rl,{input:e})},e.prototype.settleRefund=function(e,t){return this.baseDataService.mutate(ol,{input:e})},e.prototype.addNoteToOrder=function(e){return this.baseDataService.mutate(al,{input:e})},e.prototype.updateOrderNote=function(e){return this.baseDataService.mutate(sl,{input:e})},e.prototype.deleteOrderNote=function(e){return this.baseDataService.mutate(ll,{id:e})},e.prototype.transitionToState=function(e,t){return this.baseDataService.mutate(cl,{id:e,state:t})},e.prototype.updateOrderCustomFields=function(e){return this.baseDataService.mutate(ul,{input:e})},e.prototype.getOrderSummary=function(e,t){return this.baseDataService.query(dl,{start:e.toISOString(),end:t.toISOString()})},e.prototype.modifyOrder=function(e){return this.baseDataService.mutate(ml,{input:e})},e.prototype.addManualPaymentToOrder=function(e){return this.baseDataService.mutate(gl,{input:e})},e}();e.JobState=void 0,(ea=e.JobState||(e.JobState={})).PENDING="PENDING",ea.RUNNING="RUNNING",ea.COMPLETED="COMPLETED",ea.RETRYING="RETRYING",ea.FAILED="FAILED",ea.CANCELLED="CANCELLED",e.StockMovementType=void 0,(ta=e.StockMovementType||(e.StockMovementType={})).ADJUSTMENT="ADJUSTMENT",ta.ALLOCATION="ALLOCATION",ta.RELEASE="RELEASE",ta.SALE="SALE",ta.CANCELLATION="CANCELLATION",ta.RETURN="RETURN",e.AssetType=void 0,(na=e.AssetType||(e.AssetType={})).IMAGE="IMAGE",na.VIDEO="VIDEO",na.BINARY="BINARY",e.GlobalFlag=void 0,(ra=e.GlobalFlag||(e.GlobalFlag={})).TRUE="TRUE",ra.FALSE="FALSE",ra.INHERIT="INHERIT",e.AdjustmentType=void 0,(oa=e.AdjustmentType||(e.AdjustmentType={})).PROMOTION="PROMOTION",oa.DISTRIBUTED_ORDER_PROMOTION="DISTRIBUTED_ORDER_PROMOTION",e.DeletionResult=void 0,(ia=e.DeletionResult||(e.DeletionResult={})).DELETED="DELETED",ia.NOT_DELETED="NOT_DELETED",e.Permission=void 0,(aa=e.Permission||(e.Permission={})).Authenticated="Authenticated",aa.CreateAdministrator="CreateAdministrator",aa.CreateAsset="CreateAsset",aa.CreateCatalog="CreateCatalog",aa.CreateChannel="CreateChannel",aa.CreateCollection="CreateCollection",aa.CreateCountry="CreateCountry",aa.CreateCustomer="CreateCustomer",aa.CreateCustomerGroup="CreateCustomerGroup",aa.CreateFacet="CreateFacet",aa.CreateOrder="CreateOrder",aa.CreatePaymentMethod="CreatePaymentMethod",aa.CreateProduct="CreateProduct",aa.CreatePromotion="CreatePromotion",aa.CreateSettings="CreateSettings",aa.CreateShippingMethod="CreateShippingMethod",aa.CreateSystem="CreateSystem",aa.CreateTag="CreateTag",aa.CreateTaxCategory="CreateTaxCategory",aa.CreateTaxRate="CreateTaxRate",aa.CreateZone="CreateZone",aa.DeleteAdministrator="DeleteAdministrator",aa.DeleteAsset="DeleteAsset",aa.DeleteCatalog="DeleteCatalog",aa.DeleteChannel="DeleteChannel",aa.DeleteCollection="DeleteCollection",aa.DeleteCountry="DeleteCountry",aa.DeleteCustomer="DeleteCustomer",aa.DeleteCustomerGroup="DeleteCustomerGroup",aa.DeleteFacet="DeleteFacet",aa.DeleteOrder="DeleteOrder",aa.DeletePaymentMethod="DeletePaymentMethod",aa.DeleteProduct="DeleteProduct",aa.DeletePromotion="DeletePromotion",aa.DeleteSettings="DeleteSettings",aa.DeleteShippingMethod="DeleteShippingMethod",aa.DeleteSystem="DeleteSystem",aa.DeleteTag="DeleteTag",aa.DeleteTaxCategory="DeleteTaxCategory",aa.DeleteTaxRate="DeleteTaxRate",aa.DeleteZone="DeleteZone",aa.Owner="Owner",aa.Placeholder="Placeholder",aa.Public="Public",aa.ReadAdministrator="ReadAdministrator",aa.ReadAsset="ReadAsset",aa.ReadCatalog="ReadCatalog",aa.ReadChannel="ReadChannel",aa.ReadCollection="ReadCollection",aa.ReadCountry="ReadCountry",aa.ReadCustomer="ReadCustomer",aa.ReadCustomerGroup="ReadCustomerGroup",aa.ReadFacet="ReadFacet",aa.ReadOrder="ReadOrder",aa.ReadPaymentMethod="ReadPaymentMethod",aa.ReadProduct="ReadProduct",aa.ReadPromotion="ReadPromotion",aa.ReadSettings="ReadSettings",aa.ReadShippingMethod="ReadShippingMethod",aa.ReadSystem="ReadSystem",aa.ReadTag="ReadTag",aa.ReadTaxCategory="ReadTaxCategory",aa.ReadTaxRate="ReadTaxRate",aa.ReadZone="ReadZone",aa.SuperAdmin="SuperAdmin",aa.UpdateAdministrator="UpdateAdministrator",aa.UpdateAsset="UpdateAsset",aa.UpdateCatalog="UpdateCatalog",aa.UpdateChannel="UpdateChannel",aa.UpdateCollection="UpdateCollection",aa.UpdateCountry="UpdateCountry",aa.UpdateCustomer="UpdateCustomer",aa.UpdateCustomerGroup="UpdateCustomerGroup",aa.UpdateFacet="UpdateFacet",aa.UpdateGlobalSettings="UpdateGlobalSettings",aa.UpdateOrder="UpdateOrder",aa.UpdatePaymentMethod="UpdatePaymentMethod",aa.UpdateProduct="UpdateProduct",aa.UpdatePromotion="UpdatePromotion",aa.UpdateSettings="UpdateSettings",aa.UpdateShippingMethod="UpdateShippingMethod",aa.UpdateSystem="UpdateSystem",aa.UpdateTag="UpdateTag",aa.UpdateTaxCategory="UpdateTaxCategory",aa.UpdateTaxRate="UpdateTaxRate",aa.UpdateZone="UpdateZone",e.SortOrder=void 0,(sa=e.SortOrder||(e.SortOrder={})).ASC="ASC",sa.DESC="DESC",e.ErrorCode=void 0,(la=e.ErrorCode||(e.ErrorCode={})).UNKNOWN_ERROR="UNKNOWN_ERROR",la.MIME_TYPE_ERROR="MIME_TYPE_ERROR",la.LANGUAGE_NOT_AVAILABLE_ERROR="LANGUAGE_NOT_AVAILABLE_ERROR",la.CHANNEL_DEFAULT_LANGUAGE_ERROR="CHANNEL_DEFAULT_LANGUAGE_ERROR",la.SETTLE_PAYMENT_ERROR="SETTLE_PAYMENT_ERROR",la.EMPTY_ORDER_LINE_SELECTION_ERROR="EMPTY_ORDER_LINE_SELECTION_ERROR",la.ITEMS_ALREADY_FULFILLED_ERROR="ITEMS_ALREADY_FULFILLED_ERROR",la.INVALID_FULFILLMENT_HANDLER_ERROR="INVALID_FULFILLMENT_HANDLER_ERROR",la.CREATE_FULFILLMENT_ERROR="CREATE_FULFILLMENT_ERROR",la.INSUFFICIENT_STOCK_ON_HAND_ERROR="INSUFFICIENT_STOCK_ON_HAND_ERROR",la.MULTIPLE_ORDER_ERROR="MULTIPLE_ORDER_ERROR",la.CANCEL_ACTIVE_ORDER_ERROR="CANCEL_ACTIVE_ORDER_ERROR",la.PAYMENT_ORDER_MISMATCH_ERROR="PAYMENT_ORDER_MISMATCH_ERROR",la.REFUND_ORDER_STATE_ERROR="REFUND_ORDER_STATE_ERROR",la.NOTHING_TO_REFUND_ERROR="NOTHING_TO_REFUND_ERROR",la.ALREADY_REFUNDED_ERROR="ALREADY_REFUNDED_ERROR",la.QUANTITY_TOO_GREAT_ERROR="QUANTITY_TOO_GREAT_ERROR",la.REFUND_STATE_TRANSITION_ERROR="REFUND_STATE_TRANSITION_ERROR",la.PAYMENT_STATE_TRANSITION_ERROR="PAYMENT_STATE_TRANSITION_ERROR",la.FULFILLMENT_STATE_TRANSITION_ERROR="FULFILLMENT_STATE_TRANSITION_ERROR",la.ORDER_MODIFICATION_STATE_ERROR="ORDER_MODIFICATION_STATE_ERROR",la.NO_CHANGES_SPECIFIED_ERROR="NO_CHANGES_SPECIFIED_ERROR",la.PAYMENT_METHOD_MISSING_ERROR="PAYMENT_METHOD_MISSING_ERROR",la.REFUND_PAYMENT_ID_MISSING_ERROR="REFUND_PAYMENT_ID_MISSING_ERROR",la.MANUAL_PAYMENT_STATE_ERROR="MANUAL_PAYMENT_STATE_ERROR",la.PRODUCT_OPTION_IN_USE_ERROR="PRODUCT_OPTION_IN_USE_ERROR",la.MISSING_CONDITIONS_ERROR="MISSING_CONDITIONS_ERROR",la.NATIVE_AUTH_STRATEGY_ERROR="NATIVE_AUTH_STRATEGY_ERROR",la.INVALID_CREDENTIALS_ERROR="INVALID_CREDENTIALS_ERROR",la.ORDER_STATE_TRANSITION_ERROR="ORDER_STATE_TRANSITION_ERROR",la.EMAIL_ADDRESS_CONFLICT_ERROR="EMAIL_ADDRESS_CONFLICT_ERROR",la.ORDER_LIMIT_ERROR="ORDER_LIMIT_ERROR",la.NEGATIVE_QUANTITY_ERROR="NEGATIVE_QUANTITY_ERROR",la.INSUFFICIENT_STOCK_ERROR="INSUFFICIENT_STOCK_ERROR",e.LogicalOperator=void 0,(ca=e.LogicalOperator||(e.LogicalOperator={})).AND="AND",ca.OR="OR",e.CurrencyCode=void 0,(ua=e.CurrencyCode||(e.CurrencyCode={})).AED="AED",ua.AFN="AFN",ua.ALL="ALL",ua.AMD="AMD",ua.ANG="ANG",ua.AOA="AOA",ua.ARS="ARS",ua.AUD="AUD",ua.AWG="AWG",ua.AZN="AZN",ua.BAM="BAM",ua.BBD="BBD",ua.BDT="BDT",ua.BGN="BGN",ua.BHD="BHD",ua.BIF="BIF",ua.BMD="BMD",ua.BND="BND",ua.BOB="BOB",ua.BRL="BRL",ua.BSD="BSD",ua.BTN="BTN",ua.BWP="BWP",ua.BYN="BYN",ua.BZD="BZD",ua.CAD="CAD",ua.CDF="CDF",ua.CHF="CHF",ua.CLP="CLP",ua.CNY="CNY",ua.COP="COP",ua.CRC="CRC",ua.CUC="CUC",ua.CUP="CUP",ua.CVE="CVE",ua.CZK="CZK",ua.DJF="DJF",ua.DKK="DKK",ua.DOP="DOP",ua.DZD="DZD",ua.EGP="EGP",ua.ERN="ERN",ua.ETB="ETB",ua.EUR="EUR",ua.FJD="FJD",ua.FKP="FKP",ua.GBP="GBP",ua.GEL="GEL",ua.GHS="GHS",ua.GIP="GIP",ua.GMD="GMD",ua.GNF="GNF",ua.GTQ="GTQ",ua.GYD="GYD",ua.HKD="HKD",ua.HNL="HNL",ua.HRK="HRK",ua.HTG="HTG",ua.HUF="HUF",ua.IDR="IDR",ua.ILS="ILS",ua.INR="INR",ua.IQD="IQD",ua.IRR="IRR",ua.ISK="ISK",ua.JMD="JMD",ua.JOD="JOD",ua.JPY="JPY",ua.KES="KES",ua.KGS="KGS",ua.KHR="KHR",ua.KMF="KMF",ua.KPW="KPW",ua.KRW="KRW",ua.KWD="KWD",ua.KYD="KYD",ua.KZT="KZT",ua.LAK="LAK",ua.LBP="LBP",ua.LKR="LKR",ua.LRD="LRD",ua.LSL="LSL",ua.LYD="LYD",ua.MAD="MAD",ua.MDL="MDL",ua.MGA="MGA",ua.MKD="MKD",ua.MMK="MMK",ua.MNT="MNT",ua.MOP="MOP",ua.MRU="MRU",ua.MUR="MUR",ua.MVR="MVR",ua.MWK="MWK",ua.MXN="MXN",ua.MYR="MYR",ua.MZN="MZN",ua.NAD="NAD",ua.NGN="NGN",ua.NIO="NIO",ua.NOK="NOK",ua.NPR="NPR",ua.NZD="NZD",ua.OMR="OMR",ua.PAB="PAB",ua.PEN="PEN",ua.PGK="PGK",ua.PHP="PHP",ua.PKR="PKR",ua.PLN="PLN",ua.PYG="PYG",ua.QAR="QAR",ua.RON="RON",ua.RSD="RSD",ua.RUB="RUB",ua.RWF="RWF",ua.SAR="SAR",ua.SBD="SBD",ua.SCR="SCR",ua.SDG="SDG",ua.SEK="SEK",ua.SGD="SGD",ua.SHP="SHP",ua.SLL="SLL",ua.SOS="SOS",ua.SRD="SRD",ua.SSP="SSP",ua.STN="STN",ua.SVC="SVC",ua.SYP="SYP",ua.SZL="SZL",ua.THB="THB",ua.TJS="TJS",ua.TMT="TMT",ua.TND="TND",ua.TOP="TOP",ua.TRY="TRY",ua.TTD="TTD",ua.TWD="TWD",ua.TZS="TZS",ua.UAH="UAH",ua.UGX="UGX",ua.USD="USD",ua.UYU="UYU",ua.UZS="UZS",ua.VES="VES",ua.VND="VND",ua.VUV="VUV",ua.WST="WST",ua.XAF="XAF",ua.XCD="XCD",ua.XOF="XOF",ua.XPF="XPF",ua.YER="YER",ua.ZAR="ZAR",ua.ZMW="ZMW",ua.ZWL="ZWL",e.HistoryEntryType=void 0,(pa=e.HistoryEntryType||(e.HistoryEntryType={})).CUSTOMER_REGISTERED="CUSTOMER_REGISTERED",pa.CUSTOMER_VERIFIED="CUSTOMER_VERIFIED",pa.CUSTOMER_DETAIL_UPDATED="CUSTOMER_DETAIL_UPDATED",pa.CUSTOMER_ADDED_TO_GROUP="CUSTOMER_ADDED_TO_GROUP",pa.CUSTOMER_REMOVED_FROM_GROUP="CUSTOMER_REMOVED_FROM_GROUP",pa.CUSTOMER_ADDRESS_CREATED="CUSTOMER_ADDRESS_CREATED",pa.CUSTOMER_ADDRESS_UPDATED="CUSTOMER_ADDRESS_UPDATED",pa.CUSTOMER_ADDRESS_DELETED="CUSTOMER_ADDRESS_DELETED",pa.CUSTOMER_PASSWORD_UPDATED="CUSTOMER_PASSWORD_UPDATED",pa.CUSTOMER_PASSWORD_RESET_REQUESTED="CUSTOMER_PASSWORD_RESET_REQUESTED",pa.CUSTOMER_PASSWORD_RESET_VERIFIED="CUSTOMER_PASSWORD_RESET_VERIFIED",pa.CUSTOMER_EMAIL_UPDATE_REQUESTED="CUSTOMER_EMAIL_UPDATE_REQUESTED",pa.CUSTOMER_EMAIL_UPDATE_VERIFIED="CUSTOMER_EMAIL_UPDATE_VERIFIED",pa.CUSTOMER_NOTE="CUSTOMER_NOTE",pa.ORDER_STATE_TRANSITION="ORDER_STATE_TRANSITION",pa.ORDER_PAYMENT_TRANSITION="ORDER_PAYMENT_TRANSITION",pa.ORDER_FULFILLMENT="ORDER_FULFILLMENT",pa.ORDER_CANCELLATION="ORDER_CANCELLATION",pa.ORDER_REFUND_TRANSITION="ORDER_REFUND_TRANSITION",pa.ORDER_FULFILLMENT_TRANSITION="ORDER_FULFILLMENT_TRANSITION",pa.ORDER_NOTE="ORDER_NOTE",pa.ORDER_COUPON_APPLIED="ORDER_COUPON_APPLIED",pa.ORDER_COUPON_REMOVED="ORDER_COUPON_REMOVED",pa.ORDER_MODIFIED="ORDER_MODIFIED",e.LanguageCode=void 0,(da=e.LanguageCode||(e.LanguageCode={})).af="af",da.ak="ak",da.am="am",da.ar="ar",da.as="as",da.az="az",da.be="be",da.bg="bg",da.bm="bm",da.bn="bn",da.bo="bo",da.br="br",da.bs="bs",da.ca="ca",da.ce="ce",da.co="co",da.cs="cs",da.cu="cu",da.cy="cy",da.da="da",da.de="de",da.de_AT="de_AT",da.de_CH="de_CH",da.dz="dz",da.ee="ee",da.el="el",da.en="en",da.en_AU="en_AU",da.en_CA="en_CA",da.en_GB="en_GB",da.en_US="en_US",da.eo="eo",da.es="es",da.es_ES="es_ES",da.es_MX="es_MX",da.et="et",da.eu="eu",da.fa="fa",da.fa_AF="fa_AF",da.ff="ff",da.fi="fi",da.fo="fo",da.fr="fr",da.fr_CA="fr_CA",da.fr_CH="fr_CH",da.fy="fy",da.ga="ga",da.gd="gd",da.gl="gl",da.gu="gu",da.gv="gv",da.ha="ha",da.he="he",da.hi="hi",da.hr="hr",da.ht="ht",da.hu="hu",da.hy="hy",da.ia="ia",da.id="id",da.ig="ig",da.ii="ii",da.is="is",da.it="it",da.ja="ja",da.jv="jv",da.ka="ka",da.ki="ki",da.kk="kk",da.kl="kl",da.km="km",da.kn="kn",da.ko="ko",da.ks="ks",da.ku="ku",da.kw="kw",da.ky="ky",da.la="la",da.lb="lb",da.lg="lg",da.ln="ln",da.lo="lo",da.lt="lt",da.lu="lu",da.lv="lv",da.mg="mg",da.mi="mi",da.mk="mk",da.ml="ml",da.mn="mn",da.mr="mr",da.ms="ms",da.mt="mt",da.my="my",da.nb="nb",da.nd="nd",da.ne="ne",da.nl="nl",da.nl_BE="nl_BE",da.nn="nn",da.ny="ny",da.om="om",da.or="or",da.os="os",da.pa="pa",da.pl="pl",da.ps="ps",da.pt="pt",da.pt_BR="pt_BR",da.pt_PT="pt_PT",da.qu="qu",da.rm="rm",da.rn="rn",da.ro="ro",da.ro_MD="ro_MD",da.ru="ru",da.rw="rw",da.sa="sa",da.sd="sd",da.se="se",da.sg="sg",da.si="si",da.sk="sk",da.sl="sl",da.sm="sm",da.sn="sn",da.so="so",da.sq="sq",da.sr="sr",da.st="st",da.su="su",da.sv="sv",da.sw="sw",da.sw_CD="sw_CD",da.ta="ta",da.te="te",da.tg="tg",da.th="th",da.ti="ti",da.tk="tk",da.to="to",da.tr="tr",da.tt="tt",da.ug="ug",da.uk="uk",da.ur="ur",da.uz="uz",da.vi="vi",da.vo="vo",da.wo="wo",da.xh="xh",da.yi="yi",da.yo="yo",da.zh="zh",da.zh_Hans="zh_Hans",da.zh_Hant="zh_Hant",da.zu="zu";var fl,yl,vl,Cl,bl,Sl,Il,Tl,Dl,Al,El,Rl,Pl,Ol,kl,wl,xl=function(){function t(e){this.baseDataService=e}return t.prototype.searchProducts=function(e,t,n){return void 0===t&&(t=10),void 0===n&&(n=0),this.baseDataService.query(qa,{input:{term:e,take:t,skip:n,groupByProduct:!0}})},t.prototype.productSelectorSearch=function(e,t){return this.baseDataService.query(Ga,{take:t,term:e})},t.prototype.reindex=function(){return this.baseDataService.mutate(Lr)},t.prototype.getProducts=function(e){return this.baseDataService.query(Fa,{options:e})},t.prototype.getProduct=function(e){return this.baseDataService.query(wa,{id:e})},t.prototype.getProductSimple=function(e){return this.baseDataService.query(xa,{id:e})},t.prototype.getProductVariants=function(e){return this.baseDataService.query(Ja,{options:e})},t.prototype.getProductVariant=function(e){return this.baseDataService.query(Ya,{id:e})},t.prototype.getProductVariantsOptions=function(e){return this.baseDataService.query(Ba,{id:e})},t.prototype.getProductOptionGroup=function(e){return this.baseDataService.query(Ra,{id:e})},t.prototype.createProduct=function(e){var t={input:p.pick(e,["enabled","translations","customFields","assetIds","featuredAssetId","facetValueIds"])};return this.baseDataService.mutate(Ia,t)},t.prototype.updateProduct=function(e){var t={input:p.pick(e,["id","enabled","translations","customFields","assetIds","featuredAssetId","facetValueIds"])};return this.baseDataService.mutate(Sa,t)},t.prototype.deleteProduct=function(e){return this.baseDataService.mutate(Ta,{id:e})},t.prototype.createProductVariants=function(e){return this.baseDataService.mutate(Da,{input:e})},t.prototype.updateProductVariants=function(e){var t={input:e.map(p.pick(["id","enabled","translations","sku","price","taxCategoryId","facetValueIds","featuredAssetId","assetIds","trackInventory","outOfStockThreshold","useGlobalOutOfStockThreshold","stockOnHand","customFields"]))};return this.baseDataService.mutate(Aa,t)},t.prototype.deleteProductVariant=function(e){return this.baseDataService.mutate(ja,{id:e})},t.prototype.createProductOptionGroups=function(e){var t={input:e};return this.baseDataService.mutate(Ea,t)},t.prototype.addOptionGroupToProduct=function(e){return this.baseDataService.mutate(Oa,e)},t.prototype.addOptionToGroup=function(e){return this.baseDataService.mutate(Pa,{input:e})},t.prototype.removeOptionGroupFromProduct=function(e){return this.baseDataService.mutate(ka,e)},t.prototype.updateProductOption=function(e){return this.baseDataService.mutate(Va,{input:p.pick(e,["id","code","translations","customFields"])})},t.prototype.getProductOptionGroups=function(e){return this.baseDataService.query($a,{filterTerm:e})},t.prototype.getAssetList=function(t,n){return void 0===t&&(t=10),void 0===n&&(n=0),this.baseDataService.query(_a,{options:{skip:n,take:t,sort:{createdAt:e.SortOrder.DESC}}})},t.prototype.getAsset=function(e){return this.baseDataService.query(Ma,{id:e})},t.prototype.createAssets=function(e){return this.baseDataService.mutate(La,{input:e.map((function(e){return{file:e}}))})},t.prototype.updateAsset=function(e){return this.baseDataService.mutate(Na,{input:e})},t.prototype.deleteAssets=function(e,t){return this.baseDataService.mutate(Ua,{input:{assetIds:e,force:t}})},t.prototype.assignProductsToChannel=function(e){return this.baseDataService.mutate(Ha,{input:e})},t.prototype.removeProductsFromChannel=function(e){return this.baseDataService.mutate(Wa,{input:e})},t.prototype.assignVariantsToChannel=function(e){return this.baseDataService.mutate(za,{input:e})},t.prototype.removeVariantsFromChannel=function(e){return this.baseDataService.mutate(Za,{input:e})},t.prototype.getTag=function(e){return this.baseDataService.query(Qa,{id:e})},t.prototype.getTagList=function(e){return this.baseDataService.query(Ka,{options:e})},t.prototype.createTag=function(e){return this.baseDataService.mutate(Xa,{input:e})},t.prototype.updateTag=function(e){return this.baseDataService.mutate(es,{input:e})},t.prototype.deleteTag=function(e){return this.baseDataService.mutate(ts,{id:e})},t}(),Fl=o.gql(fl||(fl=ne(["\n fragment Promotion on Promotion {\n id\n createdAt\n updatedAt\n name\n enabled\n couponCode\n perCustomerUsageLimit\n startsAt\n endsAt\n conditions {\n ...ConfigurableOperation\n }\n actions {\n ...ConfigurableOperation\n }\n }\n ","\n"],["\n fragment Promotion on Promotion {\n id\n createdAt\n updatedAt\n name\n enabled\n couponCode\n perCustomerUsageLimit\n startsAt\n endsAt\n conditions {\n ...ConfigurableOperation\n }\n actions {\n ...ConfigurableOperation\n }\n }\n ","\n"])),Ge),$l=o.gql(yl||(yl=ne(["\n query GetPromotionList($options: PromotionListOptions) {\n promotions(options: $options) {\n items {\n ...Promotion\n }\n totalItems\n }\n }\n ","\n"],["\n query GetPromotionList($options: PromotionListOptions) {\n promotions(options: $options) {\n items {\n ...Promotion\n }\n totalItems\n }\n }\n ","\n"])),Fl),_l=o.gql(vl||(vl=ne(["\n query GetPromotion($id: ID!) {\n promotion(id: $id) {\n ...Promotion\n }\n }\n ","\n"],["\n query GetPromotion($id: ID!) {\n promotion(id: $id) {\n ...Promotion\n }\n }\n ","\n"])),Fl),Ml=o.gql(Cl||(Cl=ne(["\n query GetAdjustmentOperations {\n promotionConditions {\n ...ConfigurableOperationDef\n }\n promotionActions {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetAdjustmentOperations {\n promotionConditions {\n ...ConfigurableOperationDef\n }\n promotionActions {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),Ll=o.gql(bl||(bl=ne(["\n mutation CreatePromotion($input: CreatePromotionInput!) {\n createPromotion(input: $input) {\n ...Promotion\n ...ErrorResult\n }\n }\n ","\n ","\n"],["\n mutation CreatePromotion($input: CreatePromotionInput!) {\n createPromotion(input: $input) {\n ...Promotion\n ...ErrorResult\n }\n }\n ","\n ","\n"])),Fl,je),Nl=o.gql(Sl||(Sl=ne(["\n mutation UpdatePromotion($input: UpdatePromotionInput!) {\n updatePromotion(input: $input) {\n ...Promotion\n }\n }\n ","\n"],["\n mutation UpdatePromotion($input: UpdatePromotionInput!) {\n updatePromotion(input: $input) {\n ...Promotion\n }\n }\n ","\n"])),Fl),Ul=o.gql(Il||(Il=ne(["\n mutation DeletePromotion($id: ID!) {\n deletePromotion(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeletePromotion($id: ID!) {\n deletePromotion(id: $id) {\n result\n message\n }\n }\n"]))),ql=function(){function e(e){this.baseDataService=e}return e.prototype.getPromotions=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query($l,{options:{take:e,skip:t}})},e.prototype.getPromotion=function(e){return this.baseDataService.query(_l,{id:e})},e.prototype.getPromotionActionsAndConditions=function(){return this.baseDataService.query(Ml)},e.prototype.createPromotion=function(e){return this.baseDataService.mutate(Ll,{input:e})},e.prototype.updatePromotion=function(e){return this.baseDataService.mutate(Nl,{input:e})},e.prototype.deletePromotion=function(e){return this.baseDataService.mutate(Ul,{id:e})},e}(),Gl=function(){function t(e){this.baseDataService=e}return t.prototype.getCountries=function(e,t,n){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(xn,{options:{take:e,skip:t,filter:{name:n?{contains:n}:null}}})},t.prototype.getAvailableCountries=function(){return this.baseDataService.query(Fn)},t.prototype.getCountry=function(e){return this.baseDataService.query($n,{id:e})},t.prototype.createCountry=function(e){return this.baseDataService.mutate(_n,{input:p.pick(e,["code","enabled","translations"])})},t.prototype.updateCountry=function(e){return this.baseDataService.mutate(Mn,{input:p.pick(e,["id","code","enabled","translations"])})},t.prototype.deleteCountry=function(e){return this.baseDataService.mutate(Ln,{id:e})},t.prototype.getZones=function(){return this.baseDataService.query(Un)},t.prototype.getZone=function(e){return this.baseDataService.query(Un,{id:e})},t.prototype.createZone=function(e){return this.baseDataService.mutate(Gn,{input:e})},t.prototype.updateZone=function(e){return this.baseDataService.mutate(Vn,{input:e})},t.prototype.deleteZone=function(e){return this.baseDataService.mutate(jn,{id:e})},t.prototype.addMembersToZone=function(e,t){return this.baseDataService.mutate(Bn,{zoneId:e,memberIds:t})},t.prototype.removeMembersFromZone=function(e,t){return this.baseDataService.mutate(Hn,{zoneId:e,memberIds:t})},t.prototype.getTaxCategories=function(){return this.baseDataService.query(Wn)},t.prototype.getTaxCategory=function(e){return this.baseDataService.query(Zn,{id:e})},t.prototype.createTaxCategory=function(e){return this.baseDataService.mutate(Yn,{input:e})},t.prototype.updateTaxCategory=function(e){return this.baseDataService.mutate(Jn,{input:e})},t.prototype.deleteTaxCategory=function(e){return this.baseDataService.mutate(Kn,{id:e})},t.prototype.getTaxRates=function(e,t,n){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(Xn,{options:{take:e,skip:t}},n)},t.prototype.getTaxRate=function(e){return this.baseDataService.query(er,{id:e})},t.prototype.createTaxRate=function(e){return this.baseDataService.mutate(tr,{input:e})},t.prototype.updateTaxRate=function(e){return this.baseDataService.mutate(nr,{input:e})},t.prototype.deleteTaxRate=function(e){return this.baseDataService.mutate(rr,{id:e})},t.prototype.getChannels=function(){return this.baseDataService.query(ir)},t.prototype.getChannel=function(e){return this.baseDataService.query(ar,{id:e})},t.prototype.getActiveChannel=function(e){return this.baseDataService.query(sr,{},e)},t.prototype.createChannel=function(e){return this.baseDataService.mutate(lr,{input:e})},t.prototype.updateChannel=function(e){return this.baseDataService.mutate(cr,{input:e})},t.prototype.deleteChannel=function(e){return this.baseDataService.mutate(ur,{id:e})},t.prototype.getPaymentMethods=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(dr,{options:{skip:t,take:e}})},t.prototype.getPaymentMethod=function(e){return this.baseDataService.query(gr,{id:e})},t.prototype.createPaymentMethod=function(e){return this.baseDataService.mutate(hr,{input:e})},t.prototype.updatePaymentMethod=function(e){return this.baseDataService.mutate(fr,{input:e})},t.prototype.deletePaymentMethod=function(e,t){return this.baseDataService.mutate(yr,{id:e,force:t})},t.prototype.getPaymentMethodOperations=function(){return this.baseDataService.query(mr)},t.prototype.getGlobalSettings=function(e){return this.baseDataService.query(Cr,void 0,e)},t.prototype.updateGlobalSettings=function(e){return this.baseDataService.mutate(br,{input:e})},t.prototype.getJob=function(e){return this.baseDataService.query(xr,{id:e})},t.prototype.pollJobs=function(e){return this.baseDataService.query($r,{ids:e})},t.prototype.getAllJobs=function(e){return this.baseDataService.query(Fr,{options:e})},t.prototype.getJobQueues=function(){return this.baseDataService.query(_r)},t.prototype.getRunningJobs=function(){return this.baseDataService.query(Fr,{options:{filter:{state:{eq:e.JobState.RUNNING}}}})},t.prototype.cancelJob=function(e){return this.baseDataService.mutate(Mr,{id:e})},t}(),Vl=o.gql(Tl||(Tl=ne(["\n fragment ShippingMethod on ShippingMethod {\n id\n createdAt\n updatedAt\n code\n name\n description\n fulfillmentHandlerCode\n checker {\n ...ConfigurableOperation\n }\n calculator {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n description\n }\n }\n ","\n"],["\n fragment ShippingMethod on ShippingMethod {\n id\n createdAt\n updatedAt\n code\n name\n description\n fulfillmentHandlerCode\n checker {\n ...ConfigurableOperation\n }\n calculator {\n ...ConfigurableOperation\n }\n translations {\n id\n languageCode\n name\n description\n }\n }\n ","\n"])),Ge),jl=o.gql(Dl||(Dl=ne(["\n query GetShippingMethodList($options: ShippingMethodListOptions) {\n shippingMethods(options: $options) {\n items {\n ...ShippingMethod\n }\n totalItems\n }\n }\n ","\n"],["\n query GetShippingMethodList($options: ShippingMethodListOptions) {\n shippingMethods(options: $options) {\n items {\n ...ShippingMethod\n }\n totalItems\n }\n }\n ","\n"])),Vl),Bl=o.gql(Al||(Al=ne(["\n query GetShippingMethod($id: ID!) {\n shippingMethod(id: $id) {\n ...ShippingMethod\n }\n }\n ","\n"],["\n query GetShippingMethod($id: ID!) {\n shippingMethod(id: $id) {\n ...ShippingMethod\n }\n }\n ","\n"])),Vl),Hl=o.gql(El||(El=ne(["\n query GetShippingMethodOperations {\n shippingEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n shippingCalculators {\n ...ConfigurableOperationDef\n }\n fulfillmentHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"],["\n query GetShippingMethodOperations {\n shippingEligibilityCheckers {\n ...ConfigurableOperationDef\n }\n shippingCalculators {\n ...ConfigurableOperationDef\n }\n fulfillmentHandlers {\n ...ConfigurableOperationDef\n }\n }\n ","\n"])),Ve),zl=o.gql(Rl||(Rl=ne(["\n mutation CreateShippingMethod($input: CreateShippingMethodInput!) {\n createShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"],["\n mutation CreateShippingMethod($input: CreateShippingMethodInput!) {\n createShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"])),Vl),Wl=o.gql(Pl||(Pl=ne(["\n mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {\n updateShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"],["\n mutation UpdateShippingMethod($input: UpdateShippingMethodInput!) {\n updateShippingMethod(input: $input) {\n ...ShippingMethod\n }\n }\n ","\n"])),Vl),Zl=o.gql(Ol||(Ol=ne(["\n mutation DeleteShippingMethod($id: ID!) {\n deleteShippingMethod(id: $id) {\n result\n message\n }\n }\n"],["\n mutation DeleteShippingMethod($id: ID!) {\n deleteShippingMethod(id: $id) {\n result\n message\n }\n }\n"]))),Yl=o.gql(kl||(kl=ne(["\n query TestShippingMethod($input: TestShippingMethodInput!) {\n testShippingMethod(input: $input) {\n eligible\n quote {\n price\n priceWithTax\n metadata\n }\n }\n }\n"],["\n query TestShippingMethod($input: TestShippingMethodInput!) {\n testShippingMethod(input: $input) {\n eligible\n quote {\n price\n priceWithTax\n metadata\n }\n }\n }\n"]))),Jl=o.gql(wl||(wl=ne(["\n query TestEligibleShippingMethods($input: TestEligibleShippingMethodsInput!) {\n testEligibleShippingMethods(input: $input) {\n id\n name\n code\n description\n price\n priceWithTax\n metadata\n }\n }\n"],["\n query TestEligibleShippingMethods($input: TestEligibleShippingMethodsInput!) {\n testEligibleShippingMethods(input: $input) {\n id\n name\n code\n description\n price\n priceWithTax\n metadata\n }\n }\n"]))),Kl=function(){function e(e){this.baseDataService=e}return e.prototype.getShippingMethods=function(e,t){return void 0===e&&(e=10),void 0===t&&(t=0),this.baseDataService.query(jl,{options:{take:e,skip:t}})},e.prototype.getShippingMethod=function(e){return this.baseDataService.query(Bl,{id:e})},e.prototype.getShippingMethodOperations=function(){return this.baseDataService.query(Hl)},e.prototype.createShippingMethod=function(e){var t={input:p.pick(e,["code","checker","calculator","fulfillmentHandler","customFields","translations"])};return this.baseDataService.mutate(zl,t)},e.prototype.updateShippingMethod=function(e){var t={input:p.pick(e,["id","code","checker","calculator","fulfillmentHandler","customFields","translations"])};return this.baseDataService.mutate(Wl,t)},e.prototype.deleteShippingMethod=function(e){return this.baseDataService.mutate(Zl,{id:e})},e.prototype.testShippingMethod=function(e){return this.baseDataService.query(Yl,{input:e})},e.prototype.testEligibleShippingMethods=function(e){return this.baseDataService.query(Jl,{input:e})},e}(),Ql=function(){function e(e){this.baseDataService=e,this.promotion=new ql(e),this.administrator=new qe(e),this.auth=new Ze(e),this.collection=new ps(e),this.product=new xl(e),this.client=new ma(e),this.facet=new js(e),this.order=new hl(e),this.settings=new Gl(e),this.customer=new xs(e),this.shippingMethod=new Kl(e)}return e.prototype.query=function(e,t,n){return void 0===n&&(n="cache-and-network"),this.baseDataService.query(e,t,n)},e.prototype.mutate=function(e,t,n){return this.baseDataService.mutate(e,t,n)},e}();Ql.decorators=[{type:t.Injectable}],Ql.ctorParameters=function(){return[{type:eo}]};var Xl,ec=function(){function e(e,t){this.dataService=e,this.document=t,this._document=t}return e.prototype.ngOnInit=function(){var e=this;this.loading$=this.dataService.client.getNetworkStatus().stream$.pipe(r.map((function(e){return 0<e.networkStatus.inFlightRequests}))),this.dataService.client.uiState().mapStream((function(e){return e.uiState.theme})).subscribe((function(t){var n;null===(n=e._document)||void 0===n||n.body.setAttribute("data-theme",t)}))},e}();function tc(){if(!Xl)throw new Error("vendure ui config not loaded");return Xl}function nc(){return tc().defaultLanguage}ec.decorators=[{type:t.Component,args:[{selector:"vdr-root",template:'<div class="progress loop" [class.visible]="loading$ | async"></div>\r\n<router-outlet></router-outlet>\r\n<vdr-overlay-host></vdr-overlay-host>\r\n',styles:[".progress{position:absolute;overflow:hidden;height:4px;background-color:var(--color-grey-500);opacity:0;transition:opacity .1s}.progress.visible{opacity:1}"]}]}],ec.ctorParameters=function(){return[{type:Ql},{type:void 0,decorators:[{type:t.Inject,args:[n.DOCUMENT]}]}]};var rc=function(){function e(e,t,n){this.localStorageService=e,this.dataService=t,this.serverConfigService=n}return e.prototype.logIn=function(e,t,n){var o=this;return this.dataService.auth.attemptLogin(e,t,n).pipe(r.switchMap((function(e){return"CurrentUser"===e.login.__typename&&o.setChannelToken(e.login.channels),o.serverConfigService.getServerConfig().then((function(){return e.login}))})),r.switchMap((function(t){if("CurrentUser"===t.__typename){var n=o.getActiveChannel(t.channels).id;return o.dataService.client.loginSuccess(e,n,t.channels).pipe(r.map((function(){return t})))}return c.of(t)})))},e.prototype.logOut=function(){var e=this;return this.dataService.client.userStatus().single$.pipe(r.switchMap((function(t){return t.userStatus.isLoggedIn?e.dataService.client.logOut().pipe(r.mergeMap((function(){return e.dataService.auth.logOut()}))):[]})),r.mapTo(!0))},e.prototype.checkAuthenticatedStatus=function(){var e=this;return this.dataService.client.userStatus().single$.pipe(r.mergeMap((function(t){return t.userStatus.isLoggedIn?c.of(!0):e.validateAuthToken()})))},e.prototype.validateAuthToken=function(){var e=this;return this.dataService.auth.currentUser().single$.pipe(r.mergeMap((function(t){if(!t.me)return c.of(!1);e.setChannelToken(t.me.channels);var n=e.getActiveChannel(t.me.channels).id;return e.dataService.client.loginSuccess(t.me.identifier,n,t.me.channels)})),r.mapTo(!0),r.catchError((function(e){return c.of(!1)})))},e.prototype.getActiveChannel=function(e){var t=this.localStorageService.get("activeChannelToken");if(t){var n=e.find((function(e){return e.token===t}));if(n)return n}return e.find((function(e){return e.code===y.DEFAULT_CHANNEL_CODE}))||e[0]},e.prototype.setChannelToken=function(e){this.localStorageService.set("activeChannelToken",this.getActiveChannel(e).token)},e}();rc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new rc(t.ɵɵinject(Ye),t.ɵɵinject(Ql),t.ɵɵinject(Ur))},token:rc,providedIn:"root"}),rc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],rc.ctorParameters=function(){return[{type:Ye},{type:Ql},{type:Ur}]};var oc=function(){function e(e){this.ngxTranslate=e,this._availableLanguages=[]}return Object.defineProperty(e.prototype,"availableLanguages",{get:function(){return te(this._availableLanguages)},enumerable:!1,configurable:!0}),e.prototype.setDefaultLanguage=function(e){this.ngxTranslate.setDefaultLang(e)},e.prototype.setLanguage=function(e){this.ngxTranslate.use(e)},e.prototype.setAvailableLanguages=function(e){this._availableLanguages=e},e.prototype.translate=function(e,t){return this.ngxTranslate.instant(e,t)},e}();oc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new oc(t.ɵɵinject(g.TranslateService))},token:oc,providedIn:"root"}),oc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],oc.ctorParameters=function(){return[{type:g.TranslateService}]};var ic=function(){function e(){this.titleTemplateRef$=new c.Subject,this.buttonsTemplateRef$=new c.Subject}return e.prototype.onCreate=function(e){var t=this;if(e.resolveWith=function(e){t.closeModal(e)},this.options&&this.options.locals)for(var n in this.options.locals)e[n]=this.options.locals[n]},e.prototype.registerTitleTemplate=function(e){this.titleTemplateRef$.next(e)},e.prototype.registerButtonsTemplate=function(e){this.buttonsTemplateRef$.next(e)},e.prototype.modalOpenChange=function(e){!1===e&&this.closeModal()},e}();ic.decorators=[{type:t.Component,args:[{selector:"vdr-modal-dialog",template:'<clr-modal\r\n [clrModalOpen]="true"\r\n (clrModalOpenChange)="modalOpenChange($event)"\r\n [clrModalClosable]="options?.closable"\r\n [clrModalSize]="options?.size"\r\n [ngClass]="\'modal-valign-\' + (options?.verticalAlign || \'center\')"\r\n>\r\n <h3 class="modal-title"><ng-container *ngTemplateOutlet="(titleTemplateRef$ | async)"></ng-container></h3>\r\n <div class="modal-body">\r\n <vdr-dialog-component-outlet\r\n [component]="childComponentType"\r\n (create)="onCreate($event)"\r\n ></vdr-dialog-component-outlet>\r\n </div>\r\n <div class="modal-footer">\r\n <ng-container *ngTemplateOutlet="(buttonsTemplateRef$ | async)"></ng-container>\r\n </div>\r\n</clr-modal>\r\n',styles:["::ng-deep clr-modal.modal-valign-top .modal{justify-content:flex-start}::ng-deep clr-modal.modal-valign-bottom .modal{justify-content:flex-end}.modal-body{display:flex;flex-direction:column}"]}]}];var ac=function(){this.title="",this.body="",this.translationVars={},this.buttons=[]};ac.decorators=[{type:t.Component,args:[{selector:"vdr-simple-dialog",template:'<ng-template vdrDialogTitle>{{ title | translate:translationVars }}</ng-template>\r\n{{ body | translate:translationVars }}\r\n<ng-template vdrDialogButtons>\r\n <ng-container *ngFor="let button of buttons">\r\n <button\r\n class="btn"\r\n [class.btn-primary]="button.type === \'primary\'"\r\n [class.btn-danger]="button.type === \'danger\'"\r\n (click)="resolveWith(button.returnValue)"\r\n >\r\n {{ button.label | translate:translationVars }}\r\n </button>\r\n </ng-container>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var sc=function(){function e(){this.promiseResolveFns=[]}return e.prototype.registerHostView=function(e){this.hostView=e,0<this.promiseResolveFns.length&&this.resolveHostView()},e.prototype.getHostView=function(){var e=this;return new Promise((function(t){e.promiseResolveFns.push(t),void 0!==e.hostView&&e.resolveHostView()}))},e.prototype.resolveHostView=function(){var e=this;this.promiseResolveFns.forEach((function(t){return t(e.hostView)})),this.promiseResolveFns=[]},e}();sc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new sc},token:sc,providedIn:"root"}),sc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var lc=function(){function e(e,t){this.componentFactoryResolver=e,this.overlayHostService=t}return e.prototype.fromComponent=function(e,t){var n=this.componentFactoryResolver.resolveComponentFactory(ic);return c.from(this.overlayHostService.getHostView()).pipe(r.mergeMap((function(r){var o=r.createComponent(n),i=o.instance;return i.childComponentType=e,i.options=t,new c.Observable((function(e){i.closeModal=function(t){o.destroy(),e.next(t),e.complete()}}))})))},e.prototype.dialog=function(e){return this.fromComponent(ac,{locals:e})},e}();lc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new lc(t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(sc))},token:lc,providedIn:"root"}),lc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],lc.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:sc}]};var cc=function(){function e(){this.availableLanguages=[]}return e.prototype.setLanguage=function(e){this.resolveWith(e)},e}();cc.decorators=[{type:t.Component,args:[{selector:"vdr-ui-language-switcher",template:"<ng-template vdrDialogTitle>{{ 'common.select-display-language' | translate }}</ng-template>\r\n\r\n<div *ngFor=\"let code of availableLanguages\" >\r\n <button class=\"btn btn-link btn-sm\" (click)=\"setLanguage(code)\">\r\n <clr-icon [attr.shape]=\"code === currentLanguage ? 'dot-circle' : 'circle'\"></clr-icon>\r\n {{ code | uppercase }} ({{ 'lang.' + code | translate }})\r\n </button>\r\n</div>\r\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var uc=function(){function e(e,t,n,r,o,i){this.authService=e,this.dataService=t,this.router=n,this.i18nService=r,this.modalService=o,this.localStorageService=i,this.availableLanguages=[]}return e.prototype.ngOnInit=function(){this.userName$=this.dataService.client.userStatus().single$.pipe(r.map((function(e){return e.userStatus.username}))),this.uiLanguage$=this.dataService.client.uiState().stream$.pipe(r.map((function(e){return e.uiState.language}))),this.availableLanguages=this.i18nService.availableLanguages},e.prototype.selectUiLanguage=function(){var e=this;this.uiLanguage$.pipe(r.take(1),r.switchMap((function(t){return e.modalService.fromComponent(cc,{closable:!0,size:"sm",locals:{availableLanguages:e.availableLanguages,currentLanguage:t}})})),r.switchMap((function(t){return t?e.dataService.client.setUiLanguage(t):c.EMPTY}))).subscribe((function(t){t.setUiLanguage&&(e.i18nService.setLanguage(t.setUiLanguage),e.localStorageService.set("uiLanguageCode",t.setUiLanguage))}))},e.prototype.logOut=function(){var e=this;this.authService.logOut().subscribe((function(){var t=tc().loginUrl;t?window.location.href=t:e.router.navigate(["/login"])}))},e}();uc.decorators=[{type:t.Component,args:[{selector:"vdr-app-shell",template:'<clr-main-container>\r\n <clr-header>\r\n <div class="branding">\r\n <a [routerLink]="[\'/\']"><img src="assets/logo-75px.png" class="logo" /></a>\r\n </div>\r\n <div class="header-nav"></div>\r\n <div class="header-actions">\r\n <vdr-channel-switcher *vdrIfMultichannel></vdr-channel-switcher>\r\n <vdr-user-menu [userName]="userName$ | async"\r\n [uiLanguage]="uiLanguage$ | async"\r\n [availableLanguages]="availableLanguages"\r\n (selectUiLanguage)="selectUiLanguage()"\r\n (logOut)="logOut()"></vdr-user-menu>\r\n </div>\r\n </clr-header>\r\n <nav class="subnav"><vdr-breadcrumb></vdr-breadcrumb></nav>\r\n\r\n <div class="content-container">\r\n <div class="content-area"><router-outlet></router-outlet></div>\r\n <vdr-main-nav></vdr-main-nav>\r\n </div>\r\n</clr-main-container>\r\n',styles:[".branding{min-width:0}.logo{width:60px}@media screen and (min-width:768px){vdr-breadcrumb{margin-left:10.8rem}}.header-actions{align-items:center}.content-area{position:relative}"]}]}],uc.ctorParameters=function(){return[{type:rc},{type:Ql},{type:f.Router},{type:oc},{type:lc},{type:Ye}]};var pc=function(){function e(e,t,n){var o=this;this.router=e,this.route=t,this.dataService=n,this.destroy$=new c.Subject,this.breadcrumbs$=this.router.events.pipe(r.filter((function(e){return e instanceof f.NavigationEnd})),r.takeUntil(this.destroy$),r.startWith(!0),r.switchMap((function(){return o.generateBreadcrumbs(o.route.root)})))}return e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.generateBreadcrumbs=function(e){var t=this,n=this.assembleBreadcrumbParts(e).map((function(e){var n=e.value$,o=e.path;return n.pipe(r.map((function(e){return mc(e)?{label:e.label,link:t.normalizeRelativeLinks(e.link,o)}:function(e){return Array.isArray(e)&&mc(e[0])}(e)?e.map((function(e){return{label:e.label,link:t.normalizeRelativeLinks(e.link,o)}})):{label:e,link:"/"+o.join("/")}})))}));return c.combineLatest(n).pipe(r.map((function(e){return v.flatten(e)})))},e.prototype.assembleBreadcrumbParts=function(e){var t=this,n=[],r=[],o=e;do{var i=o.children;o=null,i.forEach((function(e){if(e.outlet===f.PRIMARY_OUTLET){var i=e.snapshot,a=e.routeConfig&&e.routeConfig.data&&e.routeConfig.data.breadcrumb;if(r.push(i.url.map((function(e){return e.path})).join("/")),a){"function"==typeof a&&(a=a(i.data,i.params,t.dataService));var s=dc(a)?a:c.of(a);n.push({value$:s,path:r.slice()})}o=e}}))}while(o);return n},e.prototype.normalizeRelativeLinks=function(e,t){var n=e.slice();return"./"===n[0]&&(n[0]=t.join("/")),"../"===n[0]&&(n[0]=t.slice(0,-1).join("/")),n.filter((function(e){return""!==e}))},e}();function dc(e){return e instanceof c.Observable}function mc(e){return e.hasOwnProperty("label")&&e.hasOwnProperty("link")}pc.decorators=[{type:t.Component,args:[{selector:"vdr-breadcrumb",template:'<nav role="navigation">\r\n <ul class="breadcrumbs">\r\n <li *ngFor="let breadcrumb of (breadcrumbs$ | async); let isLast = last">\r\n <a [routerLink]="breadcrumb.link" *ngIf="!isLast">{{ breadcrumb.label | translate }}</a>\r\n <ng-container *ngIf="isLast">{{ breadcrumb.label | translate }}</ng-container>\r\n </li>\r\n </ul>\r\n</nav>\r\n',styles:['@charset "UTF-8";:host{display:block;padding:0 1rem}.breadcrumbs{list-style-type:none}.breadcrumbs li{font-size:16px;display:inline-block;margin-right:10px}.breadcrumbs li:not(:last-child):after{content:"›";top:0;color:var(--color-grey-400);margin-left:10px}']}]}],pc.ctorParameters=function(){return[{type:f.Router},{type:f.ActivatedRoute},{type:Ql}]};var gc=function(){function e(e,t){this.dataService=e,this.localStorageService=t,this.displayFilterThreshold=10,this.filterControl=new C.FormControl("")}return e.prototype.ngOnInit=function(){var e=this.dataService.client.userStatus().mapStream((function(e){return e.userStatus.channels})),t=this.filterControl.valueChanges.pipe(r.startWith(""));this.channels$=c.combineLatest(e,t).pipe(r.map((function(e){var t=ee(e,2),n=t[0],r=t[1];return r?n.filter((function(e){return e.code.toLocaleLowerCase().includes(r.toLocaleLowerCase())})):n}))),this.channelCount$=e.pipe(r.map((function(e){return e.length})));var n=this.dataService.client.userStatus().mapStream((function(e){return e.userStatus.channels.find((function(t){return t.id===e.userStatus.activeChannelId}))})).pipe(r.filter(l.notNullOrUndefined));this.activeChannelCode$=n.pipe(r.map((function(e){return e.code})))},e.prototype.setActiveChannel=function(e){var t=this;this.dataService.client.setActiveChannel(e).subscribe((function(n){var r=n.setActiveChannel.channels.find((function(t){return t.id===e}));r&&t.localStorageService.set("activeChannelToken",r.token),t.filterControl.patchValue("")}))},e}();function hc(){var e=tc(),t=e.apiHost,n=e.apiPort;e.adminApiPath,e.tokenMethod;return""+("auto"===t?location.protocol+"//"+location.hostname:t)+(n?"auto"===n?""===location.port?"":":"+location.port:":"+n:"")}gc.decorators=[{type:t.Component,args:[{selector:"vdr-channel-switcher",template:'<ng-container>\r\n <vdr-dropdown>\r\n <button class="btn btn-link active-channel" vdrDropdownTrigger>\r\n <vdr-channel-badge [channelCode]="activeChannelCode$ | async"></vdr-channel-badge>\r\n <span class="active-channel">{{\r\n activeChannelCode$ | async | channelCodeToLabel | translate\r\n }}</span>\r\n <span class="trigger"><clr-icon shape="caret down"></clr-icon></span>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition="bottom-right">\r\n <input\r\n *ngIf="((channelCount$ | async) || 0) >= displayFilterThreshold"\r\n [formControl]="filterControl"\r\n type="text"\r\n class="ml2 mr2"\r\n [placeholder]="\'common.filter\' | translate"\r\n />\r\n <button\r\n *ngFor="let channel of channels$ | async"\r\n type="button"\r\n vdrDropdownItem\r\n (click)="setActiveChannel(channel.id)"\r\n >\r\n <vdr-channel-badge [channelCode]="channel.code"></vdr-channel-badge>\r\n {{ channel.code | channelCodeToLabel | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.active-channel{color:var(--color-grey-200)}.active-channel clr-icon{color:#fff}"]}]}],gc.ctorParameters=function(){return[{type:Ql},{type:Ye}]};var fc=function(){function e(e){var t=this;this.httpClient=e,this.pollingDelayMs=6e4,this._refresh=new c.Subject,this.healthCheckEndpoint=hc()+"/health";var n=this._refresh.pipe(r.throttleTime(1e3)),o=c.merge(c.timer(0,this.pollingDelayMs),n).pipe(r.switchMap((function(){return t.checkHealth()})),r.shareReplay(1));this.status$=o.pipe(r.map((function(e){return e.status}))),this.details$=o.pipe(r.map((function(e){return Object.keys(e.details).map((function(t){return{key:t,result:e.details[t]}}))}))),this.lastCheck$=o.pipe(r.map((function(e){return e.lastChecked})))}return e.prototype.refresh=function(){this._refresh.next()},e.prototype.checkHealth=function(){return this.httpClient.get(this.healthCheckEndpoint).pipe(r.catchError((function(e){return c.of(e.error)})),r.map((function(e){return Object.assign(Object.assign({},e),{lastChecked:new Date})})))},e}();fc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new fc(t.ɵɵinject(i.HttpClient))},token:fc,providedIn:"root"}),fc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],fc.ctorParameters=function(){return[{type:i.HttpClient}]};var yc=function(){function t(e){var t=this;this.dataService=e,this.updateJob$=new c.Subject,this.onCompleteHandlers=new Map,this.checkForJobs(),this.activeJobs$=this.updateJob$.pipe(r.scan((function(e,n){return t.handleJob(e,n)}),new Map),r.map((function(e){return Array.from(e.values())})),r.debounceTime(500),r.shareReplay(1)),this.subscription=this.activeJobs$.pipe(r.switchMap((function(e){return e.length?c.interval(2500).pipe(r.mapTo(e)):c.of([])}))).subscribe((function(e){e.length&&t.dataService.settings.pollJobs(e.map((function(e){return e.id}))).single$.subscribe((function(e){e.jobsById.forEach((function(e){t.updateJob$.next(e)}))}))}))}return t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.checkForJobs=function(t){var n=this;void 0===t&&(t=1e3),c.timer(t).pipe(r.switchMap((function(){return n.dataService.client.userStatus().mapSingle((function(e){return e.userStatus}))})),r.switchMap((function(t){return t.permissions.includes(e.Permission.ReadSettings)&&t.isLoggedIn?n.dataService.settings.getRunningJobs().single$:c.EMPTY}))).subscribe((function(e){return e.jobs.items.forEach((function(e){return n.updateJob$.next(e)}))}))},t.prototype.addJob=function(e,t){var n=this;this.dataService.settings.getJob(e).single$.subscribe((function(r){var o=r.job;o&&(n.updateJob$.next(o),t&&n.onCompleteHandlers.set(e,t))}))},t.prototype.handleJob=function(t,n){switch(n.state){case e.JobState.RUNNING:case e.JobState.PENDING:t.set(n.id,n);break;case e.JobState.COMPLETED:case e.JobState.FAILED:case e.JobState.CANCELLED:t.delete(n.id);var r=this.onCompleteHandlers.get(n.id);r&&(r(n),this.onCompleteHandlers.delete(n.id))}return t},t}();yc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new yc(t.ɵɵinject(Ql))},token:yc,providedIn:"root"}),yc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],yc.ctorParameters=function(){return[{type:Ql}]};var vc=function(){function t(){this.sectionBadges={},this.initialNavMenuConfig$=new c.BehaviorSubject([]),this.addedNavMenuSections=[],this.addedNavMenuItems=[],this.addedActionBarItems=[],this.setupStreams()}return t.prototype.defineNavMenuSections=function(e){this.initialNavMenuConfig$.next(e)},t.prototype.addNavMenuSection=function(e,t){this.addedNavMenuSections.push({config:e,before:t})},t.prototype.addNavMenuItem=function(e,t,n){this.addedNavMenuItems.push({config:e,sectionId:t,before:n})},t.prototype.addActionBarItem=function(t){this.addedActionBarItems.push(Object.assign({requiresPermission:e.Permission.Authenticated},t))},t.prototype.getRouterLink=function(e,t){return"function"==typeof e.routerLink?e.routerLink(t):Array.isArray(e.routerLink)?e.routerLink:null},t.prototype.setupStreams=function(){var t=this,n=c.of(this.addedNavMenuSections),o=c.of(this.addedNavMenuItems),i=c.combineLatest(this.initialNavMenuConfig$,n).pipe(r.map((function(t){var n,r,o=ee(t,2),i=o[0],a=o[1],s=function(t,n){t.requiresPermission||(t.requiresPermission=e.Permission.Authenticated);var r=i.findIndex((function(e){return e.id===t.id}));-1<r&&(i[r]=t);var o=i.findIndex((function(e){return e.id===n}));-1<o?(-1<r&&i.splice(r,1),i.splice(o,0,t)):-1===r&&i.push(t)};try{for(var l=X(a),c=l.next();!c.done;c=l.next()){var u=c.value;s(u.config,u.before)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return i})),r.shareReplay(1));this.navMenuConfig$=c.combineLatest(i,o).pipe(r.map((function(e){var n,o,i,a,s=ee(e,2),u=s[0],p=s[1],d=function(e){var t=u.find((function(t){return t.id===e.sectionId}));if(t){var n=e.config,r=(e.sectionId,e.before),o=t.items.findIndex((function(e){return e.id===n.id}));-1<o&&(t.items[o]=n);var i=t.items.findIndex((function(e){return e.id===r}));-1<i?(-1<o&&t.items.splice(o,1),t.items.splice(i,0,n)):-1===o&&t.items.push(n)}else console.error('Could not add menu item "'+e.config.id+'", section "'+e.sectionId+'" does not exist')};try{for(var m=X(p),g=m.next();!g.done;g=m.next()){d(g.value)}}catch(e){n={error:e}}finally{try{g&&!g.done&&(o=m.return)&&o.call(m)}finally{if(n)throw n.error}}try{for(var h=X(u),f=h.next();!f.done;f=h.next()){var y=f.value,v=y.items.map((function(e){return e.statusBadge})).filter(l.notNullOrUndefined);t.sectionBadges[y.id]=c.combineLatest(v).pipe(r.map((function(e){var t=e.filter((function(e){return e.propagateToSection}));if(0===t.length)return"none";var n=t.map((function(e){return e.type}));return n.includes("error")?"error":n.includes("warning")?"warning":n.includes("info")?"info":"none"})))}}catch(e){i={error:e}}finally{try{f&&!f.done&&(a=h.return)&&a.call(h)}finally{if(i)throw i.error}}return u}))),this.actionBarConfig$=c.of(this.addedActionBarItems)},t}();vc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new vc},token:vc,providedIn:"root"}),vc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],vc.ctorParameters=function(){return[]};var Cc=function(){function t(e,t,n,r,o,i){this.route=e,this.router=t,this.navBuilderService=n,this.healthCheckService=r,this.jobQueueService=o,this.dataService=i}return t.prototype.shouldDisplayLink=function(e){return!!this.userPermissions&&(!e.requiresPermission||("string"==typeof e.requiresPermission?this.userPermissions.includes(e.requiresPermission):"function"==typeof e.requiresPermission?e.requiresPermission(this.userPermissions):void 0))},t.prototype.ngOnInit=function(){var e=this;this.defineNavMenu(),this.subscription=this.dataService.client.userStatus().mapStream((function(t){var n=t.userStatus;e.userPermissions=n.permissions})).subscribe()},t.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.getRouterLink=function(e){return this.navBuilderService.getRouterLink(e,this.route)},t.prototype.defineNavMenu=function(){function t(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){var n,r;try{for(var o=X(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(t.includes(a))return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}}this.navBuilderService.defineNavMenuSections([{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadProduct,e.Permission.ReadFacet,e.Permission.ReadCollection,e.Permission.ReadAsset),id:"catalog",label:b.marker("nav.catalog"),items:[{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadProduct),id:"products",label:b.marker("nav.products"),icon:"library",routerLink:["/catalog","products"]},{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadFacet),id:"facets",label:b.marker("nav.facets"),icon:"tag",routerLink:["/catalog","facets"]},{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadCollection),id:"collections",label:b.marker("nav.collections"),icon:"folder-open",routerLink:["/catalog","collections"]},{requiresPermission:t(e.Permission.ReadCatalog,e.Permission.ReadAsset),id:"assets",label:b.marker("nav.assets"),icon:"image-gallery",routerLink:["/catalog","assets"]}]},{id:"sales",label:b.marker("nav.sales"),requiresPermission:t(e.Permission.ReadOrder),items:[{requiresPermission:t(e.Permission.ReadOrder),id:"orders",label:b.marker("nav.orders"),routerLink:["/orders"],icon:"shopping-cart"}]},{id:"customers",label:b.marker("nav.customers"),requiresPermission:t(e.Permission.ReadCustomer,e.Permission.ReadCustomerGroup),items:[{requiresPermission:t(e.Permission.ReadCustomer),id:"customers",label:b.marker("nav.customers"),routerLink:["/customer","customers"],icon:"user"},{requiresPermission:t(e.Permission.ReadCustomerGroup),id:"customer-groups",label:b.marker("nav.customer-groups"),routerLink:["/customer","groups"],icon:"users"}]},{id:"marketing",label:b.marker("nav.marketing"),requiresPermission:t(e.Permission.ReadPromotion),items:[{requiresPermission:t(e.Permission.ReadPromotion),id:"promotions",label:b.marker("nav.promotions"),routerLink:["/marketing","promotions"],icon:"asterisk"}]},{id:"settings",label:b.marker("nav.settings"),requiresPermission:t(e.Permission.ReadSettings,e.Permission.ReadChannel,e.Permission.ReadAdministrator,e.Permission.ReadShippingMethod,e.Permission.ReadPaymentMethod,e.Permission.ReadTaxCategory,e.Permission.ReadTaxRate,e.Permission.ReadCountry,e.Permission.ReadZone,e.Permission.UpdateGlobalSettings),collapsible:!0,collapsedByDefault:!0,items:[{requiresPermission:t(e.Permission.ReadChannel),id:"channels",label:b.marker("nav.channels"),routerLink:["/settings","channels"],icon:"layers"},{requiresPermission:t(e.Permission.ReadAdministrator),id:"administrators",label:b.marker("nav.administrators"),routerLink:["/settings","administrators"],icon:"administrator"},{requiresPermission:t(e.Permission.ReadAdministrator),id:"roles",label:b.marker("nav.roles"),routerLink:["/settings","roles"],icon:"users"},{requiresPermission:t(e.Permission.ReadShippingMethod),id:"shipping-methods",label:b.marker("nav.shipping-methods"),routerLink:["/settings","shipping-methods"],icon:"truck"},{requiresPermission:t(e.Permission.ReadPaymentMethod),id:"payment-methods",label:b.marker("nav.payment-methods"),routerLink:["/settings","payment-methods"],icon:"credit-card"},{requiresPermission:t(e.Permission.ReadTaxCategory),id:"tax-categories",label:b.marker("nav.tax-categories"),routerLink:["/settings","tax-categories"],icon:"view-list"},{requiresPermission:t(e.Permission.ReadTaxRate),id:"tax-rates",label:b.marker("nav.tax-rates"),routerLink:["/settings","tax-rates"],icon:"calculator"},{requiresPermission:t(e.Permission.ReadCountry),id:"countries",label:b.marker("nav.countries"),routerLink:["/settings","countries"],icon:"flag"},{requiresPermission:t(e.Permission.ReadZone),id:"zones",label:b.marker("nav.zones"),routerLink:["/settings","zones"],icon:"world"},{requiresPermission:t(e.Permission.UpdateGlobalSettings),id:"global-settings",label:b.marker("nav.global-settings"),routerLink:["/settings","global-settings"],icon:"cog"}]},{id:"system",label:b.marker("nav.system"),requiresPermission:e.Permission.ReadSystem,collapsible:!0,collapsedByDefault:!0,items:[{id:"job-queue",label:b.marker("nav.job-queue"),routerLink:["/system","jobs"],icon:"tick-chart",statusBadge:this.jobQueueService.activeJobs$.pipe(r.startWith([]),r.map((function(e){return{type:0===e.length?"none":"info",propagateToSection:e.length>0}})))},{id:"system-status",label:b.marker("nav.system-status"),routerLink:["/system","system-status"],icon:"rack-server",statusBadge:this.healthCheckService.status$.pipe(r.map((function(e){return{type:"ok"===e?"success":"error",propagateToSection:"error"===e}})))}]}])},t}();Cc.decorators=[{type:t.Component,args:[{selector:"vdr-main-nav",template:'<nav class="sidenav" [clr-nav-level]="2">\r\n <section class="sidenav-content">\r\n <ng-container *ngFor="let section of navBuilderService.navMenuConfig$ | async">\r\n <section\r\n class="nav-group"\r\n [attr.data-section-id]="section.id"\r\n [class.collapsible]="section.collapsible"\r\n *ngIf="shouldDisplayLink(section)"\r\n >\r\n <ng-container *ngIf="navBuilderService.sectionBadges[section.id] | async as sectionBadge">\r\n <div *ngIf="sectionBadge !== \'none\'" class="status-badge" [class]="sectionBadge"></div>\r\n </ng-container>\r\n <input [id]="section.id" type="checkbox" [checked]="section.collapsedByDefault" />\r\n <label [for]="section.id">{{ section.label | translate }}</label>\r\n <ul class="nav-list">\r\n <ng-container *ngFor="let item of section.items">\r\n <li *ngIf="shouldDisplayLink(item)">\r\n <a\r\n class="nav-link"\r\n [attr.data-item-id]="section.id"\r\n [routerLink]="getRouterLink(item)"\r\n routerLinkActive="active"\r\n >\r\n <ng-container *ngIf="item.statusBadge | async as itemBadge">\r\n <div\r\n *ngIf="itemBadge.type !== \'none\'"\r\n class="status-badge"\r\n [class]="itemBadge.type"\r\n ></div>\r\n </ng-container>\r\n <clr-icon [attr.shape]="item.icon || \'block\'" size="20"></clr-icon>\r\n {{ item.label | translate }}\r\n </a>\r\n </li>\r\n </ng-container>\r\n </ul>\r\n </section>\r\n </ng-container>\r\n </section>\r\n</nav>\r\n',styles:[":host{order:-1;background-color:var(--clr-nav-background-color)}nav.sidenav{height:100%;width:10.8rem;border-right-color:var(--clr-sidenav-border-color)}.nav-list clr-icon{margin-right:12px}.nav-group,.nav-link{position:relative}.status-badge{width:10px;height:10px;position:absolute;border-radius:50%;border:1px solid var(--color-component-border-100)}.status-badge.info{background-color:var(--color-primary-600)}.status-badge.success{background-color:var(--color-success-500)}.status-badge.warning{background-color:var(--color-warning-500)}.status-badge.error{background-color:var(--color-error-400)}.nav-group .status-badge{left:10px;top:6px}.nav-link .status-badge{left:25px;top:3px}"]}]}],Cc.ctorParameters=function(){return[{type:f.ActivatedRoute},{type:f.Router},{type:vc},{type:fc},{type:yc},{type:Ql}]};var bc=function(){function e(){this.offsetTop=0,this.message="",this.translationVars={},this.type="info",this.isVisible=!0,this.onClickFn=function(){}}return e.prototype.registerOnClickFn=function(e){this.onClickFn=e},e.prototype.onClick=function(){this.isVisible&&this.onClickFn()},e.prototype.fadeOut=function(){return this.isVisible=!1,new Promise((function(e){return setTimeout(e,1e3)}))},e.prototype.getHeight=function(){return this.wrapper?this.wrapper.nativeElement.getBoundingClientRect().height:0},e.prototype.getIcon=function(){switch(this.type){case"info":return"info-circle";case"success":return"check-circle";case"error":return"exclamation-circle";case"warning":return"exclamation-triangle"}},e.prototype.stringifyMessage=function(e){return"string"==typeof e?e:JSON.stringify(e,null,2)},e}();bc.decorators=[{type:t.Component,args:[{selector:"vdr-notification",template:'<div\r\n class="notification-wrapper"\r\n #wrapper\r\n [style.top.px]="offsetTop"\r\n [ngClass]="{\r\n visible: isVisible,\r\n info: type === \'info\',\r\n success: type === \'success\',\r\n error: type === \'error\',\r\n warning: type === \'warning\'\r\n }"\r\n>\r\n <clr-icon [attr.shape]="getIcon()" size="24"></clr-icon>\r\n {{ stringifyMessage(message) | translate: translationVars }}\r\n</div>\r\n',styles:["@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:.95}}@keyframes fadeIn{0%{opacity:0}to{opacity:.95}}:host{position:relative;z-index:1050}:host>.notification-wrapper{display:block;position:fixed;z-index:1001;top:0;right:10px;border-radius:3px;max-width:98vw;word-wrap:break-word;padding:10px;background-color:var(--color-grey-500);color:#fff;transition:opacity 1s,top .3s;opacity:0;white-space:pre-line}:host>.notification-wrapper.success{background-color:var(--color-success-500)}:host>.notification-wrapper.error{background-color:var(--color-error-500)}:host>.notification-wrapper.warning{background-color:var(--color-warning-500)}:host>.notification-wrapper.info{background-color:var(--color-secondary-500)}:host>.notification-wrapper.visible{opacity:.95;-webkit-animation:fadeIn .3s .3s backwards;animation:fadeIn .3s .3s backwards}"]}]}],bc.propDecorators={wrapper:[{type:t.ViewChild,args:["wrapper",{static:!0}]}],onClick:[{type:t.HostListener,args:["click"]}]};var Sc=function(e,t){t.registerHostView(e)};Sc.decorators=[{type:t.Component,args:[{selector:"vdr-overlay-host",template:"\x3c!-- --\x3e"}]}],Sc.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:sc}]};var Ic=function(){function e(e,t){this.dataService=e,this.localStorageService=t}return e.prototype.ngOnInit=function(){this.activeTheme$=this.dataService.client.uiState().mapStream((function(e){return e.uiState.theme}))},e.prototype.toggleTheme=function(e){var t=this,n="default"===e?"dark":"default";this.dataService.client.setUiTheme(n).subscribe((function(){t.localStorageService.set("activeTheme",n)}))},e}();Ic.decorators=[{type:t.Component,args:[{selector:"vdr-theme-switcher",template:'<button *ngIf="activeTheme$ | async as activeTheme" class="theme-toggle" (click)="toggleTheme(activeTheme)">\r\n <span>{{ \'common.theme\' | translate }}</span>\r\n <div class="theme-icon default" [class.active]="activeTheme === \'default\'">\r\n <clr-icon shape="sun" class="is-solid"></clr-icon>\r\n </div>\r\n <div class="theme-icon dark" [class.active]="activeTheme === \'dark\'">\r\n <clr-icon shape="moon" class="is-solid"></clr-icon>\r\n </div>\r\n</button>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-flex;justify-content:center;align-items:center}button.theme-toggle{position:relative;padding-left:20px;border:none;background:transparent;color:var(--clr-dropdown-item-color);cursor:pointer}.theme-icon{position:absolute;top:0;left:6px;z-index:0;opacity:.2;color:var(--color-text-300);transition:opacity .3s,left .3s}.theme-icon.active{z-index:1;left:0;opacity:1}.theme-icon.default.active{color:#d6ae3f}.theme-icon.dark.active{color:#ffdf3a}"]}]}],Ic.ctorParameters=function(){return[{type:Ql},{type:Ye}]};var Tc=function(){this.userName="",this.availableLanguages=[],this.logOut=new t.EventEmitter,this.selectUiLanguage=new t.EventEmitter};Tc.decorators=[{type:t.Component,args:[{selector:"vdr-user-menu",template:'<vdr-dropdown>\r\n <button class="btn btn-link trigger" vdrDropdownTrigger>\r\n <span class="user-name">{{ userName }}</span>\r\n <clr-icon shape="user" size="24"></clr-icon>\r\n <clr-icon shape="caret down"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition="bottom-right">\r\n <a [routerLink]="[\'/settings\', \'profile\']" vdrDropdownItem>\r\n <clr-icon shape="user" class="is-solid"></clr-icon> {{ \'settings.profile\' | translate }}\r\n </a>\r\n <ng-container *ngIf="1 < availableLanguages.length">\r\n <button\r\n type="button"\r\n vdrDropdownItem\r\n (click)="selectUiLanguage.emit()"\r\n [title]="\'common.select-display-language\' | translate"\r\n >\r\n <clr-icon shape="language"></clr-icon> {{ \'lang.\' + uiLanguage | translate }}\r\n </button>\r\n </ng-container>\r\n <div class="dropdown-item">\r\n <vdr-theme-switcher></vdr-theme-switcher>\r\n </div>\r\n <div class="dropdown-divider"></div>\r\n <button type="button" vdrDropdownItem (click)="logOut.emit()">\r\n <clr-icon shape="logout"></clr-icon> {{ \'common.log-out\' | translate }}\r\n </button>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',styles:[":host{display:flex;align-items:center;margin:0 .5rem;height:2.5rem}.user-name{color:var(--color-grey-200);margin-right:12px}@media screen and (max-width:768px){.user-name{display:none}}.trigger clr-icon{color:#fff}"]}]}],Tc.propDecorators={userName:[{type:t.Input}],availableLanguages:[{type:t.Input}],uiLanguage:[{type:t.Input}],logOut:[{type:t.Output}],selectUiLanguage:[{type:t.Output}]};var Dc={possibleTypes:{CreateAssetResult:["Asset","MimeTypeError"],NativeAuthenticationResult:["CurrentUser","InvalidCredentialsError","NativeAuthStrategyError"],AuthenticationResult:["CurrentUser","InvalidCredentialsError"],CreateChannelResult:["Channel","LanguageNotAvailableError"],UpdateChannelResult:["Channel","LanguageNotAvailableError"],CreateCustomerResult:["Customer","EmailAddressConflictError"],UpdateCustomerResult:["Customer","EmailAddressConflictError"],UpdateGlobalSettingsResult:["GlobalSettings","ChannelDefaultLanguageError"],TransitionOrderToStateResult:["Order","OrderStateTransitionError"],SettlePaymentResult:["Payment","SettlePaymentError","PaymentStateTransitionError","OrderStateTransitionError"],AddFulfillmentToOrderResult:["Fulfillment","EmptyOrderLineSelectionError","ItemsAlreadyFulfilledError","InsufficientStockOnHandError","InvalidFulfillmentHandlerError","FulfillmentStateTransitionError","CreateFulfillmentError"],CancelOrderResult:["Order","EmptyOrderLineSelectionError","QuantityTooGreatError","MultipleOrderError","CancelActiveOrderError","OrderStateTransitionError"],RefundOrderResult:["Refund","QuantityTooGreatError","NothingToRefundError","OrderStateTransitionError","MultipleOrderError","PaymentOrderMismatchError","RefundOrderStateError","AlreadyRefundedError","RefundStateTransitionError"],SettleRefundResult:["Refund","RefundStateTransitionError"],TransitionFulfillmentToStateResult:["Fulfillment","FulfillmentStateTransitionError"],TransitionPaymentToStateResult:["Payment","PaymentStateTransitionError"],ModifyOrderResult:["Order","NoChangesSpecifiedError","OrderModificationStateError","PaymentMethodMissingError","RefundPaymentIdMissingError","OrderLimitError","NegativeQuantityError","InsufficientStockError"],AddManualPaymentToOrderResult:["Order","ManualPaymentStateError"],RemoveOptionGroupFromProductResult:["Product","ProductOptionInUseError"],CreatePromotionResult:["Promotion","MissingConditionsError"],UpdatePromotionResult:["Promotion","MissingConditionsError"],StockMovement:["StockAdjustment","Allocation","Sale","Cancellation","Return","Release"],StockMovementItem:["StockAdjustment","Allocation","Sale","Cancellation","Return","Release"],PaginatedList:["AdministratorList","CustomerGroupList","JobList","PaymentMethodList","AssetList","CollectionList","ProductVariantList","CountryList","CustomerList","FacetList","HistoryEntryList","OrderList","ProductList","PromotionList","RoleList","ShippingMethodList","TagList","TaxRateList"],Node:["Administrator","Asset","Collection","Customer","Facet","HistoryEntry","Job","Order","Fulfillment","Payment","OrderModification","PaymentMethod","Product","ProductVariant","StockAdjustment","Allocation","Sale","Cancellation","Return","Release","Address","Channel","Country","CustomerGroup","FacetValue","OrderItem","OrderLine","Refund","Surcharge","ProductOptionGroup","ProductOption","Promotion","Role","ShippingMethod","Tag","TaxCategory","TaxRate","User","AuthenticationMethod","Zone"],ErrorResult:["MimeTypeError","LanguageNotAvailableError","ChannelDefaultLanguageError","SettlePaymentError","EmptyOrderLineSelectionError","ItemsAlreadyFulfilledError","InvalidFulfillmentHandlerError","CreateFulfillmentError","InsufficientStockOnHandError","MultipleOrderError","CancelActiveOrderError","PaymentOrderMismatchError","RefundOrderStateError","NothingToRefundError","AlreadyRefundedError","QuantityTooGreatError","RefundStateTransitionError","PaymentStateTransitionError","FulfillmentStateTransitionError","OrderModificationStateError","NoChangesSpecifiedError","PaymentMethodMissingError","RefundPaymentIdMissingError","ManualPaymentStateError","ProductOptionInUseError","MissingConditionsError","NativeAuthStrategyError","InvalidCredentialsError","OrderStateTransitionError","EmailAddressConflictError","OrderLimitError","NegativeQuantityError","InsufficientStockError"],CustomField:["StringCustomFieldConfig","LocaleStringCustomFieldConfig","IntCustomFieldConfig","FloatCustomFieldConfig","BooleanCustomFieldConfig","DateTimeCustomFieldConfig","RelationCustomFieldConfig"],CustomFieldConfig:["StringCustomFieldConfig","LocaleStringCustomFieldConfig","IntCustomFieldConfig","FloatCustomFieldConfig","BooleanCustomFieldConfig","DateTimeCustomFieldConfig","RelationCustomFieldConfig"],SearchResultPrice:["PriceRange","SinglePrice"]}},Ac=function(e){function t(t){var n=e.call(this,(function(e,t){return n.isMutation(e)&&n.jobQueueService.checkForJobs(),t?t(e):null}))||this;return n.injector=t,n}return J(t,e),Object.defineProperty(t.prototype,"jobQueueService",{get:function(){return this._jobQueueService||(this._jobQueueService=this.injector.get(yc)),this._jobQueueService},enumerable:!1,configurable:!0}),t.prototype.isMutation=function(e){return!!e.query.definitions.find((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))},t}(s.ApolloLink);function Ec(e){return{networkStatus:{inFlightRequests:0,__typename:"NetworkStatus"},userStatus:{username:"",isLoggedIn:!1,loginTime:"",activeChannelId:null,permissions:[],channels:[],__typename:"UserStatus"},uiState:{language:e.get("uiLanguageCode")||nc(),theme:e.get("activeTheme")||"default",__typename:"UiState"}}}var Rc=function(e,t,n){return Mc(n.cache,1)},Pc=function(e,t,n){return Mc(n.cache,-1)},Oc=function(e,t,n){var r=n.cache,o=t.input,i=o.username,a=o.loginTime,s=o.channels,l=o.activeChannelId,c={userStatus:{__typename:"UserStatus",username:i,loginTime:a,isLoggedIn:!0,permissions:s.find((function(e){return e.id===l})).permissions,channels:s,activeChannelId:l}};return r.writeQuery({query:An,data:c}),c.userStatus},kc=function(e,t,n){var r={userStatus:{__typename:"UserStatus",username:"",loginTime:"",isLoggedIn:!1,permissions:[],channels:[],activeChannelId:null}};return n.cache.writeQuery({query:An,data:r}),r.userStatus},wc=function(e,t,n){var r=n.cache,o=r.readQuery({query:En}),i={uiState:{__typename:"UiState",language:t.languageCode,theme:o.uiState.theme}};return r.writeQuery({query:En,data:i}),t.languageCode},xc=function(e,t,n){var r=n.cache,o={uiState:{__typename:"UiState",language:r.readQuery({query:En}).uiState.language,theme:t.theme}};return r.writeQuery({query:En,data:o}),t.theme},Fc=function(e,t,n){var r=n.cache,o=r.readQuery({query:An}),i=o.userStatus.channels.find((function(e){return e.id===t.channelId}));if(!i)throw new Error("setActiveChannel: Could not find Channel with ID "+t.channelId);var a=i.permissions,s={userStatus:Object.assign(Object.assign({},o.userStatus),{permissions:a,activeChannelId:i.id})};return r.writeQuery({query:An,data:s}),s.userStatus},$c=function(e,t,n){var r=n.cache,o=r.readQuery({query:An}),i={userStatus:Object.assign(Object.assign({},o.userStatus),{channels:Array.isArray(t.channels)?t.channels:[t.channels]})};return r.writeQuery({query:An,data:i}),i.userStatus},_c={Mutation:{requestStarted:Rc,requestCompleted:Pc,setAsLoggedIn:Oc,setAsLoggedOut:kc,setUiLanguage:wc,setUiTheme:xc,setActiveChannel:Fc,updateUserChannels:$c}};function Mc(e,t){var n=e.readQuery({query:Dn}),r=n?n.networkStatus.inFlightRequests+t:t,o={networkStatus:{__typename:"NetworkStatus",inFlightRequests:r}};return e.writeQuery({query:Dn,data:o}),r}var Lc=function(e){function t(){return e.call(this,(function(e,t){return e.variables&&(e.variables=D.omit(e.variables,["__typename"],!0)),t?t(e):null}))||this}return J(t,e),t}(s.ApolloLink),Nc=function(e){var t=this;this.httpClient=e,this.fetch=function(e,n){var r="string"==typeof e?e:e.url,o="string"==typeof e?n.method?n.method:"GET":e.method;return t.httpClient.request(o,r,{body:n.body,headers:n.headers,observe:"response",responseType:"json",withCredentials:!0}).toPromise().then((function(e){return new Response(JSON.stringify(e.body),{status:e.status,statusText:e.statusText})}))}};Nc.decorators=[{type:t.Injectable}],Nc.ctorParameters=function(){return[{type:i.HttpClient}]};var Uc=function(){function e(e,t,n){this.i18nService=e,this.resolver=t,this.overlayHostService=n,this.openToastRefs=[]}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.overlayHostService.getHostView()},enumerable:!1,configurable:!0}),e.prototype.success=function(e,t){this.notify({message:e,translationVars:t,type:"success"})},e.prototype.info=function(e,t){this.notify({message:e,translationVars:t,type:"info"})},e.prototype.warning=function(e,t){this.notify({message:e,translationVars:t,type:"warning"})},e.prototype.error=function(e,t){this.notify({message:e,translationVars:t,type:"error",duration:2e4})},e.prototype.notify=function(e){this.createToast(e)},e.prototype.createToast=function(e){return K(this,void 0,void 0,(function(){var t,n,r,o,i,a,s=this;return Q(this,(function(l){switch(l.label){case 0:return t=this.resolver.resolveComponentFactory(bc),[4,this.hostView];case 1:return n=l.sent(),r=n.createComponent(t),o=r.instance,i=this.createDismissFunction(r),o.type=e.type||"info",o.message=e.message,o.translationVars=this.translateTranslationVars(e.translationVars||{}),o.registerOnClickFn(i),(!e.duration||0<e.duration)&&(a=setTimeout(i,e.duration||3e3)),this.openToastRefs.unshift({ref:r,timerId:a}),setTimeout((function(){return s.calculatePositions()})),[2]}}))}))},e.prototype.createDismissFunction=function(e){var t=this;return function(){var n=e.instance,r=t.openToastRefs.map((function(e){return e.ref})).indexOf(e);t.openToastRefs[r]&&clearTimeout(t.openToastRefs[r].timerId),n.fadeOut().then((function(){e.destroy(),t.openToastRefs.splice(r,1),t.calculatePositions()}))}},e.prototype.calculatePositions=function(){var e=10;this.openToastRefs.forEach((function(t){var n=t.ref.instance;n.offsetTop=e,e+=n.getHeight()+6}))},e.prototype.translateTranslationVars=function(e){var t,n;try{for(var r=X(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=ee(o.value,2),a=i[0],s=i[1];"string"==typeof s&&(e[a]=this.i18nService.translate(s))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return e},e}();Uc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Uc(t.ɵɵinject(oc),t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(sc))},token:Uc,providedIn:"root"}),Uc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Uc.ctorParameters=function(){return[{type:oc},{type:t.ComponentFactoryResolver},{type:sc}]};var qc="redirectTo",Gc=function(){function e(e,t,n,r,o){this.dataService=e,this.injector=t,this.authService=n,this.router=r,this.localStorageService=o,this.tokenMethod="cookie",this.tokenMethod=tc().tokenMethod,this.authTokenHeaderKey=tc().authTokenHeaderKey||y.DEFAULT_AUTH_TOKEN_HEADER_KEY}return e.prototype.intercept=function(e,t){var n=this;return this.dataService.client.startRequest().subscribe(),t.handle(e).pipe(r.tap((function(e){e instanceof i.HttpResponse&&(n.checkForAuthToken(e),n.notifyOnError(e),n.dataService.client.completeRequest().subscribe())}),(function(e){e instanceof i.HttpErrorResponse?(n.notifyOnError(e),n.dataService.client.completeRequest().subscribe()):n.displayErrorNotification(e.message)})))},e.prototype.notifyOnError=function(e){var t,n,r,o=this;if(e instanceof i.HttpErrorResponse)if(0===e.status){var a=tc(),s=a.apiHost,l=a.apiPort;this.displayErrorNotification(b.marker("error.could-not-connect-to-server"),{url:s+":"+l})}else 503===e.status&&(null===(t=e.url)||void 0===t?void 0:t.endsWith("/health"))?this.displayErrorNotification(b.marker("error.health-check-failed")):this.displayErrorNotification(this.extractErrorFromHttpResponse(e));else{var c=e.body.errors;if(c&&Array.isArray(c)){var u=null===(r=null===(n=c[0])||void 0===n?void 0:n.extensions)||void 0===r?void 0:r.code;if("FORBIDDEN"===u)this.authService.logOut().subscribe((function(){var e;if(!window.location.pathname.includes("login")){var t=c[0].path.join(" > ");o.displayErrorNotification(b.marker("error.403-forbidden"),{path:t})}o.router.navigate(["/login"],{queryParams:(e={},e.redirectTo=btoa(o.router.url),e)})}));else if("CHANNEL_NOT_FOUND"===u){var p=c.map((function(e){return e.message})).join("\n");this.displayErrorNotification(p),this.localStorageService.remove("activeChannelToken")}else{p=c.map((function(e){return e.message})).join("\n");this.displayErrorNotification(p)}}}},e.prototype.extractErrorFromHttpResponse=function(e){var t=e.error.errors;return Array.isArray(t)?t.map((function(e){return e.message})).join("\n"):e.message},e.prototype.displayErrorNotification=function(e,t){this.injector.get(Uc).error(e,t)},e.prototype.checkForAuthToken=function(e){if("bearer"===this.tokenMethod){var t=e.headers.get(this.authTokenHeaderKey);t&&this.localStorageService.set("authToken",t)}},e}();function Vc(e,t,n){var r=tc(),o=r.adminApiPath,i=r.tokenMethod,a=hc(),l=new s.InMemoryCache({possibleTypes:Dc.possibleTypes,typePolicies:{GlobalSettings:{fields:{serverConfig:{merge:function(e,t){return Object.assign(Object.assign({},e),t)}}}}}});return l.writeQuery({query:Rn,data:Ec(e)}),window.apolloCache=l,{link:I.ApolloLink.from([new Lc,new Ac(n),S.setContext((function(){var t={},n=e.get("activeChannelToken");if(n&&(t["vendure-token"]=n),"bearer"===i){var r=e.get("authToken");r&&(t.authorization="Bearer "+r)}return{headers:t}})),T.createUploadLink({uri:a+"/"+o,fetch:t.fetch})]),cache:l,resolvers:_c}}Gc.decorators=[{type:t.Injectable}],Gc.ctorParameters=function(){return[{type:Ql},{type:t.Injector},{type:rc},{type:f.Router},{type:Ye}]};var jc=Nr,Bc=function(){};Bc.decorators=[{type:t.NgModule,args:[{imports:[i.HttpClientModule],exports:[],declarations:[],providers:[eo,Ql,Nc,Ur,{provide:o.APOLLO_OPTIONS,useFactory:Vc,deps:[Ye,Nc,t.Injector]},{provide:i.HTTP_INTERCEPTORS,useClass:Gc,multi:!0},{provide:t.APP_INITIALIZER,multi:!0,useFactory:jc,deps:[Ur]}]}]}];var Hc=function(){function e(e,t,n){void 0===t&&(t="/assets/i18n/"),void 0===n&&(n=".json"),this.http=e,this.prefix=t,this.suffix=n}return e.prototype.getTranslation=function(e){var t=this;return this.http.get(""+this.prefix+e+this.suffix).pipe(r.map((function(e){return t.process(e)})))},e.prototype.process=function(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];"string"!=typeof r?t[n]=this.process(r):"string"==typeof r&&""===r||(t[n]=e[n])}return t},e}(),zc=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return J(t,e),t.prototype.compileTranslations=function(t,n){try{return e.prototype.compileTranslations.call(this,t,n)}catch(e){console.error("There was an error with the "+n+" translations:"),console.log(e),console.log("Check the messageformat docs: https://messageformat.github.io/messageformat/page-guide")}},t}(h.TranslateMessageFormatCompiler);zc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new zc(t.ɵɵinject(h.MESSAGE_FORMAT_CONFIG,8))},token:zc,providedIn:"root"}),zc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var Wc=function(){function e(){this.inputComponentMap=new Map}return e.prototype.registerInputComponent=function(e,t){if(this.inputComponentMap.has(e))throw new Error('Cannot register an InputComponent with the id "'+e+'", as one with that id already exists');this.inputComponentMap.set(e,t)},e.prototype.getInputComponent=function(e){return this.inputComponentMap.get(e)},e}();Wc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Wc},token:Wc,providedIn:"root"}),Wc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var Zc=function(){function e(e,t){this.componentFactoryResolver=e,this.componentRegistryService=t}return e.prototype.registerCustomFieldComponent=function(e,t,n){var r=this.generateId(e,t,!0);this.componentRegistryService.registerInputComponent(r,n)},e.prototype.customFieldComponentExists=function(e,t){var n=this.generateId(e,t,!0);return this.componentRegistryService.getInputComponent(n)?n:void 0},e.prototype.generateId=function(e,t,n){var r=e;return n&&(r+="-customFields"),r+="-"+t},e}();Zc.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Zc(t.ɵɵinject(t.ComponentFactoryResolver),t.ɵɵinject(Wc))},token:Zc,providedIn:"root"}),Zc.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Zc.ctorParameters=function(){return[{type:t.ComponentFactoryResolver},{type:Wc}]};var Yc=function(){};Yc.id="boolean-form-input",Yc.decorators=[{type:t.Component,args:[{selector:"vdr-boolean-form-input",template:'<clr-checkbox-wrapper>\r\n <input\r\n type="checkbox"\r\n clrCheckbox\r\n [formControl]="formControl"\r\n [vdrDisabled]="!!readonly"\r\n />\r\n</clr-checkbox-wrapper>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var Jc=function(e){this.dataService=e,this.currencyCode$=this.dataService.settings.getActiveChannel().mapStream((function(e){return e.activeChannel.currencyCode}))};Jc.id="currency-form-input",Jc.decorators=[{type:t.Component,args:[{selector:"vdr-currency-form-input",template:'<vdr-currency-input\r\n [formControl]="formControl"\r\n [readonly]="readonly"\r\n [currencyCode]="currencyCode$ | async"\r\n></vdr-currency-input>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Jc.ctorParameters=function(){return[{type:Ql}]},Jc.propDecorators={readonly:[{type:t.Input}]};var Kc=function(){function e(e){this.dataService=e}return e.prototype.ngOnInit=function(){this.customerGroups$=this.dataService.customer.getCustomerGroupList({take:1e3}).mapSingle((function(e){return e.customerGroups.items})).pipe(r.startWith([]))},e.prototype.selectGroup=function(e){this.formControl.setValue(e.id)},e}();Kc.id="customer-group-form-input",Kc.decorators=[{type:t.Component,args:[{selector:"vdr-customer-group-form-input",template:'<ng-select\r\n [items]="customerGroups$ | async"\r\n appendTo="body"\r\n [addTag]="false"\r\n [multiple]="false"\r\n bindValue="id"\r\n [clearable]="true"\r\n [searchable]="false"\r\n [ngModel]="formControl.value"\r\n (change)="selectGroup($event)"\r\n>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <vdr-chip [colorFrom]="item.id">{{ item.name }}</vdr-chip>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item="item">\r\n <vdr-chip [colorFrom]="item.id">{{ item.name }}</vdr-chip>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Kc.ctorParameters=function(){return[{type:Ql}]},Kc.propDecorators={readonly:[{type:t.Input}]};var Qc=function(){};Qc.id="date-form-input",Qc.decorators=[{type:t.Component,args:[{selector:"vdr-date-form-input",template:'<vdr-datetime-picker\r\n [formControl]="formControl"\r\n [min]="config?.min"\r\n [max]="config?.max"\r\n [yearRange]="config?.yearRange"\r\n [readonly]="readonly"\r\n>\r\n</vdr-datetime-picker>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Qc.propDecorators={readonly:[{type:t.Input}]};var Xc=function(){function e(e){this.dataService=e,this.isListInput=!0}return e.prototype.ngOnInit=function(){this.facets$=this.dataService.facet.getAllFacets().mapSingle((function(e){return e.facets.items})).pipe(r.shareReplay(1))},e}();Xc.id="facet-value-form-input",Xc.decorators=[{type:t.Component,args:[{selector:"vdr-facet-value-form-input",template:'<vdr-facet-value-selector\r\n *ngIf="facets$ | async as facets"\r\n [readonly]="readonly"\r\n [facets]="facets"\r\n [formControl]="formControl"\r\n></vdr-facet-value-selector>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],Xc.ctorParameters=function(){return[{type:Ql}]};var eu=function(){};eu.id="number-form-input",eu.decorators=[{type:t.Component,args:[{selector:"vdr-number-form-input",template:'<vdr-affixed-input [suffix]="config?.suffix" [prefix]="config?.prefix">\r\n <input\r\n type="number"\r\n [readonly]="readonly"\r\n [min]="config?.min"\r\n [max]="config?.max"\r\n [step]="config?.step"\r\n [formControl]="formControl"\r\n />\r\n</vdr-affixed-input>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],eu.propDecorators={readonly:[{type:t.Input}]};var tu=function(){};tu.id="password-form-input",tu.decorators=[{type:t.Component,args:[{selector:"vdr-password-form-input",template:'<input\r\n type="password"\r\n [readonly]="readonly"\r\n [formControl]="formControl"\r\n/>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var nu=function(){function e(e){this.dataService=e,this.isListInput=!0}return e.prototype.ngOnInit=function(){var e=this;this.formControl.setValidators([function(e){return e.value&&e.value.length?null:{atLeastOne:{length:e.value.length}}}]),this.selection$=this.formControl.valueChanges.pipe(r.startWith(this.formControl.value),r.switchMap((function(t){return Array.isArray(t)&&0<t.length?c.forkJoin(t.map((function(t){return e.dataService.product.getProductVariant(t).mapSingle((function(e){return e.productVariant}))}))):c.of([])})),r.map((function(e){return e.filter(l.notNullOrUndefined)})))},e.prototype.addProductVariant=function(e){var t=this.formControl.value;this.formControl.setValue(te(new Set(te(t,[e.productVariantId]))))},e.prototype.removeProductVariant=function(e){var t=this.formControl.value;this.formControl.setValue(t.filter((function(t){return t!==e})))},e}();nu.id="product-selector-form-input",nu.decorators=[{type:t.Component,args:[{selector:"vdr-product-selector-form-input",template:'<ul class="list-unstyled">\r\n <li *ngFor="let variant of selection$ | async" class="variant">\r\n <div class="thumb">\r\n <img [src]="variant.product.featuredAsset | assetPreview: 32" />\r\n </div>\r\n <div class="detail">\r\n <div>{{ variant.name }}</div>\r\n <div class="sku">{{ variant.sku }}</div>\r\n </div>\r\n <div class="flex-spacer"></div>\r\n <button\r\n class="btn btn-link btn-sm btn-warning"\r\n (click)="removeProductVariant(variant.id)"\r\n [title]="\'common.remove-item-from-list\' | translate"\r\n >\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n </li>\r\n</ul>\r\n<vdr-product-selector (productSelected)="addProductVariant($event)"></vdr-product-selector>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".variant{margin-bottom:6px;display:flex;align-items:center;transition:background-color .2s}.variant:hover{background-color:var(--color-component-bg-200)}.thumb{margin-right:6px}.sku{color:var(--color-grey-400);font-size:smaller;line-height:1em}"]}]}],nu.ctorParameters=function(){return[{type:Ql}]};var ru=function(){};ru.id="relation-form-input",ru.decorators=[{type:t.Component,args:[{selector:"vdr-relation-form-input",template:'<div [ngSwitch]="config.entity">\r\n <vdr-relation-asset-input\r\n *ngSwitchCase="\'Asset\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-asset-input>\r\n <vdr-relation-product-input\r\n *ngSwitchCase="\'Product\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-product-input>\r\n <vdr-relation-customer-input\r\n *ngSwitchCase="\'Customer\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-customer-input>\r\n <vdr-relation-product-variant-input\r\n *ngSwitchCase="\'ProductVariant\'"\r\n [parentFormControl]="formControl"\r\n [config]="config"\r\n [readonly]="readonly"\r\n ></vdr-relation-product-variant-input>\r\n <ng-template ngSwitchDefault>\r\n No input component configured for "{{ config.entity }}" type\r\n </ng-template>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;background-color:var(--color-component-bg-200);padding:3px}"]}]}],ru.propDecorators={readonly:[{type:t.Input}]};var ou=function(){};ou.id="select-form-input",ou.decorators=[{type:t.Component,args:[{selector:"vdr-select-form-input",template:'<select clrSelect [formControl]="formControl" [vdrDisabled]="readonly">\r\n <option *ngFor="let option of config.options" [value]="option.value">\r\n {{ (option | customFieldLabel) || option.label || option.value }}\r\n </option>\r\n</select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["select{width:100%}"]}]}],ou.propDecorators={readonly:[{type:t.Input}]};var iu=function(){};iu.id="text-form-input",iu.decorators=[{type:t.Component,args:[{selector:"vdr-text-form-input",template:'<input\r\n type="text"\r\n [readonly]="readonly"\r\n [formControl]="formControl"\r\n/>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var au=[Yc,Jc,Qc,Xc,eu,ou,iu,nu,Kc,tu,ru];function su(e,n){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.registerInputComponent(e,n)}},deps:[Wc]}}function lu(){return au.map((function(e){return su(e.id,e)}))}var cu=function(){function e(e,t,n,r){this.navBuilderService=e,this.route=t,this.dataService=n,this.notificationService=r,this.locationId$=new c.BehaviorSubject("")}return e.prototype.ngOnInit=function(){this.items$=c.combineLatest(this.navBuilderService.actionBarConfig$,this.locationId$).pipe(r.map((function(e){var t=ee(e,2),n=t[0],r=t[1];return n.filter((function(e){return e.locationId===r}))})))},e.prototype.ngOnChanges=function(e){"locationId"in e&&this.locationId$.next(e.locationId.currentValue)},e.prototype.handleClick=function(e,t){"function"==typeof t.onClick&&t.onClick(e,{route:this.route,dataService:this.dataService,notificationService:this.notificationService})},e.prototype.getRouterLink=function(e){return this.navBuilderService.getRouterLink(e,this.route)},e.prototype.getButtonStyles=function(e){var t=["btn"];return e.buttonStyle&&"link"===e.buttonStyle?(t.push("btn-link"),t):(t.push(this.getButtonColorClass(e)),t)},e.prototype.getButtonColorClass=function(e){switch(e.buttonColor){case void 0:case"primary":return"outline"===e.buttonStyle?"btn-outline":"btn-primary";case"success":return"outline"===e.buttonStyle?"btn-success-outline":"btn-success";case"warning":return"outline"===e.buttonStyle?"btn-warning-outline":"btn-warning";default:return l.assertNever(e.buttonColor),""}},e}();cu.decorators=[{type:t.Component,args:[{selector:"vdr-action-bar-items",template:'<ng-container *ngFor="let item of items$ | async">\r\n <button *vdrIfPermissions="item.requiresPermission"\r\n [routerLink]="getRouterLink(item)"\r\n [disabled]="item.disabled ? (item.disabled | async) : false"\r\n (click)="handleClick($event, item)"\r\n [ngClass]="getButtonStyles(item)">\r\n <clr-icon *ngIf="item.icon" [attr.shape]="item.icon"></clr-icon>\r\n {{ item.label | translate }}\r\n </button>\r\n</ng-container>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],cu.ctorParameters=function(){return[{type:vc},{type:f.ActivatedRoute},{type:Ql},{type:Uc}]},cu.propDecorators={locationId:[{type:t.HostBinding,args:["attr.data-location-id"]},{type:t.Input}]};var uu=function(){this.grow=!1};uu.decorators=[{type:t.Component,args:[{selector:"vdr-ab-left",template:"\n <ng-content></ng-content>\n "}]}],uu.propDecorators={grow:[{type:t.Input}]};var pu=function(){this.grow=!1};pu.decorators=[{type:t.Component,args:[{selector:"vdr-ab-right",template:"\n <ng-content></ng-content>\n "}]}],pu.propDecorators={grow:[{type:t.Input}]};var du=function(){};du.decorators=[{type:t.Component,args:[{selector:"vdr-action-bar",template:'<div class="left-content" [class.grow]="left?.grow"><ng-content select="vdr-ab-left"></ng-content></div>\r\n<div class="right-content" [class.grow]="right?.grow"><ng-content select="vdr-ab-right"></ng-content></div>\r\n',styles:[":host{display:flex;justify-content:space-between;align-items:flex-start;background-color:var(--color-component-bg-100);position:sticky;top:-24px;z-index:25;border-bottom:1px solid var(--color-component-border-200)}:host>.grow{flex:1}"]}]}],du.propDecorators={left:[{type:t.ContentChild,args:[uu]}],right:[{type:t.ContentChild,args:[pu]}]};var mu=function(){};mu.decorators=[{type:t.Component,args:[{selector:"vdr-address-form",template:'<form [formGroup]="formGroup">\r\n <clr-input-container>\r\n <label>{{ \'customer.full-name\' | translate }}</label>\r\n <input formControlName="fullName" type="text" clrInput />\r\n </clr-input-container>\r\n\r\n <div class="clr-row">\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.street-line-1\' | translate }}</label>\r\n <input formControlName="streetLine1" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.street-line-2\' | translate }}</label>\r\n <input formControlName="streetLine2" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class="clr-row">\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.city\' | translate }}</label>\r\n <input formControlName="city" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.province\' | translate }}</label>\r\n <input formControlName="province" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <div class="clr-row">\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.postal-code\' | translate }}</label>\r\n <input formControlName="postalCode" type="text" clrInput />\r\n </clr-input-container>\r\n </div>\r\n <div class="clr-col-md-4">\r\n <clr-input-container>\r\n <label>{{ \'customer.country\' | translate }}</label>\r\n <select name="countryCode" formControlName="countryCode" clrInput clrSelect>\r\n <option *ngFor="let country of availableCountries" [value]="country.code">\r\n {{ country.name }}\r\n </option>\r\n </select>\r\n </clr-input-container>\r\n </div>\r\n </div>\r\n <clr-input-container>\r\n <label>{{ \'customer.phone-number\' | translate }}</label>\r\n <input formControlName="phoneNumber" type="text" clrInput />\r\n </clr-input-container>\r\n <section formGroupName="customFields" *ngIf="formGroup.get(\'customFields\') as customFieldsGroup">\r\n <label>{{ \'common.custom-fields\' | translate }}</label>\r\n <ng-container *ngFor="let customField of customFields">\r\n <vdr-custom-field-control\r\n entityName="Address"\r\n [customFieldsFormGroup]="customFieldsGroup"\r\n [customField]="customField"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </section>\r\n</form>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],mu.propDecorators={customFields:[{type:t.Input}],formGroup:[{type:t.Input}],availableCountries:[{type:t.Input}]};var gu=function(){};gu.decorators=[{type:t.Component,args:[{selector:"vdr-affixed-input",template:'<div [class.has-prefix]="!!prefix" [class.has-suffix]="!!suffix">\r\n <ng-content></ng-content>\r\n</div>\r\n<div class="affix prefix" *ngIf="prefix">{{ prefix }}</div>\r\n<div class="affix suffix" *ngIf="suffix">{{ suffix }}</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-flex}.affix{color:var(--color-grey-800);display:flex;align-items:center;background-color:var(--color-grey-200);border:1px solid var(--color-component-border-300);top:1px;padding:3px;line-height:.58333rem;transition:border .2s}::ng-deep .has-prefix input{border-top-left-radius:0!important;border-bottom-left-radius:0!important}.prefix{order:-1;border-radius:3px 0 0 3px;border-right:none}::ng-deep .has-suffix input{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.suffix{border-radius:0 3px 3px 0;border-left:none}"]}]}],gu.propDecorators={prefix:[{type:t.Input}],suffix:[{type:t.Input}]};var hu=function(){function e(){this.disabled=!1,this.readonly=!1}return e.prototype.ngOnChanges=function(e){"value"in e&&this.writeValue(e.value.currentValue)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.onInput=function(e){this.onChange(e)},e.prototype.writeValue=function(e){var t=+e;Number.isNaN(t)||(this._value=t)},e}();hu.decorators=[{type:t.Component,args:[{selector:"vdr-percentage-suffix-input",template:'\n <vdr-affixed-input suffix="%">\n <input\n type="number"\n step="1"\n [value]="_value"\n [disabled]="disabled"\n [readonly]="readonly"\n (input)="onInput($event.target.value)"\n (focus)="onTouch()"\n />\n </vdr-affixed-input>\n ',providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:hu,multi:!0}],styles:["\n :host {\n padding: 0;\n }\n "]}]}],hu.propDecorators={disabled:[{type:t.Input}],readonly:[{type:t.Input}],value:[{type:t.Input}]};var fu=function(){function e(e){this.serverConfig=e,this.dropZoneTarget="body",this.uploading=!1,this.selectFiles=new t.EventEmitter,this.dragging=!1,this.overDropZone=!1,this.dropZoneStyle={"width.px":0,"height.px":0,"top.px":0,"left.px":0}}return e.prototype.ngOnInit=function(){this.accept=this.serverConfig.serverConfig.permittedAssetTypes.join(","),this.fitDropZoneToTarget()},e.prototype.onDragEnter=function(){this.dragging=!0,this.fitDropZoneToTarget()},e.prototype.onDragLeave=function(e){e.clientX||e.clientY||(this.dragging=!1)},e.prototype.onDragOver=function(e){e.preventDefault()},e.prototype.onDrop=function(e){e.preventDefault(),this.dragging=!1,this.overDropZone=!1;var t=Array.from(e.dataTransfer?e.dataTransfer.items:[]).map((function(e){return e.getAsFile()})).filter(l.notNullOrUndefined);this.selectFiles.emit(t)},e.prototype.select=function(e){var t=e.target.files;t&&this.selectFiles.emit(Array.from(t))},e.prototype.fitDropZoneToTarget=function(){var e=document.querySelector(this.dropZoneTarget);if(e){var t=e.getBoundingClientRect();this.dropZoneStyle["width.px"]=t.width,this.dropZoneStyle["height.px"]=t.height,this.dropZoneStyle["top.px"]=t.top,this.dropZoneStyle["left.px"]=t.left}},e}();fu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-file-input",template:'<input type="file" class="file-input" #fileInput (change)="select($event)" multiple [accept]="accept" />\r\n<button class="btn btn-primary" (click)="fileInput.click()" [disabled]="uploading">\r\n <ng-container *ngIf="uploading; else selectable">\r\n <clr-spinner clrInline></clr-spinner>\r\n {{ \'asset.uploading\' | translate }}\r\n </ng-container>\r\n <ng-template #selectable>\r\n <clr-icon shape="upload-cloud"></clr-icon>\r\n {{ \'asset.upload-assets\' | translate }}\r\n </ng-template>\r\n</button>\r\n<div\r\n class="drop-zone"\r\n [ngStyle]="dropZoneStyle"\r\n [class.visible]="dragging"\r\n [class.dragging-over]="overDropZone"\r\n (dragenter)="overDropZone = true"\r\n (dragleave)="overDropZone = false"\r\n (dragover)="onDragOver($event)"\r\n (drop)="onDrop($event)"\r\n #dropZone\r\n>\r\n <div class="drop-label" (dragenter)="overDropZone = true">\r\n <clr-icon shape="upload-cloud" size="32"></clr-icon>\r\n {{ \'catalog.drop-files-to-upload\' | translate }}\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".file-input{display:none}.drop-zone{position:fixed;background-color:var(--color-primary-500);border:3px dashed var(--color-component-border-300);opacity:0;visibility:hidden;z-index:1000;transition:opacity .2s,background-color .2s,visibility 0s .2s;display:flex;align-items:center;justify-content:center}.drop-zone.visible{opacity:.3;visibility:visible;transition:opacity .2s,background-color .2s,border .2s,visibility 0s}.drop-zone .drop-label{background-color:hsla(0,0%,100%,.8);border-radius:3px;padding:24px;font-size:32px;pointer-events:none;opacity:.5;transition:opacity .2s}.drop-zone.dragging-over{border-color:#fff;background-color:var(--color-primary-500);opacity:.7;transition:background-color .2s,border .2s}.drop-zone.dragging-over .drop-label{opacity:1}"]}]}],fu.ctorParameters=function(){return[{type:Ur}]},fu.propDecorators={dropZoneTarget:[{type:t.Input}],uploading:[{type:t.Input}],selectFiles:[{type:t.Output}],onDragEnter:[{type:t.HostListener,args:["document:dragenter"]}],onDragLeave:[{type:t.HostListener,args:["document:dragleave",["$event"]]}]};var yu=function(){function e(e){this.dataService=e}return e.prototype.ngOnInit=function(){var e=this;this.assetWithTags$=c.of(this.asset).pipe(r.mergeMap((function(t){return e.hasTags(t)?c.of(t):e.dataService.product.getAsset(t.id).mapSingle((function(e){return e.asset}))})))},e.prototype.hasTags=function(e){return e.hasOwnProperty("tags")},e}();yu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-preview-dialog",template:'<ng-template vdrDialogTitle>\r\n <div class="title-row">\r\n {{ asset.name }}\r\n </div>\r\n</ng-template>\r\n\r\n<vdr-asset-preview\r\n *ngIf="assetWithTags$ | async as assetWithTags"\r\n [asset]="assetWithTags"\r\n (assetChange)="assetChanges = $event"\r\n (editClick)="resolveWith()"\r\n></vdr-asset-preview>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{height:70vh}.update-button.hidden{visibility:hidden}"]}]}],yu.ctorParameters=function(){return[{type:Ql}]};var vu=function(){function e(e){this.modalService=e,this.multiSelect=!1,this.canDelete=!1,this.selectionChange=new t.EventEmitter,this.deleteAssets=new t.EventEmitter,this.selection=[]}return e.prototype.ngOnChanges=function(){var e,t;if(this.assets){var n=function(e){var t=r.assets.find((function(t){return t.id===e.id}));t&&Object.assign(e,t)},r=this;try{for(var o=X(this.selection),i=o.next();!i.done;i=o.next()){n(i.value)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}},e.prototype.toggleSelection=function(e,t){var n,r=this,o=this.selection.findIndex((function(e){return e.id===t.id}));if(this.multiSelect&&e.shiftKey&&1<=this.selection.length){var i=this.selection[this.selection.length-1],a=this.assets.findIndex((function(e){return e.id===i.id})),s=this.assets.findIndex((function(e){return e.id===t.id})),l=s<a?s:a,c=s>a?s+1:a;(n=this.selection).push.apply(n,te(this.assets.slice(l,c).filter((function(e){return!r.selection.find((function(t){return t.id===e.id}))}))))}else-1===o?this.multiSelect&&(e.ctrlKey||e.shiftKey)?this.selection.push(t):this.selection=[t]:this.multiSelect&&e.ctrlKey?this.selection.splice(o,1):1<this.selection.length?this.selection=[t]:this.selection.splice(o,1);this.selection=this.selection.map((function(e){return Object.assign({},e)})),this.selectionChange.emit(this.selection)},e.prototype.isSelected=function(e){return!!this.selection.find((function(t){return t.id===e.id}))},e.prototype.lastSelected=function(){return this.selection[this.selection.length-1]},e.prototype.previewAsset=function(e){this.modalService.fromComponent(yu,{size:"xl",closable:!0,locals:{asset:e}}).subscribe()},e.prototype.entityInfoClick=function(e){e.preventDefault(),e.stopPropagation()},e}();vu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-gallery",template:'<div class="gallery">\r\n <div\r\n class="card"\r\n *ngFor="let asset of assets"\r\n (click)="toggleSelection($event, asset)"\r\n [class.selected]="isSelected(asset)"\r\n >\r\n <div class="card-img">\r\n <div class="selected-checkbox"><clr-icon shape="check-circle" size="32"></clr-icon></div>\r\n <img [src]="asset | assetPreview: \'thumb\'" />\r\n </div>\r\n <div class="detail">\r\n <vdr-entity-info\r\n [entity]="asset"\r\n [small]="true"\r\n (click)="entityInfoClick($event)"\r\n ></vdr-entity-info>\r\n <span [title]="asset.name">{{ asset.name }}</span>\r\n </div>\r\n </div>\r\n</div>\r\n<div class="info-bar">\r\n <div class="card">\r\n <div class="card-img">\r\n <div class="placeholder" *ngIf="selection.length === 0">\r\n <clr-icon shape="image" size="128"></clr-icon>\r\n <div>{{ \'catalog.no-selection\' | translate }}</div>\r\n </div>\r\n <img\r\n class="preview"\r\n *ngIf="selection.length >= 1"\r\n [src]="lastSelected().preview + \'?preset=medium\'"\r\n />\r\n </div>\r\n <div class="card-block details" *ngIf="selection.length >= 1">\r\n <div class="name">{{ lastSelected().name }}</div>\r\n <div>{{ \'asset.original-asset-size\' | translate }}: {{ lastSelected().fileSize | filesize }}</div>\r\n\r\n <ng-container *ngIf="selection.length === 1">\r\n <vdr-chip *ngFor="let tag of lastSelected().tags" [colorFrom]="tag.value"><clr-icon shape="tag" class="mr2"></clr-icon> {{ tag.value }}</vdr-chip>\r\n <div>\r\n <button (click)="previewAsset(lastSelected())" class="btn btn-link">\r\n <clr-icon shape="eye"></clr-icon> {{ \'asset.preview\' | translate }}\r\n </button>\r\n </div>\r\n <div>\r\n <a [routerLink]="[\'./\', lastSelected().id]" class="btn btn-link">\r\n <clr-icon shape="pencil"></clr-icon> {{ \'common.edit\' | translate }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <div *ngIf="canDelete">\r\n <button (click)="deleteAssets.emit(selection)" class="btn btn-link">\r\n <clr-icon shape="trash" class="is-danger"></clr-icon> {{ \'common.delete\' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="card stack" [class.visible]="selection.length > 1"></div>\r\n <div class="selection-count" [class.visible]="selection.length > 1">\r\n {{ \'asset.assets-selected-count\' | translate: { count: selection.length } }}\r\n <ul>\r\n <li *ngFor="let asset of selection">{{ asset.name }}</li>\r\n </ul>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;overflow:hidden}.gallery{flex:1;display:grid;grid-template-columns:repeat(auto-fill,150px);grid-template-rows:repeat(auto-fill,180px);grid-gap:10px 20px;overflow-y:auto;padding-left:12px;padding-top:12px;padding-bottom:12px}.gallery .card:hover{box-shadow:0 .125rem 0 0 var(--color-primary-500);border:1px solid var(--color-primary-500)}.card{margin-top:0;position:relative}.selected-checkbox{opacity:0;position:absolute;color:var(--color-success-500);background-color:#fff;border-radius:50%;top:-12px;left:-12px;box-shadow:0 5px 5px -4px rgba(0,0,0,.75);transition:opacity .1s}.card.selected{box-shadow:0 .125rem 0 0 var(--color-primary-500);border:1px solid var(--color-primary-500)}.card.selected .selected-checkbox{opacity:1}.detail{font-size:12px;margin:3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.detail vdr-entity-info{height:16px}.info-bar{width:25%;padding:0 6px;overflow-y:auto}.info-bar .card{z-index:1}.info-bar .stack{z-index:0;opacity:0;transform:perspective(500px) translateZ(0) translateY(-16px);height:16px;transition:transform .3s,opacity 0s .3s;background-color:#fff}.info-bar .stack.visible{opacity:1;transform:perspective(500px) translateZ(-44px) translateY(0);background-color:var(--color-component-bg-100);transition:transform .3s,color .3s}.info-bar .selection-count{opacity:0;position:relative;text-align:center;visibility:hidden;transition:opacity .3s,visibility 0s .3s}.info-bar .selection-count.visible{opacity:1;visibility:visible;transition:opacity .3s,visibility 0s}.info-bar .selection-count ul{text-align:left;list-style-type:none;margin-left:12px}.info-bar .selection-count ul li{font-size:12px}.info-bar .placeholder{text-align:center;color:var(--color-grey-300)}.info-bar .preview img{max-width:100%}.info-bar .details{font-size:12px;word-break:break-all}.info-bar .name{line-height:14px;font-weight:700}"]}]}],vu.ctorParameters=function(){return[{type:lc}]},vu.propDecorators={assets:[{type:t.Input}],multiSelect:[{type:t.Input}],canDelete:[{type:t.Input}],selectionChange:[{type:t.Output}],deleteAssets:[{type:t.Output}]};var Cu=function(){function t(e,t){this.dataService=e,this.notificationService=t,this.paginationConfig={currentPage:1,itemsPerPage:25,totalItems:1},this.multiSelect=!0,this.initialTags=[],this.selection=[],this.searchTerm$=new c.BehaviorSubject(void 0),this.filterByTags$=new c.BehaviorSubject(void 0),this.uploading=!1,this.destroy$=new c.Subject}return t.prototype.ngOnInit=function(){var e=this;this.listQuery=this.dataService.product.getAssetList(this.paginationConfig.itemsPerPage,0),this.allTags$=this.dataService.product.getTagList().mapSingle((function(e){return e.tags.items})),this.assets$=this.listQuery.stream$.pipe(r.tap((function(t){return e.paginationConfig.totalItems=t.assets.totalItems})),r.map((function(e){return e.assets.items}))),this.searchTerm$.pipe(r.debounceTime(250),r.takeUntil(this.destroy$)).subscribe((function(){e.fetchPage(e.paginationConfig.currentPage,e.paginationConfig.itemsPerPage)})),this.filterByTags$.pipe(r.debounceTime(100),r.takeUntil(this.destroy$)).subscribe((function(){e.fetchPage(e.paginationConfig.currentPage,e.paginationConfig.itemsPerPage)}))},t.prototype.ngAfterViewInit=function(){var e=this;0<this.initialTags.length&&this.allTags$.pipe(r.take(1),r.map((function(t){return t.filter((function(t){return e.initialTags.includes(t.value)}))})),r.tap((function(t){return e.filterByTags$.next(t)})),r.delay(1)).subscribe((function(t){return e.assetSearchInputComponent.setTags(t)}))},t.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},t.prototype.pageChange=function(e){this.paginationConfig.currentPage=e,this.fetchPage(this.paginationConfig.currentPage,this.paginationConfig.itemsPerPage)},t.prototype.itemsPerPageChange=function(e){this.paginationConfig.itemsPerPage=e,this.fetchPage(this.paginationConfig.currentPage,this.paginationConfig.itemsPerPage)},t.prototype.cancel=function(){this.resolveWith()},t.prototype.select=function(){this.resolveWith(this.selection)},t.prototype.createAssets=function(e){var t=this;e.length&&(this.uploading=!0,this.dataService.product.createAssets(e).pipe(r.finalize((function(){return t.uploading=!1}))).subscribe((function(n){t.fetchPage(t.paginationConfig.currentPage,t.paginationConfig.itemsPerPage),t.notificationService.success(b.marker("asset.notify-create-assets-success"),{count:e.length})})))},t.prototype.fetchPage=function(t,n){var r,o=+n,i=(t-1)*+n,a=this.searchTerm$.value,s=null===(r=this.filterByTags$.value)||void 0===r?void 0:r.map((function(e){return e.value}));this.listQuery.ref.refetch({options:{skip:i,take:o,filter:{name:{contains:a}},sort:{createdAt:e.SortOrder.DESC},tags:s,tagsOperator:e.LogicalOperator.AND}})},t}();Cu.decorators=[{type:t.Component,args:[{selector:"vdr-asset-picker-dialog",template:'<ng-template vdrDialogTitle>\r\n <div class="title-row">\r\n <span>{{ \'asset.select-assets\' | translate }}</span>\r\n <div class="flex-spacer"></div>\r\n <vdr-asset-file-input\r\n class="ml3"\r\n (selectFiles)="createAssets($event)"\r\n [uploading]="uploading"\r\n dropZoneTarget=".modal-content"\r\n ></vdr-asset-file-input>\r\n </div>\r\n</ng-template>\r\n<vdr-asset-search-input\r\n class="mb2"\r\n [tags]="allTags$ | async"\r\n (searchTermChange)="searchTerm$.next($event)"\r\n (tagsChange)="filterByTags$.next($event)"\r\n #assetSearchInputComponent\r\n></vdr-asset-search-input>\r\n<vdr-asset-gallery\r\n [assets]="(assets$ | async)! | paginate: paginationConfig"\r\n [multiSelect]="multiSelect"\r\n (selectionChange)="selection = $event"\r\n></vdr-asset-gallery>\r\n\r\n<div class="paging-controls">\r\n <vdr-items-per-page-controls\r\n [itemsPerPage]="paginationConfig.itemsPerPage"\r\n (itemsPerPageChange)="itemsPerPageChange($event)"\r\n ></vdr-items-per-page-controls>\r\n\r\n <vdr-pagination-controls\r\n [currentPage]="paginationConfig.currentPage"\r\n [itemsPerPage]="paginationConfig.itemsPerPage"\r\n [totalItems]="paginationConfig.totalItems"\r\n (pageChange)="pageChange($event)"\r\n ></vdr-pagination-controls>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type="button" class="btn" (click)="cancel()">{{ \'common.cancel\' | translate }}</button>\r\n <button type="submit" (click)="select()" class="btn btn-primary" [disabled]="selection.length === 0">\r\n {{ \'asset.add-asset-with-count\' | translate: { count: selection.length } }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;flex-direction:column;height:70vh}.title-row{display:flex;align-items:center;justify-content:space-between}vdr-asset-gallery{flex:1}.paging-controls{padding-top:6px;border-top:1px solid var(--color-component-border-100);display:flex;justify-content:space-between;flex-shrink:0}"]}]}],Cu.ctorParameters=function(){return[{type:Ql},{type:Uc}]},Cu.propDecorators={assetSearchInputComponent:[{type:t.ViewChild,args:["assetSearchInputComponent"]}]};var bu=function(){function e(e){this.dataService=e,this.toDelete=[],this.toUpdate=[]}return e.prototype.ngOnInit=function(){this.allTags$=this.dataService.product.getTagList().mapStream((function(e){return e.tags.items}))},e.prototype.toggleDelete=function(e){this.markedAsDeleted(e)?this.toDelete=this.toDelete.filter((function(t){return t!==e})):this.toDelete.push(e)},e.prototype.markedAsDeleted=function(e){return this.toDelete.includes(e)},e.prototype.updateTagValue=function(e,t){var n=this.toUpdate.find((function(t){return t.id===e}));n?n.value=t:this.toUpdate.push({id:e,value:t})},e.prototype.saveChanges=function(){var e,t,n,r,o=this,i=[];try{for(var a=X(this.toDelete),s=a.next();!s.done;s=a.next()){var l=s.value;i.push(this.dataService.product.deleteTag(l))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}try{for(var u=X(this.toUpdate),p=u.next();!p.done;p=u.next()){var d=p.value;this.toDelete.includes(d.id)||i.push(this.dataService.product.updateTag(d))}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}return c.forkJoin(i).subscribe((function(){return o.resolveWith(!0)}))},e}();bu.decorators=[{type:t.Component,args:[{selector:"vdr-manage-tags-dialog",template:'<ng-template vdrDialogTitle>\r\n <span>{{ \'common.manage-tags\' | translate }}</span>\r\n</ng-template>\r\n<p class="mt0 mb4">{{ \'common.manage-tags-description\' | translate }}</p>\r\n<ul class="tag-list" *ngFor="let tag of allTags$ | async">\r\n <li class="mb2 p1" [class.to-delete]="markedAsDeleted(tag.id)">\r\n <clr-icon shape="tag" class="is-solid mr2" [style.color]="tag.value | stringToColor"></clr-icon>\r\n <input type="text" (input)="updateTagValue(tag.id, $event.target.value)" [value]="tag.value" />\r\n <button class="icon-button" (click)="toggleDelete(tag.id)">\r\n <clr-icon shape="trash" class="is-danger" [class.is-solid]="markedAsDeleted(tag.id)"></clr-icon>\r\n </button>\r\n </li>\r\n</ul>\r\n<ng-template vdrDialogButtons>\r\n <button type="submit" (click)="resolveWith(false)" class="btn btn-secondary">\r\n {{ \'common.cancel\' | translate }}\r\n </button>\r\n <button\r\n type="submit"\r\n (click)="saveChanges()"\r\n class="btn btn-primary"\r\n [disabled]="!toUpdate.length && !toDelete.length"\r\n >\r\n {{ \'common.update\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".tag-list{list-style-type:none}.tag-list li{display:flex;align-items:center}.tag-list li input{max-width:170px}.tag-list li.to-delete{opacity:.7;background-color:var(--color-component-bg-300)}.tag-list li.to-delete input{background-color:transparent!important}"]}]}],bu.ctorParameters=function(){return[{type:Ql}]};var Su=function(){function e(e,n,r,o,i){this.formBuilder=e,this.dataService=n,this.notificationService=r,this.changeDetector=o,this.modalService=i,this.editable=!1,this.customFields=[],this.assetChange=new t.EventEmitter,this.editClick=new t.EventEmitter,this.size="medium",this.width=0,this.height=0,this.centered=!0,this.settingFocalPoint=!1}return Object.defineProperty(e.prototype,"fpx",{get:function(){return this.asset.focalPoint?this.asset.focalPoint.x:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fpy",{get:function(){return this.asset.focalPoint?this.asset.focalPoint.y:null},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e,t=this;this.asset.focalPoint;this.form=this.formBuilder.group({name:[this.asset.name],tags:[null===(e=this.asset.tags)||void 0===e?void 0:e.map((function(e){return e.value}))]}),this.subscription=this.form.valueChanges.subscribe((function(e){t.assetChange.emit({id:t.asset.id,name:e.name,tags:e.tags})})),this.subscription.add(c.fromEvent(window,"resize").pipe(r.debounceTime(50)).subscribe((function(){t.updateDimensions(),t.changeDetector.markForCheck()})))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.customFieldIsSet=function(e){var t;return!!(null===(t=this.customFieldsForm)||void 0===t?void 0:t.get([e]))},e.prototype.getSourceFileName=function(){var e=this.asset.source.split("/");return e[e.length-1]},e.prototype.onImageLoad=function(){this.updateDimensions(),this.changeDetector.markForCheck()},e.prototype.updateDimensions=function(){var e=this.imageElementRef.nativeElement,t=this.previewDivRef.nativeElement,n=e.naturalWidth,r=e.naturalHeight,o=t.offsetWidth,i=t.offsetHeight;if(this.settingFocalPoint){var a=r/(i-96),s=n/o;if(1<a||1<s){var l=a<s?s:a;return this.width=Math.round(n/l),this.height=Math.round(r/l),void(this.centered=!0)}}this.width=n,this.height=r,this.centered=n<=o&&r<=i},e.prototype.setFocalPointStart=function(){this.sizePriorToSettingFocalPoint=this.size,this.size="medium",this.settingFocalPoint=!0,this.lastFocalPoint=this.asset.focalPoint||{x:.5,y:.5},this.updateDimensions()},e.prototype.removeFocalPoint=function(){var e=this;this.dataService.product.updateAsset({id:this.asset.id,focalPoint:null}).subscribe((function(){e.notificationService.success(b.marker("asset.update-focal-point-success")),e.asset=Object.assign(Object.assign({},e.asset),{focalPoint:null}),e.changeDetector.markForCheck()}),(function(){return e.notificationService.error(b.marker("asset.update-focal-point-error"))}))},e.prototype.onFocalPointChange=function(e){this.lastFocalPoint=e},e.prototype.setFocalPointCancel=function(){this.settingFocalPoint=!1,this.lastFocalPoint=void 0,this.size=this.sizePriorToSettingFocalPoint},e.prototype.setFocalPointEnd=function(){var e=this;if(this.settingFocalPoint=!1,this.size=this.sizePriorToSettingFocalPoint,this.lastFocalPoint){var t=this.lastFocalPoint,n=t.x,r=t.y;this.lastFocalPoint=void 0,this.dataService.product.updateAsset({id:this.asset.id,focalPoint:{x:n,y:r}}).subscribe((function(){e.notificationService.success(b.marker("asset.update-focal-point-success")),e.asset=Object.assign(Object.assign({},e.asset),{focalPoint:{x:n,y:r}}),e.changeDetector.markForCheck()}),(function(){return e.notificationService.error(b.marker("asset.update-focal-point-error"))}))}},e.prototype.manageTags=function(){var e=this;this.modalService.fromComponent(bu,{size:"sm"}).subscribe((function(t){t&&e.notificationService.success(b.marker("common.notify-updated-tags-success"))}))},e}();Su.decorators=[{type:t.Component,args:[{selector:"vdr-asset-preview",template:'<div class="preview-image" #previewDiv [class.centered]="centered">\r\n <div class="image-wrapper">\r\n <vdr-focal-point-control\r\n [width]="width"\r\n [height]="height"\r\n [fpx]="fpx"\r\n [fpy]="fpy"\r\n [editable]="settingFocalPoint"\r\n (focalPointChange)="onFocalPointChange($event)"\r\n >\r\n <img\r\n class="asset-image"\r\n [src]="asset | assetPreview: size"\r\n #imageElement\r\n (load)="onImageLoad()"\r\n />\r\n </vdr-focal-point-control>\r\n <div class="focal-point-info" *ngIf="settingFocalPoint">\r\n <button class="icon-button" (click)="setFocalPointCancel()">\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n <button class="btn btn-primary btn-sm" (click)="setFocalPointEnd()" [disabled]="!lastFocalPoint">\r\n <clr-icon shape="crosshairs"></clr-icon>\r\n {{ \'asset.set-focal-point\' | translate }}\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<div class="controls" [class.fade]="settingFocalPoint">\r\n <form [formGroup]="form">\r\n <clr-input-container class="name-input" *ngIf="editable">\r\n <label>{{ \'common.name\' | translate }}</label>\r\n <input\r\n clrInput\r\n type="text"\r\n formControlName="name"\r\n [readonly]="!([\'UpdateCatalog\', \'UpdateAsset\'] | hasPermission) || settingFocalPoint"\r\n />\r\n </clr-input-container>\r\n\r\n <vdr-labeled-data [label]="\'common.name\' | translate" *ngIf="!editable">\r\n <span class="elide">\r\n {{ asset.name }}\r\n </span>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.source-file\' | translate">\r\n <a [href]="asset.source" [title]="asset.source" target="_blank" class="elide source-link">{{\r\n getSourceFileName()\r\n }}</a>\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.original-asset-size\' | translate">\r\n {{ asset.fileSize | filesize }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.dimensions\' | translate">\r\n {{ asset.width }} x {{ asset.height }}\r\n </vdr-labeled-data>\r\n\r\n <vdr-labeled-data [label]="\'asset.focal-point\' | translate">\r\n <span *ngIf="fpx"\r\n ><clr-icon shape="crosshairs"></clr-icon> x: {{ fpx | number: \'1.2-2\' }}, y:\r\n {{ fpy | number: \'1.2-2\' }}</span\r\n >\r\n <span *ngIf="!fpx">{{ \'common.not-set\' | translate }}</span>\r\n <br />\r\n <button\r\n class="btn btn-secondary-outline btn-sm"\r\n [disabled]="settingFocalPoint"\r\n (click)="setFocalPointStart()"\r\n >\r\n <ng-container *ngIf="!fpx">{{ \'asset.set-focal-point\' | translate }}</ng-container>\r\n <ng-container *ngIf="fpx">{{ \'asset.update-focal-point\' | translate }}</ng-container>\r\n </button>\r\n <button\r\n class="btn btn-warning-outline btn-sm"\r\n [disabled]="settingFocalPoint"\r\n *ngIf="!!fpx"\r\n (click)="removeFocalPoint()"\r\n >\r\n {{ \'asset.unset-focal-point\' | translate }}\r\n </button>\r\n </vdr-labeled-data>\r\n <vdr-labeled-data [label]="\'common.tags\' | translate">\r\n <ng-container *ngIf="editable">\r\n <vdr-tag-selector formControlName="tags"></vdr-tag-selector>\r\n <button class="btn btn-link btn-sm" (click)="manageTags()">\r\n <clr-icon shape="tags"></clr-icon>\r\n {{ \'common.manage-tags\' | translate }}\r\n </button>\r\n </ng-container>\r\n <div *ngIf="!editable">\r\n <vdr-chip *ngFor="let tag of asset.tags" [colorFrom]="tag.value">\r\n <clr-icon shape="tag" class="mr2"></clr-icon>\r\n {{ tag.value }}</vdr-chip\r\n >\r\n </div>\r\n </vdr-labeled-data>\r\n </form>\r\n <section *ngIf="customFields.length">\r\n <label>{{ \'common.custom-fields\' | translate }}</label>\r\n <ng-container *ngFor="let customField of customFields">\r\n <vdr-custom-field-control\r\n *ngIf="customFieldIsSet(customField.name)"\r\n entityName="Asset"\r\n [compact]="true"\r\n [customFieldsFormGroup]="customFieldsForm"\r\n [customField]="customField"\r\n ></vdr-custom-field-control>\r\n </ng-container>\r\n </section>\r\n <div class="flex-spacer"></div>\r\n <div class="preview-select">\r\n <clr-select-container>\r\n <label>{{ \'asset.preview\' | translate }}</label>\r\n <select clrSelect name="options" [(ngModel)]="size" [disabled]="settingFocalPoint">\r\n <option value="tiny">tiny</option>\r\n <option value="thumb">thumb</option>\r\n <option value="small">small</option>\r\n <option value="medium">medium</option>\r\n <option value="large">large</option>\r\n <option value="">full size</option>\r\n </select>\r\n </clr-select-container>\r\n <div class="asset-detail">{{ width }} x {{ height }}</div>\r\n </div>\r\n <a\r\n *ngIf="!editable"\r\n class="btn btn-link btn-sm"\r\n [routerLink]="[\'/catalog\', \'assets\', asset.id]"\r\n (click)="editClick.emit()"\r\n >\r\n <clr-icon shape="edit"></clr-icon> {{ \'common.edit\' | translate }}\r\n </a>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[':host{display:flex;height:100%}.preview-image{width:100%;height:100%;min-height:60vh;overflow:auto;text-align:center;box-shadow:inset 0 0 5px 0 rgba(0,0,0,.1);background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACuoAAArqAVDM774AAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAK0lEQVQ4T2P4jwP8xgFGNSADqDwGIF0DlMYAUH0YYFQDMoDKYwASNfz/DwB/JvcficphowAAAABJRU5ErkJggg==");flex:1}.preview-image.centered{display:flex;align-items:center;justify-content:center}.preview-image vdr-focal-point-control{position:relative;box-shadow:0 0 10px -3px rgba(0,0,0,.15)}.preview-image .image-wrapper{position:relative}.preview-image .asset-image{width:100%}.preview-image .focal-point-info{position:absolute;display:flex;right:0}.controls{display:flex;flex-direction:column;margin-left:12px;min-width:15vw;max-width:25vw;transition:opacity .3s}.controls.fade{opacity:.5}.controls .name-input{margin-bottom:24px}.controls ::ng-deep .clr-control-container,.controls ::ng-deep .clr-control-container .clr-input{width:100%}.controls .elide{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:block}.controls .source-link{direction:rtl}.controls .preview-select{display:flex;align-items:center;margin-bottom:12px}.controls .preview-select clr-select-container{margin-right:12px}']}]}],Su.ctorParameters=function(){return[{type:C.FormBuilder},{type:Ql},{type:Uc},{type:t.ChangeDetectorRef},{type:lc}]},Su.propDecorators={asset:[{type:t.Input}],editable:[{type:t.Input}],customFields:[{type:t.Input}],customFieldsForm:[{type:t.Input}],assetChange:[{type:t.Output}],editClick:[{type:t.Output}],imageElementRef:[{type:t.ViewChild,args:["imageElement",{static:!0}]}],previewDivRef:[{type:t.ViewChild,args:["previewDiv",{static:!0}]}]};var Iu=function(){function e(){this._selected=[]}return Object.defineProperty(e.prototype,"value",{get:function(){return this._selected},enumerable:!1,configurable:!0}),e.prototype.select=function(e,t,n){if(e.selected=!0,n||!e.children)if(e.value.label){var r=function(e){return!!e.value.label};this._selected.filter(r).length>0?this._selected=this._selected.filter((function(e){return!r(e)})).concat(e):this._selected.push(e)}else this._selected.push(e)},e.prototype.unselect=function(e,t){this._selected=this._selected.filter((function(t){return t!==e})),e.selected=!1},e.prototype.clear=function(e){this._selected=e?this._selected.filter((function(e){return e.disabled})):[]},e.prototype._setChildrenSelectedState=function(e,t){e.forEach((function(e){return e.selected=t}))},e.prototype._removeChildren=function(e){this._selected=this._selected.filter((function(t){return t.parent!==e}))},e.prototype._removeParent=function(e){this._selected=this._selected.filter((function(t){return t!==e}))},e}();function Tu(){return new Iu}var Du=Tu,Au=function(){function e(){var e=this;this.searchTermChange=new t.EventEmitter,this.tagsChange=new t.EventEmitter,this.lastTerm="",this.lastTagIds=[],this.filterTagResults=function(t,n){return!!e.isTag(n)&&n.value.toLowerCase().startsWith(t.toLowerCase())},this.isTag=function(e){return"object"==typeof e&&!!e&&e.hasOwnProperty("value")}}return e.prototype.setSearchTerm=function(e){var t=this;if(e)this.selectComponent.select({label:e,value:{label:e}});else{var n=this.selectComponent.selectedItems.find((function(e){return!t.isTag(e.value)}));n&&this.selectComponent.unselect(n)}},e.prototype.setTags=function(e){var t=this,n=this.selectComponent.items;this.selectComponent.selectedItems.forEach((function(n){t.isTag(n.value)&&!e.map((function(e){return e.id})).includes(n.id)&&t.selectComponent.unselect(n)})),e.map((function(e){return n.find((function(n){return t.isTag(n)&&n.id===e.id}))})).filter(l.notNullOrUndefined).forEach((function(e){t.selectComponent.selectedItems.find((function(n){var r=n.value;return!!t.isTag(r)&&r.id===e.id}))||t.selectComponent.select({label:"",value:e})}))},e.prototype.onSelectChange=function(e){var t=this;Array.isArray(e)||(e=[e]);var n=e.filter((function(e){return!t.isTag(e)}));if(1<n.length)for(var r=0;r<n.length-1;r++);var o=n[n.length-1],i=o?o.label:"",a=e.filter(this.isTag);i!==this.lastTerm&&(this.searchTermChange.emit(i),this.lastTerm=i),this.lastTagIds.join(",")!==a.map((function(e){return e.id})).join(",")&&(this.tagsChange.emit(a),this.lastTagIds=a.map((function(e){return e.id})))},e.prototype.isSearchHeaderSelected=function(){return-1===this.selectComponent.itemsList.markedIndex},e.prototype.addTagFn=function(e){return{label:e}},e}();Au.decorators=[{type:t.Component,args:[{selector:"vdr-asset-search-input",template:'<ng-select\r\n [addTag]="addTagFn"\r\n [placeholder]="\'catalog.search-asset-name-or-tag\' | translate"\r\n [items]="tags"\r\n [searchFn]="filterTagResults"\r\n [hideSelected]="true"\r\n [multiple]="true"\r\n [markFirst]="false"\r\n (change)="onSelectChange($event)"\r\n #selectComponent\r\n>\r\n <ng-template ng-header-tmp>\r\n <div\r\n class="search-header"\r\n *ngIf="selectComponent.searchTerm"\r\n [class.selected]="isSearchHeaderSelected()"\r\n (click)="selectComponent.selectTag()"\r\n >\r\n {{ \'catalog.search-for-term\' | translate }}: {{ selectComponent.searchTerm }}\r\n </div>\r\n </ng-template>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <ng-container *ngIf="item.value">\r\n <vdr-chip [colorFrom]="item.value" icon="close" (iconClick)="clear(item)"><clr-icon shape="tag" class="mr2"></clr-icon> {{ item.value }}</vdr-chip>\r\n </ng-container>\r\n <ng-container *ngIf="!item.value">\r\n <vdr-chip [icon]="\'times\'" (iconClick)="clear(item)">"{{ item.label || item }}"</vdr-chip>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item="item" let-index="index" let-search="searchTerm">\r\n <ng-container *ngIf="item.value">\r\n <vdr-chip [colorFrom]="item.value"><clr-icon shape="tag" class="mr2"></clr-icon> {{ item.value }}</vdr-chip>\r\n </ng-container>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:k.SELECTION_MODEL_FACTORY,useValue:Du}],styles:[":host{display:block;width:100%}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}ng-select{width:100%;min-width:300px;margin-right:12px}.search-header{padding:8px 10px;border-bottom:1px solid var(--color-component-border-100);cursor:pointer}.search-header.selected,.search-header:hover{background-color:var(--color-component-bg-200)}"]}]}],Au.propDecorators={tags:[{type:t.Input}],searchTermChange:[{type:t.Output}],tagsChange:[{type:t.Output}],selectComponent:[{type:t.ViewChild,args:["selectComponent",{static:!0}]}]};var Eu=function(){function e(e){this.dataService=e,this.multiple=!0,this.includeDefaultChannel=!0,this.disableChannelIds=[],this.value=[],this.disabled=!1}return e.prototype.ngOnInit=function(){var e=this;this.channels$=this.dataService.client.userStatus().single$.pipe(r.map((function(t){return t.userStatus.channels.filter((function(t){return!!e.includeDefaultChannel||t.code!==y.DEFAULT_CHANNEL_CODE}))})),r.tap((function(t){return e.channels=t})))},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){var t,n=this;if(Array.isArray(e))"string"==typeof e[0]?this.value=e.map((function(e){var t;return null===(t=n.channels)||void 0===t?void 0:t.find((function(t){return t.id===e}))})).filter(l.notNullOrUndefined):this.value=e;else if("string"==typeof e){var r=null===(t=this.channels)||void 0===t?void 0:t.find((function(t){return t.id===e}));r&&(this.value=[r])}else e&&e.id&&(this.value=[e])},e.prototype.focussed=function(){this.onTouched&&this.onTouched()},e.prototype.channelIsDisabled=function(e){return this.disableChannelIds.includes(e)},e.prototype.valueChanged=function(e){Array.isArray(e)?this.onChange(e.map((function(e){return e.id}))):this.onChange([e?e.id:void 0])},e.prototype.compareFn=function(e,t){return("string"==typeof e?e:e.id)===("string"==typeof t?t:t.id)},e}();Eu.decorators=[{type:t.Component,args:[{selector:"vdr-channel-assignment-control",template:'<ng-select\r\n appendTo="body"\r\n [addTag]="false"\r\n [multiple]="multiple"\r\n [ngModel]="value"\r\n [clearable]="false"\r\n [searchable]="false"\r\n [disabled]="disabled"\r\n [compareWith]="compareFn"\r\n (focus)="focussed()"\r\n (change)="valueChanged($event)"\r\n>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <span aria-hidden="true" class="ng-value-icon left" (click)="clear(item)"> × </span>\r\n <vdr-channel-badge [channelCode]="item.code"></vdr-channel-badge>\r\n <span class="channel-label">{{ item.code | channelCodeToLabel | translate }}</span>\r\n </ng-template>\r\n <ng-option *ngFor="let item of channels$ | async" [value]="item" [disabled]="channelIsDisabled(item.id)">\r\n <vdr-channel-badge [channelCode]="item.code"></vdr-channel-badge>\r\n {{ item.code | channelCodeToLabel | translate }}\r\n </ng-option>\r\n</ng-select>\r\n\r\n',changeDetection:t.ChangeDetectionStrategy.Default,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:Eu,multi:!0}],styles:[":host{min-width:200px}:host.clr-input{border-bottom:none;padding:0}::ng-deep .ng-option>vdr-channel-badge,::ng-deep .ng-value>vdr-channel-badge{margin-bottom:-1px}::ng-deep .ng-value>vdr-channel-badge{margin-left:6px}.channel-label{margin-right:6px}"]}]}],Eu.ctorParameters=function(){return[{type:Ql}]},Eu.propDecorators={multiple:[{type:t.Input}],includeDefaultChannel:[{type:t.Input}],disableChannelIds:[{type:t.Input}]};var Ru=function(){function e(){}return Object.defineProperty(e.prototype,"isDefaultChannel",{get:function(){return this.channelCode===y.DEFAULT_CHANNEL_CODE},enumerable:!1,configurable:!0}),e}();Ru.decorators=[{type:t.Component,args:[{selector:"vdr-channel-badge",template:'<clr-icon shape="layers" [style.color]="isDefaultChannel ? \'#aaa\' : (channelCode | stringToColor)"></clr-icon>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}button :host{margin-bottom:-1px}clr-icon{margin-right:6px}"]}]}],Ru.propDecorators={channelCode:[{type:t.Input}]};var Pu=function(){this.invert=!1,this.colorFrom="",this.iconClick=new t.EventEmitter};function Ou(e){try{return e?JSON.parse(e):void 0}catch(t){return e}}function ku(e){return Array.isArray(e)?JSON.stringify(e):(null!=e?e:"").toString()}function wu(e){var t;return e.list?[]:null!==(t=e.defaultValue)&&void 0!==t?t:null}function xu(e,t){return e?e.description.replace(/{\s*([a-zA-Z0-9]+)\s*}/gi,(function(n,r){var o=r.toLowerCase(),i=t[o];if(null==i)return"_";var a=i,s=e.args.find((function(e){return e.name===o}));return s&&"int"===s.type&&s.ui&&"currency-form-input"===s.ui.component&&(a=i/100),s&&"datetime"===s.type&&i instanceof Date&&(a=i.toLocaleDateString()),a})):""}Pu.decorators=[{type:t.Component,args:[{selector:"vdr-chip",template:'<div\r\n class="wrapper"\r\n [class.with-background]="!invert && colorFrom"\r\n [style.backgroundColor]="!invert && (colorFrom | stringToColor)"\r\n [style.color]="invert && (colorFrom | stringToColor)"\r\n [style.borderColor]="invert && (colorFrom | stringToColor)"\r\n [ngClass]="colorType"\r\n>\r\n <div class="chip-label"><ng-content></ng-content></div>\r\n <div class="chip-icon" *ngIf="icon">\r\n <button (click)="iconClick.emit($event)">\r\n <clr-icon\r\n [attr.shape]="icon"\r\n [style.color]="invert && (colorFrom | stringToColor)"\r\n [class.is-inverse]="!invert && colorFrom"\r\n ></clr-icon>\r\n </button>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}.wrapper{display:flex;border:1px solid var(--color-component-border-300);border-radius:3px;margin:6px}.wrapper.with-background{color:var(--color-grey-100);border-color:transparent}.wrapper.with-background .chip-label{opacity:.9}.wrapper.warning{border-color:var(--color-chip-warning-border)}.wrapper.warning .chip-label{color:var(--color-chip-warning-text);background-color:var(--color-chip-warning-bg)}.wrapper.success{border-color:var(--color-chip-success-border)}.wrapper.success .chip-label{color:var(--color-chip-success-text);background-color:var(--color-chip-success-bg)}.wrapper.error{border-color:var(--color-chip-error-border)}.wrapper.error .chip-label{color:var(--color-chip-error-text);background-color:var(--color-chip-error-bg)}.chip-label{padding:3px 6px;border-radius:3px;white-space:nowrap;align-items:center}.chip-icon,.chip-label{line-height:1em;display:flex}.chip-icon{border-left:1px solid var(--color-component-border-200);padding:0 3px}.chip-icon button{cursor:pointer;background:none;margin:0;padding:0;border:none}"]}]}],Pu.propDecorators={icon:[{type:t.Input}],invert:[{type:t.Input}],colorFrom:[{type:t.Input}],colorType:[{type:t.Input}],iconClick:[{type:t.Output}]};var Fu=function(){function e(){this.readonly=!1,this.removable=!0,this.remove=new t.EventEmitter,this.argValues={},this.form=new C.FormGroup({})}return e.prototype.interpolateDescription=function(){return this.operationDefinition?xu(this.operationDefinition,this.form.value):""},e.prototype.ngOnChanges=function(e){("operation"in e||"operationDefinition"in e)&&this.createForm()},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){e?this.form.disable():this.form.enable()},e.prototype.writeValue=function(e){e&&this.form.patchValue(e)},e.prototype.trackByName=function(e,t){return t.name},e.prototype.getArgDef=function(e){var t;return null===(t=this.operationDefinition)||void 0===t?void 0:t.args.find((function(t){return t.name===e.name}))},e.prototype.createForm=function(){var e,t,n,r,o=this;if(this.operation){if(this.subscription&&this.subscription.unsubscribe(),this.form=new C.FormGroup({}),this.form.__id=Math.random().toString(36).substr(10),this.operation.args){var i=function(e){var t=null===(r=a.operation.args.find((function(t){return t.name===e.name})))||void 0===r?void 0:r.value;void 0===t&&(t=wu(e));var n=e.list?void 0:e.required?C.Validators.required:void 0;a.form.addControl(e.name,new C.FormControl(t,n))},a=this;try{for(var s=X((null===(n=this.operationDefinition)||void 0===n?void 0:n.args)||[]),l=s.next();!l.done;l=s.next()){i(l.value)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}}this.subscription=this.form.valueChanges.subscribe((function(e){o.onChange&&o.onChange({code:o.operation&&o.operation.code,args:e}),o.onTouch&&o.onTouch()}))}},e.prototype.validate=function(e){return this.form.invalid?{required:!0}:null},e}();Fu.decorators=[{type:t.Component,args:[{selector:"vdr-configurable-input",template:'<div class="card" *ngIf="operation">\r\n <div class="card-block">{{ interpolateDescription() }}</div>\r\n <div class="card-block" *ngIf="operation.args?.length">\r\n <form [formGroup]="form" *ngIf="operation" class="operation-inputs">\r\n <div *ngFor="let arg of operation.args; trackBy: trackByName" class="arg-row">\r\n <ng-container *ngIf="form.get(arg.name)">\r\n <label>{{ getArgDef(arg)?.label || (arg.name | sentenceCase) }}</label>\r\n <vdr-dynamic-form-input\r\n [def]="getArgDef(arg)"\r\n [readonly]="readonly"\r\n [control]="form.get(arg.name)"\r\n [formControlName]="arg.name"\r\n ></vdr-dynamic-form-input>\r\n </ng-container>\r\n </div>\r\n </form>\r\n </div>\r\n <div class="card-footer" *ngIf="!readonly && removable">\r\n <button class="btn btn-sm btn-link btn-warning" (click)="remove.emit(operation)">\r\n <clr-icon shape="times"></clr-icon>\r\n {{ \'common.remove\' | translate }}\r\n </button>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:Fu,multi:!0},{provide:C.NG_VALIDATORS,useExisting:t.forwardRef((function(){return Fu})),multi:!0}],styles:[":host{display:block;margin-bottom:12px}:host>.card{margin-top:6px}.operation-inputs{padding-top:0}.operation-inputs .arg-row:not(:last-child){margin-bottom:24px}.operation-inputs .arg-row label{margin-right:6px}.operation-inputs .hidden{display:none}"]}]}],Fu.propDecorators={operation:[{type:t.Input}],operationDefinition:[{type:t.Input}],readonly:[{type:t.Input}],removable:[{type:t.Input}],remove:[{type:t.Output}]};var $u=function(){function e(e,n){this.dataService=e,this.changeDetectorRef=n,this.disabled=!1,this.readonly=!1,this.currencyCode="",this.valueChange=new t.EventEmitter,this.currencyCode$=new c.BehaviorSubject("")}return e.prototype.ngOnInit=function(){var e=this,t=this.dataService.client.uiState().mapStream((function(e){return e.uiState.language})),n=c.combineLatest(t,this.currencyCode$).pipe(r.map((function(e){var t=ee(e,2),n=t[0],r=t[1];if(!r)return"";var o=n.replace(/_/g,"-");return new Intl.NumberFormat(o,{style:"currency",currency:r,currencyDisplay:"symbol"}).format(void 0).indexOf("NaN")>0})));this.prefix$=n.pipe(r.map((function(t){return t?e.currencyCode:""}))),this.suffix$=n.pipe(r.map((function(t){return t?"":e.currencyCode})))},e.prototype.ngOnChanges=function(e){"value"in e&&this.writeValue(e.value.currentValue),"currencyCode"in e&&this.currencyCode$.next(this.currencyCode)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.onInput=function(e){var t=Math.round(100*+e);"function"==typeof this.onChange&&this.onChange(t),this.valueChange.emit(t);var n=Math.abs(Number(this._decimalValue)-Number(e));this._decimalValue=.009<n&&n<.011?this.toNumericString(e):e},e.prototype.onFocus=function(){"function"==typeof this.onTouch&&this.onTouch()},e.prototype.writeValue=function(e){var t=+e;Number.isNaN(t)||(this._decimalValue=this.toNumericString(Math.floor(e)/100))},e.prototype.toNumericString=function(e){return Number(e).toFixed(2)},e}();$u.decorators=[{type:t.Component,args:[{selector:"vdr-currency-input",template:'<vdr-affixed-input\r\n [prefix]="prefix$ | async | localeCurrencyName: \'symbol\'"\r\n [suffix]="suffix$ | async | localeCurrencyName: \'symbol\'"\r\n>\r\n <input\r\n type="number"\r\n step="0.01"\r\n [value]="_decimalValue"\r\n [disabled]="disabled"\r\n [readonly]="readonly"\r\n (input)="onInput($event.target.value)"\r\n (focus)="onFocus()"\r\n />\r\n</vdr-affixed-input>\r\n',providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:$u,multi:!0}],styles:[":host{padding:0;border:none}input{max-width:96px}input[readonly]{background-color:transparent}"]}]}],$u.ctorParameters=function(){return[{type:Ql},{type:t.ChangeDetectorRef}]},$u.propDecorators={disabled:[{type:t.Input}],readonly:[{type:t.Input}],value:[{type:t.Input}],currencyCode:[{type:t.Input}],valueChange:[{type:t.Output}]};var _u=function(){function e(e,t){this.dataService=e,this.customFieldComponentService=t,this.compact=!1,this.showLabel=!0,this.readonly=!1,this.hasCustomControl=!1}return e.prototype.getFieldDefinition=function(){var e=Object.assign({},this.customField),t=this.customFieldComponentService.customFieldComponentExists(this.entityName,this.customField.name);switch(t&&(e.ui={component:t}),e.__typename){case"IntCustomFieldConfig":return Object.assign(Object.assign({},e),{min:e.intMin,max:e.intMax,step:e.intStep});case"FloatCustomFieldConfig":return Object.assign(Object.assign({},e),{min:e.floatMin,max:e.floatMax,step:e.floatStep});case"DateTimeCustomFieldConfig":return Object.assign(Object.assign({},e),{min:e.datetimeMin,max:e.datetimeMax,step:e.datetimeStep});default:return Object.assign({},e)}},e}();_u.decorators=[{type:t.Component,args:[{selector:"vdr-custom-field-control",template:'<div class="clr-form-control" *ngIf="compact">\r\n <label for="basic" class="clr-control-label">{{ customField | customFieldLabel }}</label>\r\n <div class="clr-control-container">\r\n <div class="clr-input-wrapper">\r\n <ng-container *ngTemplateOutlet="inputs"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n<vdr-form-field [label]="customField | customFieldLabel" [for]="customField.name" *ngIf="!compact">\r\n <ng-container *ngTemplateOutlet="inputs"></ng-container>\r\n</vdr-form-field>\r\n\r\n<ng-template #inputs>\r\n <ng-container [formGroup]="formGroup">\r\n <vdr-dynamic-form-input\r\n [formControlName]="customField.name"\r\n [readonly]="readonly || customField.readonly"\r\n [control]="formGroup.get(customField.name)"\r\n [def]="getFieldDefinition()"\r\n >\r\n </vdr-dynamic-form-input>\r\n </ng-container>\r\n</ng-template>\r\n',styles:[":host .toggle-switch{margin-top:0;margin-bottom:0}"]}]}],_u.ctorParameters=function(){return[{type:Ql},{type:Zc}]},_u.propDecorators={entityName:[{type:t.Input}],formGroup:[{type:t.Input,args:["customFieldsFormGroup"]}],customField:[{type:t.Input}],compact:[{type:t.Input}],showLabel:[{type:t.Input}],readonly:[{type:t.Input}],customComponentPlaceholder:[{type:t.ViewChild,args:["customComponentPlaceholder",{read:t.ViewContainerRef}]}]};var Mu=function(){};Mu.decorators=[{type:t.Component,args:[{selector:"vdr-customer-label",template:'<clr-icon shape="user" [class.is-solid]="customer"></clr-icon>\r\n<div *ngIf="customer">\r\n <a [routerLink]="[\'/customer\', \'customers\', customer.id]">\r\n {{ customer.firstName }} {{ customer.lastName }}\r\n </a>\r\n</div>\r\n<div *ngIf="!customer">{{ \'common.guest\' | translate }}</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:flex;align-items:center}clr-icon{margin-right:6px}"]}]}],Mu.propDecorators={customer:[{type:t.Input}]};var Lu=function(){this.expand=!1};Lu.decorators=[{type:t.Component,args:[{selector:"vdr-dt-column",template:"\n <ng-template><ng-content></ng-content></ng-template>\n "}]}],Lu.propDecorators={expand:[{type:t.Input}],template:[{type:t.ViewChild,args:[t.TemplateRef,{static:!0}]}]};var Nu=function(){function e(){this.allSelectChange=new t.EventEmitter,this.rowSelectChange=new t.EventEmitter,this.pageChange=new t.EventEmitter,this.itemsPerPageChange=new t.EventEmitter}return e.prototype.ngAfterContentInit=function(){this.rowTemplate=this.templateRefs.last},e.prototype.trackByFn=function(e,t){return null!=t.id?t.id:e},e}();Nu.decorators=[{type:t.Component,args:[{selector:"vdr-data-table",template:'<ng-container *ngIf="!items || (items && items.length); else emptyPlaceholder">\r\n <table class="table">\r\n <thead>\r\n <tr>\r\n <th *ngIf="isRowSelectedFn" class="align-middle">\r\n <input\r\n type="checkbox"\r\n clrCheckbox\r\n [checked]="allSelected"\r\n (change)="allSelectChange.emit()"\r\n />\r\n </th>\r\n <th *ngFor="let header of columns?.toArray()" class="left" [class.expand]="header.expand">\r\n <ng-container *ngTemplateOutlet="header.template"></ng-container>\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr\r\n *ngFor="\r\n let item of items\r\n | paginate\r\n : {\r\n itemsPerPage: itemsPerPage,\r\n currentPage: currentPage,\r\n totalItems: totalItems\r\n };\r\n index as i;\r\n trackBy: trackByFn\r\n "\r\n >\r\n <td *ngIf="isRowSelectedFn" class="align-middle">\r\n <input\r\n type="checkbox"\r\n clrCheckbox\r\n [checked]="isRowSelectedFn(item)"\r\n (change)="rowSelectChange.emit(item)"\r\n />\r\n </td>\r\n <ng-container\r\n *ngTemplateOutlet="rowTemplate; context: { item: item, index: i }"\r\n ></ng-container>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class="table-footer">\r\n <vdr-items-per-page-controls\r\n *ngIf="totalItems"\r\n [itemsPerPage]="itemsPerPage"\r\n (itemsPerPageChange)="itemsPerPageChange.emit($event)"\r\n ></vdr-items-per-page-controls>\r\n\r\n <vdr-pagination-controls\r\n *ngIf="totalItems"\r\n [currentPage]="currentPage"\r\n [itemsPerPage]="itemsPerPage"\r\n [totalItems]="totalItems"\r\n (pageChange)="pageChange.emit($event)"\r\n ></vdr-pagination-controls>\r\n </div>\r\n</ng-container>\r\n<ng-template #emptyPlaceholder>\r\n <vdr-empty-placeholder [emptyStateLabel]="emptyStateLabel"></vdr-empty-placeholder>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[x.PaginationService],styles:[":host{display:block;max-width:100%;overflow:auto}thead th{position:sticky;top:24px;z-index:1}thead th.expand{width:100%}.table-footer{display:flex;align-items:baseline;justify-content:space-between;margin-top:6px}"]}]}],Nu.propDecorators={items:[{type:t.Input}],itemsPerPage:[{type:t.Input}],currentPage:[{type:t.Input}],totalItems:[{type:t.Input}],allSelected:[{type:t.Input}],isRowSelectedFn:[{type:t.Input}],emptyStateLabel:[{type:t.Input}],allSelectChange:[{type:t.Output}],rowSelectChange:[{type:t.Output}],pageChange:[{type:t.Output}],itemsPerPageChange:[{type:t.Output}],columns:[{type:t.ContentChildren,args:[Lu]}],templateRefs:[{type:t.ContentChildren,args:[t.TemplateRef]}]};var Uu={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},qu=[b.marker("datetime.weekday-su"),b.marker("datetime.weekday-mo"),b.marker("datetime.weekday-tu"),b.marker("datetime.weekday-we"),b.marker("datetime.weekday-th"),b.marker("datetime.weekday-fr"),b.marker("datetime.weekday-sa")],Gu=function(){function e(){var e=this;this.selectedDatetime$=new c.BehaviorSubject(null),this.viewingDatetime$=new c.BehaviorSubject(Z.default()),this.min=null,this.max=null,this.jumping=!1,this.selected$=this.selectedDatetime$.pipe(r.map((function(e){return e&&e.toDate()}))),this.viewing$=this.viewingDatetime$.pipe(r.map((function(e){return e.toDate()}))),this.weekStartDayIndex=Uu.mon,this.calendarView$=c.combineLatest(this.viewingDatetime$,this.selectedDatetime$).pipe(r.map((function(t){var n=ee(t,2),r=n[0],o=n[1];return e.generateCalendarView(r,o)})))}return e.prototype.setWeekStartingDay=function(e){this.weekStartDayIndex=Uu[e]},e.prototype.setMin=function(e){"string"==typeof e&&(this.min=Z.default(e))},e.prototype.setMax=function(e){"string"==typeof e&&(this.max=Z.default(e))},e.prototype.selectDatetime=function(e){var t,n=null;null==e||""===e?t=Z.default():(t=Z.default(e),n=Z.default(e)),this.selectedDatetime$.next(n),this.viewingDatetime$.next(t)},e.prototype.selectHour=function(e){var t=(this.selectedDatetime$.value||Z.default()).hour(e);this.selectedDatetime$.next(t),this.viewingDatetime$.next(t)},e.prototype.selectMinute=function(e){var t=(this.selectedDatetime$.value||Z.default()).minute(e);this.selectedDatetime$.next(t),this.viewingDatetime$.next(t)},e.prototype.viewNextMonth=function(){this.jumping=!1;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.add(1,"month"))},e.prototype.viewPrevMonth=function(){this.jumping=!1;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.subtract(1,"month"))},e.prototype.viewToday=function(){this.jumping=!1,this.viewingDatetime$.next(Z.default())},e.prototype.viewJumpDown=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.add(1,"week"))},e.prototype.viewJumpUp=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.subtract(1,"week"))},e.prototype.viewJumpRight=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.add(1,"day"))},e.prototype.viewJumpLeft=function(){this.jumping=!0;var e=this.viewingDatetime$.value;this.viewingDatetime$.next(e.subtract(1,"day"))},e.prototype.selectToday=function(){this.jumping=!1,this.selectDatetime(Z.default())},e.prototype.selectViewed=function(){this.jumping=!1,this.selectDatetime(this.viewingDatetime$.value)},e.prototype.viewMonth=function(e){this.jumping=!1;var t=this.viewingDatetime$.value;this.viewingDatetime$.next(t.month(e-1))},e.prototype.viewYear=function(e){this.jumping=!1;var t=this.viewingDatetime$.value;this.viewingDatetime$.next(t.year(e))},e.prototype.generateCalendarView=function(e,t){var n=this;if(!e.isValid()||t&&!t.isValid())return[];var r=e.startOf("month"),o=e.endOf("month"),i=Z.default(),a=e.daysInMonth(),s=t&&t.get("date"),l=(r.day()-this.weekStartDayIndex+7)%7,c=[],u=[];if(0<l)for(var p=e.subtract(1,"month"),d=p.daysInMonth(),m=p.isSame(i,"month"),g=function(t){var r=e.subtract(1,"month").date(t);u.push({dayOfMonth:t,selected:!1,inCurrentMonth:!1,isToday:m&&i.get("date")===t,isViewing:!1,disabled:!h.isInBounds(r),select:function(){n.selectDatetime(r)}})},h=this,f=d-l+1;f<=d;f++)g(f);var y=e.isSame(i,"month"),v=function(o){(o+l-1)%7==0&&(c.push(u),u=[]);var a=r.add(o-1,"day"),p=!!t&&t.isSame(e,"month")&&t.isSame(e,"year");u.push({dayOfMonth:o,selected:o===s&&p,inCurrentMonth:!0,isToday:y&&i.get("date")===o,isViewing:C.jumping&&e.date()===o,disabled:!C.isInBounds(a),select:function(){n.selectDatetime(a)}})},C=this;for(f=1;f<=a;f++)v(f);var b=7-(l+a)%7;if(7!==b){var S=e.add(1,"month").isSame(i,"month"),I=function(e){var t=o.add(e,"day");u.push({dayOfMonth:e,selected:!1,inCurrentMonth:!1,isToday:S&&i.get("date")===e,isViewing:!1,disabled:!T.isInBounds(t),select:function(){n.selectDatetime(t)}})},T=this;for(f=1;f<=b;f++)I(f)}return c.push(u),c},e.prototype.isInBounds=function(e){return(!this.min||!this.min.isAfter(e))&&(!this.max||!this.max.isBefore(e))},e}();Gu.decorators=[{type:t.Injectable}],Gu.ctorParameters=function(){return[]};var Vu=function(){function e(e,t){this.changeDetectorRef=e,this.datetimePickerService=t,this.weekStartDay="mon",this.timeGranularityInterval=5,this.min=null,this.max=null,this.readonly=!1,this.disabled=!1,this.weekdays=[]}return e.prototype.ngOnInit=function(){var e=this;this.datetimePickerService.setWeekStartingDay(this.weekStartDay),this.datetimePickerService.setMin(this.min),this.datetimePickerService.setMax(this.max),this.populateYearsSelection(),this.populateWeekdays(),this.populateHours(),this.populateMinutes(),this.calendarView$=this.datetimePickerService.calendarView$,this.current$=this.datetimePickerService.viewing$.pipe(r.map((function(e){return{date:e,month:e.getMonth()+1,year:e.getFullYear()}}))),this.selected$=this.datetimePickerService.selected$,this.selectedHours$=this.selected$.pipe(r.map((function(e){return e&&e.getHours()}))),this.selectedMinutes$=this.selected$.pipe(r.map((function(e){return e&&e.getMinutes()}))),this.subscription=this.datetimePickerService.selected$.subscribe((function(t){e.onChange&&e.onChange(null==t?t:t.toISOString())}))},e.prototype.ngAfterViewInit=function(){var e=this;this.dropdownComponent.onOpenChange((function(t){t&&e.calendarTable.nativeElement.focus()}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){this.datetimePickerService.selectDatetime(e)},e.prototype.prevMonth=function(){this.datetimePickerService.viewPrevMonth()},e.prototype.nextMonth=function(){this.datetimePickerService.viewNextMonth()},e.prototype.selectToday=function(){this.datetimePickerService.selectToday()},e.prototype.setYear=function(e){var t=e.target;this.datetimePickerService.viewYear(parseInt(t.value,10))},e.prototype.setMonth=function(e){var t=e.target;this.datetimePickerService.viewMonth(parseInt(t.value,10))},e.prototype.selectDay=function(e){e.disabled||e.select()},e.prototype.clearValue=function(){this.datetimePickerService.selectDatetime(null)},e.prototype.handleCalendarKeydown=function(e){switch(e.key){case"ArrowDown":return this.datetimePickerService.viewJumpDown();case"ArrowUp":return this.datetimePickerService.viewJumpUp();case"ArrowRight":return this.datetimePickerService.viewJumpRight();case"ArrowLeft":return this.datetimePickerService.viewJumpLeft();case"Enter":return this.datetimePickerService.selectViewed()}},e.prototype.setHour=function(e){var t=e.target;this.datetimePickerService.selectHour(parseInt(t.value,10))},e.prototype.setMinute=function(e){var t=e.target;this.datetimePickerService.selectMinute(parseInt(t.value,10))},e.prototype.closeDatepicker=function(){this.dropdownComponent.toggleOpen(),this.datetimeInput.nativeElement.focus()},e.prototype.populateYearsSelection=function(){var e,t=null!==(e=this.yearRange)&&void 0!==e?e:10,n=(new Date).getFullYear(),r=this.min&&new Date(this.min).getFullYear()||n-t,o=(this.max&&new Date(this.max).getFullYear()||n+t)-r+1;this.years=Array.from({length:o}).map((function(e,t){return r+t}))},e.prototype.populateWeekdays=function(){for(var e=Uu[this.weekStartDay],t=0;t<7;t++)this.weekdays.push(qu[(t+e+0)%7])},e.prototype.populateHours=function(){this.hours=Array.from({length:24}).map((function(e,t){return t}))},e.prototype.populateMinutes=function(){for(var e=[],t=0;t<60;t+=this.timeGranularityInterval)e.push(t);this.minutes=e},e}();Vu.decorators=[{type:t.Component,args:[{selector:"vdr-datetime-picker",template:'<div class="input-wrapper">\r\n <input\r\n readonly\r\n [ngModel]="selected$ | async | localeDate: \'medium\'"\r\n class="selected-datetime"\r\n (keydown.enter)="dropdownComponent.toggleOpen()"\r\n (keydown.space)="dropdownComponent.toggleOpen()"\r\n #datetimeInput\r\n />\r\n <button class="clear-value-button btn" [class.visible]="!disabled && !readonly && (selected$ | async)" (click)="clearValue()">\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n</div>\r\n<vdr-dropdown #dropdownComponent>\r\n <button class="btn btn-outline calendar-button" vdrDropdownTrigger [disabled]="readonly || disabled">\r\n <clr-icon shape="calendar"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class="datetime-picker" *ngIf="current$ | async as currentView" (keydown.escape)="closeDatepicker()">\r\n <div class="controls">\r\n <div class="selects">\r\n <div class="month-select">\r\n <select\r\n clrSelect\r\n name="month"\r\n [ngModel]="currentView.month"\r\n (change)="setMonth($event)"\r\n >\r\n <option [value]="1">{{ \'datetime.month-jan\' | translate }}</option>\r\n <option [value]="2">{{ \'datetime.month-feb\' | translate }}</option>\r\n <option [value]="3">{{ \'datetime.month-mar\' | translate }}</option>\r\n <option [value]="4">{{ \'datetime.month-apr\' | translate }}</option>\r\n <option [value]="5">{{ \'datetime.month-may\' | translate }}</option>\r\n <option [value]="6">{{ \'datetime.month-jun\' | translate }}</option>\r\n <option [value]="7">{{ \'datetime.month-jul\' | translate }}</option>\r\n <option [value]="8">{{ \'datetime.month-aug\' | translate }}</option>\r\n <option [value]="9">{{ \'datetime.month-sep\' | translate }}</option>\r\n <option [value]="10">{{ \'datetime.month-oct\' | translate }}</option>\r\n <option [value]="11">{{ \'datetime.month-nov\' | translate }}</option>\r\n <option [value]="12">{{ \'datetime.month-dec\' | translate }}</option>\r\n </select>\r\n </div>\r\n <div class="year-select">\r\n <select\r\n clrSelect\r\n name="month"\r\n [ngModel]="currentView.year"\r\n (change)="setYear($event)"\r\n >\r\n <option *ngFor="let year of years" [value]="year">{{ year }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n <div class="control-buttons">\r\n <button\r\n class="btn btn-link btn-sm"\r\n (click)="prevMonth()"\r\n [title]="\'common.view-previous-month\' | translate"\r\n >\r\n <clr-icon shape="caret" dir="left"></clr-icon>\r\n </button>\r\n <button class="btn btn-link btn-sm" (click)="selectToday()" [title]="\'common.select-today\' | translate">\r\n <clr-icon shape="event"></clr-icon>\r\n </button>\r\n <button\r\n class="btn btn-link btn-sm"\r\n (click)="nextMonth()"\r\n [title]="\'common.view-next-month\' | translate"\r\n >\r\n <clr-icon shape="caret" dir="right"></clr-icon>\r\n </button>\r\n </div>\r\n </div>\r\n <table class="calendar-table" #calendarTable tabindex="0" (keydown)="handleCalendarKeydown($event)">\r\n <thead>\r\n <tr>\r\n <td *ngFor="let weekdayName of weekdays">\r\n {{ weekdayName | translate }}\r\n </td>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor="let week of calendarView$ | async">\r\n <td\r\n *ngFor="let day of week"\r\n class="day-cell"\r\n [class.selected]="day.selected"\r\n [class.today]="day.isToday"\r\n [class.viewing]="day.isViewing"\r\n [class.current-month]="day.inCurrentMonth"\r\n [class.disabled]="day.disabled"\r\n (keydown.enter)="selectDay(day)"\r\n (click)="selectDay(day)"\r\n >\r\n {{ day.dayOfMonth }}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class="time-picker">\r\n <span class="flex-spacer"> {{ \'datetime.time\' | translate }}: </span>\r\n <select clrSelect name="hour" [ngModel]="selectedHours$ | async" (change)="setHour($event)">\r\n <option *ngFor="let hour of hours" [value]="hour">{{ hour | number: \'2.0-0\' }}</option>\r\n </select>\r\n <span>:</span>\r\n <select\r\n clrSelect\r\n name="hour"\r\n [ngModel]="selectedMinutes$ | async"\r\n (change)="setMinute($event)"\r\n >\r\n <option *ngFor="let minute of minutes" [value]="minute">{{\r\n minute | number: \'2.0-0\'\r\n }}</option>\r\n </select>\r\n </div>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[Gu,{provide:C.NG_VALUE_ACCESSOR,useExisting:Vu,multi:!0}],styles:[":host{display:flex;width:100%}.input-wrapper{flex:1;display:flex}input.selected-datetime{flex:1;border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right:none!important}.clear-value-button{margin:0;border-radius:0;border-left:none;border-left-color:var(--color-component-border-200);border-bottom-color:var(--color-component-border-200);border-right-color:var(--color-component-border-200);border-top-color:var(--color-component-border-200);background-color:#fff;color:var(--color-grey-500);display:none}.clear-value-button.visible{display:block}.calendar-button{margin:0;border-top-left-radius:0;border-bottom-left-radius:0}.datetime-picker{margin:0 12px}table.calendar-table{padding:6px}table.calendar-table:focus{outline:1px solid var(--color-primary-500);box-shadow:0 0 1px 2px var(--color-primary-100)}table.calendar-table td{width:24px;text-align:center;border:1px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}table.calendar-table .day-cell{background-color:var(--color-component-bg-200);color:var(--color-grey-500);cursor:pointer;transition:background-color .1s}table.calendar-table .day-cell.current-month{background-color:#fff;color:var(--color-grey-800)}table.calendar-table .day-cell.selected{background-color:var(--color-primary-500);color:#fff}table.calendar-table .day-cell.viewing:not(.selected){background-color:var(--color-primary-200)}table.calendar-table .day-cell.today{border:1px solid var(--color-component-border-300)}table.calendar-table .day-cell:hover:not(.selected):not(.disabled){background-color:var(--color-primary-100)}table.calendar-table .day-cell.disabled{cursor:default;color:var(--color-grey-300)}.selects{justify-content:space-between;margin-bottom:12px}.control-buttons,.selects{display:flex}.time-picker{display:flex;align-items:baseline;margin-top:12px}"]}]}],Vu.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Gu}]},Vu.propDecorators={yearRange:[{type:t.Input}],weekStartDay:[{type:t.Input}],timeGranularityInterval:[{type:t.Input}],min:[{type:t.Input}],max:[{type:t.Input}],readonly:[{type:t.Input}],dropdownComponent:[{type:t.ViewChild,args:["dropdownComponent",{static:!0}]}],datetimeInput:[{type:t.ViewChild,args:["datetimeInput",{static:!0}]}],calendarTable:[{type:t.ViewChild,args:["calendarTable"]}]};var ju=function(){function e(){this.isOpen=!1,this.onOpenChangeCallbacks=[],this.manualToggle=!1}return e.prototype.onClick=function(){this.manualToggle||this.toggleOpen()},e.prototype.toggleOpen=function(){var e=this;this.isOpen=!this.isOpen,this.onOpenChangeCallbacks.forEach((function(t){return t(e.isOpen)}))},e.prototype.onOpenChange=function(e){this.onOpenChangeCallbacks.push(e)},e.prototype.setTriggerElement=function(e){this.trigger=e},e}();ju.decorators=[{type:t.Component,args:[{selector:"vdr-dropdown",template:"<ng-content></ng-content>\r\n",changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ju.propDecorators={manualToggle:[{type:t.Input}]};var Bu=function(){function e(e){this.dropdown=e}return e.prototype.onDropdownItemClick=function(e){this.dropdown.onClick()},e}();Bu.decorators=[{type:t.Directive,args:[{selector:"[vdrDropdownItem]",host:{"[class.dropdown-item]":"true"}}]}],Bu.ctorParameters=function(){return[{type:ju}]},Bu.propDecorators={onDropdownItemClick:[{type:t.HostListener,args:["click",["$event"]]}]};var Hu=function(){function e(e,t,n){this.overlay=e,this.viewContainerRef=t,this.dropdown=n,this.position="bottom-left"}return e.prototype.ngOnInit=function(){var e=this;this.dropdown.onOpenChange((function(t){t?e.overlayRef.attach(e.menuPortal):e.overlayRef.detach()}))},e.prototype.ngAfterViewInit=function(){var e=this;this.overlayRef=this.overlay.create({hasBackdrop:!0,backdropClass:"clear-backdrop",positionStrategy:this.getPositionStrategy(),maxHeight:"70vh"}),this.menuPortal=new $.TemplatePortal(this.menuTemplate,this.viewContainerRef),this.backdropClickSub=this.overlayRef.backdropClick().subscribe((function(){e.dropdown.toggleOpen()}))},e.prototype.ngOnDestroy=function(){this.overlayRef&&this.overlayRef.dispose(),this.backdropClickSub&&this.backdropClickSub.unsubscribe()},e.prototype.getPositionStrategy=function(){var e,t=((e={})["top-left"]={originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},e["top-right"]={originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},e["bottom-left"]={originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},e["bottom-right"]={originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},e)[this.position];return this.overlay.position().flexibleConnectedTo(this.dropdown.trigger).withPositions([t,this.invertPosition(t)]).withViewportMargin(12).withPush(!0)},e.prototype.invertPosition=function(e){var t=Object.assign({},e);return t.originY="top"===e.originY?"bottom":"top",t.overlayY="top"===e.overlayY?"bottom":"top",t},e}();Hu.decorators=[{type:t.Component,args:[{selector:"vdr-dropdown-menu",template:'\n <ng-template #menu>\n <div class="dropdown open">\n <div class="dropdown-menu">\n <div class="dropdown-content-wrapper">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n </ng-template>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".clear-backdrop{background-color:#ff69b4}.dropdown.open>.dropdown-menu{position:relative;top:0;height:100%;overflow-y:auto}:host{opacity:1;transition:opacity .3s}"]}]}],Hu.ctorParameters=function(){return[{type:E.Overlay},{type:t.ViewContainerRef},{type:ju}]},Hu.propDecorators={position:[{type:t.Input,args:["vdrPosition"]}],menuTemplate:[{type:t.ViewChild,args:["menu",{static:!0}]}]};var zu=function(){function e(e,t){this.dropdown=e,this.elementRef=t,e.setTriggerElement(this.elementRef)}return e.prototype.onDropdownTriggerClick=function(e){this.dropdown.toggleOpen()},e}();zu.decorators=[{type:t.Directive,args:[{selector:"[vdrDropdownTrigger]"}]}],zu.ctorParameters=function(){return[{type:ju},{type:t.ElementRef}]},zu.propDecorators={onDropdownTriggerClick:[{type:t.HostListener,args:["click",["$event"]]}]};var Wu=function(){function e(){this.displayPrivacyControls=!0,this.noteIsPrivate=!0,this.note=""}return e.prototype.confirm=function(){this.resolveWith({note:this.note,isPrivate:this.noteIsPrivate})},e.prototype.cancel=function(){this.resolveWith()},e}();Wu.decorators=[{type:t.Component,args:[{selector:"vdr-edit-note-dialog",template:'<ng-template vdrDialogTitle>\r\n {{ \'common.edit-note\' | translate }}\r\n</ng-template>\r\n\r\n<textarea [(ngModel)]="note" name="note" class="note"></textarea>\r\n<div class="visibility-select" *ngIf="displayPrivacyControls">\r\n <clr-checkbox-wrapper>\r\n <input type="checkbox" clrCheckbox [(ngModel)]="noteIsPrivate" />\r\n <label>{{ \'order.note-is-private\' | translate }}</label>\r\n </clr-checkbox-wrapper>\r\n <span *ngIf="noteIsPrivate" class="private">\r\n {{ \'order.note-only-visible-to-administrators\' | translate }}\r\n </span>\r\n <span *ngIf="!noteIsPrivate" class="public">\r\n {{ \'order.note-visible-to-customer\' | translate }}\r\n </span>\r\n</div>\r\n<ng-template vdrDialogButtons>\r\n <button type="button" class="btn" (click)="cancel()">{{ \'common.cancel\' | translate }}</button>\r\n <button type="submit" (click)="confirm()" class="btn btn-primary" [disabled]="note.length === 0">\r\n {{ \'common.confirm\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".visibility-select{display:flex;justify-content:space-between;align-items:baseline}.visibility-select .public{color:var(--color-warning-500)}.visibility-select .private{color:var(--color-success-500)}textarea.note{width:100%;height:72px;border-radius:3px;margin-right:6px}"]}]}];var Zu=function(){};Zu.decorators=[{type:t.Component,args:[{selector:"vdr-empty-placeholder",template:'<div class="empty-state">\r\n <clr-icon shape="bubble-exclamation" size="64"></clr-icon>\r\n <div class="empty-label">\r\n <ng-container *ngIf="emptyStateLabel; else defaultEmptyLabel">{{ emptyStateLabel }}</ng-container>\r\n <ng-template #defaultEmptyLabel>{{ \'common.no-results\' | translate }}</ng-template>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".empty-state{text-align:center;padding:60px;color:var(--color-grey-400);width:100%}.empty-state .empty-label{margin-top:12px;font-size:22px}"]}]}],Zu.propDecorators={emptyStateLabel:[{type:t.Input}]};var Yu=function(){this.small=!1};Yu.decorators=[{type:t.Component,args:[{selector:"vdr-entity-info",template:'<vdr-dropdown *ngIf="entity.id">\r\n <button class="btn btn-icon btn-link info-button" [class.btn-sm]="small" vdrDropdownTrigger>\r\n <clr-icon shape="info-standard"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class="entity-info">\r\n <vdr-labeled-data [label]="\'common.ID\' | translate">\r\n {{ entity.id }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf="entity.createdAt" [label]="\'common.created-at\' | translate">\r\n {{ entity.createdAt | localeDate: \'medium\' }}\r\n </vdr-labeled-data>\r\n <vdr-labeled-data *ngIf="entity.updatedAt" [label]="\'common.updated-at\' | translate">\r\n {{ entity.updatedAt | localeDate: \'medium\' }}\r\n </vdr-labeled-data>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".info-button{color:var(--color-icon-button)}.entity-info{margin:0 12px}"]}]}],Yu.propDecorators={small:[{type:t.Input}],entity:[{type:t.Input}]};var Ju=function(){function e(e,t){var n=this;this.dataService=e,this.notificationService=t,this.cancellationMessage$=new c.Subject,this.destroyMessage$=new c.Subject,this.handleMessage=function(e){var t=e.data,o=e.origin;if(n.isExtensionMessage(t)){var i=n.cancellationMessage$.pipe(r.filter((function(e){return e===t.requestId}))),a=c.merge(i,n.destroyMessage$);switch(t.type){case"cancellation":n.cancellationMessage$.next(t.requestId);break;case"destroy":n.destroyMessage$.next();break;case"graphql-query":var s=t.data,p=s.document,d=s.variables,m=s.fetchPolicy;n.dataService.query(u.parse(p),d,m).stream$.pipe(r.takeUntil(a)).subscribe(n.createObserver(t.requestId,o));break;case"graphql-mutation":var g=t.data;p=g.document,d=g.variables;n.dataService.mutate(u.parse(p),d).pipe(r.takeUntil(a)).subscribe(n.createObserver(t.requestId,o));break;case"notification":n.notificationService.notify(t.data);break;default:l.assertNever(t)}}}}return e.prototype.init=function(e){this.extensionWindow=e,window.addEventListener("message",this.handleMessage)},e.prototype.destroy=function(){window.removeEventListener("message",this.handleMessage),this.destroyMessage$.next()},e.prototype.ngOnDestroy=function(){this.destroy()},e.prototype.createObserver=function(e,t){var n=this;return{next:function(r){return n.sendMessage({data:r,error:!1,complete:!1,requestId:e},t)},error:function(r){return n.sendMessage({data:r,error:!0,complete:!1,requestId:e},t)},complete:function(){return n.sendMessage({data:null,error:!1,complete:!0,requestId:e},t)}}},e.prototype.sendMessage=function(e,t){this.extensionWindow.postMessage(e,t)},e.prototype.isExtensionMessage=function(e){return e.hasOwnProperty("type")&&e.hasOwnProperty("data")&&e.hasOwnProperty("requestId")},e}();Ju.decorators=[{type:t.Injectable}],Ju.ctorParameters=function(){return[{type:Ql},{type:Uc}]};var Ku=function(){function e(e,t,n){this.route=e,this.sanitizer=t,this.extensionHostService=n,this.openInIframe=!0,this.extensionWindowIsOpen=!1}return e.prototype.ngOnInit=function(){var e=this.route.snapshot.data;if(!this.isExtensionHostConfig(e.extensionHostConfig))throw new Error("Expected an ExtensionHostConfig object, got "+JSON.stringify(e.extensionHostConfig));this.config=e.extensionHostConfig,this.openInIframe=!this.config.openInNewTab,this.extensionUrl=this.sanitizer.bypassSecurityTrustResourceUrl(this.config.extensionUrl||"about:blank")},e.prototype.ngAfterViewInit=function(){if(this.openInIframe){var e=this.extensionFrame.nativeElement.contentWindow;e&&this.extensionHostService.init(e)}},e.prototype.ngOnDestroy=function(){this.extensionWindow&&this.extensionWindow.close()},e.prototype.launchExtensionWindow=function(){var e,t=this,n=window.open(this.config.extensionUrl);n&&(this.extensionHostService.init(n),this.extensionWindowIsOpen=!0,this.extensionWindow=n,function t(n,r){n.closed?(window.clearTimeout(e),r()):e=window.setTimeout((function(){return t(n,r)}),250)}(n,(function(){t.extensionWindowIsOpen=!1,t.extensionHostService.destroy()})))},e.prototype.isExtensionHostConfig=function(e){return e.hasOwnProperty("extensionUrl")},e}();Ku.decorators=[{type:t.Component,args:[{selector:"vdr-extension-host",template:'<ng-template [ngIf]="openInIframe" [ngIfElse]="launchExtension">\r\n <iframe [src]="extensionUrl" #extensionFrame></iframe>\r\n</ng-template>\r\n<ng-template #launchExtension>\r\n <div class="launch-button" [class.launched]="extensionWindowIsOpen">\r\n <div>\r\n <button\r\n class="btn btn-lg btn-primary"\r\n [disabled]="extensionWindowIsOpen"\r\n (click)="launchExtensionWindow()"\r\n >\r\n <clr-icon shape="pop-out"></clr-icon>\r\n {{ \'common.launch-extension\' | translate }}\r\n </button>\r\n <h3 class="window-hint" [class.visible]="extensionWindowIsOpen">\r\n {{ \'common.extension-running-in-separate-window\' | translate }}\r\n </h3>\r\n </div>\r\n </div>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.Default,providers:[Ju],styles:[".launch-button,iframe{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border:none}.launch-button{padding:24px;display:flex;align-items:center;justify-content:center;transition:background-color .3s;text-align:center}.launch-button.launched{background-color:var(--color-component-bg-300)}.window-hint{visibility:hidden;opacity:0;transition:visibility .3s 0,opacity .3s}.window-hint.visible{visibility:visible;opacity:1;transition:visibility 0,opacity .3s}"]}]}],Ku.ctorParameters=function(){return[{type:f.ActivatedRoute},{type:d.DomSanitizer},{type:Ju}]},Ku.propDecorators={extensionFrame:[{type:t.ViewChild,args:["extensionFrame"]}]};var Qu=function(){this.removable=!0,this.displayFacetName=!0,this.remove=new t.EventEmitter};function Xu(e){return e.reduce((function(e,t){return e.concat(t.values)}),[])}Qu.decorators=[{type:t.Component,args:[{selector:"vdr-facet-value-chip",template:'<vdr-chip\r\n [icon]="removable ? \'times\' : undefined"\r\n [colorFrom]="facetValue.facet.name"\r\n (iconClick)="remove.emit()"\r\n [title]="facetValue.facet.name + \' - \' + facetValue.name"\r\n>\r\n <span *ngIf="displayFacetName" class="facet-name">{{ facetValue.facet.name }}</span>\r\n {{ facetValue.name }}\r\n</vdr-chip>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:inline-block}.facet-name{color:var(--color-grey-100);text-transform:uppercase;font-size:10px;margin-right:3px;height:11px}"]}]}],Qu.propDecorators={facetValue:[{type:t.Input}],removable:[{type:t.Input}],displayFacetName:[{type:t.Input}],remove:[{type:t.Output}]};var ep=function(){function e(e){this.dataService=e,this.selectedValuesChange=new t.EventEmitter,this.readonly=!1,this.facetValues=[],this.disabled=!1,this.toSelectorItem=function(e){return{name:e.name,facetName:e.facet.name,id:e.id,value:e}}}return e.prototype.ngOnInit=function(){this.facetValues=Xu(this.facets).map(this.toSelectorItem)},e.prototype.onChange=function(e){this.readonly||(this.selectedValuesChange.emit(e.map((function(e){return e.value}))),this.onChangeFn&&this.onChangeFn(JSON.stringify(e.map((function(e){return e.id})))))},e.prototype.registerOnChange=function(e){this.onChangeFn=e},e.prototype.registerOnTouched=function(e){this.onTouchFn=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.focus=function(){this.ngSelect.focus()},e.prototype.writeValue=function(e){if("string"==typeof e)try{var t=JSON.parse(e);this.value=t}catch(e){throw e}else if(Array.isArray(e)){e.every((function(e){return"number"==typeof e||"string"==typeof e}))?this.value=e.map((function(e){return e.toString()})):this.value=e.map((function(e){return e.id}))}},e}();ep.decorators=[{type:t.Component,args:[{selector:"vdr-facet-value-selector",template:'<ng-select\r\n [items]="facetValues"\r\n [addTag]="false"\r\n [hideSelected]="true"\r\n bindValue="id"\r\n multiple="true"\r\n appendTo="body"\r\n bindLabel="name"\r\n [disabled]="disabled || readonly"\r\n [ngModel]="value"\r\n (change)="onChange($event)"\r\n>\r\n <ng-template ng-label-tmp let-item="item" let-clear="clear">\r\n <vdr-facet-value-chip\r\n [facetValue]="item.value"\r\n [removable]="!readonly"\r\n (remove)="clear(item)"\r\n ></vdr-facet-value-chip>\r\n </ng-template>\r\n <ng-template ng-option-tmp let-item="item">\r\n <vdr-facet-value-chip [facetValue]="item.value" [removable]="false"></vdr-facet-value-chip>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:ep,multi:!0}],styles:[":host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}"]}]}],ep.ctorParameters=function(){return[{type:Ql}]},ep.propDecorators={selectedValuesChange:[{type:t.Output}],facets:[{type:t.Input}],readonly:[{type:t.Input}],ngSelect:[{type:t.ViewChild,args:[k.NgSelectComponent]}]};var tp=function(){function e(){this.visible=!1,this.editable=!1,this.fpx=.5,this.fpy=.5,this.focalPointChange=new t.EventEmitter}return Object.defineProperty(e.prototype,"initialPosition",{get:function(){return this.focalPointToOffset(null==this.fpx?.5:this.fpx,null==this.fpy?.5:this.fpy)},enumerable:!1,configurable:!0}),e.prototype.onDragEnded=function(e){var t=this.getCurrentFocalPoint(),n=t.x,r=t.y;this.fpx=n,this.fpy=r,this.focalPointChange.emit({x:n,y:r})},e.prototype.getCurrentFocalPoint=function(){var e=this.dot.nativeElement.getBoundingClientRect(),t=e.left,n=e.top,r=e.width,o=e.height,i=this.frame.nativeElement.getBoundingClientRect(),a=i.left,s=n-i.top+o/2;return{x:(t-a+r/2)/this.width,y:s/this.height}},e.prototype.focalPointToOffset=function(e,t){var n=this.dot.nativeElement.getBoundingClientRect(),r=n.width,o=n.height;return{x:e*this.width-r/2,y:t*this.height-o/2}},e}();tp.decorators=[{type:t.Component,args:[{selector:"vdr-focal-point-control",template:'<ng-content></ng-content>\r\n<div class="frame" #frame [style.width.px]="width" [style.height.px]="height">\r\n <div\r\n #dot\r\n class="dot"\r\n [class.visible]="visible"\r\n [class.editable]="editable"\r\n cdkDrag\r\n [cdkDragDisabled]="!editable"\r\n cdkDragBoundary=".frame"\r\n (cdkDragEnded)="onDragEnded($event)"\r\n [cdkDragFreeDragPosition]="initialPosition"\r\n ></div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{position:relative;display:block}.frame{top:0}.dot,.frame{position:absolute}.dot{width:20px;height:20px;border-radius:50%;border:2px solid #fff;visibility:hidden;transition:opacity .3s;box-shadow:0 0 4px 4px rgba(0,0,0,.42)}.dot.visible{visibility:visible;opacity:.7}.dot.editable{cursor:move;visibility:visible;opacity:1;-webkit-animation:pulse;animation:pulse;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-animation-iteration-count:4;animation-iteration-count:4}@-webkit-keyframes pulse{0%{border-color:#fff}50%{border-color:var(--color-warning-500)}to{border-color:#fff}}@keyframes pulse{0%{border-color:#fff}50%{border-color:var(--color-warning-500)}to{border-color:#fff}}"]}]}],tp.propDecorators={visible:[{type:t.Input}],editable:[{type:t.Input}],width:[{type:t.HostBinding,args:["style.width.px"]},{type:t.Input}],height:[{type:t.HostBinding,args:["style.height.px"]},{type:t.Input}],fpx:[{type:t.Input}],fpy:[{type:t.Input}],focalPointChange:[{type:t.Output}],frame:[{type:t.ViewChild,args:["frame",{static:!0}]}],dot:[{type:t.ViewChild,args:["dot",{static:!0}]}]};var np=function(){function e(e,t){this.elementRef=e,this.formControlName=t}return Object.defineProperty(e.prototype,"valid",{get:function(){return!!this.formControlName&&!!this.formControlName.valid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return!!this.formControlName&&!!this.formControlName.touched},enumerable:!1,configurable:!0}),e.prototype.setReadOnly=function(e){var t=this.elementRef.nativeElement;!function(e){return e.hasOwnProperty("selectedIndex")}(t)?t.readOnly=e:t.disabled=e},e}();np.decorators=[{type:t.Directive,args:[{selector:"input, textarea, select"}]}],np.ctorParameters=function(){return[{type:t.ElementRef},{type:C.NgControl,decorators:[{type:t.Optional}]}]};var rp=function(){function e(){this.errors={},this.readOnlyToggle=!1,this.isReadOnly=!1}return e.prototype.ngOnInit=function(){this.readOnlyToggle&&(this.isReadOnly=!0,this.setReadOnly(!0)),this.isReadOnly=this.readOnlyToggle},e.prototype.setReadOnly=function(e){this.formFieldControl.setReadOnly(e),this.isReadOnly=e},e.prototype.getErrorMessage=function(){var e,t;if(this.formFieldControl&&this.formFieldControl.formControlName){var n=this.formFieldControl.formControlName.errors;if(n)try{for(var r=X(Object.keys(n)),o=r.next();!o.done;o=r.next()){var i=o.value;if(this.errors[i])return this.errors[i]}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}}},e}();rp.decorators=[{type:t.Component,args:[{selector:"vdr-form-field",template:'<div\r\n class="form-group"\r\n [class.no-label]="!label"\r\n [class.clr-error]="formFieldControl?.formControlName?.invalid"\r\n>\r\n <label *ngIf="label" [for]="for" class="clr-control-label">\r\n {{ label }}\r\n <vdr-help-tooltip *ngIf="tooltip" [content]="tooltip"></vdr-help-tooltip>\r\n </label>\r\n <label\r\n [for]="for"\r\n aria-haspopup="true"\r\n role="tooltip"\r\n [class.invalid]="formFieldControl?.touched && !formFieldControl?.valid"\r\n class="tooltip tooltip-validation tooltip-sm tooltip-top-left"\r\n >\r\n <div class="input-row" [class.has-toggle]="readOnlyToggle">\r\n <ng-content></ng-content>\r\n <button\r\n *ngIf="readOnlyToggle"\r\n type="button"\r\n [disabled]="!isReadOnly"\r\n [title]="\'common.edit-field\' | translate"\r\n class="btn btn-icon edit-button"\r\n (click)="setReadOnly(false)"\r\n >\r\n <clr-icon shape="edit"></clr-icon>\r\n </button>\r\n </div>\r\n <div class="clr-subtext" *ngIf="getErrorMessage()">{{ getErrorMessage() }}</div>\r\n <span class="tooltip-content">{{ label }} is required.</span>\r\n </label>\r\n</div>\r\n',styles:[':host{display:block}:host .form-group>label:first-child{top:6px}:host .form-group>label:nth-of-type(2){flex:1;max-width:20rem}:host .form-group>label:nth-of-type(2) ::ng-deep>:not(.tooltip-content){width:100%}:host .form-group .tooltip-validation{height:auto}:host .form-group.no-label{margin:-6px 0 0;padding:0;justify-content:center}:host .form-group.no-label>label{position:relative;justify-content:center}:host .form-group.no-label .input-row{justify-content:center}:host .input-row{display:flex}:host .input-row ::ng-deep input{flex:1}:host .input-row ::ng-deep input[disabled]{background-color:var(--color-component-bg-200)}:host .input-row button.edit-button{margin:0;border-radius:0 3px 3px 0}:host .input-row.has-toggle ::ng-deep input{border-top-right-radius:0!important;border-bottom-right-radius:0!important;border-right:none}:host .input-row ::ng-deep clr-toggle-wrapper{margin-top:8px}.tooltip.tooltip-validation.invalid:before{position:absolute;content:"";height:.666667rem;width:.666667rem;top:.125rem;right:.25rem;background-image:url(data:image/svg+xml;charset=utf8,%3Csvg%20version%3D%221.1%22%20viewBox%3D%225%205%2026%2026%22%20preserveAspectRatio%3D%22xMidYMid%20meet%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%3E%3Cstyle%3E.clr-i-outline%7Bfill%3A%23a32100%3B%7D%3C%2Fstyle%3E%3C%2Fdefs%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Ctitle%3Eexclamation-circle-line%3C%2Ftitle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cpath%20class%3D%22clr-i-outline%20clr-i-outline-path-1%22%20d%3D%22M18%2C6A12%2C12%2C0%2C1%2C0%2C30%2C18%2C12%2C12%2C0%2C0%2C0%2C18%2C6Zm0%2C22A10%2C10%2C0%2C1%2C1%2C28%2C18%2C10%2C10%2C0%2C0%2C1%2C18%2C28Z%22%3E%3C%2Fpath%3E%3Cpath%20class%3D%22clr-i-outline%20clr-i-outline-path-2%22%20d%3D%22M18%2C20.07a1.3%2C1.3%2C0%2C0%2C1-1.3-1.3v-6a1.3%2C1.3%2C0%2C1%2C1%2C2.6%2C0v6A1.3%2C1.3%2C0%2C0%2C1%2C18%2C20.07Z%22%3E%3C%2Fpath%3E%3Ccircle%20class%3D%22clr-i-outline%20clr-i-outline-path-3%22%20cx%3D%2217.95%22%20cy%3D%2223.02%22%20r%3D%221.5%22%3E%3C%2Fcircle%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3C%2Fsvg%3E);background-repeat:no-repeat;background-size:contain;vertical-align:middle;margin:0}.tooltip .tooltip-content.tooltip-sm,.tooltip.tooltip-sm>.tooltip-content{width:5rem}.tooltip:hover>.tooltip-content{right:12px;margin-bottom:0}.tooltip:not(.invalid):hover>.tooltip-content{display:none}']}]}],rp.propDecorators={label:[{type:t.Input}],for:[{type:t.Input}],tooltip:[{type:t.Input}],errors:[{type:t.Input}],readOnlyToggle:[{type:t.Input}],formFieldControl:[{type:t.ContentChild,args:[np,{static:!0}]}]};var op=function(){};op.decorators=[{type:t.Component,args:[{selector:"vdr-form-item",template:'<div class="form-group">\r\n <label class="clr-control-label">{{ label }}</label>\r\n <div class="content"><ng-content></ng-content></div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}:host .form-group>.content{flex:1;max-width:20rem}"]}]}],op.propDecorators={label:[{type:t.Input}]};var ip=function(){function e(){}return e.prototype.getCountryName=function(){return this.isAddressFragment(this.address)?this.address.country.name:this.address.country||""},e.prototype.getCustomFields=function(){var e=this.address.customFields;return e?Object.entries(e).filter((function(e){return"__typename"!==ee(e,1)[0]})).map((function(e){var t,n,r=ee(e,2);return{key:r[0],value:null!==(n=null===(t=r[1])||void 0===t?void 0:t.toString())&&void 0!==n?n:"-"}})):[]},e.prototype.isAddressFragment=function(e){return"string"!=typeof e.country},e}();ip.decorators=[{type:t.Component,args:[{selector:"vdr-formatted-address",template:'<ul class="address-lines">\r\n <li *ngIf="address.fullName">{{ address.fullName }}</li>\r\n <li *ngIf="address.streetLine1">{{ address.streetLine1 }}</li>\r\n <li *ngIf="address.streetLine2">{{ address.streetLine2 }}</li>\r\n <li *ngIf="address.city">{{ address.city }}</li>\r\n <li *ngIf="address.province">{{ address.province }}</li>\r\n <li *ngIf="address.postalCode">{{ address.postalCode }}</li>\r\n <li *ngIf="address.country">\r\n <clr-icon shape="world" size="12"></clr-icon>\r\n {{ getCountryName() }}\r\n </li>\r\n <li *ngIf="address.phoneNumber">\r\n <clr-icon shape="phone-handset" size="12"></clr-icon>\r\n {{ address.phoneNumber }}\r\n </li>\r\n <li *ngFor="let customField of getCustomFields()" class="custom-field">\r\n <vdr-labeled-data [label]="customField.key">{{ customField.value }}</vdr-labeled-data>\r\n </li>\r\n</ul>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".address-lines{list-style-type:none;line-height:1.2em}.custom-field{margin-top:6px}"]}]}],ip.propDecorators={address:[{type:t.Input}]};var ap=function(){};ap.decorators=[{type:t.Component,args:[{selector:"vdr-help-tooltip",template:'<clr-tooltip>\r\n <clr-icon clrTooltipTrigger shape="help" size="14"></clr-icon>\r\n <clr-tooltip-content [clrPosition]="position" clrSize="md" *clrIfOpen>\r\n <span>{{ content }}</span>\r\n </clr-tooltip-content>\r\n</clr-tooltip>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ap.propDecorators={content:[{type:t.Input}],position:[{type:t.Input}]};var sp=function(){};sp.decorators=[{type:t.Component,args:[{selector:"vdr-history-entry-detail",template:'<vdr-dropdown>\r\n <button class="btn btn-link btn-sm details-button" vdrDropdownTrigger>\r\n <clr-icon shape="details" size="12"></clr-icon>\r\n {{ \'common.details\' | translate }}\r\n </button>\r\n <vdr-dropdown-menu>\r\n <div class="entry-dropdown">\r\n <ng-content></ng-content>\r\n </div>\r\n </vdr-dropdown-menu>\r\n</vdr-dropdown>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".entry-dropdown{margin:0 12px}.details-button{margin:0}"]}]}];var lp=function(){this.itemsPerPage=10,this.itemsPerPageChange=new t.EventEmitter};lp.decorators=[{type:t.Component,args:[{selector:"vdr-items-per-page-controls",template:'<div class="select">\r\n <select [ngModel]="itemsPerPage" (change)="itemsPerPageChange.emit($event.target.value)">\r\n <option [value]="10">{{ \'common.items-per-page-option\' | translate: { count: 10 } }}</option>\r\n <option [value]="25">{{ \'common.items-per-page-option\' | translate: { count: 25 } }}</option>\r\n <option [value]="50">{{ \'common.items-per-page-option\' | translate: { count: 50 } }}</option>\r\n <option [value]="100">{{ \'common.items-per-page-option\' | translate: { count: 100 } }}</option>\r\n </select>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],lp.propDecorators={itemsPerPage:[{type:t.Input}],itemsPerPageChange:[{type:t.Output}]};var cp=function(){};cp.decorators=[{type:t.Component,args:[{selector:"vdr-labeled-data",template:'<div class="label-title">{{ label }}</div>\r\n<ng-content></ng-content>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;margin-bottom:6px}.label-title{font-size:12px;color:var(--color-text-300);line-height:12px;margin-bottom:-4px}"]}]}],cp.propDecorators={label:[{type:t.Input}]};var up=function(){this.disabled=!1,this.languageCodeChange=new t.EventEmitter};up.decorators=[{type:t.Component,args:[{selector:"vdr-language-selector",template:'<ng-container *ngIf="1 < availableLanguageCodes?.length">\r\n <vdr-dropdown>\r\n <button type="button" class="btn btn-sm btn-link" vdrDropdownTrigger [disabled]="disabled">\r\n <clr-icon shape="world"></clr-icon>\r\n {{ \'common.language\' | translate }}: {{ \'lang.\' + currentLanguageCode | translate | uppercase }}\r\n <clr-icon shape="caret down"></clr-icon>\r\n </button>\r\n <vdr-dropdown-menu vdrPosition="bottom-right">\r\n <button\r\n type="button"\r\n *ngFor="let code of availableLanguageCodes"\r\n (click)="languageCodeChange.emit(code)"\r\n vdrDropdownItem\r\n >\r\n {{ \'lang.\' + code | translate }} <span class="code">{{ code }}</span>\r\n </button>\r\n </vdr-dropdown-menu>\r\n </vdr-dropdown>\r\n</ng-container>\r\n',styles:[".code{color:var(--color-grey-400)}"]}]}],up.propDecorators={currentLanguageCode:[{type:t.Input}],availableLanguageCodes:[{type:t.Input}],disabled:[{type:t.Input}],languageCodeChange:[{type:t.Output}]};var pp=function(){function e(e,t){this.modal=e,this.templateRef=t}return e.prototype.ngOnInit=function(){var e=this;setTimeout((function(){return e.modal.registerButtonsTemplate(e.templateRef)}))},e}();pp.decorators=[{type:t.Directive,args:[{selector:"[vdrDialogButtons]"}]}],pp.ctorParameters=function(){return[{type:ic},{type:t.TemplateRef}]};var dp=function(){function e(e,n){this.viewContainerRef=e,this.componentFactoryResolver=n,this.create=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this.componentFactoryResolver.resolveComponentFactory(this.component),t=this.viewContainerRef.createComponent(e);this.create.emit(t.instance)},e}();dp.decorators=[{type:t.Component,args:[{selector:"vdr-dialog-component-outlet",template:""}]}],dp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.ComponentFactoryResolver}]},dp.propDecorators={component:[{type:t.Input}],create:[{type:t.Output}]};var mp=function(){function e(e,t){this.modal=e,this.templateRef=t}return e.prototype.ngOnInit=function(){var e=this;setTimeout((function(){return e.modal.registerTitleTemplate(e.templateRef)}))},e}();mp.decorators=[{type:t.Directive,args:[{selector:"[vdrDialogTitle]"}]}],mp.ctorParameters=function(){return[{type:ic},{type:t.TemplateRef}]};var gp=function(){function e(e){this.isArrayItem=!1,this.depth=e?e.depth+1:0}return e.prototype.ngOnInit=function(){this.entries=this.getEntries(this.value),this.expanded=0===this.depth||this.isArrayItem,this.valueIsArray=Object.keys(this.value).every((function(e){return Number.isInteger(+e)}))},e.prototype.isObject=function(e){return"object"==typeof e&&null!==e},e.prototype.getEntries=function(e){return"string"==typeof e?[{key:"",value:e}]:Object.entries(e).map((function(e){var t=ee(e,2);return{key:t[0],value:t[1]}}))},e}();gp.decorators=[{type:t.Component,args:[{selector:"vdr-object-tree",template:'<button class="icon-button" (click)="expanded = !expanded" *ngIf="depth !== 0 && !isArrayItem">\r\n <clr-icon shape="caret" size="12" [dir]="expanded ? \'down\' : \'right\'"></clr-icon>\r\n</button>\r\n<ul\r\n class="object-tree-node"\r\n [ngClass]="\'depth-\' + depth"\r\n [class.array-value]="valueIsArray"\r\n [class.array-item]="isArrayItem"\r\n [class.expanded]="expanded"\r\n>\r\n <li *ngFor="let entry of entries">\r\n <span class="key" *ngIf="entry.key">{{ entry.key }}:</span>\r\n <ng-container *ngIf="isObject(entry.value)">\r\n <vdr-object-tree [value]="entry.value" [isArrayItem]="valueIsArray"></vdr-object-tree>\r\n </ng-container>\r\n <ng-container *ngIf="!isObject(entry.value)">\r\n {{ entry.value }}\r\n </ng-container>\r\n </li>\r\n</ul>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".object-tree-node{list-style-type:none;line-height:16px;font-size:12px;overflow:hidden;max-height:0}.object-tree-node.depth-0{margin-left:0;margin-top:8px}.object-tree-node.depth-1,.object-tree-node.depth-2,.object-tree-node.depth-3,.object-tree-node.depth-4,.object-tree-node.depth-5,.object-tree-node.depth-6{margin-left:6px}.object-tree-node.expanded{max-height:5000px}.object-tree-node.array-item{margin-top:-16px;margin-left:16px}.object-tree-node.array-value.expanded>li+li{margin-top:6px}.key{color:var(--color-text-300)}"]}]}],gp.ctorParameters=function(){return[{type:gp,decorators:[{type:t.Optional},{type:t.SkipSelf}]}]},gp.propDecorators={value:[{type:t.Input}],isArrayItem:[{type:t.Input}]};var hp=function(){function e(){}return Object.defineProperty(e.prototype,"chipColorType",{get:function(){switch(this.state){case"AddingItems":case"ArrangingPayment":return"";case"Delivered":return"success";case"Cancelled":return"error";case"PaymentAuthorized":case"PaymentSettled":case"PartiallyDelivered":case"PartiallyShipped":case"Shipped":default:return"warning"}},enumerable:!1,configurable:!0}),e}();hp.decorators=[{type:t.Component,args:[{selector:"vdr-order-state-label",template:'<vdr-chip [ngClass]="state" [colorType]="chipColorType">\r\n <clr-icon shape="success-standard" *ngIf="state === \'Delivered\'" size="12"></clr-icon>\r\n <clr-icon shape="success-standard" *ngIf="state === \'PartiallyDelivered\'" size="12"></clr-icon>\r\n <clr-icon shape="ban" *ngIf="state === \'Cancelled\'" size="12"></clr-icon>\r\n {{ state | stateI18nToken | translate }}\r\n <ng-content></ng-content>\r\n</vdr-chip>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["clr-icon{margin-right:3px}"]}]}],hp.propDecorators={state:[{type:t.Input}]};var fp=function(){this.pageChange=new t.EventEmitter};fp.decorators=[{type:t.Component,args:[{selector:"vdr-pagination-controls",template:'<pagination-template #p="paginationApi" (pageChange)="pageChange.emit($event)">\r\n <ul>\r\n <li class="pagination-previous">\r\n <a *ngIf="!p.isFirstPage()" (click)="p.previous()" (keyup.enter)="p.previous()" tabindex="0">«</a>\r\n <div *ngIf="p.isFirstPage()">«</div>\r\n </li>\r\n\r\n <li *ngFor="let page of p.pages">\r\n <a\r\n (click)="p.setCurrent(page.value)"\r\n (keyup.enter)="p.setCurrent(page.value)"\r\n *ngIf="p.getCurrent() !== page.value"\r\n tabindex="0"\r\n >\r\n {{ page.label }}\r\n </a>\r\n\r\n <div class="current" *ngIf="p.getCurrent() === page.value">{{ page.label }}</div>\r\n </li>\r\n\r\n <li class="pagination-next">\r\n <a *ngIf="!p.isLastPage()" (click)="p.next()" (keyup.enter)="p.next()" tabindex="0">»</a>\r\n <div *ngIf="p.isLastPage()">»</div>\r\n </li>\r\n </ul>\r\n</pagination-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:["pagination-template{display:block}pagination-template ul{list-style-type:none;display:flex;justify-content:center}pagination-template li{transition:border-bottom-color .2s}pagination-template li>a{cursor:pointer}pagination-template li>a:focus,pagination-template li>a:hover{border-bottom-color:var(--color-grey-300);text-decoration:none}pagination-template li>a,pagination-template li>div{padding:3px 12px;display:block;border-bottom:3px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}pagination-template li>div.current{border-bottom-color:var(--color-primary-500)}"]}]}],fp.propDecorators={currentPage:[{type:t.Input}],itemsPerPage:[{type:t.Input}],totalItems:[{type:t.Input}],pageChange:[{type:t.Output}]};var yp=function(){function e(e){this.dataService=e,this.searchInput$=new c.Subject,this.searchLoading=!1,this.productSelected=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.initSearchResults()},e.prototype.initSearchResults=function(){var e=this,t=this.searchInput$.pipe(r.debounceTime(200),r.distinctUntilChanged(),r.tap((function(){return e.searchLoading=!0})),r.switchMap((function(t){return t?e.dataService.product.productSelectorSearch(t,10).mapSingle((function(e){return e.search.items})):c.of([])})),r.tap((function(){return e.searchLoading=!1}))),n=this.productSelected.pipe(r.mapTo([]));this.searchResults$=c.concat(c.of([]),c.merge(t,n))},e.prototype.selectResult=function(e){e&&(this.productSelected.emit(e),this.ngSelect.clearModel())},e}();yp.decorators=[{type:t.Component,args:[{selector:"vdr-product-selector",template:'<ng-select\r\n #autoComplete\r\n [items]="searchResults$ | async"\r\n [addTag]="false"\r\n [multiple]="false"\r\n [hideSelected]="true"\r\n [loading]="searchLoading"\r\n [typeahead]="searchInput$"\r\n [appendTo]="\'body\'"\r\n [placeholder]="\'settings.search-by-product-name-or-sku\' | translate"\r\n (change)="selectResult($event)"\r\n>\r\n <ng-template ng-option-tmp let-item="item">\r\n <img [src]="item.productAsset | assetPreview: 32">\r\n {{ item.productVariantName }}\r\n <small class="sku">{{ item.sku }}</small>\r\n </ng-template>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block}.sku{margin-left:12px;color:var(--color-grey-500)}"]}]}],yp.ctorParameters=function(){return[{type:Ql}]},yp.propDecorators={productSelected:[{type:t.Output}],ngSelect:[{type:t.ViewChild,args:["autoComplete",{static:!0}]}]};var vp=function(){function e(){this.previewLoaded=!1}return e.prototype.ngOnInit=function(){this.form=new C.FormGroup({src:new C.FormControl(this.existing?this.existing.src:"",C.Validators.required),title:new C.FormControl(this.existing?this.existing.title:""),alt:new C.FormControl(this.existing?this.existing.alt:"")})},e.prototype.select=function(){this.resolveWith(this.form.value)},e.prototype.onImageLoad=function(e){this.previewLoaded=!0},e.prototype.onImageError=function(e){this.previewLoaded=!1},e}();vp.decorators=[{type:t.Component,args:[{selector:"vdr-external-image-dialog",template:'<div class="flex">\r\n <form [formGroup]="form" class="flex-spacer" clrForm clrLayout="vertical">\r\n <clr-input-container class="expand">\r\n <label>{{ \'editor.image-src\' | translate }}</label>\r\n <input clrInput type="text" formControlName="src" />\r\n </clr-input-container>\r\n <clr-input-container class="expand">\r\n <label>{{ \'editor.image-title\' | translate }}</label>\r\n <input clrInput type="text" formControlName="title" />\r\n </clr-input-container>\r\n <clr-input-container class="expand">\r\n <label>{{ \'editor.image-alt\' | translate }}</label>\r\n <input clrInput type="text" formControlName="alt" />\r\n </clr-input-container>\r\n </form>\r\n <div class="preview">\r\n <img\r\n [src]="form.get(\'src\')?.value"\r\n [class.visible]="previewLoaded"\r\n (load)="onImageLoad($event)"\r\n (error)="onImageError($event)"\r\n />\r\n <div class="placeholder" *ngIf="!previewLoaded">\r\n <clr-icon shape="image" size="128"></clr-icon>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<ng-template vdrDialogButtons>\r\n <button type="submit" (click)="select()" class="btn btn-primary" [disabled]="form.invalid || !previewLoaded">\r\n {{ \'editor.insert-image\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".preview{display:flex;align-items:center;justify-content:center;max-width:150px;margin-left:12px}.preview img{max-width:100%;display:none}.preview img.visible{display:block}.preview .placeholder{color:var(--color-grey-300)}"]}]}];var Cp=function(){function e(){}return e.prototype.ngOnInit=function(){this.form=new C.FormGroup({href:new C.FormControl(this.existing?this.existing.href:"",C.Validators.required),title:new C.FormControl(this.existing?this.existing.title:"")})},e.prototype.remove=function(){this.resolveWith({title:"",href:""})},e.prototype.select=function(){this.resolveWith(this.form.value)},e}();function bp(e){return z.wrappingInputRule(/^\s*>\s$/,e)}function Sp(e){return z.wrappingInputRule(/^(\d+)\.\s$/,e,(function(e){return{order:+e[1]}}),(function(e,t){return t.childCount+t.attrs.order===+e[1]}))}function Ip(e){return z.wrappingInputRule(/^\s*([-+*])\s$/,e)}function Tp(e){return z.textblockTypeInputRule(/^```$/,e)}function Dp(e,t){return z.textblockTypeInputRule(new RegExp("^(#{1,"+t+"})\\s$"),e,(function(e){return{level:e[1].length}}))}function Ap(e){var t,n=z.smartQuotes.concat(z.ellipsis,z.emDash);return(t=e.nodes.blockquote)&&n.push(bp(t)),(t=e.nodes.ordered_list)&&n.push(Sp(t)),(t=e.nodes.bullet_list)&&n.push(Ip(t)),(t=e.nodes.code_block)&&n.push(Tp(t)),(t=e.nodes.heading)&&n.push(Dp(t,6)),z.inputRules({rules:n})}Cp.decorators=[{type:t.Component,args:[{selector:"vdr-link-dialog",template:'<form [formGroup]="form">\r\n <vdr-form-field [label]="\'editor.link-href\' | translate" for="href">\r\n <input id="href" type="text" formControlName="href" />\r\n </vdr-form-field>\r\n <vdr-form-field [label]="\'editor.link-title\' | translate" for="title">\r\n <input id="title" type="text" formControlName="title" />\r\n </vdr-form-field>\r\n</form>\r\n<ng-template vdrDialogButtons>\r\n <button type="button" class="btn btn-secondary" (click)="remove()" *ngIf="existing">\r\n <clr-icon shape="unlink"></clr-icon> {{ \'editor.remove-link\' | translate }}\r\n </button>\r\n <button type="submit" (click)="select()" class="btn btn-primary" [disabled]="form.invalid">\r\n {{ \'editor.set-link\' | translate }}\r\n </button>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var Ep="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function Rp(e,t){var n,r={};function o(e,n){if(t){var o=t[e];if(!1===o)return;o&&(e=o)}r[e]=n}if(o("Mod-z",N.undo),o("Shift-Mod-z",N.redo),o("Backspace",z.undoInputRule),Ep||o("Mod-y",N.redo),o("Alt-ArrowUp",_.joinUp),o("Alt-ArrowDown",_.joinDown),o("Mod-BracketLeft",_.lift),o("Escape",_.selectParentNode),(n=e.marks.strong)&&(o("Mod-b",_.toggleMark(n)),o("Mod-B",_.toggleMark(n))),(n=e.marks.em)&&(o("Mod-i",_.toggleMark(n)),o("Mod-I",_.toggleMark(n))),(n=e.marks.code)&&o("Mod-`",_.toggleMark(n)),(n=e.nodes.bullet_list)&&o("Shift-Ctrl-8",j.wrapInList(n)),(n=e.nodes.ordered_list)&&o("Shift-Ctrl-9",j.wrapInList(n)),(n=e.nodes.blockquote)&&o("Ctrl->",_.wrapIn(n)),n=e.nodes.hard_break){var i=n,a=_.chainCommands(_.exitCode,(function(e,t){return t(e.tr.replaceSelectionWith(i.create()).scrollIntoView()),!0}));o("Mod-Enter",a),o("Shift-Enter",a),Ep&&o("Ctrl-Enter",a)}if((n=e.nodes.list_item)&&(o("Enter",j.splitListItem(n)),o("Mod-[",j.liftListItem(n)),o("Mod-]",j.sinkListItem(n))),(n=e.nodes.paragraph)&&o("Shift-Ctrl-0",_.setBlockType(n)),(n=e.nodes.code_block)&&o("Shift-Ctrl-\\",_.setBlockType(n)),n=e.nodes.heading)for(var s=1;s<=6;s++)o("Shift-Ctrl-"+s,_.setBlockType(n,{level:s}));if(n=e.nodes.horizontal_rule){var l=n;o("Mod-_",(function(e,t){return t(e.tr.replaceSelectionWith(l.create()).scrollIntoView()),!0}))}return r}function Pp(e,t){var n=e.selection,r=n.from,o=n.$from,i=n.to;return n.empty?t.isInSet(e.storedMarks||o.marks()):e.doc.rangeHasMark(r,i,t)}function Op(e,t){for(var n=e.selection.$from,r=n.depth;r>=0;r--){var o=n.index(r);if(n.node(r).canReplaceWith(o,o,t))return!0}return!1}function kp(e,t){return new q.MenuItem({title:"Insert image",label:"Image",class:"",css:"",enable:function(t){return Op(t,e)},run:function(n,r,o){var i;n.selection instanceof B.NodeSelection&&n.selection.node.type===e&&(i=n.selection.node.attrs),t.fromComponent(vp,{closable:!0,locals:{existing:i}}).subscribe((function(t){t&&o.dispatch(o.state.tr.replaceSelectionWith(e.createAndFill(t))),o.focus()}))}})}function wp(e,t,n){var r=e.doc,o=r.resolve(n).marks().find((function(e){return"link"===e.type.name})),i=r.resolve(t).marks().find((function(e){return"link"===e.type.name}));return!!(o&&i&&o.eq(i))}function xp(e,t){return new q.MenuItem({title:"Add or remove link",icon:q.icons.link,class:"",css:"",active:function(t){return Pp(t,e)},enable:function(e){var t=e.selection;return!t.empty||wp(e,t.anchor,t.head)},run:function(n,r,o){var i,a=n.selection,s=n.doc;if(a instanceof B.TextSelection&&wp(n,a.anchor+1,a.head-1)){var l=s.resolve(a.anchor+1).marks().find((function(e){return"link"===e.type.name}));l&&(i=l.attrs)}return t.fromComponent(Cp,{closable:!0,locals:{existing:i}}).subscribe((function(t){var i=n.tr;if(t){var s=a.ranges[0],l=s.$from,c=s.$to;i=i.removeMark(l.pos,c.pos,e),""!==t.href&&(i=i.addMark(l.pos,c.pos,e.create(t)))}r(i.scrollIntoView()),o.focus()})),!0}})}function Fp(e,t){var n={label:t.title,run:e};for(var r in t)n[r]=t[r];return t.enable&&!0!==t.enable||t.select||(n[t.enable?"enable":"select"]=function(t){return e(t)}),new q.MenuItem(n)}function $p(e,t){var n={active:function(t){return Pp(t,e)},enable:!0};for(var r in t)n[r]=t[r];return Fp(_.toggleMark(e),n)}function _p(e,t){return Fp(j.wrapInList(e,t.attrs),t)}function Mp(e,t){var n,r={};if((n=e.marks.strong)&&(r.toggleStrong=$p(n,{title:"Toggle strong style",icon:q.icons.strong})),(n=e.marks.em)&&(r.toggleEm=$p(n,{title:"Toggle emphasis",icon:q.icons.em})),(n=e.marks.code)&&(r.toggleCode=$p(n,{title:"Toggle code font",icon:q.icons.code})),(n=e.marks.link)&&(r.toggleLink=xp(n,t)),(n=e.nodes.image)&&(r.insertImage=kp(n,t)),(n=e.nodes.bullet_list)&&(r.wrapBulletList=_p(n,{title:"Wrap in bullet list",icon:q.icons.bulletList})),(n=e.nodes.ordered_list)&&(r.wrapOrderedList=_p(n,{title:"Wrap in ordered list",icon:q.icons.orderedList})),(n=e.nodes.blockquote)&&(r.wrapBlockQuote=q.wrapItem(n,{title:"Wrap in block quote",icon:q.icons.blockquote})),(n=e.nodes.paragraph)&&(r.makeParagraph=q.blockTypeItem(n,{title:"Change to paragraph",label:"Plain"})),(n=e.nodes.code_block)&&(r.makeCodeBlock=q.blockTypeItem(n,{title:"Change to code block",label:"Code"})),n=e.nodes.heading)for(var o=1;o<=10;o++)r["makeHead"+o]=q.blockTypeItem(n,{title:"Change to heading "+o,label:"Level "+o,attrs:{level:o}});if(n=e.nodes.horizontal_rule){var i=n;r.insertHorizontalRule=new q.MenuItem({title:"Insert horizontal rule",label:"Horizontal rule",class:"",css:"",enable:function(e){return Op(e,i)},run:function(e,t){t(e.tr.replaceSelectionWith(i.create()))}})}var a=function(e){return e.filter((function(e){return e}))};r.insertMenu=new q.Dropdown(a([r.insertImage,r.insertHorizontalRule]),{label:"Insert"}),r.typeMenu=new q.Dropdown(a([r.makeParagraph,r.makeCodeBlock,r.makeHead1&&new q.DropdownSubmenu(a([r.makeHead1,r.makeHead2,r.makeHead3,r.makeHead4,r.makeHead5,r.makeHead6]),{label:"Heading"})]),{label:"Type..."});var s=a([r.toggleStrong,r.toggleEm,r.toggleLink]);return r.inlineMenu=[s],r.blockMenu=[a([r.wrapBulletList,r.wrapOrderedList,r.wrapBlockQuote,q.joinUpItem,q.liftItem,q.selectParentNodeItem])],r.fullMenu=[s].concat([[r.insertMenu,r.typeMenu]],[[q.undoItem,q.redoItem]],r.blockMenu),r}var Lp=function(e,t){if(void 0===e&&(e=null),void 0===t&&(t=null),!e||!t)return!1;var n=e.parent.childAfter(e.parentOffset);if(!n.node)return!1;var r=n.node.marks.find((function(e){return e.type===t}));if(!r)return!1;for(var o=e.index(),i=e.start()+n.offset;o>0&&r.isInSet(e.parent.child(o-1).marks);)o-=1,i-=e.parent.child(o).nodeSize;return{from:i,to:i+n.node.nodeSize}},Np=new B.Plugin({props:{handleClick:function(e,t){var n=e.state,r=n.doc,o=n.tr,i=n.schema,a=Lp(r.resolve(t),i.marks.link);if(!a)return!1;var s=r.resolve(a.from),l=r.resolve(a.to),c=o.setSelection(new B.TextSelection(s,l));return e.dispatch(c),!0}}}),Up=function(){function e(e){this.modalService=e,this.mySchema=new G.Schema({nodes:j.addListNodes(V.schema.spec.nodes,"paragraph block*","block"),marks:V.schema.spec.marks}),this.enabled=!0}return e.prototype.createEditorView=function(e){var t=this;this.editorView=new H.EditorView(e.element,{state:this.getStateFromText(""),dispatchTransaction:function(n){if(t.enabled&&(t.editorView.updateState(t.editorView.state.apply(n)),n.docChanged)){var r=t.getTextFromState(t.editorView.state);e.onTextInput(r)}},editable:function(){return e.isReadOnly()}})},e.prototype.update=function(e){if(this.editorView){var t=this.getStateFromText(e);document.body.contains(this.editorView.dom)&&this.editorView.updateState(t)}},e.prototype.destroy=function(){this.editorView&&this.editorView.destroy()},e.prototype.setEnabled=function(e){this.editorView&&(this.enabled=e,this.editorView.updateState(this.editorView.state))},e.prototype.getStateFromText=function(e){var t=document.createElement("div");return t.innerHTML=e,B.EditorState.create({doc:G.DOMParser.fromSchema(this.mySchema).parse(t),plugins:this.configurePlugins({schema:this.mySchema,floatingMenu:!1})})},e.prototype.getTextFromState=function(e){var t=document.createElement("div"),n=G.DOMSerializer.fromSchema(this.mySchema).serializeFragment(e.doc.content);return t.appendChild(n),t.innerHTML},e.prototype.configurePlugins=function(e){var t=[Ap(e.schema),U.keymap(Rp(e.schema,e.mapKeys)),U.keymap(_.baseKeymap),M.dropCursor(),L.gapCursor(),Np];return!1!==e.menuBar&&t.push(q.menuBar({floating:!1!==e.floatingMenu,content:e.menuContent||Mp(e.schema,this.modalService).fullMenu})),!1!==e.history&&t.push(N.history()),t.concat(new B.Plugin({props:{attributes:{class:"vdr-prosemirror"}}}))},e}();Up.decorators=[{type:t.Injectable}],Up.ctorParameters=function(){return[{type:lc}]};var qp=function(){function e(e,t){this.changeDetector=e,this.prosemirrorService=t,this._readonly=!1}return Object.defineProperty(e.prototype,"readonly",{set:function(e){this._readonly=!!e,this.prosemirrorService.setEnabled(!this._readonly)},enumerable:!1,configurable:!0}),e.prototype.ngAfterViewInit=function(){var e=this;this.prosemirrorService.createEditorView({element:this.editorEl.nativeElement,onTextInput:function(t){e.onChange(t),e.changeDetector.markForCheck()},isReadOnly:function(){return!e._readonly}}),this.value&&this.prosemirrorService.update(this.value)},e.prototype.ngOnDestroy=function(){this.prosemirrorService.destroy()},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.prosemirrorService.setEnabled(!e)},e.prototype.writeValue=function(e){this.value=e,this.prosemirrorService&&this.prosemirrorService.update(e)},e}();qp.decorators=[{type:t.Component,args:[{selector:"vdr-rich-text-editor",template:'<label class="clr-control-label">{{ label }}</label>\r\n<div #editor></div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:qp,multi:!0},Up],styles:['@charset "UTF-8";::ng-deep .ProseMirror{position:relative;word-wrap:break-word;white-space:pre-wrap;font-variant-ligatures:none}::ng-deep .ProseMirror pre{white-space:pre-wrap}::ng-deep .ProseMirror li{position:relative}::ng-deep .ProseMirror-hideselection ::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection ::selection{background:transparent}::ng-deep .ProseMirror-hideselection ::-moz-selection{background:transparent}::ng-deep .ProseMirror-hideselection{caret-color:transparent}::ng-deep .ProseMirror-selectednode{outline:2px solid var(--color-primary-500)}::ng-deep li.ProseMirror-selectednode{outline:none}::ng-deep li.ProseMirror-selectednode:after{content:"";position:absolute;left:-32px;right:-2px;top:-2px;bottom:-2px;border:2px solid var(--color-primary-500);pointer-events:none}::ng-deep .ProseMirror-textblock-dropdown{min-width:3em}::ng-deep .ProseMirror-menu{margin:0 -4px;line-height:1}::ng-deep .ProseMirror-tooltip .ProseMirror-menu{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;white-space:pre}::ng-deep .ProseMirror-menuitem{margin-right:3px;display:inline-block}::ng-deep .ProseMirror-menuseparator{border-right:1px solid var(--color-component-border-200);margin-right:3px}::ng-deep .ProseMirror-menu-dropdown,::ng-deep .ProseMirror-menu-dropdown-menu{font-size:90%;white-space:nowrap}::ng-deep .ProseMirror-menu-dropdown{vertical-align:1px;cursor:pointer;position:relative;padding-right:15px}::ng-deep .ProseMirror-menu-dropdown-wrap{padding:1px 0 1px 4px;display:inline-block;position:relative}::ng-deep .ProseMirror-menu-dropdown:after{content:"";border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid;opacity:.6;position:absolute;right:4px;top:calc(50% - 2px)}::ng-deep .ProseMirror-menu-dropdown-menu,::ng-deep .ProseMirror-menu-submenu{position:absolute;background:#fff;color:var(--color-grey-600);border:1px solid var(--color-component-border-200);padding:2px}::ng-deep .ProseMirror-menu-dropdown-menu{z-index:15;min-width:6em}::ng-deep .ProseMirror-menu-dropdown-item{cursor:pointer;padding:2px 8px 2px 4px}::ng-deep .ProseMirror-menu-dropdown-item:hover{background:var(--color-component-bg-100)}::ng-deep .ProseMirror-menu-submenu-wrap{position:relative;margin-right:-4px}::ng-deep .ProseMirror-menu-submenu-label:after{content:"";border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid;opacity:.6;position:absolute;right:4px;top:calc(50% - 4px)}::ng-deep .ProseMirror-menu-submenu{display:none;min-width:4em;left:100%;top:-3px}::ng-deep .ProseMirror-menu-active{background:var(--color-component-bg-100);border-radius:4px}::ng-deep .ProseMirror-menu-disabled{opacity:.3}::ng-deep .ProseMirror-menu-submenu-wrap-active .ProseMirror-menu-submenu,::ng-deep .ProseMirror-menu-submenu-wrap:hover .ProseMirror-menu-submenu{display:block}::ng-deep .ProseMirror-menubar{border-top-left-radius:inherit;border-top-right-radius:inherit;position:relative;min-height:1em;color:var(--color-grey-600);padding:1px 6px;top:0;left:0;right:0;background:var(--color-component-bg-100);z-index:10;box-sizing:border-box;overflow:visible}::ng-deep .ProseMirror-icon{display:inline-block;line-height:.8;vertical-align:-2px;padding:2px 8px;cursor:pointer}::ng-deep .ProseMirror-menu-disabled.ProseMirror-icon{cursor:default}::ng-deep .ProseMirror-icon svg{fill:currentColor;height:1em}::ng-deep .ProseMirror-icon span{vertical-align:text-top}::ng-deep .ProseMirror-gapcursor{display:none;pointer-events:none;position:absolute}::ng-deep .ProseMirror-gapcursor:after{content:"";display:block;position:absolute;top:-2px;width:20px;border-top:1px solid #000;-webkit-animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite;animation:ProseMirror-cursor-blink 1.1s steps(2,start) infinite}@-webkit-keyframes ProseMirror-cursor-blink{to{visibility:hidden}}@keyframes ProseMirror-cursor-blink{to{visibility:hidden}}::ng-deep .ProseMirror-focused .ProseMirror-gapcursor{display:block}::ng-deep .ProseMirror ol,::ng-deep .ProseMirror ul{padding-left:30px;list-style-position:initial}::ng-deep .ProseMirror blockquote{padding-left:1em;border-left:3px solid var(--color-grey-100);margin-left:0;margin-right:0}::ng-deep .ProseMirror-prompt{background:#fff;padding:5px 10px 5px 15px;border:1px solid silver;position:fixed;border-radius:3px;z-index:11;box-shadow:-.5px 2px 5px rgba(0,0,0,.2)}::ng-deep .ProseMirror-prompt h5{margin:0;font-weight:400;font-size:100%;color:var(--color-grey-500)}::ng-deep .ProseMirror-prompt input[type=text],::ng-deep .ProseMirror-prompt textarea{background:var(--color-component-bg-100);border:none;outline:none}::ng-deep .ProseMirror-prompt input[type=text]{padding:0 4px}::ng-deep .ProseMirror-prompt-close{position:absolute;left:2px;top:1px;color:var(--color-grey-400);border:none;background:transparent;padding:0}::ng-deep .ProseMirror-prompt-close:after{content:"✕";font-size:12px}::ng-deep .ProseMirror-invalid{background:var(--color-warning-200);border:1px solid var(--color-warning-300);border-radius:4px;padding:5px 10px;position:absolute;min-width:10em}::ng-deep .ProseMirror-prompt-buttons{margin-top:5px;display:none}::ng-deep #editor,::ng-deep .editor{background:var(--color-form-input-bg);color:#000;background-clip:padding-box;border-radius:4px;border:2px solid rgba(0,0,0,.2);padding:5px 0;margin-bottom:23px}::ng-deep .ProseMirror h1:first-child,::ng-deep .ProseMirror h2:first-child,::ng-deep .ProseMirror h3:first-child,::ng-deep .ProseMirror h4:first-child,::ng-deep .ProseMirror h5:first-child,::ng-deep .ProseMirror h6:first-child,::ng-deep .ProseMirror p:first-child{margin-top:10px}::ng-deep .ProseMirror{padding:4px 8px 4px 14px;line-height:1.2;outline:none}::ng-deep .ProseMirror p{margin-bottom:.5rem;color:var(--color-grey-800)}:host{display:block;max-width:710px;margin-bottom:.5rem}:host.readonly ::ng-deep .ProseMirror-menubar{display:none}::ng-deep .ProseMirror-menubar{position:sticky;top:24px;margin-top:6px;border:1px solid var(--color-component-border-200);border-bottom:none;background-color:var(--color-component-bg-200);color:var(--color-icon-button);padding:6px 12px}::ng-deep .vdr-prosemirror{background:var(--color-form-input-bg);min-height:128px;border:1px solid var(--color-component-border-200);border-radius:0 0 3px 3px;transition:border-color .2s;overflow:auto}::ng-deep .vdr-prosemirror:focus{border-color:var(--color-primary-500)!important;box-shadow:0 0 1px 1px var(--color-primary-100)}::ng-deep .vdr-prosemirror hr{padding:2px 10px;border:none;margin:1em 0}::ng-deep .vdr-prosemirror hr:after{content:"";display:block;height:1px;background-color:silver;line-height:2px}::ng-deep .vdr-prosemirror img{cursor:default;max-width:100%}']}]}],qp.ctorParameters=function(){return[{type:t.ChangeDetectorRef},{type:Up}]},qp.propDecorators={label:[{type:t.Input}],readonly:[{type:t.Input}],_readonly:[{type:t.HostBinding,args:["class.readonly"]}],editorEl:[{type:t.ViewChild,args:["editor",{static:!0}]}]};var Gp=function(){this.size="large",this.selected=!1,this.disabled=!1,this.selectedChange=new t.EventEmitter};Gp.decorators=[{type:t.Component,args:[{selector:"vdr-select-toggle",template:'<div\r\n class="toggle"\r\n [class.disabled]="disabled"\r\n [class.small]="size === \'small\'"\r\n [attr.tabindex]="disabled ? null : 0"\r\n [class.selected]="selected"\r\n (keydown.enter)="selectedChange.emit(!selected)"\r\n (keydown.space)="$event.preventDefault(); selectedChange.emit(!selected)"\r\n (click)="selectedChange.emit(!selected)"\r\n>\r\n <clr-icon shape="check" [attr.size]="size === \'small\' ? 16 : 32"></clr-icon>\r\n</div>\r\n<div class="toggle-label" [class.disabled]="disabled" *ngIf="label" (click)="selectedChange.emit(!selected)">\r\n {{ label }}\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".toggle,:host{display:flex;align-items:center;justify-content:center}.toggle{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;background-color:var(--color-component-bg-100);border:2px solid var(--color-component-border-300);padding:0 6px;border-radius:50%;width:32px;height:32px;color:var(--color-grey-300);transition:background-color .2s,border .2s}.toggle.small{width:24px;height:24px}.toggle:not(.disabled):hover{border-color:var(--color-success-500);background-color:var(--color-success-400);opacity:.9}.toggle.selected{background-color:var(--color-success-500);border-color:var(--color-success-600);color:#fff}.toggle.selected:not(.disabled):hover{background-color:var(--color-success-500);border-color:var(--color-success-400);opacity:.9}.toggle:focus{outline:none;box-shadow:0 0 2px 2px var(--color-primary-500)}.toggle.disabled{cursor:default}.toggle-label{flex:1;margin-left:6px;text-align:left;font-size:12px}.toggle-label:not(.disabled){cursor:pointer}"]}]}],Gp.propDecorators={size:[{type:t.Input}],selected:[{type:t.Input}],disabled:[{type:t.Input}],label:[{type:t.Input}],selectedChange:[{type:t.Output}]};var Vp=function(){this.disabled=!1};Vp.decorators=[{type:t.Component,args:[{selector:"vdr-table-row-action",template:'<ng-container *ngIf="!disabled; else: disabledLink">\r\n <a class="btn btn-link btn-sm" [routerLink]="linkTo">\r\n <clr-icon [attr.shape]="iconShape"></clr-icon>\r\n {{ label }}\r\n </a>\r\n</ng-container>\r\n<ng-template #disabledLink>\r\n <button class="btn btn-link btn-sm" disabled>\r\n <clr-icon [attr.shape]="iconShape"></clr-icon>\r\n {{ label }}\r\n </button>\r\n</ng-template>\r\n',styles:["a.btn{margin:0}"]}]}],Vp.propDecorators={linkTo:[{type:t.Input}],label:[{type:t.Input}],iconShape:[{type:t.Input}],disabled:[{type:t.Input}]};var jp=function(){function e(e){this.dataService=e}return e.prototype.ngOnInit=function(){this.allTags$=this.dataService.product.getTagList().mapStream((function(e){return e.tags.items.map((function(e){return e.value}))}))},e.prototype.addTagFn=function(e){return e},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.setDisabledState=function(e){this.disabled=e},e.prototype.writeValue=function(e){Array.isArray(e)&&(this._value=e)},e.prototype.valueChanged=function(e){this.onChange(e)},e}();jp.decorators=[{type:t.Component,args:[{selector:"vdr-tag-selector",template:'<ng-select\r\n [addTag]="addTagFn"\r\n [multiple]="true"\r\n [ngModel]="_value"\r\n [clearable]="true"\r\n [searchable]="true"\r\n [disabled]="disabled"\r\n [placeholder]="placeholder"\r\n (change)="valueChanged($event)"\r\n>\r\n <ng-template ng-label-tmp let-tag="item" let-clear="clear">\r\n <vdr-chip [colorFrom]="tag" icon="close" (iconClick)="clear(tag)"><clr-icon shape="tag" class="mr2"></clr-icon> {{ tag }}</vdr-chip>\r\n </ng-template>\r\n <ng-option *ngFor="let tag of allTags$ | async" [value]="tag">\r\n <vdr-chip [colorFrom]="tag"><clr-icon shape="tag" class="mr2"></clr-icon> {{ tag }}</vdr-chip>\r\n </ng-option>\r\n</ng-select>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:jp,multi:!0}],styles:[":host{display:block;margin-top:12px;position:relative}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{background:none;margin:0}:host ::ng-deep .ng-dropdown-panel-items div.ng-option:last-child{display:none}:host ::ng-deep .ng-dropdown-panel .ng-dropdown-header{border:none;padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container{padding:0}:host ::ng-deep .ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{padding-left:8px}"]}]}],jp.ctorParameters=function(){return[{type:Ql}]},jp.propDecorators={placeholder:[{type:t.Input}]};var Bp=function(){function e(){this.collapsed=!1,this.expandClick=new t.EventEmitter}return Object.defineProperty(e.prototype,"timelineTitle",{get:function(){return this.collapsed?b.marker("common.expand-entries"):b.marker("common.collapse-entries")},enumerable:!1,configurable:!0}),e.prototype.getIconShape=function(){if(this.iconShape)return"string"==typeof this.iconShape?this.iconShape:this.iconShape[0]},e.prototype.getIconClass=function(){if(this.iconShape)return"string"==typeof this.iconShape?"":this.iconShape[1]},e}();Bp.decorators=[{type:t.Component,args:[{selector:"vdr-timeline-entry",template:'<div\r\n [ngClass]="displayType"\r\n [class.has-custom-icon]="!!iconShape"\r\n class="entry"\r\n [class.last]="isLast === true"\r\n [class.collapsed]="collapsed"\r\n>\r\n <div class="timeline" (click)="expandClick.emit()" [title]="timelineTitle | translate">\r\n <div class="custom-icon">\r\n <clr-icon\r\n *ngIf="iconShape && !collapsed"\r\n [attr.shape]="getIconShape()"\r\n [ngClass]="getIconClass()"\r\n size="24"\r\n ></clr-icon>\r\n </div>\r\n </div>\r\n <div class="entry-body">\r\n <div class="detail">\r\n <div class="time">\r\n {{ createdAt | localeDate: \'short\' }}\r\n </div>\r\n <div class="name">\r\n {{ name }}\r\n </div>\r\n </div>\r\n <div [class.featured-entry]="featured">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[':host{display:block}:host:first-of-type .timeline:before{border-left-color:var(--color-timeline-thread)}:host:first-of-type .entry-body{max-height:none}.entry{display:flex}.timeline{border-left:2px solid var(--color-timeline-thread);padding-bottom:8px;position:relative}.timeline:before{content:"";position:absolute;width:2px;height:32px;left:-2px;border-left:2px solid var(--color-timeline-thread)}.timeline:after{content:"";display:block;border-radius:50%;width:8px;height:8px;background-color:var(--color-component-bg-200);border:1px solid var(--color-component-border-300);position:absolute;left:-5px;top:32px;transition:top .2s;cursor:pointer}.timeline .custom-icon{position:absolute;width:32px;height:32px;left:-17px;top:32px;align-items:center;justify-content:center;border-radius:50%;color:var(--color-primary-600);background-color:var(--color-component-bg-100);border:1px solid var(--color-component-border-200);display:none}.entry.has-custom-icon .timeline:after{display:none}.entry.has-custom-icon .custom-icon{display:flex}.entry.last .timeline{border-left-color:transparent}.entry-body{flex:1;padding-top:24px;padding-left:12px;line-height:16px;margin-left:12px;color:var(--color-text-200);overflow:visible;max-height:100px;transition:max-height .2s,padding-top .2s,opacity .2s .2s}.featured-entry ::ng-deep .title{color:var(--color-text-100);font-size:16px;line-height:26px}.featured-entry ::ng-deep .note-text{color:var(--color-text-100);white-space:pre-wrap}.detail{display:flex;color:var(--color-text-300);font-size:12px}.detail .name{margin-left:12px}.muted .timeline,.muted .timeline .custom-icon{color:var(--color-text-300)}.success .timeline,.success .timeline .custom-icon{color:var(--color-success-400)}.success .timeline:after{background-color:var(--color-success-200);border:1px solid var(--color-success-400)}.error .timeline,.error .timeline .custom-icon{color:var(--color-error-400)}.error .timeline:after{background-color:var(--color-error-200);border:1px solid var(--color-error-400)}.warning .timeline,.warning .timeline .custom-icon{color:var(--color-warning-400)}.warning .timeline:after{background-color:var(--color-warning-200);border:1px solid var(--color-warning-400)}.collapsed .entry-body{max-height:0;overflow:hidden;opacity:0;padding-top:0}.collapsed .timeline{border-left-color:transparent}.collapsed .timeline:after{top:0}']}]}],Bp.propDecorators={displayType:[{type:t.Input}],createdAt:[{type:t.Input}],name:[{type:t.Input}],featured:[{type:t.Input}],iconShape:[{type:t.Input}],isLast:[{type:t.Input}],collapsed:[{type:t.HostBinding,args:["class.collapsed"]},{type:t.Input}],expandClick:[{type:t.Output}]};var Hp=function(){this.readonly=!1};Hp.decorators=[{type:t.Component,args:[{selector:"vdr-title-input",template:'<ng-content></ng-content>\r\n<div class="edit-icon" *ngIf="!readonly">\r\n <clr-icon shape="edit"></clr-icon>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;position:relative}:host ::ng-deep input{font-size:18px;color:var(--clr-p1-color);max-width:100%}:host ::ng-deep input:not(:focus){border-color:transparent!important;background-color:transparent!important}:host ::ng-deep input:focus{background-color:var(--clr-global-app-background)}:host ::ng-deep .clr-control-container{max-width:100%}:host ::ng-deep .clr-input-wrapper{max-width:100%!important}:host .edit-icon{position:absolute;right:8px;top:6px;color:var(--color-grey-300);opacity:0;transition:opacity .2s}:host:hover ::ng-deep input:not(:focus){background-color:var(--color-component-bg-200)!important}:host:hover .edit-icon{opacity:1}:host.readonly .edit-icon{display:none}:host.readonly:hover ::ng-deep input:not(:focus){background-color:var(--color-grey-200)!important}"]}]}],Hp.propDecorators={readonly:[{type:t.HostBinding,args:["class.readonly"]},{type:t.Input}]};var zp=function(){function e(e,t){this.formControlName=e,this.formControl=t}return Object.defineProperty(e.prototype,"disabled",{set:function(e){var t,n,r,o=null!==(n=null===(t=this.formControlName)||void 0===t?void 0:t.control)&&void 0!==n?n:null===(r=this.formControl)||void 0===r?void 0:r.form;o&&(!1==!!e?o.enable({emitEvent:!1}):o.disable({emitEvent:!1}))},enumerable:!1,configurable:!0}),e}();zp.decorators=[{type:t.Directive,args:[{selector:"[vdrDisabled]"}]}],zp.ctorParameters=function(){return[{type:C.FormControlName,decorators:[{type:t.Optional}]},{type:C.FormControlDirective,decorators:[{type:t.Optional}]}]},zp.propDecorators={disabled:[{type:t.Input,args:["vdrDisabled"]}]};var Wp=function(){function e(e,t,n){this._viewContainer=e,this.updateViewFn=n,this.updateArgs$=new c.BehaviorSubject([]),this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=t}return e.prototype.ngOnInit=function(){var e=this;this.subscription=this.updateArgs$.pipe(r.switchMap((function(t){return e.updateViewFn.apply(e,te(t))}))).subscribe((function(t){t?e.showThen():e.showElse()}))},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.setElseTemplate=function(e){this.assertTemplate("vdrIfPermissionsElse",e),this._elseTemplateRef=e,this._elseViewRef=null},e.prototype.showThen=function(){this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef)))},e.prototype.showElse=function(){this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef)))},e.prototype.assertTemplate=function(e,t){if(!!(t&&!t.createEmbeddedView))throw new Error(e+" must be a TemplateRef, but received '"+t+"'.")},e}();Wp.decorators=[{type:t.Directive}],Wp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Function}]};var Zp=function(e){function t(t,n,o,i){var a=e.call(this,t,n,(function(){return a.dataService.client.userStatus().mapStream((function(e){var t=e.userStatus;return a.defaultChannelIsActive(t)})).pipe(r.tap((function(){return a.changeDetectorRef.markForCheck()})))}))||this;return a.dataService=o,a.changeDetectorRef=i,a}return J(t,e),Object.defineProperty(t.prototype,"vdrIfMultichannelElse",{set:function(e){this.setElseTemplate(e)},enumerable:!1,configurable:!0}),t.prototype.defaultChannelIsActive=function(e){var t=e.channels.find((function(e){return e.code===y.DEFAULT_CHANNEL_CODE}));return!(!t||e.activeChannelId!==t.id)},t}(Wp);Zp.decorators=[{type:t.Directive,args:[{selector:"[vdrIfDefaultChannelActive]"}]}],Zp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Ql},{type:t.ChangeDetectorRef}]},Zp.propDecorators={vdrIfMultichannelElse:[{type:t.Input}]};var Yp=function(e){function t(t,n,r){var o=e.call(this,t,n,(function(){return o.dataService.client.userStatus().mapStream((function(e){return 1<e.userStatus.channels.length}))}))||this;return o.dataService=r,o}return J(t,e),Object.defineProperty(t.prototype,"vdrIfMultichannelElse",{set:function(e){this.setElseTemplate(e)},enumerable:!1,configurable:!0}),t}(Wp);Yp.decorators=[{type:t.Directive,args:[{selector:"[vdrIfMultichannel]"}]}],Yp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Ql}]},Yp.propDecorators={vdrIfMultichannelElse:[{type:t.Input}]};var Jp=function(e){function t(t,n,o,i){var a=e.call(this,t,n,(function(e){return null==e?c.of(!0):e?a.dataService.client.userStatus().mapStream((function(t){var n,r,o=t.userStatus;try{for(var i=X(e),a=i.next();!a.done;a=i.next()){var s=a.value;if(o.permissions.includes(s))return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!1})).pipe(r.tap((function(){return a.changeDetectorRef.markForCheck()}))):c.of(!1)}))||this;return a.dataService=o,a.changeDetectorRef=i,a.permissionToCheck=["__initial_value__"],a}return J(t,e),Object.defineProperty(t.prototype,"vdrIfPermissions",{set:function(e){this.permissionToCheck=e&&(Array.isArray(e)?e:[e])||null,this.updateArgs$.next([this.permissionToCheck])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"vdrIfPermissionsElse",{set:function(e){this.setElseTemplate(e),this.updateArgs$.next([this.permissionToCheck])},enumerable:!1,configurable:!0}),t}(Wp);Jp.decorators=[{type:t.Directive,args:[{selector:"[vdrIfPermissions]"}]}],Jp.ctorParameters=function(){return[{type:t.ViewContainerRef},{type:t.TemplateRef},{type:Ql},{type:t.ChangeDetectorRef}]},Jp.propDecorators={vdrIfPermissions:[{type:t.Input}],vdrIfPermissionsElse:[{type:t.Input}]};var Kp=function(){function e(e,t,n,r){this.componentRegistryService=e,this.componentFactoryResolver=t,this.changeDetectorRef=n,this.injector=r,this.renderAsList=!1,this.listItems=[],this.listId=1,this.listFormArray=new C.FormArray([]),this.renderList$=new c.Subject,this.destroy$=new c.Subject}return e.prototype.ngOnInit=function(){var e=this.getInputComponentConfig(this.def).component,t=this.componentRegistryService.getInputComponent(e);if(t)this.componentType=t;else{console.error('No form input component registered with the id "'+e+'". Using the default input instead.');var n=this.componentRegistryService.getInputComponent(this.getInputComponentConfig(Object.assign(Object.assign({},this.def),{ui:void 0})).component);n&&(this.componentType=n)}},e.prototype.ngAfterViewInit=function(){var e,t=this;if(this.componentType){var n=this.componentFactoryResolver.resolveComponentFactory(this.componentType),o=n.create(this.injector),i=null!==(e=o.instance.isListInput)&&void 0!==e&&e;if(o.destroy(),!1===this.def.list&&i)throw new Error("The "+this.componentType.name+" component is a list input, but the definition for "+this.def.name+" does not expect a list");if(this.renderAsList=this.def.list&&!i,this.renderAsList){var a,s=function(e){e.length&&(a&&a.unsubscribe(),t.listFormArray=new C.FormArray([]),t.listItems.forEach((function(e){var t;return null===(t=e.componentRef)||void 0===t?void 0:t.destroy()})),e.forEach((function(e,r){var o,i=null===(o=t.listItems)||void 0===o?void 0:o[r];i&&(t.listFormArray.push(i.control),i.componentRef=t.renderInputComponent(n,e,i.control))})),a=t.listFormArray.valueChanges.pipe(r.takeUntil(t.destroy$)).subscribe((function(e){t.control.markAsTouched(),t.control.markAsDirty(),t.onChange(e),t.control.patchValue(e,{emitEvent:!1})})))};this.listItemContainers.changes.pipe(r.take(1)).subscribe((function(e){return s(t.listItemContainers)})),this.renderList$.pipe(r.switchMap((function(){return t.listItemContainers.changes.pipe(r.take(1))})),r.takeUntil(this.destroy$)).subscribe((function(){s(t.listItemContainers)}))}else this.singleComponentRef=this.renderInputComponent(n,this.singleViewContainer,this.control)}setTimeout((function(){return t.changeDetectorRef.markForCheck()}))},e.prototype.ngOnChanges=function(e){var t,n;if(this.listItems)try{for(var r=X(this.listItems),o=r.next();!o.done;o=r.next()){var i=o.value;i.componentRef&&this.updateBindings(e,i.componentRef)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}this.singleComponentRef&&this.updateBindings(e,this.singleComponentRef)},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.updateBindings=function(e,n){"def"in e&&(n.instance.config=this.isConfigArgDef(this.def)?this.def.ui:this.def),"readonly"in e&&(n.instance.readonly=this.readonly),n.injector.get(t.ChangeDetectorRef).markForCheck()},e.prototype.trackById=function(e,t){return t.id},e.prototype.addListItem=function(){var e;this.listItems||(this.listItems=[]),this.listItems.push({id:this.listId++,control:new C.FormControl(null!==(e=this.def.defaultValue)&&void 0!==e?e:null)}),this.renderList$.next()},e.prototype.moveListItem=function(e){this.listItems&&(A.moveItemInArray(this.listItems,e.previousIndex,e.currentIndex),this.listFormArray.removeAt(e.previousIndex),this.listFormArray.insert(e.currentIndex,e.item.data.control),this.renderList$.next())},e.prototype.removeListItem=function(e){var t;if(this.listItems){var n=this.listItems.findIndex((function(t){return t===e}));null===(t=e.componentRef)||void 0===t||t.destroy(),this.listFormArray.removeAt(n),this.listItems=this.listItems.filter((function(t){return t!==e})),this.renderList$.next()}},e.prototype.renderInputComponent=function(e,n,r){var o=n.createComponent(e),i=o.instance;return i.config=a.simpleDeepClone(this.isConfigArgDef(this.def)?this.def.ui:this.def),i.formControl=r,i.readonly=this.readonly,o.injector.get(t.ChangeDetectorRef).markForCheck(),o},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouch=e},e.prototype.writeValue=function(e){var t=this;Array.isArray(e)?e.length===this.listItems.length?e.forEach((function(e,n){var r;(null===(r=t.listItems[n])||void 0===r?void 0:r.control).patchValue(Ou(e),{emitEvent:!1})})):(this.listItems=e.map((function(e){return{id:t.listId++,control:new C.FormControl(Ou(e))}})),this.renderList$.next()):(this.listItems=[],this.renderList$.next()),this.changeDetectorRef.markForCheck()},e.prototype.getInputComponentConfig=function(e){var t;if(this.hasUiConfig(e)&&e.ui.component)return e.ui;var n=null==e?void 0:e.type;switch(n){case"string":case"localeString":return!(!this.isConfigArgDef(e)||!(null===(t=e.ui)||void 0===t?void 0:t.options))||!!e.options?{component:"select-form-input"}:{component:"text-form-input"};case"int":case"float":return{component:"number-form-input"};case"boolean":return{component:"boolean-form-input"};case"datetime":return{component:"date-form-input"};case"ID":return{component:"text-form-input"};case"relation":return{component:"relation-form-input"};default:l.assertNever(n)}},e.prototype.isConfigArgDef=function(e){var t;return"ConfigArgDefinition"===(null===(t=e)||void 0===t?void 0:t.__typename)},e.prototype.hasUiConfig=function(e){var t,n;return"object"==typeof e&&"string"==typeof(null===(n=null===(t=e)||void 0===t?void 0:t.ui)||void 0===n?void 0:n.component)},e}();Kp.decorators=[{type:t.Component,args:[{selector:"vdr-dynamic-form-input",template:'<ng-container *ngIf="!renderAsList; else list">\r\n <ng-container #single></ng-container>\r\n</ng-container>\r\n<ng-template #list>\r\n <div class="list-container" cdkDropList (cdkDropListDropped)="moveListItem($event)">\r\n <div class="list-item-row" *ngFor="let item of listItems; trackBy: trackById" cdkDrag [cdkDragData]="item">\r\n <ng-container #listItem></ng-container>\r\n <button class="btn btn-link btn-sm btn-warning" (click)="removeListItem(item)" [title]="\'common.remove-item-from-list\' | translate">\r\n <clr-icon shape="times"></clr-icon>\r\n </button>\r\n <div class="flex-spacer"></div>\r\n <div class="drag-handle" cdkDragHandle *ngIf="!readonly">\r\n <clr-icon shape="drag-handle" size="24"></clr-icon>\r\n </div>\r\n </div>\r\n <button class="btn btn-secondary btn-sm" (click)="addListItem()">\r\n <clr-icon shape="plus"></clr-icon> {{ \'common.add-item-to-list\' | translate }}\r\n </button>\r\n </div>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,providers:[{provide:C.NG_VALUE_ACCESSOR,useExisting:Kp,multi:!0}],styles:[".list-container{border:1px solid var(--color-component-border-200);border-radius:3px;padding:12px}.list-item-row{font-size:13px;display:flex;align-items:center;margin:3px 0}.drag-placeholder{transition:transform .25s cubic-bezier(0,0,.2,1)}.cdk-drag-preview{font-size:13px;background-color:var(--color-component-bg-100);opacity:.8;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.cdk-drag-placeholder{opacity:.1}.cdk-drag-animating,.cdk-drop-list-dragging .list-item-row:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"]}]}],Kp.ctorParameters=function(){return[{type:Wc},{type:t.ComponentFactoryResolver},{type:t.ChangeDetectorRef},{type:t.Injector}]},Kp.propDecorators={def:[{type:t.Input}],readonly:[{type:t.Input}],control:[{type:t.Input}],singleViewContainer:[{type:t.ViewChild,args:["single",{read:t.ViewContainerRef}]}],listItemContainers:[{type:t.ViewChildren,args:["listItem",{read:t.ViewContainerRef}]}]};var Qp=function(){function e(e,t){this.modalService=e,this.dataService=t}return e.prototype.ngOnInit=function(){var e=this;this.asset$=this.parentFormControl.valueChanges.pipe(r.startWith(this.parentFormControl.value),r.map((function(e){return null==e?void 0:e.id})),r.distinctUntilChanged(),r.switchMap((function(t){return t?e.dataService.product.getAsset(t).mapStream((function(e){return e.asset||void 0})):c.of(void 0)})))},e.prototype.selectAsset=function(){var e=this;this.modalService.fromComponent(Cu,{size:"xl",locals:{multiSelect:!1}}).subscribe((function(t){t&&t.length&&(e.parentFormControl.setValue(t[0]),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e.prototype.previewAsset=function(e){this.modalService.fromComponent(yu,{size:"xl",closable:!0,locals:{asset:e}}).subscribe()},e}();Qp.decorators=[{type:t.Component,args:[{selector:"vdr-relation-asset-input",template:'<vdr-relation-card\r\n (select)="selectAsset()"\r\n (remove)="remove()"\r\n placeholderIcon="image"\r\n [entity]="asset$ | async"\r\n [selectLabel]="\'asset.select-asset\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview let-asset="entity">\r\n <img\r\n class="preview"\r\n [title]="\'asset.preview\' | translate"\r\n [src]="asset | assetPreview: \'tiny\'"\r\n (click)="previewAsset(asset)"\r\n />\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-asset="entity">\r\n <div class="name" [title]="asset.name">\r\n {{ asset.name }}\r\n </div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".preview{cursor:pointer}.detail{flex:1}.detail,.name{overflow:hidden}.name{white-space:nowrap;text-overflow:ellipsis}"]}]}],Qp.ctorParameters=function(){return[{type:lc},{type:Ql}]},Qp.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}]};var Xp=function(){};Xp.decorators=[{type:t.Component,args:[{selector:"vdr-relation-selector-dialog",template:'<ng-template vdrDialogTitle>{{ title | translate }}</ng-template>\r\n<ng-container [ngTemplateOutlet]="selectorTemplate" [ngTemplateOutletContext]="{ select: resolveWith }"></ng-container>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}];var ed=function(){function e(e,t){this.modalService=e,this.dataService=t,this.searchControl=new C.FormControl(""),this.searchTerm$=new c.Subject}return Object.defineProperty(e.prototype,"customer",{get:function(){return this.parentFormControl.value},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){var e=this;this.results$=this.searchTerm$.pipe(r.debounceTime(200),r.switchMap((function(t){return e.dataService.customer.getCustomerList(10,0,t).mapSingle((function(e){return e.customers.items}))})))},e.prototype.selectCustomer=function(){var e=this;this.modalService.fromComponent(Xp,{size:"md",closable:!0,locals:{title:b.marker("customer.select-customer"),selectorTemplate:this.template}}).subscribe((function(t){t&&(e.parentFormControl.setValue(t),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e}();ed.decorators=[{type:t.Component,args:[{selector:"vdr-relation-customer-input",template:'<vdr-relation-card\r\n (select)="selectCustomer()"\r\n (remove)="remove()"\r\n placeholderIcon="user"\r\n [entity]="customer"\r\n [selectLabel]="\'customer.select-customer\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview>\r\n <div class="placeholder">\r\n <clr-icon shape="user" class="is-solid" size="50"></clr-icon>\r\n </div>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-c="entity">\r\n <div class="">\r\n <a [routerLink]="[\'/customer/customers\', c.id]">{{ c.firstName }} {{ c.lastName }}</a>\r\n </div>\r\n <div class="">{{ c.emailAddress }}</div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select="select">\r\n <ng-select [items]="results$ | async" [typeahead]="searchTerm$" appendTo="body" (change)="select($event)">\r\n <ng-template ng-option-tmp let-item="item">\r\n <b>{{ item.emailAddress }}</b>\r\n {{ item.firstName }} {{ item.lastName }}\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[""]}]}],ed.ctorParameters=function(){return[{type:lc},{type:Ql}]},ed.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}],template:[{type:t.ViewChild,args:["selector"]}]};var td=function(){function e(e,t){this.modalService=e,this.dataService=t,this.searchControl=new C.FormControl(""),this.searchTerm$=new c.Subject}return e.prototype.ngOnInit=function(){var e=this;this.productVariant$=this.parentFormControl.valueChanges.pipe(r.startWith(this.parentFormControl.value),r.map((function(e){return null==e?void 0:e.id})),r.distinctUntilChanged(),r.switchMap((function(t){return t?e.dataService.product.getProductVariant(t).mapStream((function(e){return e.productVariant||void 0})):c.of(void 0)}))),this.results$=this.searchTerm$.pipe(r.debounceTime(200),r.switchMap((function(t){return e.dataService.product.getProductVariants(Object.assign(Object.assign({},t?{filter:{name:{contains:t}}}:{}),{take:10})).mapSingle((function(e){return e.productVariants.items}))})))},e.prototype.selectProductVariant=function(){var e=this;this.modalService.fromComponent(Xp,{size:"md",closable:!0,locals:{title:b.marker("catalog.select-product-variant"),selectorTemplate:this.template}}).subscribe((function(t){t&&(e.parentFormControl.setValue(t),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e}();td.decorators=[{type:t.Component,args:[{selector:"vdr-relation-product-variant-input",template:'<vdr-relation-card\r\n (select)="selectProductVariant()"\r\n (remove)="remove()"\r\n placeholderIcon="library"\r\n [entity]="productVariant$ | async"\r\n [selectLabel]="\'catalog.select-product-variant\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview let-variant="entity">\r\n <img\r\n *ngIf="variant.featuredAsset || variant.product.featuredAsset as asset; else placeholder"\r\n [src]="asset | assetPreview: \'tiny\'"\r\n />\r\n <ng-template #placeholder>\r\n <div class="placeholder" *ngIf="!variant.featuredAsset">\r\n <clr-icon shape="image" size="50"></clr-icon>\r\n </div>\r\n </ng-template>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-variant="entity">\r\n <a [routerLink]="[\'/catalog/products\', variant.product.id, { tab: \'variants\' }]">{{ variant.name }}</a>\r\n <div class="">{{ variant.sku }}</div>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select="select">\r\n <ng-select [items]="results$ | async" [typeahead]="searchTerm$" appendTo="body" (change)="select($event)">\r\n <ng-template ng-option-tmp let-item="item">\r\n <img\r\n *ngIf="item.featuredAsset || item.product.featuredAsset as asset"\r\n [src]="asset | assetPreview: 32"\r\n />\r\n {{ item.name }}\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".placeholder{color:var(--color-grey-300)}"]}]}],td.ctorParameters=function(){return[{type:lc},{type:Ql}]},td.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}],template:[{type:t.ViewChild,args:["selector"]}]};var nd=function(){function e(e,t){this.modalService=e,this.dataService=t,this.searchControl=new C.FormControl(""),this.searchTerm$=new c.Subject}return e.prototype.ngOnInit=function(){var e=this;this.product$=this.parentFormControl.valueChanges.pipe(r.startWith(this.parentFormControl.value),r.map((function(e){return null==e?void 0:e.id})),r.distinctUntilChanged(),r.switchMap((function(t){return t?e.dataService.product.getProductSimple(t).mapStream((function(e){return e.product||void 0})):c.of(void 0)}))),this.results$=this.searchTerm$.pipe(r.debounceTime(200),r.switchMap((function(t){return e.dataService.product.getProducts(Object.assign(Object.assign({},t?{filter:{name:{contains:t}}}:{}),{take:10})).mapSingle((function(e){return e.products.items}))})))},e.prototype.selectProduct=function(){var e=this;this.modalService.fromComponent(Xp,{size:"md",closable:!0,locals:{title:b.marker("catalog.select-product"),selectorTemplate:this.template}}).subscribe((function(t){t&&(e.parentFormControl.setValue(t),e.parentFormControl.markAsDirty())}))},e.prototype.remove=function(){this.parentFormControl.setValue(null),this.parentFormControl.markAsDirty()},e}();nd.decorators=[{type:t.Component,args:[{selector:"vdr-relation-product-input",template:'<vdr-relation-card\r\n (select)="selectProduct()"\r\n (remove)="remove()"\r\n placeholderIcon="library"\r\n [entity]="product$ | async"\r\n [selectLabel]="\'catalog.select-product\' | translate"\r\n [removable]="!config.list"\r\n [readonly]="readonly"\r\n>\r\n <ng-template vdrRelationCardPreview let-product="entity">\r\n <img *ngIf="product.featuredAsset" [src]="product.featuredAsset | assetPreview: \'tiny\'" />\r\n <div class="placeholder" *ngIf="!product.featuredAsset">\r\n <clr-icon shape="image" size="50"></clr-icon>\r\n </div>\r\n </ng-template>\r\n <ng-template vdrRelationCardDetail let-product="entity">\r\n <a [routerLink]="[\'/catalog/products\', product.id]">{{ product.name }}</a>\r\n </ng-template>\r\n</vdr-relation-card>\r\n\r\n<ng-template #selector let-select="select">\r\n <ng-select [items]="results$ | async" [typeahead]="searchTerm$" appendTo="body" (change)="select($event)">\r\n <ng-template ng-option-tmp let-item="item">\r\n <img [src]="item.featuredAsset | assetPreview: 32" />\r\n {{ item.name }}\r\n </ng-template>\r\n </ng-select>\r\n</ng-template>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[".placeholder{color:var(--color-grey-300)}"]}]}],nd.ctorParameters=function(){return[{type:lc},{type:Ql}]},nd.propDecorators={readonly:[{type:t.Input}],parentFormControl:[{type:t.Input}],config:[{type:t.Input}],template:[{type:t.ViewChild,args:["selector"]}]};var rd=function(){};rd.decorators=[{type:t.Directive,args:[{selector:"[vdrRelationCardPreview]"}]}];var od=function(){};od.decorators=[{type:t.Directive,args:[{selector:"[vdrRelationCardDetail]"}]}];var id=function(){this.removable=!0,this.select=new t.EventEmitter,this.remove=new t.EventEmitter};id.decorators=[{type:t.Component,args:[{selector:"vdr-relation-card",template:'<div class="flex">\r\n <ng-container *ngIf="entity; else placeholder">\r\n <div class="preview">\r\n <ng-container *ngTemplateOutlet="previewTemplate; context: { entity: entity }"></ng-container>\r\n </div>\r\n <div class="detail">\r\n <div class="pl3">\r\n <ng-container *ngTemplateOutlet="detailTemplate; context: { entity: entity }"></ng-container>\r\n </div>\r\n <button *ngIf="!readonly" class="btn btn-sm btn-link" (click)="select.emit()">\r\n <clr-icon shape="link"></clr-icon> {{ \'common.change-selection\' | translate }}\r\n </button>\r\n <button *ngIf="!readonly && removable" class="btn btn-sm btn-link" (click)="remove.emit()">\r\n <clr-icon shape="times"></clr-icon> {{ \'common.remove\' | translate }}\r\n </button>\r\n </div>\r\n </ng-container>\r\n <ng-template #placeholder>\r\n <div class="preview">\r\n <div class="placeholder" (click)="!readonly && select.emit()">\r\n <clr-icon [attr.shape]="placeholderIcon" size="50"></clr-icon>\r\n </div>\r\n </div>\r\n <div class="detail">\r\n <div class="pl3 not-set">{{ \'common.not-set\' | translate }}</div>\r\n <button *ngIf="!readonly" class="btn btn-sm btn-link" (click)="select.emit()">\r\n <clr-icon shape="link"></clr-icon> {{ selectLabel }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n</div>\r\n',changeDetection:t.ChangeDetectionStrategy.OnPush,styles:[":host{display:block;min-width:300px}.not-set,.placeholder{color:var(--color-grey-300)}.detail{flex:1}.detail,.name{overflow:hidden}.name{white-space:nowrap;text-overflow:ellipsis}"]}]}],id.propDecorators={entity:[{type:t.Input}],placeholderIcon:[{type:t.Input}],selectLabel:[{type:t.Input}],readonly:[{type:t.Input}],removable:[{type:t.Input}],select:[{type:t.Output}],remove:[{type:t.Output}],previewTemplate:[{type:t.ContentChild,args:[rd,{read:t.TemplateRef}]}],detailTemplate:[{type:t.ContentChild,args:[od,{read:t.TemplateRef}]}]};var ad=function(){function e(){}return e.prototype.transform=function(e,t){if(void 0===t&&(t="thumb"),!e)return"";if(!e.preview||"string"!=typeof e.preview)throw new Error("Expected an Asset, got "+JSON.stringify(e));var n=e.focalPoint?"&fpx="+e.focalPoint.x+"&fpy="+e.focalPoint.y:"";return Number.isNaN(Number(t))?e.preview+"?preset="+t+n:e.preview+"?w="+t+"&h="+t+n},e}();ad.decorators=[{type:t.Pipe,args:[{name:"assetPreview"}]}];var sd=function(){function e(){}return e.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e===y.DEFAULT_CHANNEL_CODE?b.marker("common.default-channel"):e},e}();sd.decorators=[{type:t.Pipe,args:[{name:"channelCodeToLabel"}]}];var ld=function(){function e(e){var t=this;this.dataService=e,this.subscription=e.client.uiState().stream$.subscribe((function(e){t.uiLanguageCode=e.uiState.language}))}return e.prototype.transform=function(e){var t=this;if(!e)return e;var n=e.label,r=this.isCustomFieldConfig(e)?e.name:e.value;if(n){var o=n.find((function(e){return e.languageCode===t.uiLanguageCode}));return o?o.value:n[0].value}return r},e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e.prototype.isCustomFieldConfig=function(e){return e.hasOwnProperty("name")},e}();ld.decorators=[{type:t.Pipe,args:[{name:"customFieldLabel",pure:!1}]}],ld.ctorParameters=function(){return[{type:Ql}]};var cd=function(){function e(e){this.i18nService=e}return e.prototype.transform=function(e){if(e<1e3)return this.i18nService.translate(b.marker("datetime.duration-milliseconds"),{ms:e});if(e<6e4){var t=+(e/1e3).toFixed(1);return this.i18nService.translate(b.marker("datetime.duration-seconds"),{s:t})}var n=Math.floor(e/6e4),r=Math.round(e%6e4/1e3).toString().padStart(2,"0");return this.i18nService.translate(b.marker("datetime.duration-minutes:seconds"),{m:n,s:r})},e}();cd.decorators=[{type:t.Pipe,args:[{name:"duration"}]}],cd.ctorParameters=function(){return[{type:oc}]};var ud=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=!0),"number"!=typeof e&&"string"!=typeof e?e:function(e,t){var n=t?1e3:1024;if(Math.abs(e)<n)return e+" B";var r=t?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=-1;do{e/=n,++o}while(Math.abs(e)>=n&&o<r.length-1);return e.toFixed(1)+" "+r[o]}(e,!0===t)},e}();ud.decorators=[{type:t.Pipe,args:[{name:"filesize"}]}];var pd=function(){function e(e,t){this.dataService=e,this.changeDetectorRef=t,this.hasPermission=!1,this.lastPermissions=null,this.currentPermissions$=this.dataService.client.userStatus().mapStream((function(e){return e.userStatus.permissions}))}return e.prototype.transform=function(e){var t=this,n=Array.isArray(e)?e:[e],r=n.join(",");return this.lastPermissions!==r&&(this.lastPermissions=r,this.hasPermission=!1,this.dispose(),this.subscription=this.currentPermissions$.subscribe((function(e){t.hasPermission=t.checkPermissions(e,n),t.changeDetectorRef.markForCheck()}))),this.hasPermission},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.checkPermissions=function(e,t){var n,r;try{for(var o=X(t),i=o.next();!i.done;i=o.next()){var a=i.value;if(e.includes(a))return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1},e.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},e}();pd.decorators=[{type:t.Pipe,args:[{name:"hasPermission",pure:!1}]}],pd.ctorParameters=function(){return[{type:Ql},{type:t.ChangeDetectorRef}]};var dd=function(){function e(e,t){var n=this;e&&t&&(this.subscription=e.client.uiState().mapStream((function(e){return e.uiState.language})).subscribe((function(e){n.locale=e.replace(/_/g,"-"),t.markForCheck()})))}return e.prototype.ngOnDestroy=function(){this.subscription&&this.subscription.unsubscribe()},e}();dd.decorators=[{type:t.Injectable}],dd.ctorParameters=function(){return[{type:Ql},{type:t.ChangeDetectorRef}]};var md=function(e){function t(t,n){return e.call(this,t,n)||this}return J(t,e),t.prototype.transform=function(e,t,n){var r;if(void 0===t&&(t="full"),null==e||""===e)return"";if("string"!=typeof e)return'Invalid currencyCode "'+e+'"';var o="",i="",a="string"==typeof n?n:null!==(r=this.locale)&&void 0!==r?r:"en";return"full"!==t&&"name"!==t||(o=new Intl.NumberFormat(a,{style:"currency",currency:e,currencyDisplay:"name"}).format(void 0).replace(/\s*NaN\s*/,"")),"full"!==t&&"symbol"!==t||(i=new Intl.NumberFormat(a,{style:"currency",currency:e,currencyDisplay:"symbol"}).format(void 0).replace(/\s*NaN\s*/,"")),"full"===t?o+" ("+i+")":"name"===t?o:i},t}(dd);md.decorators=[{type:t.Pipe,args:[{name:"localeCurrencyName",pure:!1}]}],md.ctorParameters=function(){return[{type:Ql,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Optional}]}]};var gd=function(e){function t(t,n){return e.call(this,t,n)||this}return J(t,e),t.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ee(t,2),o=r[0],i=r[1];if("number"==typeof e&&"string"==typeof o){var a="string"==typeof i?i:this.locale,s=e/100;return new Intl.NumberFormat(a,{style:"currency",currency:o}).format(s)}return e},t}(dd);gd.decorators=[{type:t.Pipe,args:[{name:"localeCurrency",pure:!1}]}],gd.ctorParameters=function(){return[{type:Ql,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Optional}]}]};var hd=function(e){function t(t,n){return e.call(this,t,n)||this}return J(t,e),t.prototype.transform=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=ee(t,2),o=r[0],i=r[1];if(this.locale||"string"==typeof i){var a="string"==typeof i?i:this.locale,s=e instanceof Date?e:"string"==typeof e?new Date(e):void 0;if(s){var l=this.getOptionsForFormat("string"==typeof o?o:"medium");return new Intl.DateTimeFormat(a,l).format(s)}}},t.prototype.getOptionsForFormat=function(e){switch(e){case"medium":return{month:"short",year:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};case"mediumTime":return{hour:"numeric",minute:"numeric",second:"numeric",hour12:!0};case"longDate":return{year:"numeric",month:"long",day:"numeric"};case"short":return{day:"numeric",month:"numeric",year:"2-digit",hour:"numeric",minute:"numeric",hour12:!0};default:return}},t}(dd);hd.decorators=[{type:t.Pipe,args:[{name:"localeDate",pure:!1}]}],hd.ctorParameters=function(){return[{type:Ql,decorators:[{type:t.Optional}]},{type:t.ChangeDetectorRef,decorators:[{type:t.Optional}]}]};var fd=function(){function e(){}return e.prototype.transform=function(e){if("string"==typeof e){var t=void 0;return(t=function(e){return/^[a-zA-Z]+[A-Z][a-zA-Z]+$/.test(e)}(e)?e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase():e.toLowerCase()).charAt(0).toUpperCase()+t.slice(1)}return e},e}();fd.decorators=[{type:t.Pipe,args:[{name:"sentenceCase"}]}];var yd=function(){function e(){}return e.prototype.transform=function(e,t){return e.slice().sort((function(e,n){var r=t?e[t]:e,o=t?n[t]:n;return r===o?0:null==r?1:null==o?-1:r>o?1:-1}))},e}();yd.decorators=[{type:t.Pipe,args:[{name:"sort"}]}];var vd=function(){function e(){this.stateI18nTokens={Created:b.marker("state.created"),AddingItems:b.marker("state.adding-items"),ArrangingPayment:b.marker("state.arranging-payment"),PaymentAuthorized:b.marker("state.payment-authorized"),PaymentSettled:b.marker("state.payment-settled"),PartiallyShipped:b.marker("state.partially-shipped"),Shipped:b.marker("state.shipped"),PartiallyDelivered:b.marker("state.partially-delivered"),Authorized:b.marker("state.authorized"),Delivered:b.marker("state.delivered"),Cancelled:b.marker("state.cancelled"),Pending:b.marker("state.pending"),Settled:b.marker("state.settled"),Failed:b.marker("state.failed"),Error:b.marker("state.error"),Declined:b.marker("state.declined"),Modifying:b.marker("state.modifying"),ArrangingAdditionalPayment:b.marker("state.arranging-additional-payment")}}return e.prototype.transform=function(e){if("string"==typeof e&&e.length){var t=this.stateI18nTokens[e];return t||"state."+e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/ +/g,"-").toLowerCase()}return e},e}();function Cd(e){if(!e||""===e)return"var(--color-component-bg-100)";var t=["#10893E","#107C10","#7E735F","#2F5646","#498205","#847545","#744DA9","#018574","#486860","#525E54","#647C64","#567C73","#8764B8","#515C6B","#4A5459","#69797E","#0063B1","#0078D7","#2D7D9A","#7A7574","#767676"];return t[e.split("").reduce((function(e,t,n){return e+Math.round(t.charCodeAt(0)*Math.log(n+2))}),0)%t.length]}vd.decorators=[{type:t.Pipe,args:[{name:"stateI18nToken"}]}];var bd=function(){function e(){}return e.prototype.transform=function(e){return Cd(e)},e}();bd.decorators=[{type:t.Pipe,args:[{name:"stringToColor",pure:!0}]}];var Sd=function(){function e(e){this.i18nService=e}return e.prototype.transform=function(e,t){var n,r,o=Z.default(e),i=Z.default(t||new Date).diff(o,"second"),a=[[60,b.marker("datetime.ago-seconds")],[3600,b.marker("datetime.ago-minutes")],[86400,b.marker("datetime.ago-hours")],[31536e3,b.marker("datetime.ago-days")],[Number.MAX_SAFE_INTEGER,b.marker("datetime.ago-years")]],s=1;try{for(var l=X(a),c=l.next();!c.done;c=l.next()){var u=ee(c.value,2),p=u[0],d=u[1];if(i<p){var m=Math.max(0,Math.floor(i/s));return this.i18nService.translate(d,{count:m})}s=p}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return o.format()},e}();Sd.decorators=[{type:t.Pipe,args:[{name:"timeAgo",pure:!1}]}],Sd.ctorParameters=function(){return[{type:oc}]};var Id=function(){function e(e,t){this.modalService=e,this.router=t}return e.prototype.canDeactivate=function(e,t,n,o){return!!e.canDeactivate()||this.modalService.dialog({title:b.marker("common.confirm-navigation"),body:b.marker("common.there-are-unsaved-changes"),buttons:[{type:"danger",label:b.marker("common.discard-changes"),returnValue:!0},{type:"primary",label:b.marker("common.cancel-navigation"),returnValue:!1}]}).pipe(r.map((function(e){return!!e})))},e}();Id.decorators=[{type:t.Injectable}],Id.ctorParameters=function(){return[{type:lc},{type:f.Router}]};var Td=[R.ClarityModule,n.CommonModule,C.FormsModule,C.ReactiveFormsModule,f.RouterModule,k.NgSelectModule,x.NgxPaginationModule,g.TranslateModule,E.OverlayModule,A.DragDropModule],Dd=[du,uu,pu,Su,yu,Au,Fu,gu,Pu,$u,md,Mu,_u,Nu,Lu,ep,lp,fp,Vp,Qu,ud,rp,np,op,ic,hu,dp,pp,mp,Gp,up,qp,ac,Hp,fd,ju,Hu,yd,zu,Bu,hp,ip,cp,bd,gp,Jp,Yp,pd,cu,zp,fu,vu,Cu,Yu,Vu,Ru,Eu,sd,Zp,Ku,ld,tp,ad,Cp,vp,Sd,cd,Zu,Bp,sp,Wu,nu,vd,yp,ap,Kc,mu,hd,gd,jp],Ad=[iu,tu,eu,Qc,Jc,Yc,ou,Xc,Kp,ru,Qp,nd,td,ed,rd,od,Xp],Ed=function(){};Ed.decorators=[{type:t.NgModule,args:[{imports:[Td],exports:te(Td,Dd,Ad),declarations:te(Dd,Ad,[bu,Xp,id]),providers:[lc,Id],schemas:[t.CUSTOM_ELEMENTS_SCHEMA]}]}];var Rd=function(){function e(e,t,n){this.i18nService=e,this.localStorageService=t,this.titleService=n,this.initUiLanguages(),this.initUiTitle()}return e.prototype.initUiLanguages=function(){var e=nc(),t=this.localStorageService.get("uiLanguageCode"),n=tc().availableLanguages;if(!n.includes(e))throw new Error('The defaultLanguage "'+e+'" must be one of the availableLanguages ['+n.map((function(e){return'"'+e+'"'})).join(", ")+"]");var r=t&&n.includes(t)?t:e;this.localStorageService.set("uiLanguageCode",r),this.i18nService.setLanguage(r),this.i18nService.setDefaultLanguage(e),this.i18nService.setAvailableLanguages(n||[e])},e.prototype.initUiTitle=function(){var e=tc().brand||"VendureAdmin";this.titleService.setTitle(e)},e}();function Pd(e,t){var n=t.getBaseHrefFromDOM();return new Hc(e,n+"i18n-messages/")}function Od(){var e=tc().availableLanguages,t=nc(),n=e.filter((function(e){return e!==t}));return{locales:te([t],n)}}Rd.decorators=[{type:t.NgModule,args:[{imports:[d.BrowserModule,Bc,Ed,m.BrowserAnimationsModule,g.TranslateModule.forRoot({loader:{provide:g.TranslateLoader,useFactory:Pd,deps:[i.HttpClient,n.PlatformLocation]},compiler:{provide:g.TranslateCompiler,useClass:zc}})],providers:[{provide:h.MESSAGE_FORMAT_CONFIG,useFactory:Od},lu(),d.Title],exports:[Ed,Sc],declarations:[uc,Tc,Cc,pc,Sc,bc,cc,gc,Ic]}]}],Rd.ctorParameters=function(){return[{type:oc},{type:Ye},{type:d.Title}]};var kd=function(){};kd.decorators=[{type:t.NgModule,args:[{imports:[Ed,Rd],declarations:[ec],exports:[ec]}]}];var wd=function(){function e(e,t,n,r){this.route=e,this.router=t,this.serverConfigService=n,this.dataService=r,this.destroy$=new c.Subject}return e.prototype.init=function(){var e=this;this.entity$=this.route.data.pipe(r.switchMap((function(t){return t.entity.pipe(r.takeUntil(e.destroy$))})),r.tap((function(t){return e.id=t.id})),r.shareReplay(1)),this.isNew$=this.entity$.pipe(r.map((function(e){return""===e.id})),r.shareReplay(1)),this.languageCode$=this.route.paramMap.pipe(r.map((function(e){return e.get("lang")})),r.switchMap((function(t){return t?c.of(t):e.dataService.settings.getActiveChannel().mapSingle((function(e){return e.activeChannel.defaultLanguageCode}))})),r.distinctUntilChanged(),r.shareReplay(1)),this.availableLanguages$=this.serverConfigService.getAvailableLanguages(),c.combineLatest(this.entity$,this.languageCode$).pipe(r.takeUntil(this.destroy$)).subscribe((function(t){var n=ee(t,2),r=n[0],o=n[1];e.setFormValues(r,o),e.detailForm.markAsPristine()}))},e.prototype.destroy=function(){this.destroy$.next(),this.destroy$.complete()},e.prototype.setLanguage=function(e){this.setQueryParam("lang",e)},e.prototype.canDeactivate=function(){return this.detailForm&&this.detailForm.pristine},e.prototype.getCustomFieldConfig=function(e){return this.serverConfigService.getCustomFieldsFor(e)},e.prototype.setQueryParam=function(e,t){var n;this.router.navigate(["./",Object.assign(Object.assign({},this.route.snapshot.params),(n={},n[e]=t,n))],{relativeTo:this.route,queryParamsHandling:"merge"})},e}();var xd=function(){function e(e,t,n){this.router=e,this.emptyEntity=t,this.entityStream=n}return e.prototype.resolve=function(e,t){var n=e.paramMap.get("id"),o=this.router.events.pipe(r.filter((function(e){return e instanceof f.ActivationStart})));if("create"===n)return c.of(c.of(this.emptyEntity));var i=this.entityStream(n||"").pipe(r.takeUntil(o),r.filter(l.notNullOrUndefined),r.shareReplay(1));return i.pipe(r.take(1),r.map((function(){return i})))},e}(),Fd=function(){function e(e,t){this.router=e,this.route=t,this.destroy$=new c.Subject,this.onPageChangeFn=function(e,t){return{options:{skip:e,take:t}}},this.refresh$=new c.BehaviorSubject(void 0),this.defaults={take:10,skip:0}}return e.prototype.setQueryFn=function(e,t,n,r){this.listQueryFn=e,this.mappingFn=t,n&&(this.onPageChangeFn=n),r&&(this.defaults=r)},e.prototype.ngOnInit=function(){var e=this;if(!this.listQueryFn)throw new Error("No listQueryFn has been defined. Please call super.setQueryFn() in the constructor.");this.listQuery=this.listQueryFn(this.defaults.take,this.defaults.skip);this.result$=this.listQuery.stream$.pipe(r.shareReplay(1)),this.items$=this.result$.pipe(r.map((function(t){return e.mappingFn(t).items}))),this.totalItems$=this.result$.pipe(r.map((function(t){return e.mappingFn(t).totalItems}))),this.currentPage$=this.route.queryParamMap.pipe(r.map((function(e){return e.get("page")})),r.map((function(e){return e?+e:1})),r.distinctUntilChanged()),this.itemsPerPage$=this.route.queryParamMap.pipe(r.map((function(e){return e.get("perPage")})),r.map((function(t){return t?+t:e.defaults.take})),r.distinctUntilChanged()),c.combineLatest(this.currentPage$,this.itemsPerPage$,this.refresh$).pipe(r.takeUntil(this.destroy$)).subscribe((function(t){var n=ee(t,3),r=n[0],o=n[1],i=(n[2],o),a=(r-1)*o;e.listQuery.ref.refetch(e.onPageChangeFn(a,i))}))},e.prototype.ngOnDestroy=function(){this.destroy$.next(),this.destroy$.complete(),this.listQuery.completed$.next()},e.prototype.setPageNumber=function(e){this.setQueryParam("page",e,{replaceUrl:!0})},e.prototype.setItemsPerPage=function(e){this.setQueryParam("perPage",e,{replaceUrl:!0})},e.prototype.refresh=function(){this.refresh$.next(void 0)},e.prototype.setQueryParam=function(e,t,n){"string"==typeof e&&((r={})[e]=t);var r,o,i,a=null!==(i="string"==typeof e?n:t)&&void 0!==i?i:{};this.router.navigate(["./"],Object.assign({queryParams:"string"==typeof e?(o={},o[e]=t,o):e,relativeTo:this.route,queryParamsHandling:"merge"},a))},e}();function $d(e,t){return((null==e?void 0:e.translations)||[]).find((function(e){return e.languageCode===t}))}function _d(e){switch(e){case"localeString":case"string":return"";case"boolean":return!1;case"float":case"int":return 0;case"datetime":return new Date;case"relation":return null;default:l.assertNever(e)}}function Md(e,t){var n=Object.assign({},e);return Object.keys(n).forEach((function(e){t.hasOwnProperty(e)&&(n[e]=t[e])})),n}Fd.decorators=[{type:t.Directive}],Fd.ctorParameters=function(){return[{type:f.Router},{type:f.ActivatedRoute}]},b.marker("lang.af"),b.marker("lang.ak"),b.marker("lang.sq"),b.marker("lang.am"),b.marker("lang.ar"),b.marker("lang.hy"),b.marker("lang.as"),b.marker("lang.az"),b.marker("lang.bm"),b.marker("lang.bn"),b.marker("lang.eu"),b.marker("lang.be"),b.marker("lang.bs"),b.marker("lang.br"),b.marker("lang.bg"),b.marker("lang.my"),b.marker("lang.ca"),b.marker("lang.ce"),b.marker("lang.zh"),b.marker("lang.zh_Hans"),b.marker("lang.zh_Hant"),b.marker("lang.cu"),b.marker("lang.kw"),b.marker("lang.co"),b.marker("lang.hr"),b.marker("lang.cs"),b.marker("lang.da"),b.marker("lang.nl"),b.marker("lang.nl_BE"),b.marker("lang.dz"),b.marker("lang.en"),b.marker("lang.en_AU"),b.marker("lang.en_CA"),b.marker("lang.en_GB"),b.marker("lang.en_US"),b.marker("lang.eo"),b.marker("lang.et"),b.marker("lang.ee"),b.marker("lang.fo"),b.marker("lang.fi"),b.marker("lang.fr"),b.marker("lang.fr_CA"),b.marker("lang.fr_CH"),b.marker("lang.ff"),b.marker("lang.gl"),b.marker("lang.lg"),b.marker("lang.ka"),b.marker("lang.de"),b.marker("lang.de_AT"),b.marker("lang.de_CH"),b.marker("lang.el"),b.marker("lang.gu"),b.marker("lang.ht"),b.marker("lang.ha"),b.marker("lang.he"),b.marker("lang.hi"),b.marker("lang.hu"),b.marker("lang.is"),b.marker("lang.ig"),b.marker("lang.id"),b.marker("lang.ia"),b.marker("lang.ga"),b.marker("lang.it"),b.marker("lang.ja"),b.marker("lang.jv"),b.marker("lang.kl"),b.marker("lang.kn"),b.marker("lang.ks"),b.marker("lang.kk"),b.marker("lang.km"),b.marker("lang.ki"),b.marker("lang.rw"),b.marker("lang.ko"),b.marker("lang.ku"),b.marker("lang.ky"),b.marker("lang.lo"),b.marker("lang.la"),b.marker("lang.lv"),b.marker("lang.ln"),b.marker("lang.lt"),b.marker("lang.lu"),b.marker("lang.lb"),b.marker("lang.mk"),b.marker("lang.mg"),b.marker("lang.ms"),b.marker("lang.ml"),b.marker("lang.mt"),b.marker("lang.gv"),b.marker("lang.mi"),b.marker("lang.mr"),b.marker("lang.mn"),b.marker("lang.ne"),b.marker("lang.nd"),b.marker("lang.se"),b.marker("lang.nb"),b.marker("lang.nn"),b.marker("lang.ny"),b.marker("lang.or"),b.marker("lang.om"),b.marker("lang.os"),b.marker("lang.ps"),b.marker("lang.fa"),b.marker("lang.fa_AF"),b.marker("lang.pl"),b.marker("lang.pt"),b.marker("lang.pt_BR"),b.marker("lang.pt_PT"),b.marker("lang.pa"),b.marker("lang.qu"),b.marker("lang.ro"),b.marker("lang.ro_MD"),b.marker("lang.rm"),b.marker("lang.rn"),b.marker("lang.ru"),b.marker("lang.sm"),b.marker("lang.sg"),b.marker("lang.sa"),b.marker("lang.gd"),b.marker("lang.sr"),b.marker("lang.sn"),b.marker("lang.ii"),b.marker("lang.sd"),b.marker("lang.si"),b.marker("lang.sk"),b.marker("lang.sl"),b.marker("lang.so"),b.marker("lang.st"),b.marker("lang.es"),b.marker("lang.es_ES"),b.marker("lang.es_MX"),b.marker("lang.su"),b.marker("lang.sw"),b.marker("lang.sw_CD"),b.marker("lang.sv"),b.marker("lang.tg"),b.marker("lang.ta"),b.marker("lang.tt"),b.marker("lang.te"),b.marker("lang.th"),b.marker("lang.bo"),b.marker("lang.ti"),b.marker("lang.to"),b.marker("lang.tr"),b.marker("lang.tk"),b.marker("lang.uk"),b.marker("lang.ur"),b.marker("lang.ug"),b.marker("lang.uz"),b.marker("lang.vi"),b.marker("lang.vo"),b.marker("lang.cy"),b.marker("lang.fy"),b.marker("lang.wo"),b.marker("lang.xh"),b.marker("lang.yi"),b.marker("lang.yo"),b.marker("lang.zu");var Ld=function(){function e(){this.registry=new Map,this.layoutDef=[]}return e.prototype.registerWidget=function(e,t){if(this.registry.has(e))throw new Error('A dashboard widget with the id "'+e+'" already exists');this.registry.set(e,t)},e.prototype.getAvailableIds=function(e){return te(this.registry.entries()).filter((function(t){var n,r,o=ee(t,2),i=(o[0],o[1]);return!i.requiresPermissions||(n=i.requiresPermissions,r=e,n.every((function(e){return r.includes(e)})))})).map((function(e){return ee(e,1)[0]}))},e.prototype.getWidgetById=function(e){if(!this.registry.has(e))throw new Error('No widget was found with the id "'+e+'"');return this.registry.get(e)},e.prototype.setDefaultLayout=function(e){this.layoutDef=e},e.prototype.getDefaultLayout=function(){return this.layoutDef},e.prototype.getWidgetLayout=function(e){var t=this,n=(e||this.layoutDef).map((function(e){var n=e.id,r=e.width,o=t.registry.get(n);return o?{id:n,config:o,width:t.getValidWidth(n,o,r)}:t.idNotFound(n)})).filter(l.notNullOrUndefined);return this.buildLayout(n)},e.prototype.idNotFound=function(e){console.error('No dashboard widget was found with the id "'+e+'"\nAvailable ids: '+te(this.registry.keys()).map((function(e){return'"'+e+'"'})).join(", "))},e.prototype.getValidWidth=function(e,t,n){var r,o=n,i=(null===(r=t.supportedWidths)||void 0===r?void 0:r.length)?t.supportedWidths:[3,4,6,8,12];if(!i.includes(n)){var a=i.sort((function(e,t){return e-t})),s=i[a.length-1];console.error('The "'+e+'" widget does not support the specified width ('+n+").\nSupported widths are: ["+a.join(", ")+"].\nUsing ("+s+") instead."),o=s}return o},e.prototype.buildLayout=function(e){var t,n,r=[],o=[];try{for(var i=X(e),a=i.next();!a.done;a=i.next()){var s=a.value,l=s.id,c=s.config,u=s.width;12<o.reduce((function(e,t){return e+t.width}),0)+u&&(r.push(o),o=[]),o.push({id:l,config:c,width:u})}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r.push(o),r},e}();Ld.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Ld},token:Ld,providedIn:"root"}),Ld.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}];var Nd=function(){function e(e,t){this.router=e,this.authService=t,this.externalLoginUrl=tc().loginUrl}return e.prototype.canActivate=function(e){var t=this;return this.authService.checkAuthenticatedStatus().pipe(r.tap((function(e){e||(t.externalLoginUrl?window.location.href=t.externalLoginUrl:t.router.navigate(["/login"]))})))},e}();Nd.ɵprov=t.ɵɵdefineInjectable({factory:function(){return new Nd(t.ɵɵinject(f.Router),t.ɵɵinject(rc))},token:Nd,providedIn:"root"}),Nd.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],Nd.ctorParameters=function(){return[{type:f.Router},{type:rc}]};var Ud=function(e){this.extensionUrl=e.extensionUrl,this.openInNewTab=null!=e.openInNewTab&&e.openInNewTab};e.ADDRESS_FRAGMENT=ds,e.ADD_CUSTOMERS_TO_GROUP=Es,e.ADD_MANUAL_PAYMENT_TO_ORDER=gl,e.ADD_MEMBERS_TO_ZONE=Bn,e.ADD_NOTE_TO_CUSTOMER=Os,e.ADD_NOTE_TO_ORDER=al,e.ADD_OPTION_GROUP_TO_PRODUCT=Oa,e.ADD_OPTION_TO_GROUP=Pa,e.ADMINISTRATOR_FRAGMENT=Ee,e.ADMIN_UI_VERSION="1.0.3",e.ALL_CUSTOM_FIELDS_FRAGMENT=Or,e.ASSET_FRAGMENT=ga,e.ASSIGN_PRODUCTS_TO_CHANNEL=Ha,e.ASSIGN_ROLE_TO_ADMINISTRATOR=Ue,e.ASSIGN_VARIANTS_TO_CHANNEL=za,e.ATTEMPT_LOGIN=He,e.AUTH_REDIRECT_PARAM=qc,e.ActionBarComponent=du,e.ActionBarItemsComponent=cu,e.ActionBarLeftComponent=uu,e.ActionBarRightComponent=pu,e.AddressFormComponent=mu,e.AdministratorDataService=qe,e.AffixedInputComponent=gu,e.AppComponent=ec,e.AppComponentModule=kd,e.AppShellComponent=uc,e.AssetFileInputComponent=fu,e.AssetGalleryComponent=vu,e.AssetPickerDialogComponent=Cu,e.AssetPreviewComponent=Su,e.AssetPreviewDialogComponent=yu,e.AssetPreviewPipe=ad,e.AssetSearchInputComponent=Au,e.AuthDataService=Ze,e.AuthGuard=Nd,e.AuthService=rc,e.BOOLEAN_CUSTOM_FIELD_FRAGMENT=Dr,e.BaseDataService=eo,e.BaseDetailComponent=wd,e.BaseEntityResolver=xd,e.BaseListComponent=Fd,e.BooleanFormInputComponent=Yc,e.BreadcrumbComponent=pc,e.CANCEL_JOB=Mr,e.CANCEL_ORDER=nl,e.CHANNEL_FRAGMENT=or,e.COLLECTION_FRAGMENT=rs,e.CONFIGURABLE_OPERATION_DEF_FRAGMENT=Ve,e.CONFIGURABLE_OPERATION_FRAGMENT=Ge,e.COUNTRY_FRAGMENT=wn,e.CREATE_ADMINISTRATOR=ke,e.CREATE_ASSETS=La,e.CREATE_CHANNEL=lr,e.CREATE_COLLECTION=as,e.CREATE_COUNTRY=_n,e.CREATE_CUSTOMER=fs,e.CREATE_CUSTOMER_ADDRESS=Cs,e.CREATE_CUSTOMER_GROUP=Ss,e.CREATE_FACET=_s,e.CREATE_FACET_VALUES=Ns,e.CREATE_FULFILLMENT=tl,e.CREATE_PAYMENT_METHOD=hr,e.CREATE_PRODUCT=Ia,e.CREATE_PRODUCT_OPTION_GROUP=Ea,e.CREATE_PRODUCT_VARIANTS=Da,e.CREATE_PROMOTION=Ll,e.CREATE_ROLE=Me,e.CREATE_SHIPPING_METHOD=zl,e.CREATE_TAG=Xa,e.CREATE_TAX_CATEGORY=Yn,e.CREATE_TAX_RATE=tr,e.CREATE_ZONE=Gn,e.CURRENT_USER_FRAGMENT=Be,e.CUSTOMER_FRAGMENT=ms,e.CUSTOM_FIELD_CONFIG_FRAGMENT=Sr,e.CanDeactivateDetailGuard=Id,e.ChannelAssignmentControlComponent=Eu,e.ChannelBadgeComponent=Ru,e.ChannelLabelPipe=sd,e.ChannelSwitcherComponent=gc,e.CheckJobsLink=Ac,e.ChipComponent=Pu,e.ClientDataService=ma,e.CollectionDataService=ps,e.ComponentRegistryService=Wc,e.ConfigurableInputComponent=Fu,e.CoreModule=Rd,e.CurrencyFormInputComponent=Jc,e.CurrencyInputComponent=$u,e.CustomFieldComponentService=Zc,e.CustomFieldControlComponent=_u,e.CustomFieldLabelPipe=ld,e.CustomHttpTranslationLoader=Hc,e.CustomerDataService=xs,e.CustomerGroupFormInputComponent=Kc,e.CustomerLabelComponent=Mu,e.DATE_TIME_CUSTOM_FIELD_FRAGMENT=Rr,e.DELETE_ADMINISTRATOR=Fe,e.DELETE_ASSETS=Ua,e.DELETE_CHANNEL=ur,e.DELETE_COLLECTION=cs,e.DELETE_COUNTRY=Ln,e.DELETE_CUSTOMER=vs,e.DELETE_CUSTOMER_GROUP=Ts,e.DELETE_CUSTOMER_NOTE=ws,e.DELETE_FACET=Ls,e.DELETE_FACET_VALUES=qs,e.DELETE_ORDER_NOTE=ll,e.DELETE_PAYMENT_METHOD=yr,e.DELETE_PRODUCT=Ta,e.DELETE_PRODUCT_VARIANT=ja,e.DELETE_PROMOTION=Ul,e.DELETE_ROLE=Ne,e.DELETE_SHIPPING_METHOD=Zl,e.DELETE_TAG=ts,e.DELETE_TAX_CATEGORY=Kn,e.DELETE_TAX_RATE=rr,e.DELETE_ZONE=jn,e.DISCOUNT_FRAGMENT=Bs,e.DashboardWidgetService=Ld,e.DataModule=Bc,e.DataService=Ql,e.DataTableColumnComponent=Lu,e.DataTableComponent=Nu,e.DateFormInputComponent=Qc,e.DatetimePickerComponent=Vu,e.DatetimePickerService=Gu,e.DefaultInterceptor=Gc,e.DialogButtonsDirective=pp,e.DialogComponentOutletComponent=dp,e.DialogTitleDirective=mp,e.DisabledDirective=zp,e.DropdownComponent=ju,e.DropdownItemDirective=Bu,e.DropdownMenuComponent=Hu,e.DropdownTriggerDirective=zu,e.DurationPipe=cd,e.DynamicFormInputComponent=Kp,e.ERROR_RESULT_FRAGMENT=je,e.EditNoteDialogComponent=Wu,e.EmptyPlaceholderComponent=Zu,e.EntityInfoComponent=Yu,e.ExtensionHostComponent=Ku,e.ExtensionHostConfig=Ud,e.ExtensionHostService=Ju,e.ExternalImageDialogComponent=vp,e.FACET_VALUE_FRAGMENT=Fs,e.FACET_WITH_VALUES_FRAGMENT=$s,e.FLOAT_CUSTOM_FIELD_FRAGMENT=Er,e.FULFILLMENT_FRAGMENT=Zs,e.FacetDataService=js,e.FacetValueChipComponent=Qu,e.FacetValueFormInputComponent=Xc,e.FacetValueSelectorComponent=ep,e.FetchAdapter=Nc,e.FileSizePipe=ud,e.FocalPointControlComponent=tp,e.FormFieldComponent=rp,e.FormFieldControlDirective=np,e.FormItemComponent=op,e.FormattedAddressComponent=ip,e.GET_ACTIVE_ADMINISTRATOR=Pe,e.GET_ACTIVE_CHANNEL=sr,e.GET_ADJUSTMENT_OPERATIONS=Ml,e.GET_ADMINISTRATOR=Oe,e.GET_ADMINISTRATORS=Re,e.GET_ASSET=Ma,e.GET_ASSET_LIST=_a,e.GET_AVAILABLE_COUNTRIES=Fn,e.GET_CHANNEL=ar,e.GET_CHANNELS=ir,e.GET_CLIENT_STATE=Rn,e.GET_COLLECTION=is,e.GET_COLLECTION_CONTENTS=us,e.GET_COLLECTION_FILTERS=ns,e.GET_COLLECTION_LIST=os,e.GET_COUNTRY=$n,e.GET_COUNTRY_LIST=xn,e.GET_CURRENT_USER=We,e.GET_CUSTOMER=hs,e.GET_CUSTOMER_GROUPS=Ds,e.GET_CUSTOMER_GROUP_WITH_CUSTOMERS=As,e.GET_CUSTOMER_HISTORY=Ps,e.GET_CUSTOMER_LIST=gs,e.GET_FACET_LIST=Gs,e.GET_FACET_WITH_VALUES=Vs,e.GET_GLOBAL_SETTINGS=Cr,e.GET_JOBS_BY_ID=$r,e.GET_JOBS_LIST=Fr,e.GET_JOB_INFO=xr,e.GET_JOB_QUEUE_LIST=_r,e.GET_NEWTORK_STATUS=Dn,e.GET_ORDER=Qs,e.GET_ORDERS_LIST=Ks,e.GET_ORDER_HISTORY=il,e.GET_ORDER_SUMMARY=dl,e.GET_PAYMENT_METHOD=gr,e.GET_PAYMENT_METHOD_LIST=dr,e.GET_PAYMENT_METHOD_OPERATIONS=mr,e.GET_PRODUCT_LIST=Fa,e.GET_PRODUCT_OPTION_GROUP=Ra,e.GET_PRODUCT_OPTION_GROUPS=$a,e.GET_PRODUCT_SIMPLE=xa,e.GET_PRODUCT_VARIANT=Ya,e.GET_PRODUCT_VARIANT_LIST=Ja,e.GET_PRODUCT_VARIANT_OPTIONS=Ba,e.GET_PRODUCT_WITH_VARIANTS=wa,e.GET_PROMOTION=_l,e.GET_PROMOTION_LIST=$l,e.GET_ROLE=_e,e.GET_ROLES=$e,e.GET_SERVER_CONFIG=kr,e.GET_SHIPPING_METHOD=Bl,e.GET_SHIPPING_METHOD_LIST=jl,e.GET_SHIPPING_METHOD_OPERATIONS=Hl,e.GET_TAG=Qa,e.GET_TAG_LIST=Ka,e.GET_TAX_CATEGORIES=Wn,e.GET_TAX_CATEGORY=Zn,e.GET_TAX_RATE=er,e.GET_TAX_RATE_LIST=Xn,e.GET_UI_STATE=En,e.GET_USER_STATUS=An,e.GET_ZONE=qn,e.GET_ZONES=Un,e.GLOBAL_SETTINGS_FRAGMENT=vr,e.HasPermissionPipe=pd,e.HealthCheckService=fc,e.HelpTooltipComponent=ap,e.HistoryEntryDetailComponent=sp,e.HttpLoaderFactory=Pd,e.I18nService=oc,e.INT_CUSTOM_FIELD_FRAGMENT=Ar,e.IfDefaultChannelActiveDirective=Zp,e.IfDirectiveBase=Wp,e.IfMultichannelDirective=Yp,e.IfPermissionsDirective=Jp,e.InjectableTranslateMessageFormatCompiler=zc,e.ItemsPerPageControlsComponent=lp,e.JOB_INFO_FRAGMENT=wr,e.JobQueueService=yc,e.LOCALE_STRING_CUSTOM_FIELD_FRAGMENT=Tr,e.LOG_OUT=ze,e.LabeledDataComponent=cp,e.LanguageSelectorComponent=up,e.LinkDialogComponent=Cp,e.LocalStorageService=Ye,e.LocaleBasePipe=dd,e.LocaleCurrencyNamePipe=md,e.LocaleCurrencyPipe=gd,e.LocaleDatePipe=hd,e.MODIFY_ORDER=ml,e.MOVE_COLLECTION=ls,e.MainNavComponent=Cc,e.ManageTagsDialogComponent=bu,e.ModalDialogComponent=ic,e.ModalService=lc,e.NavBuilderService=vc,e.NotificationComponent=bc,e.NotificationService=Uc,e.NumberFormInputComponent=eu,e.ORDER_ADDRESS_FRAGMENT=zs,e.ORDER_DETAIL_FRAGMENT=Js,e.ORDER_FRAGMENT=Ws,e.ORDER_LINE_FRAGMENT=Ys,e.ObjectTreeComponent=gp,e.OmitTypenameLink=Lc,e.OrderDataService=hl,e.OrderStateLabelComponent=hp,e.OverlayHostComponent=Sc,e.OverlayHostService=sc,e.PAYMENT_METHOD_FRAGMENT=pr,e.PRODUCT_OPTION_FRAGMENT=ya,e.PRODUCT_OPTION_GROUP_FRAGMENT=fa,e.PRODUCT_OPTION_GROUP_WITH_OPTIONS_FRAGMENT=ba,e.PRODUCT_SELECTOR_SEARCH=Ga,e.PRODUCT_VARIANT_FRAGMENT=va,e.PRODUCT_WITH_VARIANTS_FRAGMENT=Ca,e.PROMOTION_FRAGMENT=Fl,e.PaginationControlsComponent=fp,e.PasswordFormInputComponent=tu,e.PercentageSuffixInputComponent=hu,e.ProductDataService=xl,e.ProductSelectorComponent=yp,e.ProductSelectorFormInputComponent=nu,e.PromotionDataService=ql,e.ProsemirrorService=Up,e.QueryResult=kn,e.REFUND_FRAGMENT=Hs,e.REFUND_ORDER=rl,e.REINDEX=Lr,e.RELATION_CUSTOM_FIELD_FRAGMENT=Pr,e.REMOVE_CUSTOMERS_FROM_GROUP=Rs,e.REMOVE_MEMBERS_FROM_ZONE=Hn,e.REMOVE_OPTION_GROUP_FROM_PRODUCT=ka,e.REMOVE_PRODUCTS_FROM_CHANNEL=Wa,e.REMOVE_VARIANTS_FROM_CHANNEL=Za,e.REQUEST_COMPLETED=vn,e.REQUEST_STARTED=yn,e.ROLE_FRAGMENT=Ae,e.RelationAssetInputComponent=Qp,e.RelationCardComponent=id,e.RelationCardDetailDirective=od,e.RelationCardPreviewDirective=rd,e.RelationCustomerInputComponent=ed,e.RelationFormInputComponent=ru,e.RelationProductInputComponent=nd,e.RelationProductVariantInputComponent=td,e.RelationSelectorDialogComponent=Xp,e.RichTextEditorComponent=qp,e.SEARCH_PRODUCTS=qa,e.SETTLE_PAYMENT=Xs,e.SETTLE_REFUND=ol,e.SET_ACTIVE_CHANNEL=Pn,e.SET_AS_LOGGED_IN=bn,e.SET_AS_LOGGED_OUT=Sn,e.SET_UI_LANGUAGE=In,e.SET_UI_THEME=Tn,e.SHIPPING_METHOD_FRAGMENT=Vl,e.STRING_CUSTOM_FIELD_FRAGMENT=Ir,e.SelectFormInputComponent=ou,e.SelectToggleComponent=Gp,e.SentenceCasePipe=fd,e.ServerConfigService=Ur,e.SettingsDataService=Gl,e.SharedModule=Ed,e.ShippingMethodDataService=Kl,e.SimpleDialogComponent=ac,e.SingleSearchSelectionModel=Iu,e.SingleSearchSelectionModelFactory=Tu,e.SortPipe=yd,e.StateI18nTokenPipe=vd,e.StringToColorPipe=bd,e.TAG_FRAGMENT=ha,e.TAX_CATEGORY_FRAGMENT=zn,e.TAX_RATE_FRAGMENT=Qn,e.TEST_ELIGIBLE_SHIPPING_METHODS=Jl,e.TEST_SHIPPING_METHOD=Yl,e.TRANSITION_FULFILLMENT_TO_STATE=pl,e.TRANSITION_ORDER_TO_STATE=cl,e.TRANSITION_PAYMENT_TO_STATE=el,e.TableRowActionComponent=Vp,e.TagSelectorComponent=jp,e.TextFormInputComponent=iu,e.ThemeSwitcherComponent=Ic,e.TimeAgoPipe=Sd,e.TimelineEntryComponent=Bp,e.TitleInputComponent=Hp,e.UPDATE_ACTIVE_ADMINISTRATOR=xe,e.UPDATE_ADMINISTRATOR=we,e.UPDATE_ASSET=Na,e.UPDATE_CHANNEL=cr,e.UPDATE_COLLECTION=ss,e.UPDATE_COUNTRY=Mn,e.UPDATE_CUSTOMER=ys,e.UPDATE_CUSTOMER_ADDRESS=bs,e.UPDATE_CUSTOMER_GROUP=Is,e.UPDATE_CUSTOMER_NOTE=ks,e.UPDATE_FACET=Ms,e.UPDATE_FACET_VALUES=Us,e.UPDATE_GLOBAL_SETTINGS=br,e.UPDATE_ORDER_CUSTOM_FIELDS=ul,e.UPDATE_ORDER_NOTE=sl,e.UPDATE_PAYMENT_METHOD=fr,e.UPDATE_PRODUCT=Sa,e.UPDATE_PRODUCT_OPTION=Va,e.UPDATE_PRODUCT_VARIANTS=Aa,e.UPDATE_PROMOTION=Nl,e.UPDATE_ROLE=Le,e.UPDATE_SHIPPING_METHOD=Wl,e.UPDATE_TAG=es,e.UPDATE_TAX_CATEGORY=Jn,e.UPDATE_TAX_RATE=nr,e.UPDATE_USER_CHANNELS=On,e.UPDATE_ZONE=Vn,e.USER_STATUS_FRAGMENT=Cn,e.UiLanguageSwitcherDialogComponent=cc,e.UserMenuComponent=Tc,e.ZONE_FRAGMENT=Nn,e.addActionBarItem=function(e){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.addActionBarItem(e)}},deps:[vc]}},e.addCustomFields=qr,e.addNavMenuItem=function(e,n,r){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.addNavMenuItem(e,n,r)}},deps:[vc]}},e.addNavMenuSection=function(e,n){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.addNavMenuSection(e,n)}},deps:[vc]}},e.blockQuoteRule=bp,e.buildInputRules=Ap,e.buildKeymap=Rp,e.buildMenuItems=Mp,e.bulletListRule=Ip,e.canInsert=Op,e.clientResolvers=_c,e.codeBlockRule=Tp,e.configurableDefinitionToInstance=function(e){return Object.assign(Object.assign({},e),{args:e.args.map((function(e){return Object.assign(Object.assign({},e),{value:wu(e)})}))})},e.configurableOperationValueIsValid=function(e,t){var n,r;if(!e||!t)return!1;if(e.code!==t.code)return!1;try{for(var o=X(e.args),i=o.next();!i.done;i=o.next()){var a=i.value,s=t.args[a.name];if(a.required&&(null==s||""===s||"0"===s))return!1}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!0},e.createApollo=Vc,e.createResolveData=function(e){return{entity:e}},e.createUpdatedTranslatable=function(e){var t,n,r=e.translatable,o=e.updatedFields,i=e.languageCode,a=e.customFieldConfig,s=e.defaultTranslation,l=$d(r,i)||s||{},c=r.translations.indexOf(l),u=Md(l,o),p={},d={};if(a&&o.hasOwnProperty("customFields")){try{for(var m=X(a),g=m.next();!g.done;g=m.next()){var h=g.value,f=o.customFields[h.name];"localeString"===h.type?d[h.name]=f:p[h.name]=""===f?_d(h.type):f}}catch(e){t={error:e}}finally{try{g&&!g.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}u.customFields=d}var y=Object.assign(Object.assign({},Md(r,o)),{translations:r.translations.slice()});return a&&(y.customFields=p),-1!==c?y.translations.splice(c,1,u):y.translations.push(u),y},e.dayOfWeekIndex=Uu,e.defaultFormInputs=au,e.detailBreadcrumb=function(e){return e.entity.pipe(r.map((function(t){var n="";return n="create"===e.id?"common.create":""+e.getName(t),[{label:e.breadcrumbKey,link:["../",e.route]},{label:n,link:[e.route,e.id]}]})))},e.encodeConfigArgValue=ku,e.findTranslation=$d,e.flattenFacetValues=Xu,e.getAppConfig=tc,e.getClientDefaults=Ec,e.getConfigArgValue=Ou,e.getDefaultConfigArgValue=wu,e.getDefaultUiLanguage=nc,e.getLocales=Od,e.getMarkRange=Lp,e.getServerLocation=hc,e.headingRule=Dp,e.hostExternalFrame=function(e){var t=""===e.path?"full":"prefix";return{path:e.path,pathMatch:t,component:Ku,data:{breadcrumb:[{label:e.breadcrumbLabel,link:["./"]}],extensionHostConfig:new Ud(e)}}},e.initializeServerConfigService=Nr,e.insertImageItem=kp,e.interpolateDescription=xu,e.introspectionResult=Dc,e.isEntityCreateOrUpdateMutation=Hr,e.linkItem=xp,e.linkSelectPlugin=Np,e.loadAppConfig=function(){return fetch("./vendure-ui-config.json").then((function(e){return e.json()})).then((function(e){Xl=e}))},e.markActive=Pp,e.orderedListRule=Sp,e.registerCustomFieldComponent=function(e,n,r){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.registerCustomFieldComponent(e,n,r)}},deps:[Zc]}},e.registerDashboardWidget=function(e,n){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.registerWidget(e,n)}},deps:[Ld]}},e.registerDefaultFormInputs=lu,e.registerFormInputComponent=su,e.removeReadonlyCustomFields=Wr,e.setDashboardWidgetLayout=function(e){return{provide:t.APP_INITIALIZER,multi:!0,useFactory:function(t){return function(){t.setDefaultLayout(e)}},deps:[Ld]}},e.stringToColor=Cd,e.toConfigurableOperationInput=function(e,t){return{code:e.code,arguments:Object.values(t.args||{}).map((function(t,n){return{name:e.args[n].name,value:t.hasOwnProperty("value")?ku(t.value):ku(t)}}))}},e.transformRelationCustomFieldInputs=Kr,e.weekDayNames=qu,e.ɵ0=Rc,e.ɵ1=Pc,e.ɵ2=Oc,e.ɵ3=kc,e.ɵ4=wc,e.ɵ5=xc,e.ɵ6=Fc,e.ɵ7=$c,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=vendure-admin-ui-core.umd.min.js.map