@flarehr/apollo-super-selection 5.87.56845 → 5.88.58802

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.
Files changed (75) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  2. package/dist/lib/apollo-super-selection/{p-9cd765f5.system.js → p-035b3fcf.system.js} +1 -1
  3. package/dist/lib/apollo-super-selection/p-10c435ea.system.entry.js +1 -0
  4. package/dist/lib/apollo-super-selection/p-157712cb.entry.js +1 -0
  5. package/dist/lib/apollo-super-selection/p-19a451d6.entry.js +1 -0
  6. package/dist/lib/apollo-super-selection/{p-b3f43d1a.entry.js → p-19be074b.entry.js} +1 -1
  7. package/dist/lib/apollo-super-selection/{p-07893761.system.entry.js → p-240b48ec.system.entry.js} +1 -1
  8. package/dist/lib/apollo-super-selection/{p-d64c4c69.entry.js → p-36ea14fc.entry.js} +4 -4
  9. package/dist/lib/apollo-super-selection/p-3cec4189.system.entry.js +1 -0
  10. package/dist/lib/apollo-super-selection/p-6a4fc9a6.js +1 -0
  11. package/dist/lib/apollo-super-selection/{p-6d4e757b.system.js → p-7b1087e8.system.js} +1 -1
  12. package/dist/lib/apollo-super-selection/{p-f8bb280b.js → p-9640d3ea.js} +1 -1
  13. package/dist/lib/apollo-super-selection/{p-4a95528c.js → p-9a268e32.js} +1 -1
  14. package/dist/lib/apollo-super-selection/{p-dac37462.system.js → p-a68b9b0f.system.js} +1 -1
  15. package/dist/lib/apollo-super-selection/p-a7025e9f.js +1 -0
  16. package/dist/lib/apollo-super-selection/{p-e56506e8.system.entry.js → p-b819e464.system.entry.js} +18 -18
  17. package/dist/lib/apollo-super-selection/p-b88cf353.system.js +1 -0
  18. package/dist/lib/apollo-super-selection/p-bd6e6a8f.system.js +1 -1
  19. package/dist/lib/apollo-super-selection/{p-bbe230d9.entry.js → p-e435c64b.entry.js} +1 -1
  20. package/dist/lib/apollo-super-selection/{p-37ed5963.system.entry.js → p-f924ae7d.system.entry.js} +1 -1
  21. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  22. package/dist/lib/cjs/{australian-fund-lookup.service-4be59dec.js → australian-fund-lookup.service-ee589d6c.js} +1 -1
  23. package/dist/lib/cjs/{custom-fund.store-3d1ac996.js → custom-fund.store-f56ea1fb.js} +1 -1
  24. package/dist/lib/cjs/{event-tracking.service-ed12699a.js → event-tracking.service-35513098.js} +2 -2
  25. package/dist/lib/cjs/loader.cjs.js +1 -1
  26. package/dist/lib/cjs/{sss-button_32.cjs.entry.js → sss-button_33.cjs.entry.js} +211 -50
  27. package/dist/lib/cjs/sss-default-fund-router.cjs.entry.js +2 -2
  28. package/dist/lib/cjs/sss-default-fund.cjs.entry.js +3 -3
  29. package/dist/lib/cjs/sss-promoted-fund-router.cjs.entry.js +23 -0
  30. package/dist/lib/cjs/sss-super-byof-host.cjs.entry.js +3 -3
  31. package/dist/lib/cjs/{super-selection-app.service-ca52a1fc.js → super-selection-app.service-352ccc67.js} +6 -1
  32. package/dist/lib/collection/collection-manifest.json +3 -0
  33. package/dist/lib/collection/components/promoted-fund/super-promoted-fund-types.js +1 -0
  34. package/dist/lib/collection/components/promoted-fund/super-promoted-fund.js +194 -0
  35. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/default-fund/default-fund-router.js +1 -1
  36. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-router.js +37 -0
  37. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +1 -1
  38. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +4 -0
  39. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +2 -1
  40. package/dist/lib/esm/apollo-super-selection.js +1 -1
  41. package/dist/lib/esm/{australian-fund-lookup.service-a2f593d3.js → australian-fund-lookup.service-139f6b9d.js} +1 -1
  42. package/dist/lib/esm/{custom-fund.store-dcc61edf.js → custom-fund.store-59962585.js} +1 -1
  43. package/dist/lib/esm/{event-tracking.service-9398a317.js → event-tracking.service-83984310.js} +2 -2
  44. package/dist/lib/esm/loader.js +1 -1
  45. package/dist/lib/esm/{sss-button_32.entry.js → sss-button_33.entry.js} +211 -51
  46. package/dist/lib/esm/sss-default-fund-router.entry.js +2 -2
  47. package/dist/lib/esm/sss-default-fund.entry.js +3 -3
  48. package/dist/lib/esm/sss-promoted-fund-router.entry.js +19 -0
  49. package/dist/lib/esm/sss-super-byof-host.entry.js +3 -3
  50. package/dist/lib/esm/{super-selection-app.service-50f199de.js → super-selection-app.service-312ba6b0.js} +6 -1
  51. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  52. package/dist/lib/esm-es5/{australian-fund-lookup.service-a2f593d3.js → australian-fund-lookup.service-139f6b9d.js} +1 -1
  53. package/dist/lib/esm-es5/{custom-fund.store-dcc61edf.js → custom-fund.store-59962585.js} +1 -1
  54. package/dist/lib/esm-es5/event-tracking.service-83984310.js +1 -0
  55. package/dist/lib/esm-es5/loader.js +1 -1
  56. package/dist/lib/esm-es5/{sss-button_32.entry.js → sss-button_33.entry.js} +4 -4
  57. package/dist/lib/esm-es5/sss-default-fund-router.entry.js +1 -1
  58. package/dist/lib/esm-es5/sss-default-fund.entry.js +1 -1
  59. package/dist/lib/esm-es5/sss-promoted-fund-router.entry.js +1 -0
  60. package/dist/lib/esm-es5/sss-super-byof-host.entry.js +1 -1
  61. package/dist/lib/esm-es5/{super-selection-app.service-50f199de.js → super-selection-app.service-312ba6b0.js} +1 -1
  62. package/dist/lib/types/components/promoted-fund/super-promoted-fund-types.d.ts +41 -0
  63. package/dist/lib/types/components/promoted-fund/super-promoted-fund.d.ts +23 -0
  64. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +1 -0
  65. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-router.d.ts +5 -0
  66. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +1 -0
  67. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +1 -0
  68. package/dist/lib/types/components.d.ts +30 -0
  69. package/package.json +1 -1
  70. package/dist/lib/apollo-super-selection/p-2c136506.system.entry.js +0 -1
  71. package/dist/lib/apollo-super-selection/p-5716179f.js +0 -1
  72. package/dist/lib/apollo-super-selection/p-89c8d0e2.entry.js +0 -1
  73. package/dist/lib/apollo-super-selection/p-a2b4e667.system.js +0 -1
  74. package/dist/lib/apollo-super-selection/p-a99c601b.js +0 -1
  75. package/dist/lib/esm-es5/event-tracking.service-9398a317.js +0 -1
@@ -1 +1 @@
1
- import{r as registerInstance,h,H as Host}from"./index-107d7c24.js";import{a as superSelectionAppService}from"./super-selection-app.service-50f199de.js";import"./active-router-d18b36fb.js";import{i as injectHistory}from"./injectHistory-e92e4664.js";var DefaultFundRouter=function(){function e(e){registerInstance(this,e)}e.prototype.render=function(){if(superSelectionAppService.isDefaultFundNewComponentEnabled){return h(Host,null,h("sss-default-fund-host",null))}return h(Host,null,h("sss-default-fund",{history:this.history}))};return e}();injectHistory(DefaultFundRouter);export{DefaultFundRouter as sss_default_fund_router};
1
+ import{r as registerInstance,h,H as Host}from"./index-107d7c24.js";import{a as superSelectionAppService}from"./super-selection-app.service-312ba6b0.js";import"./active-router-d18b36fb.js";import{i as injectHistory}from"./injectHistory-e92e4664.js";var DefaultFundRouter=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){if(superSelectionAppService.isDefaultFundNewComponentEnabled){return h(Host,null,h("sss-default-fund-host",{history:this.history}))}return h(Host,null,h("sss-default-fund",{history:this.history}))};return t}();injectHistory(DefaultFundRouter);export{DefaultFundRouter as sss_default_fund_router};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{o(i.next(e))}catch(e){a(e)}}function u(e){try{o(i["throw"](e))}catch(e){a(e)}}function o(e){e.done?n(e.value):s(e.value).then(r,u)}o((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,s,a,r;return r={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function u(e){return function(t){return o([e,t])}}function o(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;s=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];s=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,h,g as getAssetPath,H as Host}from"./index-107d7c24.js";import{O as Option,a as superSelectionAppService}from"./super-selection-app.service-50f199de.js";import{E as EventTrackingService,S as SuperSelectionAppRoutes,n as navigationService,c as customFundChoiceApi}from"./event-tracking.service-9398a317.js";import{a as australianFundLookupService}from"./australian-fund-lookup.service-a2f593d3.js";var DefaultFund=function(){function e(e){registerInstance(this,e);this.defaultFundProductName="Loading fund...";this.eventTrackingService=EventTrackingService.Instance}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=superSelectionAppService.defaultFundUsi;if(Option.isNone(e)){return[2]}this.isDefaultFundExists=true;return[4,australianFundLookupService.getFundAsync(e.value,true)];case 1:t=n.sent();if(Option.isNone(t)){this.isInvalidDefaultFund=true;return[2]}this.defaultFund=t.value;this.defaultFundProductName=t.value.productName;return[2]}}))}))};e.prototype.componentDidLoad=function(){var e,t,n,i;return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:(t=(e=this.defaultFund)===null||e===void 0?void 0:e.usi)!==null&&t!==void 0?t:"",fundName:(i=(n=this.defaultFund)===null||n===void 0?void 0:n.productName)!==null&&i!==void 0?i:"",promotedFundsShown:superSelectionAppService.promotedFunds,defaultFundUsiSet:Option.toUndefined(superSelectionAppService.defaultFundUsi)})};e.prototype.render=function(){var e=this;return h(Host,null,h("sss-header-section",null),h("div",{class:"flex justify-center mt-11"},h("sss-custom-fund",null,h("div",{class:"p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg"},h("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),(!this.isDefaultFundExists||this.isInvalidDefaultFund)&&h("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},h("div",{class:"flex"},h("div",{class:"flex-shrink-0"},h("img",{class:"h-5 w-5",src:getAssetPath("assets/icon-exclamation.svg")})),h("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},h("span",null,"It looks like your employer has not specified a default fund, please contact them if you’d like to use your company’s default fund.")))),this.isDefaultFundExists&&!this.isInvalidDefaultFund&&h("div",null,h("div",{class:"mt-3"},h("label",{class:"text-sm font-medium text-gray-700"},"Fund Name"),h("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.defaultFundProductName)),h("div",{class:"mt-3"},h("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),h("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.defaultFund.usi)),h("div",{class:"mt-8 mb-8 h-px w-full bg-gray-200"}),h("div",{class:"text-sm text-gray-700"},h("label",{class:"font-semibold text-gray-900"},"By clicking “Continue”, you acknowledge that:"),h("ul",{class:"list-disc list-outside pl-5"},h("li",{class:"mt-2"},"you are choosing to join your employer’s default super fund;"),h("li",{class:"mt-2"},"your employer will open a new account for you with their default super fund; and"),h("li",{class:"mt-2"},"your application to join is subject to Trustee approval."))))),h("div",{class:"flex justify-center mt-8"},h("div",{class:"sm:max-w-320 w-full"},this.isDefaultFundExists&&!this.isInvalidDefaultFund&&h("div",{class:"mb-4"},h("sss-button",{testid:"continue-button",fillWidth:true,promiseFn:function(){return e.handleSubmitForm()}},"Continue")),h("stencil-route-link",{url:SuperSelectionAppRoutes.ChoicePage},h("sss-button",{testid:"back-button",fillWidth:true,variant:"secondary"},"Back")))))))};e.prototype.handleSubmitForm=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){if(this.isInvalidDefaultFund){return[2]}navigationService.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",fundDetails:{type:"default",fundName:this.defaultFundProductName,fundUsi:this.defaultFund.usi},handleSubmitFn:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({standardChoiceFormSignature:t},superSelectionAppService.promotedFundsConfig))];case 1:e.sent();return[2]}}))}))}});return[2]}))}))};return e}();export{DefaultFund as sss_default_fund};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function s(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function r(e){try{o(i.next(e))}catch(e){a(e)}}function u(e){try{o(i["throw"](e))}catch(e){a(e)}}function o(e){e.done?n(e.value):s(e.value).then(r,u)}o((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,s,a,r;return r={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function u(e){return function(t){return o([e,t])}}function o(r){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,s&&(a=r[0]&2?s["return"]:r[0]?s["throw"]||((a=s["return"])&&a.call(s),0):s.next)&&!(a=a.call(s,r[1])).done)return a;if(s=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:n.label++;return{value:r[1],done:false};case 5:n.label++;s=r[1];r=[0];continue;case 7:r=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){n=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){n.label=r[1];break}if(r[0]===6&&n.label<a[1]){n.label=a[1];a=r;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(r);break}if(a[2])n.ops.pop();n.trys.pop();continue}r=t.call(e,n)}catch(e){r=[6,e];s=0}finally{i=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};import{r as registerInstance,h,g as getAssetPath,H as Host}from"./index-107d7c24.js";import{O as Option,a as superSelectionAppService}from"./super-selection-app.service-312ba6b0.js";import{E as EventTrackingService,S as SuperSelectionAppRoutes,n as navigationService,c as customFundChoiceApi}from"./event-tracking.service-83984310.js";import{a as australianFundLookupService}from"./australian-fund-lookup.service-139f6b9d.js";var DefaultFund=function(){function e(e){registerInstance(this,e);this.defaultFundProductName="Loading fund...";this.eventTrackingService=EventTrackingService.Instance}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:e=superSelectionAppService.defaultFundUsi;if(Option.isNone(e)){return[2]}this.isDefaultFundExists=true;return[4,australianFundLookupService.getFundAsync(e.value,true)];case 1:t=n.sent();if(Option.isNone(t)){this.isInvalidDefaultFund=true;return[2]}this.defaultFund=t.value;this.defaultFundProductName=t.value.productName;return[2]}}))}))};e.prototype.componentDidLoad=function(){var e,t,n,i;return this.eventTrackingService.TrackDefaultSuperFundDetailViewedAsync({fundUsi:(t=(e=this.defaultFund)===null||e===void 0?void 0:e.usi)!==null&&t!==void 0?t:"",fundName:(i=(n=this.defaultFund)===null||n===void 0?void 0:n.productName)!==null&&i!==void 0?i:"",promotedFundsShown:superSelectionAppService.promotedFunds,defaultFundUsiSet:Option.toUndefined(superSelectionAppService.defaultFundUsi)})};e.prototype.render=function(){var e=this;return h(Host,null,h("sss-header-section",null),h("div",{class:"flex justify-center mt-11"},h("sss-custom-fund",null,h("div",{class:"p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg"},h("p",{class:"sm:text-lg font-bold mb-3"},"Fund details"),(!this.isDefaultFundExists||this.isInvalidDefaultFund)&&h("div",{class:"bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3"},h("div",{class:"flex"},h("div",{class:"flex-shrink-0"},h("img",{class:"h-5 w-5",src:getAssetPath("assets/icon-exclamation.svg")})),h("div",{class:"ml-3 text-sm text-yellow-700 leading-5"},h("span",null,"It looks like your employer has not specified a default fund, please contact them if you’d like to use your company’s default fund.")))),this.isDefaultFundExists&&!this.isInvalidDefaultFund&&h("div",null,h("div",{class:"mt-3"},h("label",{class:"text-sm font-medium text-gray-700"},"Fund Name"),h("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.defaultFundProductName)),h("div",{class:"mt-3"},h("label",{class:"text-sm font-medium text-gray-700"},"Fund USI"),h("div",{class:"mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-base sm:text-sm"},this.defaultFund.usi)),h("div",{class:"mt-8 mb-8 h-px w-full bg-gray-200"}),h("div",{class:"text-sm text-gray-700"},h("label",{class:"font-semibold text-gray-900"},"By clicking “Continue”, you acknowledge that:"),h("ul",{class:"list-disc list-outside pl-5"},h("li",{class:"mt-2"},"you are choosing to join your employer’s default super fund;"),h("li",{class:"mt-2"},"your employer will open a new account for you with their default super fund; and"),h("li",{class:"mt-2"},"your application to join is subject to Trustee approval."))))),h("div",{class:"flex justify-center mt-8"},h("div",{class:"sm:max-w-320 w-full"},this.isDefaultFundExists&&!this.isInvalidDefaultFund&&h("div",{class:"mb-4"},h("sss-button",{testid:"continue-button",fillWidth:true,promiseFn:function(){return e.handleSubmitForm()}},"Continue")),h("stencil-route-link",{url:SuperSelectionAppRoutes.ChoicePage},h("sss-button",{testid:"back-button",fillWidth:true,variant:"secondary"},"Back")))))))};e.prototype.handleSubmitForm=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){if(this.isInvalidDefaultFund){return[2]}navigationService.navigateInternallyToStandardChoice({history:this.history,fundName:"Employer’s default fund",fundDetails:{type:"default",fundName:this.defaultFundProductName,fundUsi:this.defaultFund.usi},handleSubmitFn:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,customFundChoiceApi.submitDefaultFundChoiceAsync(Object.assign({standardChoiceFormSignature:t},superSelectionAppService.promotedFundsConfig))];case 1:e.sent();return[2]}}))}))}});return[2]}))}))};return e}();export{DefaultFund as sss_default_fund};
@@ -0,0 +1 @@
1
+ import{r as registerInstance,h,H as Host}from"./index-107d7c24.js";import{a as superSelectionAppService}from"./super-selection-app.service-312ba6b0.js";import"./active-router-d18b36fb.js";import{i as injectHistory}from"./injectHistory-e92e4664.js";var PromotedFundRouter=function(){function t(t){registerInstance(this,t)}t.prototype.render=function(){if(superSelectionAppService.isPromotedFundNewComponentEnabled){return h(Host,null,h("sss-promoted-fund-host",{history:this.history}))}return h(Host,null,h("sss-super-campaign-host",{history:this.history}))};return t}();injectHistory(PromotedFundRouter);export{PromotedFundRouter as sss_promoted_fund_router};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r["throw"](e))}catch(e){i(e)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-107d7c24.js";import{a as superSelectionAppService,O as Option}from"./super-selection-app.service-50f199de.js";import"./active-router-d18b36fb.js";import{i as injectHistory}from"./injectHistory-e92e4664.js";import{E as EventTrackingService,n as navigationService,S as SuperSelectionAppRoutes,c as customFundChoiceApi}from"./event-tracking.service-9398a317.js";import{s as state}from"./custom-fund.store-dcc61edf.js";var LoadWaitingTimeout=3e4;var SuperByofComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded"})(SuperByofComponentStatus||(SuperByofComponentStatus={}));var superByofComponentStatus=SuperByofComponentStatus.NotLoaded;var SuperByofHost=function(){function e(e){var t=this;registerInstance(this,e);this.eventTrackingService=EventTrackingService.Instance;this.subscribeToSuperByofEvents=function(){for(var e in t.byofEventHandlers){document.addEventListener(e,t.byofEventHandlers[e])}};this.unSubscribeFromSuperByofEvents=function(){for(var e in t.byofEventHandlers){document.removeEventListener(e,t.byofEventHandlers[e])}};this.byofLoaded=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){if(e.detail.sender==="super-byof"){superByofComponentStatus=SuperByofComponentStatus.Loaded;clearTimeout(this.loadingTimeoutRef);this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({promotedFundsShown:superSelectionAppService.promotedFunds,defaultFundUsiSet:Option.toUndefined(superSelectionAppService.defaultFundUsi)})}return[2,Promise.resolve()]}))}))};this.byofCompleted=function(e){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){if(e.detail.sender==="super-byof"){state.myOwnFundForm={fundUsi:Option.fromNullable(e.detail.fundUsi),fundName:Option.fromNullable(e.detail.fundName),memberNumber:Option.fromNullable(e.detail.memberNumber),memberFirstName:Option.fromNullable(e.detail.memberFirstName),memberFamilyName:Option.fromNullable(e.detail.memberLastName)};if(superSelectionAppService.isBringYourOwnFundCustomStepEnabled&&superSelectionAppService.isUsingSuperCampaign){navigationService.navigateInternally(this.history,SuperSelectionAppRoutes.MyOwnFundEngagementStep);return[2]}navigationService.navigateInternallyToStandardChoice({history:this.history,fundName:e.detail.fundName,fundDetails:{type:"myOwnFund",fundName:e.detail.fundName,fundUsi:e.detail.fundUsi,memberNumber:e.detail.memberNumber},handleSubmitFn:function(n){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=Object.assign({fundUsi:e.detail.fundUsi,memberNumber:e.detail.memberNumber,memberFirstName:e.detail.memberFirstName,memberFamilyName:e.detail.memberLastName,standardChoiceFormSignature:n},superSelectionAppService.promotedFundsConfig);return[4,customFundChoiceApi.submitCustomFundChoiceAsync(t)];case 1:r.sent();return[2]}}))}))}})}return[2]}))}))};this.byofCancelled=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(e.detail.sender==="super-byof"))return[3,2];return[4,navigationService.navigateInternally(this.history,SuperSelectionAppRoutes.ChoicePage)];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};this.byofEventHandlers={"byof-loaded":this.byofLoaded.bind(this),"byof-completed":this.byofCompleted.bind(this),"byof-cancelled":this.byofCancelled.bind(this)}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(Option.isSome(superSelectionAppService.backendUrl)&&Option.isSome(superSelectionAppService.state.jwt)){this.backendUrl=superSelectionAppService.backendUrl.value;this.accessToken=superSelectionAppService.state.jwt.value;if(superByofComponentStatus===SuperByofComponentStatus.NotLoaded){this.loadingTimeoutRef=setTimeout(this.byofLoadingTimeoutTriggered.bind(this),LoadWaitingTimeout)}this.subscribeToSuperByofEvents()}else{throw Error("SuperByofHost pre-requisites not met.")}return[2]}))}))};e.prototype.disconnectedCallback=function(){clearTimeout(this.loadingTimeoutRef);this.unSubscribeFromSuperByofEvents()};e.prototype.render=function(){return h(Host,null,h("sss-header-section",null),h("div",{class:"flex justify-center mt-11"},h("sss-custom-fund",null,h("apollo-super-byof",{"backend-url":this.backendUrl,"access-token":this.accessToken}))))};e.prototype.byofLoadingTimeoutTriggered=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(superByofComponentStatus!==SuperByofComponentStatus.Loaded){throw Error("BYOF component failed to load.")}return[2]}))}))};return e}();injectHistory(SuperByofHost);export{SuperByofHost as sss_super_byof_host};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r["throw"](e))}catch(e){i(e)}}function u(e){e.done?n(e.value):o(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return u([e,t])}}function u(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host}from"./index-107d7c24.js";import{a as superSelectionAppService,O as Option}from"./super-selection-app.service-312ba6b0.js";import"./active-router-d18b36fb.js";import{i as injectHistory}from"./injectHistory-e92e4664.js";import{E as EventTrackingService,n as navigationService,S as SuperSelectionAppRoutes,c as customFundChoiceApi}from"./event-tracking.service-83984310.js";import{s as state}from"./custom-fund.store-59962585.js";var LoadWaitingTimeout=3e4;var SuperByofComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded"})(SuperByofComponentStatus||(SuperByofComponentStatus={}));var superByofComponentStatus=SuperByofComponentStatus.NotLoaded;var SuperByofHost=function(){function e(e){var t=this;registerInstance(this,e);this.eventTrackingService=EventTrackingService.Instance;this.subscribeToSuperByofEvents=function(){for(var e in t.byofEventHandlers){document.addEventListener(e,t.byofEventHandlers[e])}};this.unSubscribeFromSuperByofEvents=function(){for(var e in t.byofEventHandlers){document.removeEventListener(e,t.byofEventHandlers[e])}};this.byofLoaded=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){if(e.detail.sender==="super-byof"){superByofComponentStatus=SuperByofComponentStatus.Loaded;clearTimeout(this.loadingTimeoutRef);this.eventTrackingService.TrackMyOwnSuperFundDetailViewedAsync({promotedFundsShown:superSelectionAppService.promotedFunds,defaultFundUsiSet:Option.toUndefined(superSelectionAppService.defaultFundUsi)})}return[2,Promise.resolve()]}))}))};this.byofCompleted=function(e){return __awaiter(t,void 0,void 0,(function(){var t=this;return __generator(this,(function(n){if(e.detail.sender==="super-byof"){state.myOwnFundForm={fundUsi:Option.fromNullable(e.detail.fundUsi),fundName:Option.fromNullable(e.detail.fundName),memberNumber:Option.fromNullable(e.detail.memberNumber),memberFirstName:Option.fromNullable(e.detail.memberFirstName),memberFamilyName:Option.fromNullable(e.detail.memberLastName)};if(superSelectionAppService.isBringYourOwnFundCustomStepEnabled&&superSelectionAppService.isUsingSuperCampaign){navigationService.navigateInternally(this.history,SuperSelectionAppRoutes.MyOwnFundEngagementStep);return[2]}navigationService.navigateInternallyToStandardChoice({history:this.history,fundName:e.detail.fundName,fundDetails:{type:"myOwnFund",fundName:e.detail.fundName,fundUsi:e.detail.fundUsi,memberNumber:e.detail.memberNumber},handleSubmitFn:function(n){return __awaiter(t,void 0,void 0,(function(){var t;return __generator(this,(function(r){switch(r.label){case 0:t=Object.assign({fundUsi:e.detail.fundUsi,memberNumber:e.detail.memberNumber,memberFirstName:e.detail.memberFirstName,memberFamilyName:e.detail.memberLastName,standardChoiceFormSignature:n},superSelectionAppService.promotedFundsConfig);return[4,customFundChoiceApi.submitCustomFundChoiceAsync(t)];case 1:r.sent();return[2]}}))}))}})}return[2]}))}))};this.byofCancelled=function(e){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:if(!(e.detail.sender==="super-byof"))return[3,2];return[4,navigationService.navigateInternally(this.history,SuperSelectionAppRoutes.ChoicePage)];case 1:t.sent();t.label=2;case 2:return[2]}}))}))};this.byofEventHandlers={"byof-loaded":this.byofLoaded.bind(this),"byof-completed":this.byofCompleted.bind(this),"byof-cancelled":this.byofCancelled.bind(this)}}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(Option.isSome(superSelectionAppService.backendUrl)&&Option.isSome(superSelectionAppService.state.jwt)){this.backendUrl=superSelectionAppService.backendUrl.value;this.accessToken=superSelectionAppService.state.jwt.value;if(superByofComponentStatus===SuperByofComponentStatus.NotLoaded){this.loadingTimeoutRef=setTimeout(this.byofLoadingTimeoutTriggered.bind(this),LoadWaitingTimeout)}this.subscribeToSuperByofEvents()}else{throw Error("SuperByofHost pre-requisites not met.")}return[2]}))}))};e.prototype.disconnectedCallback=function(){clearTimeout(this.loadingTimeoutRef);this.unSubscribeFromSuperByofEvents()};e.prototype.render=function(){return h(Host,null,h("sss-header-section",null),h("div",{class:"flex justify-center mt-11"},h("sss-custom-fund",null,h("apollo-super-byof",{"backend-url":this.backendUrl,"access-token":this.accessToken}))))};e.prototype.byofLoadingTimeoutTriggered=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(superByofComponentStatus!==SuperByofComponentStatus.Loaded){throw Error("BYOF component failed to load.")}return[2]}))}))};return e}();injectHistory(SuperByofHost);export{SuperByofHost as sss_super_byof_host};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?n(e.value):o(e.value).then(a,u)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return s([e,t])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{e as getRenderingRef,f as forceUpdate}from"./index-107d7c24.js";var isSome=function(e){return e._tag==="Some"};var isNone=function(e){return e._tag==="None"};var none={_tag:"None"};var some=function(e){return{_tag:"Some",value:e}};function fromNullable(e){return e==null?none:some(e)}function toUndefined(e){return isNone(e)?undefined:e.value}var appendToMap=function(e,t,n){var r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};var debounce=function(e,t){var n;return function(){var r=[];for(var o=0;o<arguments.length;o++){r[o]=arguments[o]}if(n){clearTimeout(n)}n=setTimeout((function(){n=0;e.apply(void 0,r)}),t)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(isConnected))}}),2e3);var stencilSubscription=function(e){var t=e.on;var n=new Map;if(typeof getRenderingRef==="function"){t("dispose",(function(){n.clear()}));t("get",(function(e){var t=getRenderingRef();if(t){appendToMap(n,e,t)}}));t("set",(function(e){var t=n.get(e);if(t){n.set(e,t.filter(forceUpdate))}cleanupElements(n)}));t("reset",(function(){n.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(n)}))}};var createObservableMap=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var r={dispose:[],get:[],set:[],reset:[]};var o=function(){n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));r.reset.forEach((function(e){return e()}))};var i=function(){r.dispose.forEach((function(e){return e()}));o()};var a=function(e){r.get.forEach((function(t){return t(e)}));return n.get(e)};var u=function(e,o){var i=n.get(e);if(t(o,i,e)){n.set(e,o);r.set.forEach((function(t){return t(e,o,i)}))}};var s=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return a(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,n){u(t,n);return true}});var c=function(e,t){r[e].push(t);return function(){removeFromArray(r[e],t)}};var f=function(t,n){var r=c("set",(function(e,r){if(e===t){n(r)}}));var o=c("reset",(function(){return n(e[t])}));return function(){r();o()}};var p=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};return{state:s,get:a,set:u,on:c,onChange:f,use:p,dispose:i,reset:o}};var removeFromArray=function(e,t){var n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};var createStore=function(e,t){var n=createObservableMap(e,t);stencilSubscription(n);return n};function createCommonjsModule(e,t,n){return n={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(n,n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var _function=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0;function n(e){return e}t.identity=n;t.unsafeCoerce=n;function r(e){return function(t){return!e(t)}}t.not=r;function o(e){return function(){return e}}t.constant=o;t.constTrue=o(true);t.constFalse=o(false);t.constNull=o(null);t.constUndefined=o(undefined);t.constVoid=t.constUndefined;function i(e){return function(t,n){return e(n,t)}}t.flip=i;function a(e,t,n,r,o,i,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return o(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return i(o(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(i(o(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(i(o(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(i(o(r(n(t(e.apply(this,arguments)))))))))}}return}t.flow=a;function u(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e}t.tuple=u;function s(e){return e+1}t.increment=s;function c(e){return e-1}t.decrement=c;function f(e){throw new Error("Called `absurd` function which should be uncallable")}t.absurd=f;function p(e){return function(t){return e.apply(void 0,t)}}t.tupled=p;function l(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return e(t)}}t.untupled=l;function d(e,t,n,r,o,i,a,u,s,c,f,p,l,d,h,m,v,g,y,b){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return o(r(n(t(e))));case 6:return i(o(r(n(t(e)))));case 7:return a(i(o(r(n(t(e))))));case 8:return u(a(i(o(r(n(t(e)))))));case 9:return s(u(a(i(o(r(n(t(e))))))));case 10:return c(s(u(a(i(o(r(n(t(e)))))))));case 11:return f(c(s(u(a(i(o(r(n(t(e))))))))));case 12:return p(f(c(s(u(a(i(o(r(n(t(e)))))))))));case 13:return l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))));case 14:return d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))));case 15:return h(d(l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))))));case 16:return m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))))));case 17:return v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))))))));case 18:return g(v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))))))));case 19:return y(g(v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))))))))));case 20:return b(y(g(v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))))))))))}return}t.pipe=d;t.hole=f;var h=function(e,t,n){var r;return Object.assign({},e,(r={},r[t]=n,r))};t.bind_=h;var m=function(e){return function(t){var n;return n={},n[e]=t,n}};t.bindTo_=m}));var Option=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0;t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0;var n=function(e){return e._tag==="Some"};t.isSome=n;var r=function(e){return e._tag==="None"};t.isNone=r;t.none={_tag:"None"};var o=function(e){return{_tag:"Some",value:e}};t.some=o;function i(e){return e==null?t.none:t.some(e)}t.fromNullable=i;function a(e){return function(n){return e(n)?t.some(n):t.none}}t.fromPredicate=a;function u(e){try{return t.some(e())}catch(e){return t.none}}t.tryCatch=u;function s(e){return e._tag==="Right"?t.none:t.some(e.left)}t.getLeft=s;function c(e){return e._tag==="Left"?t.none:t.some(e.right)}t.getRight=c;t.fromEither=c;function f(e,n){return function(r){return t.isNone(r)?e():n(r.value)}}t.fold=f;function p(e){return t.isNone(e)?null:e.value}t.toNullable=p;function l(e){return t.isNone(e)?undefined:e.value}t.toUndefined=l;var d=function(e){return function(n){return t.isNone(n)?e():n.value}};t.getOrElseW=d;t.getOrElse=t.getOrElseW;function h(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return i(e.apply(void 0,t))}}t.fromNullableK=h;t.mapNullable=m;function m(e){return function(n){return t.isNone(n)?t.none:i(e(n.value))}}t.chainNullableK=m;var v=function(e,n){return _function.pipe(e,t.map(n))};var g=function(e,n){return _function.pipe(e,t.ap(n))};var y=function(e,n){return _function.pipe(e,t.chain(n))};var b=function(e,n,r){return _function.pipe(e,t.reduce(n,r))};var _=function(e){var n=t.foldMap(e);return function(e,t){return _function.pipe(e,n(t))}};var w=function(e,n,r){return _function.pipe(e,t.reduceRight(n,r))};var S=function(e){var n=t.traverse(e);return function(e,t){return _function.pipe(e,n(t))}};var C=function(e,n){return _function.pipe(e,t.alt(n))};var O=function(e,n){return _function.pipe(e,t.filter(n))};var E=function(e,n){return _function.pipe(e,t.filterMap(n))};var F=function(e,n){return _function.pipe(e,t.extend(n))};var N=function(e,n){return _function.pipe(e,t.partition(n))};var A=function(e,n){return _function.pipe(e,t.partitionMap(n))};var P=function(e){var n=t.wither(e);return function(e,t){return _function.pipe(e,n(t))}};var R=function(e){var n=t.wilt(e);return function(e,t){return _function.pipe(e,n(t))}};var M=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n.value))}};t.map=M;var U=function(e){return function(n){return t.isNone(n)?t.none:t.isNone(e)?t.none:t.some(n.value(e.value))}};t.ap=U;var j=function(e){return _function.flow(t.map((function(e){return function(){return e}})),t.ap(e))};t.apFirst=j;var I=function(e){return _function.flow(t.map((function(){return function(e){return e}})),t.ap(e))};t.apSecond=I;t.of=t.some;var T=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.chain=T;var D=function(e){return t.chain((function(n){return _function.pipe(e(n),t.map((function(){return n})))}))};t.chainFirst=D;t.flatten=t.chain(_function.identity);var k=function(e){return function(n){return t.isNone(n)?e():n}};t.altW=k;t.alt=t.altW;var B=function(){return t.none};t.zero=B;var x=function(){return t.none};t.throwError=x;var W=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n))}};t.extend=W;t.duplicate=t.extend(_function.identity);var q=function(e,n){return function(r){return t.isNone(r)?e:n(e,r.value)}};t.reduce=q;var L=function(e){return function(n){return function(r){return t.isNone(r)?e.empty:n(r.value)}}};t.foldMap=L;var $=function(e,n){return function(r){return t.isNone(r)?e:n(r.value,e)}};t.reduceRight=$;t.compact=t.flatten;var J={left:t.none,right:t.none};var z=function(e){var n=_function.pipe(e,t.map((function(e){return{left:s(e),right:c(e)}})));return t.isNone(n)?J:n.value};t.separate=z;var K=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)?n:t.none}};t.filter=K;var Q=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.filterMap=Q;var Y=function(e){return function(t){return{left:O(t,(function(t){return!e(t)})),right:O(t,e)}}};t.partition=Y;var H=function(e){return _function.flow(t.map(e),t.separate)};t.partitionMap=H;var V=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):e.map(n(r.value),t.some)}}};t.traverse=V;var X=function(e){return function(n){return t.isNone(n)?e.of(t.none):e.map(n.value,t.some)}};t.sequence=X;var G=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):n(r.value)}}};t.wither=G;var Z=function(e){return function(n){return function(r){return t.isNone(r)?e.of({left:t.none,right:t.none}):e.map(n(r.value),(function(e){return{left:s(e),right:c(e)}}))}}};t.wilt=Z;t.URI="Option";function ee(e){return{show:function(n){return t.isNone(n)?"none":"some("+e.show(n.value)+")"}}}t.getShow=ee;function te(e){return{equals:function(n,r){return n===r||(t.isNone(n)?t.isNone(r):t.isNone(r)?false:e.equals(n.value,r.value))}}}t.getEq=te;function ne(e){return{equals:te(e).equals,compare:function(n,r){return n===r?0:t.isSome(n)?t.isSome(r)?e.compare(n.value,r.value):1:-1}}}t.getOrd=ne;function re(e){return{concat:function(n,r){return t.isSome(n)&&t.isSome(r)?t.some(e.concat(n.value,r.value)):t.none}}}t.getApplySemigroup=re;function oe(e){return{concat:re(e).concat,empty:t.some(e.empty)}}t.getApplyMonoid=oe;function ie(){return{concat:function(e,n){return t.isNone(e)?n:e},empty:t.none}}t.getFirstMonoid=ie;function ae(){return{concat:function(e,n){return t.isNone(n)?e:n},empty:t.none}}t.getLastMonoid=ae;function ue(e){return{concat:function(n,r){return t.isNone(n)?r:t.isNone(r)?n:t.some(e.concat(n.value,r.value))},empty:t.none}}t.getMonoid=ue;t.Functor={URI:t.URI,map:v};t.Applicative={URI:t.URI,map:v,ap:g,of:t.of};t.Monad={URI:t.URI,map:v,ap:g,of:t.of,chain:y};t.Foldable={URI:t.URI,reduce:b,foldMap:_,reduceRight:w};t.Alt={URI:t.URI,map:v,alt:C};t.Alternative={URI:t.URI,map:v,ap:g,of:t.of,alt:C,zero:t.zero};t.Extend={URI:t.URI,map:v,extend:F};t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate};t.Filterable={URI:t.URI,map:v,compact:t.compact,separate:t.separate,filter:O,filterMap:E,partition:N,partitionMap:A};t.Traversable={URI:t.URI,map:v,reduce:b,foldMap:_,reduceRight:w,traverse:S,sequence:t.sequence};t.Witherable={URI:t.URI,map:v,reduce:b,foldMap:_,reduceRight:w,traverse:S,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:O,filterMap:E,partition:N,partitionMap:A,wither:P,wilt:R};t.MonadThrow={URI:t.URI,map:v,ap:g,of:t.of,chain:y,throwError:t.throwError};t.option={URI:t.URI,map:v,of:t.of,ap:g,chain:y,reduce:b,foldMap:_,reduceRight:w,traverse:S,sequence:t.sequence,zero:t.zero,alt:C,extend:F,compact:t.compact,separate:t.separate,filter:O,filterMap:E,partition:N,partitionMap:A,wither:P,wilt:R,throwError:t.throwError};function se(e){return function(n,r){return t.isNone(r)?false:e.equals(n,r.value)}}t.elem=se;function ce(e){return function(n){return t.isNone(n)?false:e(n.value)}}t.exists=ce;function fe(e){return function(n){return t.isSome(e(n))}}t.getRefinement=fe;t.Do=t.of({});var pe=function(e){return t.map(_function.bindTo_(e))};t.bindTo=pe;var le=function(e,n){return t.chain((function(r){return _function.pipe(n(r),t.map((function(t){return _function.bind_(r,e,t)})))}))};t.bind=le;var de=function(e,n){return _function.flow(t.map((function(t){return function(n){return _function.bind_(t,e,n)}})),t.ap(n))};t.apS=de;var he=function(e){return function(n){var r=[];for(var o=0;o<n.length;o++){var i=e(o,n[o]);if(t.isNone(i)){return t.none}r.push(i.value)}return t.some(r)}};t.traverseArrayWithIndex=he;var me=function(e){return t.traverseArrayWithIndex((function(t,n){return e(n)}))};t.traverseArray=me;t.sequenceArray=t.traverseArray(_function.identity)}));function e(e){this.message=e}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,a=0,u="";o=n.charAt(a++);~o&&(r=i%4?64*r+o:o,i++%4)?u+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return u};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";var __assign=undefined&&undefined.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __spreadArrays=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};var mix=function(e,t,n){if(n===void 0){n=false}if(!e||!t||typeof e!=="object"||typeof t!=="object")return e;var r=__assign({},e);for(var o in t){if(t.hasOwnProperty(o)){if(t[o]instanceof Array&&e[o]instanceof Array){r[o]=n?__spreadArrays(e[o],t[o]):t[o]}else if(typeof t[o]==="object"&&typeof e[o]==="object"){r[o]=mix(e[o],t[o],n)}else{r[o]=t[o]}}}return r};var __spreadArrays$1=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};var config={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(e,t){var n=t===void 0?{}:t,r=n.doThrow,o=r===void 0?true:r,i=n.instance,a=i===void 0?false:i;var u=[];for(var s=2;s<arguments.length;s++){u[s-2]=arguments[s]}var c=this.polyfills[e]||(typeof self!=="undefined"?self[e]:null)||(typeof global!=="undefined"?global[e]:null);if(o&&!c)throw new Error(e+" is not defined");return a&&c?new(c.bind.apply(c,__spreadArrays$1([void 0],u))):c}};var onMatch=function(e,t,n,r){if(!e.getEntriesByName)return false;var o=e.getEntriesByName(t);if(o&&o.length>0){n(o.reverse()[0]);if(r.clearMeasures)r.clearMeasures(t);perfs.callbacks.delete(t);if(perfs.callbacks.size<1){perfs.observer.disconnect();if(r.clearResourceTimings){r.clearResourceTimings()}}return true}return false};var lazyObserver=function(e,t){if(!perfs.observer&&e&&t){perfs.observer=new t((function(t){perfs.callbacks.forEach((function(n,r){onMatch(t,r,n,e)}))}));if(e.clearResourceTimings)e.clearResourceTimings()}return perfs.observer};var perfs={callbacks:new Map,observer:null,observe:function(e,t){if(!e||!t)return;var n=config.polyfill("performance",{doThrow:false});var r=config.polyfill("PerformanceObserver",{doThrow:false});if(!lazyObserver(n,r))return;if(!onMatch(n,e,t,n)){if(perfs.callbacks.size<1)perfs.observer.observe({entryTypes:["resource","measure"]});perfs.callbacks.set(e,t)}}};var middlewareHelper=function(e){return function(t){return e.length===0?t:e.length===1?e[0](t):e.reduceRight((function(n,r,o){return o===e.length-2?r(n(t)):r(n)}))}};var WretchErrorWrapper=function(){function e(e){this.error=e}return e}();var resolver=function(e){var t=e._url,n=e._catchers,r=e._resolvers,o=e._middlewares,i=e._options;var a=new Map(n);var u=mix(config.defaults,i);var s=config.polyfill("AbortController",{doThrow:false,instance:true});if(!u["signal"]&&s){u["signal"]=s.signal}var c={ref:null,clear:function(){if(c.ref){clearTimeout(c.ref);c.ref=null}}};var f=middlewareHelper(o)(config.polyfill("fetch"))(t,u);var p=f.catch((function(e){throw new WretchErrorWrapper(e)})).then((function(e){c.clear();if(!e.ok){return e[config.errorType||"text"]().then((function(t){var n=new Error(t);n[config.errorType||"text"]=t;n["status"]=e.status;n["response"]=e;throw n}))}return e}));var l=function(t){return t.catch((function(t){c.clear();var n=t instanceof WretchErrorWrapper?t.error:t;if(t instanceof WretchErrorWrapper&&a.has("__fromFetch"))return a.get("__fromFetch")(n,e);else if(a.has(n.status))return a.get(n.status)(n,e);else if(a.has(n.name))return a.get(n.name)(n,e);else throw n}))};var d=function(e){return function(t){return e?l(p.then((function(t){return t&&t[e]()})).then((function(e){return t?t(e):e}))):l(p.then((function(e){return t?t(e):e})))}};var h={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(e){f.then((function(t){return perfs.observe(t.url,e)}));return h},setTimeout:function(e,t){if(t===void 0){t=s}c.clear();c.ref=setTimeout((function(){return t.abort()}),e);return h},controller:function(){return[s,h]},error:function(e,t){a.set(e,t);return h},badRequest:function(e){return h.error(400,e)},unauthorized:function(e){return h.error(401,e)},forbidden:function(e){return h.error(403,e)},notFound:function(e){return h.error(404,e)},timeout:function(e){return h.error(408,e)},internalError:function(e){return h.error(500,e)},fetchError:function(e){return h.error("__fromFetch",e)},onAbort:function(e){return h.error("AbortError",e)}};return r.reduce((function(t,n){return n(t,e)}),h)};var __assign$1=undefined&&undefined.__assign||function(){__assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign$1.apply(this,arguments)};var __spreadArrays$2=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};var JSON_MIME="application/json";var CONTENT_TYPE_HEADER="Content-Type";var Wretcher=function(){function e(e,t,n,r,o,i){if(n===void 0){n=new Map}if(r===void 0){r=[]}if(o===void 0){o=[]}if(i===void 0){i=[]}this._url=e;this._options=t;this._catchers=n;this._resolvers=r;this._middlewares=o;this._deferredChain=i}e.factory=function(t,n){if(t===void 0){t=""}if(n===void 0){n={}}return new e(t,n)};e.prototype.selfFactory=function(t){var n=t===void 0?{}:t,r=n.url,o=r===void 0?this._url:r,i=n.options,a=i===void 0?this._options:i,u=n.catchers,s=u===void 0?this._catchers:u,c=n.resolvers,f=c===void 0?this._resolvers:c,p=n.middlewares,l=p===void 0?this._middlewares:p,d=n.deferredChain,h=d===void 0?this._deferredChain:d;return new e(o,__assign$1({},a),new Map(s),__spreadArrays$2(f),__spreadArrays$2(l),__spreadArrays$2(h))};e.prototype.defaults=function(e,t){if(t===void 0){t=false}config.defaults=t?mix(config.defaults,e):e;return this};e.prototype.errorType=function(e){config.errorType=e;return this};e.prototype.polyfills=function(e){config.polyfills=__assign$1(__assign$1({},config.polyfills),e);return this};e.prototype.url=function(e,t){if(t===void 0){t=false}if(t)return this.selfFactory({url:e});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+e+"?"+n[1]:this._url+e})};e.prototype.options=function(e,t){if(t===void 0){t=true}return this.selfFactory({options:t?mix(this._options,e):e})};e.prototype.query=function(e,t){if(t===void 0){t=false}return this.selfFactory({url:appendQueryParams(this._url,e,t)})};e.prototype.headers=function(e){return this.selfFactory({options:mix(this._options,{headers:e||{}})})};e.prototype.accept=function(e){return this.headers({Accept:e})};e.prototype.content=function(e){var t;return this.headers((t={},t[CONTENT_TYPE_HEADER]=e,t))};e.prototype.auth=function(e){return this.headers({Authorization:e})};e.prototype.catcher=function(e,t){var n=new Map(this._catchers);n.set(e,t);return this.selfFactory({catchers:n})};e.prototype.signal=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{signal:e.signal})})};e.prototype.resolve=function(e,t){if(t===void 0){t=false}return this.selfFactory({resolvers:t?[e]:__spreadArrays$2(this._resolvers,[e])})};e.prototype.defer=function(e,t){if(t===void 0){t=false}return this.selfFactory({deferredChain:t?[e]:__spreadArrays$2(this._deferredChain,[e])})};e.prototype.middlewares=function(e,t){if(t===void 0){t=false}return this.selfFactory({middlewares:t?e:__spreadArrays$2(this._middlewares,e)})};e.prototype.method=function(e,t,n){if(t===void 0){t={}}if(n===void 0){n=null}var r=this._options.headers;var o=!n?this:typeof n==="object"&&(!r||Object.entries(r).every((function(e){var t=e[0],n=e[1];return t.toLowerCase()!==CONTENT_TYPE_HEADER.toLowerCase()||n.startsWith(JSON_MIME)})))?this.json(n):this.body(n);o=o.options(__assign$1(__assign$1({},t),{method:e}));var i=o._deferredChain.reduce((function(e,t){return t(e,e._url,e._options)}),o);return resolver(i)};e.prototype.get=function(e){return this.method("GET",e)};e.prototype.delete=function(e){return this.method("DELETE",e)};e.prototype.put=function(e,t){return this.method("PUT",t,e)};e.prototype.post=function(e,t){return this.method("POST",t,e)};e.prototype.patch=function(e,t){return this.method("PATCH",t,e)};e.prototype.head=function(e){return this.method("HEAD",e)};e.prototype.opts=function(e){return this.method("OPTIONS",e)};e.prototype.replay=function(e){return this.method(this._options.method,e)};e.prototype.body=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{body:e})})};e.prototype.json=function(e){var t;var n=(t=Object.entries(this._options.headers||{}).find((function(e){var t=e[0],n=e[1];return t.toLowerCase()===CONTENT_TYPE_HEADER.toLowerCase()&&n.startsWith(JSON_MIME)})))===null||t===void 0?void 0:t[1];return this.content(n||JSON_MIME).body(JSON.stringify(e))};e.prototype.formData=function(e,t){if(t===void 0){t=false}return this.body(convertFormData(e,t))};e.prototype.formUrl=function(e){return this.body(typeof e==="string"?e:convertFormUrl(e)).content("application/x-www-form-urlencoded")};return e}();var appendQueryParams=function(e,t,n){var r;if(typeof t==="string"){r=t}else{var o=config.polyfill("URLSearchParams",{instance:true});for(var i in t){if(t[i]instanceof Array){for(var a=0,u=t[i];a<u.length;a++){var s=u[a];o.append(i,s)}}else{o.append(i,t[i])}}r=o.toString()}var c=e.split("?");if(n||c.length<2)return c[0]+"?"+r;return e+"&"+r};function convertFormData(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=config.polyfill("FormData",{instance:true})}if(r===void 0){r=[]}Object.entries(e).forEach((function(e){var o=e[0],i=e[1];var a=r.reduce((function(e,t){return e?e+"["+t+"]":t}),null);a=a?a+"["+o+"]":o;if(i instanceof Array){for(var u=0,s=i;u<s.length;u++){var c=s[u];n.append(a+"[]",c)}}else if(t&&typeof i==="object"&&(!(t instanceof Array)||!t.includes(o))){if(i!==null){convertFormData(i,t,n,__spreadArrays$2(r,[o]))}}else{n.append(a,i)}}));return n}function encodeQueryValue(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(typeof t==="object"?JSON.stringify(t):""+t)}function convertFormUrl(e){return Object.keys(e).map((function(t){var n=e[t];if(n instanceof Array){return n.map((function(e){return encodeQueryValue(t,e)})).join("&")}return encodeQueryValue(t,n)})).join("&")}var factory=Wretcher.factory;factory["default"]=Wretcher.factory;function buildBackendApiClient(){var e=superSelectionAppService.jwt;var t=superSelectionAppService.profileId;var n=superSelectionAppService.accountIdOrDefault;var r=superSelectionAppService.partnerIdOrDefault;return factory(superSelectionAppService.apiBaseUrl).headers({Authorization:"Bearer "+e,"X-PROFILE-ID":t,"X-PARTNER-ID":r,"X-ACCOUNT-ID":n})}var slate={fundId:"slate",usi:"32367272075001"};function hydratePromotedFundChoiceDtoKind(e){if("slate"in e){e.kind="slate"}else if("australianRetirementTrust"in e){e.kind="australianRetirementTrust"}else if("aware"in e){e.kind="aware"}else if("active"in e){e.kind="active"}else if("australianEthical"in e){e.kind="australianEthical"}else if("virgin"in e){e.kind="virgin"}else if("spirit"in e){e.kind="spirit"}else if("firstSuper"in e){e.kind="firstSuper"}else if("mercerMyChoice"in e){e.kind="mercerMyChoice"}else if("generic"in e){e.kind="generic"}}function getPromotedFundUsi(e){switch(e.kind){case"slate":return slate.usi;case"australianRetirementTrust":return e.australianRetirementTrust.usi;case"aware":return e.aware.usi;case"active":return e.active.usi;case"australianEthical":return e.australianEthical.usi;case"virgin":return e.virgin.usi;case"spirit":return e.spirit.usi;case"firstSuper":return e.firstSuper.usi;case"mercerMyChoice":return e.mercerMyChoice.usi;case"generic":return e.generic.usi;default:return""}}function getPromotedFundId(e){switch(e.kind){case"slate":return slate.fundId;case"australianRetirementTrust":return"australian-retirement-trust";case"aware":return"aware";case"active":return"active";case"australianEthical":return"australian-ethical";case"virgin":return"virgin";case"spirit":return"spirit";case"firstSuper":return"first-super";case"mercerMyChoice":return"mercermychoice";case"generic":return e.generic.fundId;default:return""}}function getSuperChoiceUsi(e){switch(e.kind){case"Promoted":return some(getPromotedFundUsi(e.promoted));case"MyOwnFund":return some(e.myOwnFund.usi);case"SMSF":return none;case"Default":return some(e.default.usi);case"PromotedDefault":return some(e.promotedDefault.usi);case"DefinedBenefits":return some(e.definedBenefits.usi);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.usi);default:return none}}function getPromotedFundMemberNumber(e){switch(e.kind){case"slate":return e.slate.memberNumber;case"australianRetirementTrust":return e.australianRetirementTrust.memberNumber;case"aware":return e.aware.memberNumber;case"active":return e.active.memberNumber;case"australianEthical":return e.australianEthical.memberNumber;case"virgin":return e.virgin.memberNumber;case"spirit":return e.spirit.memberNumber;case"firstSuper":return e.firstSuper.memberNumber;case"mercerMyChoice":return e.mercerMyChoice.memberNumber;case"generic":return e.generic.memberNumber;default:return""}}function getSuperChoiceMemberNumber(e){switch(e.kind){case"Promoted":return some(getPromotedFundMemberNumber(e.promoted));case"MyOwnFund":return some(e.myOwnFund.memberNumber);case"DefinedBenefits":return some(e.definedBenefits.memberNumber);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.memberNumber);case"SMSF":case"Default":case"PromotedDefault":return none;default:return none}}function hydrateSuperChoiceDetailsDtoKind(e){if("promoted"in e){e.kind="Promoted"}else if("myOwnFund"in e){e.kind="MyOwnFund"}else if("smsf"in e){e.kind="SMSF"}else if("default"in e){e.kind="Default"}else if("promotedDefault"in e){e.kind="PromotedDefault"}else if("definedBenefits"in e){e.kind="DefinedBenefits"}else if("promotedDefaultWithJoin"in e){e.kind="PromotedDefaultWithJoin"}}var SuperSelectionApi=function(){function e(){}e.prototype.getAustralianFundsAsync=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,buildBackendApiClient().url("super-choice/australian-funds-v2?"+this.toQueryString(t,e)).get().notFound((function(){throw new Error("Failed to fetch the list of australian super funds.")})).json()]}))}))};e.prototype.getAustralianFundAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=t?"?includeInactive=true":"";return[2,buildBackendApiClient().url("super-choice/australian-funds/"+e+n).get().notFound((function(){throw new Error("Failed to fetch australian super fund.")})).json()]}))}))};e.prototype.getAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("client-app-state").get().notFound((function(){throw new Error("Failed to fetch application configuration.")})).json()];case 1:t=n.sent();if((e=t.superBuyer.superChoice)===null||e===void 0?void 0:e.choiceDetails){hydrateSuperChoiceDetailsDtoKind(t.superBuyer.superChoice.choiceDetails);switch(t.superBuyer.superChoice.choiceDetails.kind){case"Promoted":hydratePromotedFundChoiceDtoKind(t.superBuyer.superChoice.choiceDetails.promoted);break}}return[2,t]}}))}))};e.prototype.clickPromotedTileAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("click-promoted-tile").post(e).res()]}))}))};e.prototype.viewSuperFundPanelAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("view-super-fund-panel").post(e).res()]}))}))};e.prototype.toSearchFilterQueryString=function(e){return"search="+e.searchString+(e.maxRecordCount>0?"&maxRecordCount="+e.maxRecordCount:"")};e.prototype.toQueryString=function(e,t){var n=this.toSearchFilterQueryString(t);var r=e?"includeInactive=true":"";var o=function(e){return e&&e.length};return[n,r].filter(o).join("&")};return e}();var superSelectionApi=new SuperSelectionApi;var SuperCampaignComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded";e[e["NotWorking"]=3]="NotWorking"})(SuperCampaignComponentStatus||(SuperCampaignComponentStatus={}));var SuperCampaignState=function(){function e(){this._promotedFundsShown=[]}Object.defineProperty(e.prototype,"PromotedFundIds",{get:function(){return this._promotedFundsShown.map((function(e){return e.fundId}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsShown",{set:function(e){this._promotedFundsShown=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"DefaultFundPosition",{get:function(){var e=this._promotedFundsShown.findIndex((function(e){return e.fundType==="promoted-default"}));if(e===-1)return undefined;return e+1},enumerable:false,configurable:true});return e}();var initialState={apiBaseUrl:Option.none,appBaseUrl:Option.none,profileId:Option.none,jwt:Option.none,superBuyer:Option.none,superChoicePrefill:Option.none,promotedFunds:Option.none,accountConfiguration:Option.none,profileConfiguration:Option.none,hasSuccessPageBeenAcknowledged:false,hasSuperSelectionBeenSubmitted:false,isDefinedBenefitsEligible:Option.none,superCampaignEnabled:true,superCampaignState:undefined,superCampaignComponentStatus:SuperCampaignComponentStatus.NotLoaded,hideFooterSection:false,bringYourOwnFundCustomStepEnabled:false,smsfCustomStepEnabled:false,featuredFundsEnabled:false,defaultFundNewComponentEnabled:false};var SuperSelectionAppService=function(){function e(){var e=this;var t=createStore(initialState),n=t.state,r=t.onChange;this._state=n;this._onChange=r;r("jwt",(function(t){e._state.profileId=_function.pipe(t,Option.chain((function(e){return Option.fromNullable(o(e).sub)})))}))}Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superBuyer",{get:function(){if(Option.isNone(this._state.superBuyer)){throw Error("User information is not set")}return this._state.superBuyer.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){if(Option.isNone(this._state.apiBaseUrl)){throw Error("API base URL is not set")}return this._state.apiBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){if(Option.isNone(this._state.appBaseUrl)){throw Error("App base URL is not set")}return this._state.appBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFunds",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return this.superCampaignState.PromotedFundIds}if(Option.isNone(this._state.promotedFunds)){throw Error("Promoted Funds is not set")}return this._state.promotedFunds.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedDefaultFundPosition",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return Option.fromNullable(this.superCampaignState.DefaultFundPosition)}return Option.none},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsConfig",{get:function(){return{shownFunds:this.promotedFunds,promotedDefaultFundPosition:Option.toUndefined(this.promotedDefaultFundPosition),promotedFundsConfigSource:this.isUsingSuperCampaign?"superCampaign":"superSelection"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"profileId",{get:function(){if(Option.isNone(this._state.profileId)){throw Error("Failed to get Profile ID from JWT")}return this._state.profileId.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultFundUsi",{get:function(){var e=_function.pipe(this._state.profileConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten);if(Option.isSome(e)){return e}return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"accountIdOrDefault",{get:function(){return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return e.accountId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"partnerIdOrDefault",{get:function(){return _function.pipe(this._state.superBuyer,Option.map((function(e){return e.partnerId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"jwt",{get:function(){if(Option.isNone(this._state.jwt)){throw Error("No authentication information was found")}return this._state.jwt.value},enumerable:false,configurable:true});e.prototype.completeSuperSelectionFlow=function(){this._state.hasSuccessPageBeenAcknowledged=true};e.prototype.markSuperSelectionAsSubmitted=function(){this._state.hasSuperSelectionBeenSubmitted=true};Object.defineProperty(e.prototype,"isDefinedBenefitsEligible",{get:function(){return this._state.isDefinedBenefitsEligible},enumerable:false,configurable:true});e.prototype.loadAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,superSelectionApi.getAppStateAsync()];case 1:e=t.sent();this._state.accountConfiguration=Option.fromNullable(e.accountConfiguration);this._state.profileConfiguration=Option.fromNullable(e.profileConfiguration);this._state.superBuyer=Option.fromNullable(e.superBuyer);this._state.promotedFunds=Option.fromNullable(e.promotedFunds);this._state.bringYourOwnFundCustomStepEnabled=e.bringYourOwnFundCustomStepEnabled;this._state.smsfCustomStepEnabled=e.smsfCustomStepEnabled;this._state.featuredFundsEnabled=e.featuredFundsEnabled;this._state.defaultFundNewComponentEnabled=e.defaultFundNewComponentEnabled;this._state.superChoicePrefill=Option.fromNullable(e.prefill);this._state.isDefinedBenefitsEligible=Option.fromNullable(e.isDefinedBenefitsEligible);if(Option.isSome(this._state.accountConfiguration)){if(this._state.accountConfiguration.value.featureSet.type==="basic"){this._state.superCampaignEnabled=false}}return[2]}}))}))};e.prototype.setSuperCampaignPromotedFundsShown=function(e){if(this._state.superCampaignState!==undefined)this._state.superCampaignState.promotedFundsShown=e;else throw new Error("Cannot set shown funds for SuperCampaing state because it is undefined")};e.prototype.viewSuperFundPanelAsync=function(e,t){return superSelectionApi.viewSuperFundPanelAsync(Object.assign(Object.assign({},this.promotedFundsConfig),{shownFunds:t?t:this.promotedFundsConfig.shownFunds,placementId:e}))};Object.defineProperty(e.prototype,"superCampaignState",{get:function(){return this._state.superCampaignState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignComponentStatus",{get:function(){return this._state.superCampaignComponentStatus},set:function(e){if(e===SuperCampaignComponentStatus.Loaded){this._state.superCampaignComponentStatus=SuperCampaignComponentStatus.Loaded;this._state.superCampaignState=new SuperCampaignState}else{this._state.superCampaignComponentStatus=e;this._state.superCampaignState=undefined}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUsingSuperCampaign",{get:function(){return this.state.superCampaignEnabled&&this.superCampaignState!==undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBringYourOwnFundCustomStepEnabled",{get:function(){return this.state.bringYourOwnFundCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSmsfCustomStepEnabled",{get:function(){return this.state.smsfCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFeaturedFundsEnabled",{get:function(){return this.state.featuredFundsEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDefaultFundNewComponentEnabled",{get:function(){return this.state.defaultFundNewComponentEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignCanNotBeActivated",{get:function(){return!this.state.superCampaignEnabled||this.superCampaignComponentStatus===SuperCampaignComponentStatus.NotWorking},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hideFooterSection",{get:function(){return this._state.hideFooterSection},set:function(e){this._state.hideFooterSection=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"backendUrl",{get:function(){return Option.map(this.getBaseUrl)(this.state.apiBaseUrl)},enumerable:false,configurable:true});e.prototype.getBaseUrl=function(e){var t=new URL(e);return t.protocol+"//"+t.hostname+(t.port.length>0?":"+t.port:"")};return e}();var superSelectionAppService=new SuperSelectionAppService;export{Option as O,SuperCampaignComponentStatus as S,superSelectionAppService as a,isNone as b,buildBackendApiClient as c,getSuperChoiceUsi as d,getSuperChoiceMemberNumber as e,superSelectionApi as f,getPromotedFundId as g,slate as h,isSome as i,factory as j,fromNullable as k,createStore as l,none as n,some as s,toUndefined as t};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function u(e){try{s(r["throw"](e))}catch(e){i(e)}}function s(e){e.done?n(e.value):o(e.value).then(a,u)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a;return a={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function u(e){return function(t){return s([e,t])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(i=a[0]&2?o["return"]:a[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;if(o=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(i=n.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){n.label=a[1];break}if(a[0]===6&&n.label<i[1]){n.label=i[1];i=a;break}if(i&&n.label<i[2]){n.label=i[2];n.ops.push(a);break}if(i[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{e as getRenderingRef,f as forceUpdate}from"./index-107d7c24.js";var isSome=function(e){return e._tag==="Some"};var isNone=function(e){return e._tag==="None"};var none={_tag:"None"};var some=function(e){return{_tag:"Some",value:e}};function fromNullable(e){return e==null?none:some(e)}function toUndefined(e){return isNone(e)?undefined:e.value}var appendToMap=function(e,t,n){var r=e.get(t);if(!r){e.set(t,[n])}else if(!r.includes(n)){r.push(n)}};var debounce=function(e,t){var n;return function(){var r=[];for(var o=0;o<arguments.length;o++){r[o]=arguments[o]}if(n){clearTimeout(n)}n=setTimeout((function(){n=0;e.apply(void 0,r)}),t)}};var isConnected=function(e){return!("isConnected"in e)||e.isConnected};var cleanupElements=debounce((function(e){for(var t=0,n=e.keys();t<n.length;t++){var r=n[t];e.set(r,e.get(r).filter(isConnected))}}),2e3);var stencilSubscription=function(e){var t=e.on;var n=new Map;if(typeof getRenderingRef==="function"){t("dispose",(function(){n.clear()}));t("get",(function(e){var t=getRenderingRef();if(t){appendToMap(n,e,t)}}));t("set",(function(e){var t=n.get(e);if(t){n.set(e,t.filter(forceUpdate))}cleanupElements(n)}));t("reset",(function(){n.forEach((function(e){return e.forEach(forceUpdate)}));cleanupElements(n)}))}};var createObservableMap=function(e,t){if(t===void 0){t=function(e,t){return e!==t}}var n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));var r={dispose:[],get:[],set:[],reset:[]};var o=function(){n=new Map(Object.entries(e!==null&&e!==void 0?e:{}));r.reset.forEach((function(e){return e()}))};var i=function(){r.dispose.forEach((function(e){return e()}));o()};var a=function(e){r.get.forEach((function(t){return t(e)}));return n.get(e)};var u=function(e,o){var i=n.get(e);if(t(o,i,e)){n.set(e,o);r.set.forEach((function(t){return t(e,o,i)}))}};var s=typeof Proxy==="undefined"?{}:new Proxy(e,{get:function(e,t){return a(t)},ownKeys:function(e){return Array.from(n.keys())},getOwnPropertyDescriptor:function(){return{enumerable:true,configurable:true}},has:function(e,t){return n.has(t)},set:function(e,t,n){u(t,n);return true}});var c=function(e,t){r[e].push(t);return function(){removeFromArray(r[e],t)}};var f=function(t,n){var r=c("set",(function(e,r){if(e===t){n(r)}}));var o=c("reset",(function(){return n(e[t])}));return function(){r();o()}};var p=function(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e.forEach((function(e){if(e.set){c("set",e.set)}if(e.get){c("get",e.get)}if(e.reset){c("reset",e.reset)}}))};return{state:s,get:a,set:u,on:c,onChange:f,use:p,dispose:i,reset:o}};var removeFromArray=function(e,t){var n=e.indexOf(t);if(n>=0){e[n]=e[e.length-1];e.length--}};var createStore=function(e,t){var n=createObservableMap(e,t);stencilSubscription(n);return n};function createCommonjsModule(e,t,n){return n={path:t,exports:{},require:function(e,t){return commonjsRequire()}},e(n,n.exports),n.exports}function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var _function=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.bindTo_=t.bind_=t.hole=t.pipe=t.untupled=t.tupled=t.absurd=t.decrement=t.increment=t.tuple=t.flow=t.flip=t.constVoid=t.constUndefined=t.constNull=t.constFalse=t.constTrue=t.constant=t.not=t.unsafeCoerce=t.identity=void 0;function n(e){return e}t.identity=n;t.unsafeCoerce=n;function r(e){return function(t){return!e(t)}}t.not=r;function o(e){return function(){return e}}t.constant=o;t.constTrue=o(true);t.constFalse=o(false);t.constNull=o(null);t.constUndefined=o(undefined);t.constVoid=t.constUndefined;function i(e){return function(t,n){return e(n,t)}}t.flip=i;function a(e,t,n,r,o,i,a,u,s){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return o(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return i(o(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return a(i(o(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return u(a(i(o(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return s(u(a(i(o(r(n(t(e.apply(this,arguments)))))))))}}return}t.flow=a;function u(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}return e}t.tuple=u;function s(e){return e+1}t.increment=s;function c(e){return e-1}t.decrement=c;function f(e){throw new Error("Called `absurd` function which should be uncallable")}t.absurd=f;function p(e){return function(t){return e.apply(void 0,t)}}t.tupled=p;function l(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return e(t)}}t.untupled=l;function d(e,t,n,r,o,i,a,u,s,c,f,p,l,d,h,m,v,g,y,b){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return o(r(n(t(e))));case 6:return i(o(r(n(t(e)))));case 7:return a(i(o(r(n(t(e))))));case 8:return u(a(i(o(r(n(t(e)))))));case 9:return s(u(a(i(o(r(n(t(e))))))));case 10:return c(s(u(a(i(o(r(n(t(e)))))))));case 11:return f(c(s(u(a(i(o(r(n(t(e))))))))));case 12:return p(f(c(s(u(a(i(o(r(n(t(e)))))))))));case 13:return l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))));case 14:return d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))));case 15:return h(d(l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))))));case 16:return m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))))));case 17:return v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))))))));case 18:return g(v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))))))));case 19:return y(g(v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e))))))))))))))))));case 20:return b(y(g(v(m(h(d(l(p(f(c(s(u(a(i(o(r(n(t(e)))))))))))))))))))}return}t.pipe=d;t.hole=f;var h=function(e,t,n){var r;return Object.assign({},e,(r={},r[t]=n,r))};t.bind_=h;var m=function(e){return function(t){var n;return n={},n[e]=t,n}};t.bindTo_=m}));var Option=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:true});t.getApplySemigroup=t.getOrd=t.getEq=t.getShow=t.URI=t.wilt=t.wither=t.sequence=t.traverse=t.partitionMap=t.partition=t.filterMap=t.filter=t.separate=t.compact=t.reduceRight=t.foldMap=t.reduce=t.duplicate=t.extend=t.throwError=t.zero=t.alt=t.altW=t.flatten=t.chainFirst=t.chain=t.of=t.apSecond=t.apFirst=t.ap=t.map=t.chainNullableK=t.mapNullable=t.fromNullableK=t.getOrElse=t.getOrElseW=t.toUndefined=t.toNullable=t.fold=t.fromEither=t.getRight=t.getLeft=t.tryCatch=t.fromPredicate=t.fromNullable=t.some=t.none=t.isNone=t.isSome=void 0;t.sequenceArray=t.traverseArray=t.traverseArrayWithIndex=t.apS=t.bind=t.bindTo=t.Do=t.getRefinement=t.exists=t.elem=t.option=t.MonadThrow=t.Witherable=t.Traversable=t.Filterable=t.Compactable=t.Extend=t.Alternative=t.Alt=t.Foldable=t.Monad=t.Applicative=t.Functor=t.getMonoid=t.getLastMonoid=t.getFirstMonoid=t.getApplyMonoid=void 0;var n=function(e){return e._tag==="Some"};t.isSome=n;var r=function(e){return e._tag==="None"};t.isNone=r;t.none={_tag:"None"};var o=function(e){return{_tag:"Some",value:e}};t.some=o;function i(e){return e==null?t.none:t.some(e)}t.fromNullable=i;function a(e){return function(n){return e(n)?t.some(n):t.none}}t.fromPredicate=a;function u(e){try{return t.some(e())}catch(e){return t.none}}t.tryCatch=u;function s(e){return e._tag==="Right"?t.none:t.some(e.left)}t.getLeft=s;function c(e){return e._tag==="Left"?t.none:t.some(e.right)}t.getRight=c;t.fromEither=c;function f(e,n){return function(r){return t.isNone(r)?e():n(r.value)}}t.fold=f;function p(e){return t.isNone(e)?null:e.value}t.toNullable=p;function l(e){return t.isNone(e)?undefined:e.value}t.toUndefined=l;var d=function(e){return function(n){return t.isNone(n)?e():n.value}};t.getOrElseW=d;t.getOrElse=t.getOrElseW;function h(e){return function(){var t=[];for(var n=0;n<arguments.length;n++){t[n]=arguments[n]}return i(e.apply(void 0,t))}}t.fromNullableK=h;t.mapNullable=m;function m(e){return function(n){return t.isNone(n)?t.none:i(e(n.value))}}t.chainNullableK=m;var v=function(e,n){return _function.pipe(e,t.map(n))};var g=function(e,n){return _function.pipe(e,t.ap(n))};var y=function(e,n){return _function.pipe(e,t.chain(n))};var b=function(e,n,r){return _function.pipe(e,t.reduce(n,r))};var _=function(e){var n=t.foldMap(e);return function(e,t){return _function.pipe(e,n(t))}};var w=function(e,n,r){return _function.pipe(e,t.reduceRight(n,r))};var S=function(e){var n=t.traverse(e);return function(e,t){return _function.pipe(e,n(t))}};var C=function(e,n){return _function.pipe(e,t.alt(n))};var O=function(e,n){return _function.pipe(e,t.filter(n))};var E=function(e,n){return _function.pipe(e,t.filterMap(n))};var F=function(e,n){return _function.pipe(e,t.extend(n))};var N=function(e,n){return _function.pipe(e,t.partition(n))};var A=function(e,n){return _function.pipe(e,t.partitionMap(n))};var P=function(e){var n=t.wither(e);return function(e,t){return _function.pipe(e,n(t))}};var R=function(e){var n=t.wilt(e);return function(e,t){return _function.pipe(e,n(t))}};var M=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n.value))}};t.map=M;var U=function(e){return function(n){return t.isNone(n)?t.none:t.isNone(e)?t.none:t.some(n.value(e.value))}};t.ap=U;var j=function(e){return _function.flow(t.map((function(e){return function(){return e}})),t.ap(e))};t.apFirst=j;var I=function(e){return _function.flow(t.map((function(){return function(e){return e}})),t.ap(e))};t.apSecond=I;t.of=t.some;var T=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.chain=T;var D=function(e){return t.chain((function(n){return _function.pipe(e(n),t.map((function(){return n})))}))};t.chainFirst=D;t.flatten=t.chain(_function.identity);var k=function(e){return function(n){return t.isNone(n)?e():n}};t.altW=k;t.alt=t.altW;var B=function(){return t.none};t.zero=B;var x=function(){return t.none};t.throwError=x;var W=function(e){return function(n){return t.isNone(n)?t.none:t.some(e(n))}};t.extend=W;t.duplicate=t.extend(_function.identity);var q=function(e,n){return function(r){return t.isNone(r)?e:n(e,r.value)}};t.reduce=q;var L=function(e){return function(n){return function(r){return t.isNone(r)?e.empty:n(r.value)}}};t.foldMap=L;var $=function(e,n){return function(r){return t.isNone(r)?e:n(r.value,e)}};t.reduceRight=$;t.compact=t.flatten;var J={left:t.none,right:t.none};var z=function(e){var n=_function.pipe(e,t.map((function(e){return{left:s(e),right:c(e)}})));return t.isNone(n)?J:n.value};t.separate=z;var K=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)?n:t.none}};t.filter=K;var Q=function(e){return function(n){return t.isNone(n)?t.none:e(n.value)}};t.filterMap=Q;var Y=function(e){return function(t){return{left:O(t,(function(t){return!e(t)})),right:O(t,e)}}};t.partition=Y;var H=function(e){return _function.flow(t.map(e),t.separate)};t.partitionMap=H;var V=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):e.map(n(r.value),t.some)}}};t.traverse=V;var X=function(e){return function(n){return t.isNone(n)?e.of(t.none):e.map(n.value,t.some)}};t.sequence=X;var G=function(e){return function(n){return function(r){return t.isNone(r)?e.of(t.none):n(r.value)}}};t.wither=G;var Z=function(e){return function(n){return function(r){return t.isNone(r)?e.of({left:t.none,right:t.none}):e.map(n(r.value),(function(e){return{left:s(e),right:c(e)}}))}}};t.wilt=Z;t.URI="Option";function ee(e){return{show:function(n){return t.isNone(n)?"none":"some("+e.show(n.value)+")"}}}t.getShow=ee;function te(e){return{equals:function(n,r){return n===r||(t.isNone(n)?t.isNone(r):t.isNone(r)?false:e.equals(n.value,r.value))}}}t.getEq=te;function ne(e){return{equals:te(e).equals,compare:function(n,r){return n===r?0:t.isSome(n)?t.isSome(r)?e.compare(n.value,r.value):1:-1}}}t.getOrd=ne;function re(e){return{concat:function(n,r){return t.isSome(n)&&t.isSome(r)?t.some(e.concat(n.value,r.value)):t.none}}}t.getApplySemigroup=re;function oe(e){return{concat:re(e).concat,empty:t.some(e.empty)}}t.getApplyMonoid=oe;function ie(){return{concat:function(e,n){return t.isNone(e)?n:e},empty:t.none}}t.getFirstMonoid=ie;function ae(){return{concat:function(e,n){return t.isNone(n)?e:n},empty:t.none}}t.getLastMonoid=ae;function ue(e){return{concat:function(n,r){return t.isNone(n)?r:t.isNone(r)?n:t.some(e.concat(n.value,r.value))},empty:t.none}}t.getMonoid=ue;t.Functor={URI:t.URI,map:v};t.Applicative={URI:t.URI,map:v,ap:g,of:t.of};t.Monad={URI:t.URI,map:v,ap:g,of:t.of,chain:y};t.Foldable={URI:t.URI,reduce:b,foldMap:_,reduceRight:w};t.Alt={URI:t.URI,map:v,alt:C};t.Alternative={URI:t.URI,map:v,ap:g,of:t.of,alt:C,zero:t.zero};t.Extend={URI:t.URI,map:v,extend:F};t.Compactable={URI:t.URI,compact:t.compact,separate:t.separate};t.Filterable={URI:t.URI,map:v,compact:t.compact,separate:t.separate,filter:O,filterMap:E,partition:N,partitionMap:A};t.Traversable={URI:t.URI,map:v,reduce:b,foldMap:_,reduceRight:w,traverse:S,sequence:t.sequence};t.Witherable={URI:t.URI,map:v,reduce:b,foldMap:_,reduceRight:w,traverse:S,sequence:t.sequence,compact:t.compact,separate:t.separate,filter:O,filterMap:E,partition:N,partitionMap:A,wither:P,wilt:R};t.MonadThrow={URI:t.URI,map:v,ap:g,of:t.of,chain:y,throwError:t.throwError};t.option={URI:t.URI,map:v,of:t.of,ap:g,chain:y,reduce:b,foldMap:_,reduceRight:w,traverse:S,sequence:t.sequence,zero:t.zero,alt:C,extend:F,compact:t.compact,separate:t.separate,filter:O,filterMap:E,partition:N,partitionMap:A,wither:P,wilt:R,throwError:t.throwError};function se(e){return function(n,r){return t.isNone(r)?false:e.equals(n,r.value)}}t.elem=se;function ce(e){return function(n){return t.isNone(n)?false:e(n.value)}}t.exists=ce;function fe(e){return function(n){return t.isSome(e(n))}}t.getRefinement=fe;t.Do=t.of({});var pe=function(e){return t.map(_function.bindTo_(e))};t.bindTo=pe;var le=function(e,n){return t.chain((function(r){return _function.pipe(n(r),t.map((function(t){return _function.bind_(r,e,t)})))}))};t.bind=le;var de=function(e,n){return _function.flow(t.map((function(t){return function(n){return _function.bind_(t,e,n)}})),t.ap(n))};t.apS=de;var he=function(e){return function(n){var r=[];for(var o=0;o<n.length;o++){var i=e(o,n[o]);if(t.isNone(i)){return t.none}r.push(i.value)}return t.some(r)}};t.traverseArrayWithIndex=he;var me=function(e){return t.traverseArrayWithIndex((function(t,n){return e(n)}))};t.traverseArray=me;t.sequenceArray=t.traverseArray(_function.identity)}));function e(e){this.message=e}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var n=String(t).replace(/=+$/,"");if(n.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,o,i=0,a=0,u="";o=n.charAt(a++);~o&&(r=i%4?64*r+o:o,i++%4)?u+=String.fromCharCode(255&r>>(-2*i&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return u};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return r(t)}}function n(e){this.message=e}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";var __assign=undefined&&undefined.__assign||function(){__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign.apply(this,arguments)};var __spreadArrays=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};var mix=function(e,t,n){if(n===void 0){n=false}if(!e||!t||typeof e!=="object"||typeof t!=="object")return e;var r=__assign({},e);for(var o in t){if(t.hasOwnProperty(o)){if(t[o]instanceof Array&&e[o]instanceof Array){r[o]=n?__spreadArrays(e[o],t[o]):t[o]}else if(typeof t[o]==="object"&&typeof e[o]==="object"){r[o]=mix(e[o],t[o],n)}else{r[o]=t[o]}}}return r};var __spreadArrays$1=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};var config={defaults:{},errorType:null,polyfills:{fetch:null,FormData:null,URLSearchParams:null,performance:null,PerformanceObserver:null,AbortController:null},polyfill:function(e,t){var n=t===void 0?{}:t,r=n.doThrow,o=r===void 0?true:r,i=n.instance,a=i===void 0?false:i;var u=[];for(var s=2;s<arguments.length;s++){u[s-2]=arguments[s]}var c=this.polyfills[e]||(typeof self!=="undefined"?self[e]:null)||(typeof global!=="undefined"?global[e]:null);if(o&&!c)throw new Error(e+" is not defined");return a&&c?new(c.bind.apply(c,__spreadArrays$1([void 0],u))):c}};var onMatch=function(e,t,n,r){if(!e.getEntriesByName)return false;var o=e.getEntriesByName(t);if(o&&o.length>0){n(o.reverse()[0]);if(r.clearMeasures)r.clearMeasures(t);perfs.callbacks.delete(t);if(perfs.callbacks.size<1){perfs.observer.disconnect();if(r.clearResourceTimings){r.clearResourceTimings()}}return true}return false};var lazyObserver=function(e,t){if(!perfs.observer&&e&&t){perfs.observer=new t((function(t){perfs.callbacks.forEach((function(n,r){onMatch(t,r,n,e)}))}));if(e.clearResourceTimings)e.clearResourceTimings()}return perfs.observer};var perfs={callbacks:new Map,observer:null,observe:function(e,t){if(!e||!t)return;var n=config.polyfill("performance",{doThrow:false});var r=config.polyfill("PerformanceObserver",{doThrow:false});if(!lazyObserver(n,r))return;if(!onMatch(n,e,t,n)){if(perfs.callbacks.size<1)perfs.observer.observe({entryTypes:["resource","measure"]});perfs.callbacks.set(e,t)}}};var middlewareHelper=function(e){return function(t){return e.length===0?t:e.length===1?e[0](t):e.reduceRight((function(n,r,o){return o===e.length-2?r(n(t)):r(n)}))}};var WretchErrorWrapper=function(){function e(e){this.error=e}return e}();var resolver=function(e){var t=e._url,n=e._catchers,r=e._resolvers,o=e._middlewares,i=e._options;var a=new Map(n);var u=mix(config.defaults,i);var s=config.polyfill("AbortController",{doThrow:false,instance:true});if(!u["signal"]&&s){u["signal"]=s.signal}var c={ref:null,clear:function(){if(c.ref){clearTimeout(c.ref);c.ref=null}}};var f=middlewareHelper(o)(config.polyfill("fetch"))(t,u);var p=f.catch((function(e){throw new WretchErrorWrapper(e)})).then((function(e){c.clear();if(!e.ok){return e[config.errorType||"text"]().then((function(t){var n=new Error(t);n[config.errorType||"text"]=t;n["status"]=e.status;n["response"]=e;throw n}))}return e}));var l=function(t){return t.catch((function(t){c.clear();var n=t instanceof WretchErrorWrapper?t.error:t;if(t instanceof WretchErrorWrapper&&a.has("__fromFetch"))return a.get("__fromFetch")(n,e);else if(a.has(n.status))return a.get(n.status)(n,e);else if(a.has(n.name))return a.get(n.name)(n,e);else throw n}))};var d=function(e){return function(t){return e?l(p.then((function(t){return t&&t[e]()})).then((function(e){return t?t(e):e}))):l(p.then((function(e){return t?t(e):e})))}};var h={res:d(null),json:d("json"),blob:d("blob"),formData:d("formData"),arrayBuffer:d("arrayBuffer"),text:d("text"),perfs:function(e){f.then((function(t){return perfs.observe(t.url,e)}));return h},setTimeout:function(e,t){if(t===void 0){t=s}c.clear();c.ref=setTimeout((function(){return t.abort()}),e);return h},controller:function(){return[s,h]},error:function(e,t){a.set(e,t);return h},badRequest:function(e){return h.error(400,e)},unauthorized:function(e){return h.error(401,e)},forbidden:function(e){return h.error(403,e)},notFound:function(e){return h.error(404,e)},timeout:function(e){return h.error(408,e)},internalError:function(e){return h.error(500,e)},fetchError:function(e){return h.error("__fromFetch",e)},onAbort:function(e){return h.error("AbortError",e)}};return r.reduce((function(t,n){return n(t,e)}),h)};var __assign$1=undefined&&undefined.__assign||function(){__assign$1=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o))e[o]=t[o]}return e};return __assign$1.apply(this,arguments)};var __spreadArrays$2=undefined&&undefined.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),o=0,t=0;t<n;t++)for(var i=arguments[t],a=0,u=i.length;a<u;a++,o++)r[o]=i[a];return r};var JSON_MIME="application/json";var CONTENT_TYPE_HEADER="Content-Type";var Wretcher=function(){function e(e,t,n,r,o,i){if(n===void 0){n=new Map}if(r===void 0){r=[]}if(o===void 0){o=[]}if(i===void 0){i=[]}this._url=e;this._options=t;this._catchers=n;this._resolvers=r;this._middlewares=o;this._deferredChain=i}e.factory=function(t,n){if(t===void 0){t=""}if(n===void 0){n={}}return new e(t,n)};e.prototype.selfFactory=function(t){var n=t===void 0?{}:t,r=n.url,o=r===void 0?this._url:r,i=n.options,a=i===void 0?this._options:i,u=n.catchers,s=u===void 0?this._catchers:u,c=n.resolvers,f=c===void 0?this._resolvers:c,p=n.middlewares,l=p===void 0?this._middlewares:p,d=n.deferredChain,h=d===void 0?this._deferredChain:d;return new e(o,__assign$1({},a),new Map(s),__spreadArrays$2(f),__spreadArrays$2(l),__spreadArrays$2(h))};e.prototype.defaults=function(e,t){if(t===void 0){t=false}config.defaults=t?mix(config.defaults,e):e;return this};e.prototype.errorType=function(e){config.errorType=e;return this};e.prototype.polyfills=function(e){config.polyfills=__assign$1(__assign$1({},config.polyfills),e);return this};e.prototype.url=function(e,t){if(t===void 0){t=false}if(t)return this.selfFactory({url:e});var n=this._url.split("?");return this.selfFactory({url:n.length>1?n[0]+e+"?"+n[1]:this._url+e})};e.prototype.options=function(e,t){if(t===void 0){t=true}return this.selfFactory({options:t?mix(this._options,e):e})};e.prototype.query=function(e,t){if(t===void 0){t=false}return this.selfFactory({url:appendQueryParams(this._url,e,t)})};e.prototype.headers=function(e){return this.selfFactory({options:mix(this._options,{headers:e||{}})})};e.prototype.accept=function(e){return this.headers({Accept:e})};e.prototype.content=function(e){var t;return this.headers((t={},t[CONTENT_TYPE_HEADER]=e,t))};e.prototype.auth=function(e){return this.headers({Authorization:e})};e.prototype.catcher=function(e,t){var n=new Map(this._catchers);n.set(e,t);return this.selfFactory({catchers:n})};e.prototype.signal=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{signal:e.signal})})};e.prototype.resolve=function(e,t){if(t===void 0){t=false}return this.selfFactory({resolvers:t?[e]:__spreadArrays$2(this._resolvers,[e])})};e.prototype.defer=function(e,t){if(t===void 0){t=false}return this.selfFactory({deferredChain:t?[e]:__spreadArrays$2(this._deferredChain,[e])})};e.prototype.middlewares=function(e,t){if(t===void 0){t=false}return this.selfFactory({middlewares:t?e:__spreadArrays$2(this._middlewares,e)})};e.prototype.method=function(e,t,n){if(t===void 0){t={}}if(n===void 0){n=null}var r=this._options.headers;var o=!n?this:typeof n==="object"&&(!r||Object.entries(r).every((function(e){var t=e[0],n=e[1];return t.toLowerCase()!==CONTENT_TYPE_HEADER.toLowerCase()||n.startsWith(JSON_MIME)})))?this.json(n):this.body(n);o=o.options(__assign$1(__assign$1({},t),{method:e}));var i=o._deferredChain.reduce((function(e,t){return t(e,e._url,e._options)}),o);return resolver(i)};e.prototype.get=function(e){return this.method("GET",e)};e.prototype.delete=function(e){return this.method("DELETE",e)};e.prototype.put=function(e,t){return this.method("PUT",t,e)};e.prototype.post=function(e,t){return this.method("POST",t,e)};e.prototype.patch=function(e,t){return this.method("PATCH",t,e)};e.prototype.head=function(e){return this.method("HEAD",e)};e.prototype.opts=function(e){return this.method("OPTIONS",e)};e.prototype.replay=function(e){return this.method(this._options.method,e)};e.prototype.body=function(e){return this.selfFactory({options:__assign$1(__assign$1({},this._options),{body:e})})};e.prototype.json=function(e){var t;var n=(t=Object.entries(this._options.headers||{}).find((function(e){var t=e[0],n=e[1];return t.toLowerCase()===CONTENT_TYPE_HEADER.toLowerCase()&&n.startsWith(JSON_MIME)})))===null||t===void 0?void 0:t[1];return this.content(n||JSON_MIME).body(JSON.stringify(e))};e.prototype.formData=function(e,t){if(t===void 0){t=false}return this.body(convertFormData(e,t))};e.prototype.formUrl=function(e){return this.body(typeof e==="string"?e:convertFormUrl(e)).content("application/x-www-form-urlencoded")};return e}();var appendQueryParams=function(e,t,n){var r;if(typeof t==="string"){r=t}else{var o=config.polyfill("URLSearchParams",{instance:true});for(var i in t){if(t[i]instanceof Array){for(var a=0,u=t[i];a<u.length;a++){var s=u[a];o.append(i,s)}}else{o.append(i,t[i])}}r=o.toString()}var c=e.split("?");if(n||c.length<2)return c[0]+"?"+r;return e+"&"+r};function convertFormData(e,t,n,r){if(t===void 0){t=false}if(n===void 0){n=config.polyfill("FormData",{instance:true})}if(r===void 0){r=[]}Object.entries(e).forEach((function(e){var o=e[0],i=e[1];var a=r.reduce((function(e,t){return e?e+"["+t+"]":t}),null);a=a?a+"["+o+"]":o;if(i instanceof Array){for(var u=0,s=i;u<s.length;u++){var c=s[u];n.append(a+"[]",c)}}else if(t&&typeof i==="object"&&(!(t instanceof Array)||!t.includes(o))){if(i!==null){convertFormData(i,t,n,__spreadArrays$2(r,[o]))}}else{n.append(a,i)}}));return n}function encodeQueryValue(e,t){return encodeURIComponent(e)+"="+encodeURIComponent(typeof t==="object"?JSON.stringify(t):""+t)}function convertFormUrl(e){return Object.keys(e).map((function(t){var n=e[t];if(n instanceof Array){return n.map((function(e){return encodeQueryValue(t,e)})).join("&")}return encodeQueryValue(t,n)})).join("&")}var factory=Wretcher.factory;factory["default"]=Wretcher.factory;function buildBackendApiClient(){var e=superSelectionAppService.jwt;var t=superSelectionAppService.profileId;var n=superSelectionAppService.accountIdOrDefault;var r=superSelectionAppService.partnerIdOrDefault;return factory(superSelectionAppService.apiBaseUrl).headers({Authorization:"Bearer "+e,"X-PROFILE-ID":t,"X-PARTNER-ID":r,"X-ACCOUNT-ID":n})}var slate={fundId:"slate",usi:"32367272075001"};function hydratePromotedFundChoiceDtoKind(e){if("slate"in e){e.kind="slate"}else if("australianRetirementTrust"in e){e.kind="australianRetirementTrust"}else if("aware"in e){e.kind="aware"}else if("active"in e){e.kind="active"}else if("australianEthical"in e){e.kind="australianEthical"}else if("virgin"in e){e.kind="virgin"}else if("spirit"in e){e.kind="spirit"}else if("firstSuper"in e){e.kind="firstSuper"}else if("mercerMyChoice"in e){e.kind="mercerMyChoice"}else if("generic"in e){e.kind="generic"}}function getPromotedFundUsi(e){switch(e.kind){case"slate":return slate.usi;case"australianRetirementTrust":return e.australianRetirementTrust.usi;case"aware":return e.aware.usi;case"active":return e.active.usi;case"australianEthical":return e.australianEthical.usi;case"virgin":return e.virgin.usi;case"spirit":return e.spirit.usi;case"firstSuper":return e.firstSuper.usi;case"mercerMyChoice":return e.mercerMyChoice.usi;case"generic":return e.generic.usi;default:return""}}function getPromotedFundId(e){switch(e.kind){case"slate":return slate.fundId;case"australianRetirementTrust":return"australian-retirement-trust";case"aware":return"aware";case"active":return"active";case"australianEthical":return"australian-ethical";case"virgin":return"virgin";case"spirit":return"spirit";case"firstSuper":return"first-super";case"mercerMyChoice":return"mercermychoice";case"generic":return e.generic.fundId;default:return""}}function getSuperChoiceUsi(e){switch(e.kind){case"Promoted":return some(getPromotedFundUsi(e.promoted));case"MyOwnFund":return some(e.myOwnFund.usi);case"SMSF":return none;case"Default":return some(e.default.usi);case"PromotedDefault":return some(e.promotedDefault.usi);case"DefinedBenefits":return some(e.definedBenefits.usi);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.usi);default:return none}}function getPromotedFundMemberNumber(e){switch(e.kind){case"slate":return e.slate.memberNumber;case"australianRetirementTrust":return e.australianRetirementTrust.memberNumber;case"aware":return e.aware.memberNumber;case"active":return e.active.memberNumber;case"australianEthical":return e.australianEthical.memberNumber;case"virgin":return e.virgin.memberNumber;case"spirit":return e.spirit.memberNumber;case"firstSuper":return e.firstSuper.memberNumber;case"mercerMyChoice":return e.mercerMyChoice.memberNumber;case"generic":return e.generic.memberNumber;default:return""}}function getSuperChoiceMemberNumber(e){switch(e.kind){case"Promoted":return some(getPromotedFundMemberNumber(e.promoted));case"MyOwnFund":return some(e.myOwnFund.memberNumber);case"DefinedBenefits":return some(e.definedBenefits.memberNumber);case"PromotedDefaultWithJoin":return some(e.promotedDefaultWithJoin.memberNumber);case"SMSF":case"Default":case"PromotedDefault":return none;default:return none}}function hydrateSuperChoiceDetailsDtoKind(e){if("promoted"in e){e.kind="Promoted"}else if("myOwnFund"in e){e.kind="MyOwnFund"}else if("smsf"in e){e.kind="SMSF"}else if("default"in e){e.kind="Default"}else if("promotedDefault"in e){e.kind="PromotedDefault"}else if("definedBenefits"in e){e.kind="DefinedBenefits"}else if("promotedDefaultWithJoin"in e){e.kind="PromotedDefaultWithJoin"}}var SuperSelectionApi=function(){function e(){}e.prototype.getAustralianFundsAsync=function(e,t){if(t===void 0){t=false}return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,buildBackendApiClient().url("super-choice/australian-funds-v2?"+this.toQueryString(t,e)).get().notFound((function(){throw new Error("Failed to fetch the list of australian super funds.")})).json()]}))}))};e.prototype.getAustralianFundAsync=function(e,t){return __awaiter(this,void 0,void 0,(function(){var n;return __generator(this,(function(r){n=t?"?includeInactive=true":"";return[2,buildBackendApiClient().url("super-choice/australian-funds/"+e+n).get().notFound((function(){throw new Error("Failed to fetch australian super fund.")})).json()]}))}))};e.prototype.getAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("client-app-state").get().notFound((function(){throw new Error("Failed to fetch application configuration.")})).json()];case 1:t=n.sent();if((e=t.superBuyer.superChoice)===null||e===void 0?void 0:e.choiceDetails){hydrateSuperChoiceDetailsDtoKind(t.superBuyer.superChoice.choiceDetails);switch(t.superBuyer.superChoice.choiceDetails.kind){case"Promoted":hydratePromotedFundChoiceDtoKind(t.superBuyer.superChoice.choiceDetails.promoted);break}}return[2,t]}}))}))};e.prototype.clickPromotedTileAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("click-promoted-tile").post(e).res()]}))}))};e.prototype.viewSuperFundPanelAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("view-super-fund-panel").post(e).res()]}))}))};e.prototype.toSearchFilterQueryString=function(e){return"search="+e.searchString+(e.maxRecordCount>0?"&maxRecordCount="+e.maxRecordCount:"")};e.prototype.toQueryString=function(e,t){var n=this.toSearchFilterQueryString(t);var r=e?"includeInactive=true":"";var o=function(e){return e&&e.length};return[n,r].filter(o).join("&")};return e}();var superSelectionApi=new SuperSelectionApi;var SuperCampaignComponentStatus;(function(e){e[e["NotLoaded"]=1]="NotLoaded";e[e["Loaded"]=2]="Loaded";e[e["NotWorking"]=3]="NotWorking"})(SuperCampaignComponentStatus||(SuperCampaignComponentStatus={}));var SuperCampaignState=function(){function e(){this._promotedFundsShown=[]}Object.defineProperty(e.prototype,"PromotedFundIds",{get:function(){return this._promotedFundsShown.map((function(e){return e.fundId}))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsShown",{set:function(e){this._promotedFundsShown=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"DefaultFundPosition",{get:function(){var e=this._promotedFundsShown.findIndex((function(e){return e.fundType==="promoted-default"}));if(e===-1)return undefined;return e+1},enumerable:false,configurable:true});return e}();var initialState={apiBaseUrl:Option.none,appBaseUrl:Option.none,profileId:Option.none,jwt:Option.none,superBuyer:Option.none,superChoicePrefill:Option.none,promotedFunds:Option.none,accountConfiguration:Option.none,profileConfiguration:Option.none,hasSuccessPageBeenAcknowledged:false,hasSuperSelectionBeenSubmitted:false,isDefinedBenefitsEligible:Option.none,superCampaignEnabled:true,superCampaignState:undefined,superCampaignComponentStatus:SuperCampaignComponentStatus.NotLoaded,hideFooterSection:false,bringYourOwnFundCustomStepEnabled:false,smsfCustomStepEnabled:false,featuredFundsEnabled:false,defaultFundNewComponentEnabled:false,promotedFundNewComponentEnabled:false};var SuperSelectionAppService=function(){function e(){var e=this;var t=createStore(initialState),n=t.state,r=t.onChange;this._state=n;this._onChange=r;r("jwt",(function(t){e._state.profileId=_function.pipe(t,Option.chain((function(e){return Option.fromNullable(o(e).sub)})))}))}Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superBuyer",{get:function(){if(Option.isNone(this._state.superBuyer)){throw Error("User information is not set")}return this._state.superBuyer.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"apiBaseUrl",{get:function(){if(Option.isNone(this._state.apiBaseUrl)){throw Error("API base URL is not set")}return this._state.apiBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){if(Option.isNone(this._state.appBaseUrl)){throw Error("App base URL is not set")}return this._state.appBaseUrl.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFunds",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return this.superCampaignState.PromotedFundIds}if(Option.isNone(this._state.promotedFunds)){throw Error("Promoted Funds is not set")}return this._state.promotedFunds.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedDefaultFundPosition",{get:function(){if(this.state.superCampaignEnabled&&this.superCampaignState!==undefined){return Option.fromNullable(this.superCampaignState.DefaultFundPosition)}return Option.none},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"promotedFundsConfig",{get:function(){return{shownFunds:this.promotedFunds,promotedDefaultFundPosition:Option.toUndefined(this.promotedDefaultFundPosition),promotedFundsConfigSource:this.isUsingSuperCampaign?"superCampaign":"superSelection"}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"profileId",{get:function(){if(Option.isNone(this._state.profileId)){throw Error("Failed to get Profile ID from JWT")}return this._state.profileId.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"defaultFundUsi",{get:function(){var e=_function.pipe(this._state.profileConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten);if(Option.isSome(e)){return e}return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return Option.fromNullable(e.defaultFundUsi)})),Option.flatten)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"accountIdOrDefault",{get:function(){return _function.pipe(this._state.accountConfiguration,Option.map((function(e){return e.accountId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"partnerIdOrDefault",{get:function(){return _function.pipe(this._state.superBuyer,Option.map((function(e){return e.partnerId})),Option.getOrElse((function(){return""})))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"jwt",{get:function(){if(Option.isNone(this._state.jwt)){throw Error("No authentication information was found")}return this._state.jwt.value},enumerable:false,configurable:true});e.prototype.completeSuperSelectionFlow=function(){this._state.hasSuccessPageBeenAcknowledged=true};e.prototype.markSuperSelectionAsSubmitted=function(){this._state.hasSuperSelectionBeenSubmitted=true};Object.defineProperty(e.prototype,"isDefinedBenefitsEligible",{get:function(){return this._state.isDefinedBenefitsEligible},enumerable:false,configurable:true});e.prototype.loadAppStateAsync=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,superSelectionApi.getAppStateAsync()];case 1:e=t.sent();this._state.accountConfiguration=Option.fromNullable(e.accountConfiguration);this._state.profileConfiguration=Option.fromNullable(e.profileConfiguration);this._state.superBuyer=Option.fromNullable(e.superBuyer);this._state.promotedFunds=Option.fromNullable(e.promotedFunds);this._state.bringYourOwnFundCustomStepEnabled=e.bringYourOwnFundCustomStepEnabled;this._state.smsfCustomStepEnabled=e.smsfCustomStepEnabled;this._state.featuredFundsEnabled=e.featuredFundsEnabled;this._state.defaultFundNewComponentEnabled=e.defaultFundNewComponentEnabled;this._state.promotedFundNewComponentEnabled=e.promotedFundNewComponentEnabled;this._state.superChoicePrefill=Option.fromNullable(e.prefill);this._state.isDefinedBenefitsEligible=Option.fromNullable(e.isDefinedBenefitsEligible);if(Option.isSome(this._state.accountConfiguration)){if(this._state.accountConfiguration.value.featureSet.type==="basic"){this._state.superCampaignEnabled=false}}return[2]}}))}))};e.prototype.setSuperCampaignPromotedFundsShown=function(e){if(this._state.superCampaignState!==undefined)this._state.superCampaignState.promotedFundsShown=e;else throw new Error("Cannot set shown funds for SuperCampaing state because it is undefined")};e.prototype.viewSuperFundPanelAsync=function(e,t){return superSelectionApi.viewSuperFundPanelAsync(Object.assign(Object.assign({},this.promotedFundsConfig),{shownFunds:t?t:this.promotedFundsConfig.shownFunds,placementId:e}))};Object.defineProperty(e.prototype,"superCampaignState",{get:function(){return this._state.superCampaignState},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignComponentStatus",{get:function(){return this._state.superCampaignComponentStatus},set:function(e){if(e===SuperCampaignComponentStatus.Loaded){this._state.superCampaignComponentStatus=SuperCampaignComponentStatus.Loaded;this._state.superCampaignState=new SuperCampaignState}else{this._state.superCampaignComponentStatus=e;this._state.superCampaignState=undefined}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isUsingSuperCampaign",{get:function(){return this.state.superCampaignEnabled&&this.superCampaignState!==undefined},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isBringYourOwnFundCustomStepEnabled",{get:function(){return this.state.bringYourOwnFundCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isSmsfCustomStepEnabled",{get:function(){return this.state.smsfCustomStepEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFeaturedFundsEnabled",{get:function(){return this.state.featuredFundsEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isDefaultFundNewComponentEnabled",{get:function(){return this.state.defaultFundNewComponentEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isPromotedFundNewComponentEnabled",{get:function(){return this.state.promotedFundNewComponentEnabled},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"superCampaignCanNotBeActivated",{get:function(){return!this.state.superCampaignEnabled||this.superCampaignComponentStatus===SuperCampaignComponentStatus.NotWorking},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"hideFooterSection",{get:function(){return this._state.hideFooterSection},set:function(e){this._state.hideFooterSection=e},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"backendUrl",{get:function(){return Option.map(this.getBaseUrl)(this.state.apiBaseUrl)},enumerable:false,configurable:true});e.prototype.getBaseUrl=function(e){var t=new URL(e);return t.protocol+"//"+t.hostname+(t.port.length>0?":"+t.port:"")};return e}();var superSelectionAppService=new SuperSelectionAppService;export{Option as O,SuperCampaignComponentStatus as S,superSelectionAppService as a,isNone as b,buildBackendApiClient as c,getSuperChoiceUsi as d,getSuperChoiceMemberNumber as e,superSelectionApi as f,getPromotedFundId as g,slate as h,isSome as i,factory as j,fromNullable as k,createStore as l,none as n,some as s,toUndefined as t};
@@ -0,0 +1,41 @@
1
+ export declare type Sender = 'super-promoted-fund';
2
+ export declare type PromotedFundCommonEventPayload = {
3
+ sender: Sender;
4
+ };
5
+ export declare type PromotedFundCancelledEvent = PromotedFundCommonEventPayload & {
6
+ type: 'promoted-fund-cancelled';
7
+ };
8
+ export declare type PromotedFundType = 'Promoted' | 'PromotedDefault' | 'PromotedDefaultWithJoin';
9
+ export declare type PromotedFundCompletedEvent = PromotedFundCommonEventPayload & {
10
+ type: 'promoted-fund-completed';
11
+ fundType: PromotedFundType;
12
+ fundId: string;
13
+ fundUsi: string;
14
+ fundName: string;
15
+ memberNumber?: string;
16
+ memberFirstName?: string;
17
+ memberFamilyName?: string;
18
+ sourceOfJoin?: string;
19
+ isDefaultExclusive?: boolean;
20
+ };
21
+ export declare type PromotedFundLoadedEvent = PromotedFundCommonEventPayload & {
22
+ type: 'promoted-fund-loaded';
23
+ };
24
+ export declare type SuperCampaignLoadFailedEvent = {
25
+ sender: Sender;
26
+ type: 'super-campaign-load-failed';
27
+ reason: string;
28
+ };
29
+ export declare type SuperCampaignFailedEvent = {
30
+ sender: Sender;
31
+ type: 'super-campaign-failed';
32
+ reason: string;
33
+ };
34
+ export declare type EventPayload = PromotedFundCancelledEvent | PromotedFundCompletedEvent | PromotedFundLoadedEvent | SuperCampaignLoadFailedEvent | SuperCampaignFailedEvent;
35
+ export declare type EventType = EventPayload['type'];
36
+ export declare type EventHandlers = {
37
+ [k in EventType]: (event: CustomEvent<Extract<EventPayload, {
38
+ type: k;
39
+ }>>) => Promise<void>;
40
+ };
41
+ export declare const LoadWaitingTimeout = 30000;
@@ -0,0 +1,23 @@
1
+ import { RouterHistory } from '@stencil/router';
2
+ export declare class SuperPromotedFundHost {
3
+ history: RouterHistory;
4
+ private backendUrl;
5
+ private accessToken;
6
+ private readonly promotedFundEventHandlers;
7
+ private loadingTimeoutRef;
8
+ constructor();
9
+ componentWillLoad(): Promise<void>;
10
+ disconnectedCallback(): void;
11
+ render(): Element[];
12
+ private subscribeToSuperPromotedFundEvents;
13
+ private unSubscribeFromSuperPromotedFundEvents;
14
+ private promotedFundLoaded;
15
+ private promotedFundCompleted;
16
+ private buildFundDetails;
17
+ private buildHandleSubmitFn;
18
+ private promotedFundCancelled;
19
+ private superCampaignLoadFailed;
20
+ private superCampaignFailed;
21
+ private activateFallbackMechanism;
22
+ private promotedFundLoadingTimeoutTriggered;
23
+ }
@@ -222,6 +222,7 @@ export declare type AppStateDto = {
222
222
  smsfCustomStepEnabled: boolean;
223
223
  featuredFundsEnabled: boolean;
224
224
  defaultFundNewComponentEnabled: boolean;
225
+ promotedFundNewComponentEnabled: boolean;
225
226
  isDefinedBenefitsEligible: boolean | null;
226
227
  prefill: SuperChoicePrefillDto | null;
227
228
  };
@@ -0,0 +1,5 @@
1
+ import { RouterHistory } from '@stencil/router';
2
+ export declare class PromotedFundRouter {
3
+ history: RouterHistory;
4
+ render(): Element[];
5
+ }
@@ -34,6 +34,7 @@ export declare class SuperSelectionAppService {
34
34
  get isSmsfCustomStepEnabled(): boolean;
35
35
  get isFeaturedFundsEnabled(): boolean;
36
36
  get isDefaultFundNewComponentEnabled(): boolean;
37
+ get isPromotedFundNewComponentEnabled(): boolean;
37
38
  get superCampaignCanNotBeActivated(): boolean;
38
39
  get hideFooterSection(): boolean;
39
40
  set hideFooterSection(value: boolean);
@@ -24,6 +24,7 @@ export declare type AppContextState = {
24
24
  smsfCustomStepEnabled: boolean;
25
25
  featuredFundsEnabled: boolean;
26
26
  defaultFundNewComponentEnabled: boolean;
27
+ promotedFundNewComponentEnabled: boolean;
27
28
  superCampaignState: SuperCampaignState | undefined;
28
29
  superCampaignComponentStatus: SuperCampaignComponentStatus;
29
30
  hideFooterSection: boolean;
@@ -100,6 +100,12 @@ export namespace Components {
100
100
  interface SssPrefillWarningBox {
101
101
  "notificationList": string[];
102
102
  }
103
+ interface SssPromotedFundHost {
104
+ "history": RouterHistory;
105
+ }
106
+ interface SssPromotedFundRouter {
107
+ "history": RouterHistory;
108
+ }
103
109
  interface SssSmsfEngagementStepHost {
104
110
  "history": RouterHistory;
105
111
  }
@@ -265,6 +271,18 @@ declare global {
265
271
  prototype: HTMLSssPrefillWarningBoxElement;
266
272
  new (): HTMLSssPrefillWarningBoxElement;
267
273
  };
274
+ interface HTMLSssPromotedFundHostElement extends Components.SssPromotedFundHost, HTMLStencilElement {
275
+ }
276
+ var HTMLSssPromotedFundHostElement: {
277
+ prototype: HTMLSssPromotedFundHostElement;
278
+ new (): HTMLSssPromotedFundHostElement;
279
+ };
280
+ interface HTMLSssPromotedFundRouterElement extends Components.SssPromotedFundRouter, HTMLStencilElement {
281
+ }
282
+ var HTMLSssPromotedFundRouterElement: {
283
+ prototype: HTMLSssPromotedFundRouterElement;
284
+ new (): HTMLSssPromotedFundRouterElement;
285
+ };
268
286
  interface HTMLSssSmsfEngagementStepHostElement extends Components.SssSmsfEngagementStepHost, HTMLStencilElement {
269
287
  }
270
288
  var HTMLSssSmsfEngagementStepHostElement: {
@@ -342,6 +360,8 @@ declare global {
342
360
  "sss-prefill-my-own-fund": HTMLSssPrefillMyOwnFundElement;
343
361
  "sss-prefill-smsf": HTMLSssPrefillSmsfElement;
344
362
  "sss-prefill-warning-box": HTMLSssPrefillWarningBoxElement;
363
+ "sss-promoted-fund-host": HTMLSssPromotedFundHostElement;
364
+ "sss-promoted-fund-router": HTMLSssPromotedFundRouterElement;
345
365
  "sss-smsf-engagement-step-host": HTMLSssSmsfEngagementStepHostElement;
346
366
  "sss-standard-choice-form": HTMLSssStandardChoiceFormElement;
347
367
  "sss-success": HTMLSssSuccessElement;
@@ -444,6 +464,12 @@ declare namespace LocalJSX {
444
464
  interface SssPrefillWarningBox {
445
465
  "notificationList"?: string[];
446
466
  }
467
+ interface SssPromotedFundHost {
468
+ "history"?: RouterHistory;
469
+ }
470
+ interface SssPromotedFundRouter {
471
+ "history"?: RouterHistory;
472
+ }
447
473
  interface SssSmsfEngagementStepHost {
448
474
  "history"?: RouterHistory;
449
475
  }
@@ -501,6 +527,8 @@ declare namespace LocalJSX {
501
527
  "sss-prefill-my-own-fund": SssPrefillMyOwnFund;
502
528
  "sss-prefill-smsf": SssPrefillSmsf;
503
529
  "sss-prefill-warning-box": SssPrefillWarningBox;
530
+ "sss-promoted-fund-host": SssPromotedFundHost;
531
+ "sss-promoted-fund-router": SssPromotedFundRouter;
504
532
  "sss-smsf-engagement-step-host": SssSmsfEngagementStepHost;
505
533
  "sss-standard-choice-form": SssStandardChoiceForm;
506
534
  "sss-success": SssSuccess;
@@ -538,6 +566,8 @@ declare module "@stencil/core" {
538
566
  "sss-prefill-my-own-fund": LocalJSX.SssPrefillMyOwnFund & JSXBase.HTMLAttributes<HTMLSssPrefillMyOwnFundElement>;
539
567
  "sss-prefill-smsf": LocalJSX.SssPrefillSmsf & JSXBase.HTMLAttributes<HTMLSssPrefillSmsfElement>;
540
568
  "sss-prefill-warning-box": LocalJSX.SssPrefillWarningBox & JSXBase.HTMLAttributes<HTMLSssPrefillWarningBoxElement>;
569
+ "sss-promoted-fund-host": LocalJSX.SssPromotedFundHost & JSXBase.HTMLAttributes<HTMLSssPromotedFundHostElement>;
570
+ "sss-promoted-fund-router": LocalJSX.SssPromotedFundRouter & JSXBase.HTMLAttributes<HTMLSssPromotedFundRouterElement>;
541
571
  "sss-smsf-engagement-step-host": LocalJSX.SssSmsfEngagementStepHost & JSXBase.HTMLAttributes<HTMLSssSmsfEngagementStepHostElement>;
542
572
  "sss-standard-choice-form": LocalJSX.SssStandardChoiceForm & JSXBase.HTMLAttributes<HTMLSssStandardChoiceFormElement>;
543
573
  "sss-success": LocalJSX.SssSuccess & JSXBase.HTMLAttributes<HTMLSssSuccessElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flarehr/apollo-super-selection",
3
- "version": "5.87.56845",
3
+ "version": "5.88.58802",
4
4
  "description": "Apollo Super Selection",
5
5
  "main": "dist/lib/index.cjs.js",
6
6
  "module": "dist/lib/index.js",
@@ -1 +0,0 @@
1
- System.register(["./p-71ca4cf8.system.js","./p-9cd765f5.system.js","./p-97188c78.system.js","./p-524b1ff5.system.js"],(function(t){"use strict";var n,s,e,u,r;return{setters:[function(t){n=t.r;s=t.h;e=t.H},function(t){u=t.a},function(){},function(t){r=t.i}],execute:function(){var f=t("sss_default_fund_router",function(){function t(t){n(this,t)}t.prototype.render=function(){if(u.isDefaultFundNewComponentEnabled){return s(e,null,s("sss-default-fund-host",null))}return s(e,null,s("sss-default-fund",{history:this.history}))};return t}());r(f)}}}));
@@ -1 +0,0 @@
1
- import{h as e}from"./p-db0bded8.js";import{l as n,a as t,c as s}from"./p-f8bb280b.js";function r(e,n){void 0===n&&(n="*"),e.sender="flare",window.parent.postMessage(e,n)}const u={appReady:function(){r({type:"appReady"})},resize:function(e,n){r({type:"contentResized",height:e,width:n})},navigation:function(e){r({type:"pageNavigated",url:e})},complete:function(){r({type:"complete"})},submitSuccess:function(){r({type:"submitSuccess"})}},{state:i}=n({handleSubmitFn:async function(){},fundName:"",fundDetails:{type:"null"},promotedFundId:void 0});var c;!function(e){e.ExistingChoicePage="/existing",e.SuperCampaign="/super-campaign",e.ChoicePage="/",e.MyOwnFund="/super-choice/my-own-fund/",e.MyOwnFundEngagementStep="/super-choice/my-own-fund-engagement/",e.SmsfEngagementStep="/super-choice/smsf-engagement/",e.Prefill="/super-choice/prefill/",e.PrefillInvalidMyOwnFundPage="/super-choice/sss-prefill-invalid-my-own-fund/",e.PrefillMyOwnFundPage="/super-choice/prefill-my-own-fund/",e.PrefillSMSFPage="/super-choice/prefill-smsf/",e.PrefillInvalidSMSFPage="/super-choice/prefill-invalid-smsf/",e.SelfManagedFund="/super-choice/smsf/",e.DefaultFund="/super-choice/default/",e.FeaturedFunds="/super-choice/featured-funds/",e.StandardChoice="/standard-choice/",e.Success="/success/"}(c||(c={}));const a=[e("stencil-route",{url:c.ExistingChoicePage,component:"sss-existing-choice-page"}),e("stencil-route",{url:c.SuperCampaign,component:"sss-super-campaign-host"}),e("stencil-route",{exact:!0,url:c.ChoicePage,component:"sss-choice-router"}),e("stencil-route",{url:c.MyOwnFund,component:"sss-super-byof-host"}),e("stencil-route",{url:c.MyOwnFundEngagementStep,component:"sss-my-own-fund-engagement-step-host"}),e("stencil-route",{url:c.SmsfEngagementStep,component:"sss-smsf-engagement-step-host"}),e("stencil-route",{url:c.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),e("stencil-route",{url:c.Prefill,component:"sss-prefill"}),e("stencil-route",{url:c.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),e("stencil-route",{url:c.PrefillSMSFPage,component:"sss-prefill-smsf"}),e("stencil-route",{url:c.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),e("stencil-route",{url:c.SelfManagedFund,component:"sss-super-smsf-host"}),e("stencil-route",{url:c.DefaultFund,component:"sss-default-fund-router"}),e("stencil-route",{url:c.FeaturedFunds,component:"sss-super-campaign-featured-funds"}),e("stencil-route",{url:c.StandardChoice,component:"sss-standard-choice-form"}),e("stencil-route",{url:c.Success,component:"sss-success"})],o=new class{navigateInternally(e,n){const t=`${this.appBaseUrl}${this.toRouteWithLeadingSlash(n)}`;u.navigation(t),e.push(t)}navigateInternallyToStandardChoice(e){i.handleSubmitFn=e.handleSubmitFn,i.fundName=e.fundName,i.fundDetails=e.fundDetails,i.promotedFundId=e.promotedFundId,this.navigateInternally(e.history,c.StandardChoice)}toExternalUrl(e){const n=new URL(e);return n.searchParams.append("_extnav","true"),n.href}get appBaseUrl(){return t.appBaseUrl.replace(/\/$/,"")}toRouteWithLeadingSlash(e){return e.length>0&&"/"===e[0]?e:"/"+e}},d=new class{async submitDefaultFundChoiceAsync(e){return s().url("super-choice/default").post(e).badRequest((()=>{throw new Error("Failed to process default fund join request")})).text()}async submitCustomFundChoiceAsync(e){return s().url("super-choice/custom-fund").post(e).badRequest((()=>{throw new Error("Failed to process custom fund join request")})).text()}async submitSelfManagedFundChoiceAsync(e){return s().url("super-choice/smsf").post(e).badRequest((()=>{throw new Error("Failed to process SMSF choice request")})).text()}async submitDefinedBenefitsChoiceAsync(e){return s().url("super-choice/defined-benefits").post(e).badRequest((()=>{throw new Error("Failed to process Defined Benefits choice request")})).text()}async validateAbnForSMSF(e){return(await s().url(`super-choice/smsf/${e}/validate`).get().badRequest((()=>{throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()).result}};class p{static get Instance(){return this.instance||(this.instance=new this)}async PostAnalyticsEventAsync(e){return s().url("analytics-events").post(e).res()}}class l{constructor(){this.eventTrackingApi=p.Instance}static get Instance(){return this.instance||(this.instance=new this)}async TrackSuperFundPdsViewedAsync(e){return this.trackEventAsync({SuperFundPdsViewed:e})}async TrackPromotedSuperFundDetailViewedAsync(e){return this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:e}})}async TrackPromotedDefaultSuperFundDetailViewedAsync(e){return this.trackEventAsync({SuperFundDetailViewed:{PromotedDefaultFund:e}})}async TrackMyOwnSuperFundDetailViewedAsync(e){return this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:e}})}async TrackSmsfSuperFundDetailViewedAsync(e){return this.trackEventAsync({SuperFundDetailViewed:{Smsf:e}})}async TrackDefaultSuperFundDetailViewedAsync(e){return this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:e}})}async TrackSuperFundNominationViewedAsync(e){return this.trackEventAsync({SuperFundNominationViewed:e})}async TrackSuperFundNominationDeclinedAsync(e){return this.trackEventAsync({SuperFundNominationDeclined:e})}async TrackSuperFundDisclaimerViewedAsync(e){return this.trackEventAsync({SuperFundDisclaimerViewed:e})}async TrackSuperFundDisclaimerAcceptedAsync(e){return this.trackEventAsync({SuperFundDisclaimerAccepted:e})}async TrackSuperFundPrefillViewedAsync(e){return this.trackEventAsync({SuperFundPrefillViewed:e})}async TrackSuperFundPrefillDeclinedAsync(e){return this.trackEventAsync({SuperFundPrefillDeclined:e})}async TrackSuperFundDetailChangeRequestedAsync(e){return this.trackEventAsync({SuperFundDetailChangeRequested:e})}async TrackSuperCampaignActivationSucceededAsync(e){return this.trackEventAsync({SuperCampaignActivationSucceeded:e})}async TrackSuperMyOwnFundEngagementStepActivationSucceeded(e){return this.trackEventAsync({SuperMyOwnFundEngagementStepActivationSucceeded:{fundUsi:e}})}async TrackSuperMyOwnFundEngagementStepContinued(e,n){return this.trackEventAsync({SuperMyOwnFundEngagementStepContinued:{fundUsi:e,reason:n}})}async TrackSuperSmsfEngagementStepActivationSucceeded(){return this.trackEventAsync({SuperSmsfEngagementStepActivationSucceeded:{}})}async TrackSuperSmsfEngagementStepContinued(e){return this.trackEventAsync({SuperSmsfEngagementStepContinued:{reason:e}})}async trackEventAsync(e){try{await this.eventTrackingApi.PostAnalyticsEventAsync({event:e})}catch(e){return}}}export{l as E,c as S,a,d as c,u as i,o as n,i as s}
@@ -1 +0,0 @@
1
- import{r as s,h as r,H as t}from"./p-db0bded8.js";import{a as o}from"./p-f8bb280b.js";import"./p-fdadb647.js";import{i as d}from"./p-d5c7a35f.js";const a=class{constructor(r){s(this,r)}render(){return r(t,null,o.isDefaultFundNewComponentEnabled?r("sss-default-fund-host",null):r("sss-default-fund",{history:this.history}))}};d(a);export{a as sss_default_fund_router}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,u){function o(e){try{c(r.next(e))}catch(e){u(e)}}function s(e){try{c(r["throw"](e))}catch(e){u(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(u=o[0]&2?i["return"]:o[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,o[1])).done)return u;if(i=0,u)o=[o[0]&2,u.value];switch(o[0]){case 0:case 1:u=o;break;case 4:n.label++;return{value:o[1],done:false};case 5:n.label++;i=o[1];o=[0];continue;case 7:o=n.ops.pop();n.trys.pop();continue;default:if(!(u=n.trys,u=u.length>0&&u[u.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!u||o[1]>u[0]&&o[1]<u[3])){n.label=o[1];break}if(o[0]===6&&n.label<u[1]){n.label=u[1];u=o;break}if(u&&n.label<u[2]){n.label=u[2];n.ops.push(o);break}if(u[2])n.ops.pop();n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e];i=0}finally{r=u=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-71ca4cf8.system.js","./p-9cd765f5.system.js"],(function(e){"use strict";var t,n,r,i;return{setters:[function(e){t=e.h},function(e){n=e.l;r=e.a;i=e.c}],execute:function(){e("S",void 0);function u(){o({type:"appReady"})}function o(e,t){if(t===undefined)t="*";e.sender="flare";window.parent.postMessage(e,t)}function s(e,t){o({type:"contentResized",height:e,width:t})}function c(e){o({type:"pageNavigated",url:e})}function a(){o({type:"complete"})}function d(){o({type:"submitSuccess"})}var f=e("i",{appReady:u,resize:s,navigation:c,complete:a,submitSuccess:d});var p={handleSubmitFn:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))},fundName:"",fundDetails:{type:"null"},promotedFundId:undefined};var l=n(p).state;e("s",l);var h;(function(e){e["ExistingChoicePage"]="/existing";e["SuperCampaign"]="/super-campaign";e["ChoicePage"]="/";e["MyOwnFund"]="/super-choice/my-own-fund/";e["MyOwnFundEngagementStep"]="/super-choice/my-own-fund-engagement/";e["SmsfEngagementStep"]="/super-choice/smsf-engagement/";e["Prefill"]="/super-choice/prefill/";e["PrefillInvalidMyOwnFundPage"]="/super-choice/sss-prefill-invalid-my-own-fund/";e["PrefillMyOwnFundPage"]="/super-choice/prefill-my-own-fund/";e["PrefillSMSFPage"]="/super-choice/prefill-smsf/";e["PrefillInvalidSMSFPage"]="/super-choice/prefill-invalid-smsf/";e["SelfManagedFund"]="/super-choice/smsf/";e["DefaultFund"]="/super-choice/default/";e["FeaturedFunds"]="/super-choice/featured-funds/";e["StandardChoice"]="/standard-choice/";e["Success"]="/success/"})(h||(h=e("S",{})));var v=e("a",[t("stencil-route",{url:h.ExistingChoicePage,component:"sss-existing-choice-page"}),t("stencil-route",{url:h.SuperCampaign,component:"sss-super-campaign-host"}),t("stencil-route",{exact:true,url:h.ChoicePage,component:"sss-choice-router"}),t("stencil-route",{url:h.MyOwnFund,component:"sss-super-byof-host"}),t("stencil-route",{url:h.MyOwnFundEngagementStep,component:"sss-my-own-fund-engagement-step-host"}),t("stencil-route",{url:h.SmsfEngagementStep,component:"sss-smsf-engagement-step-host"}),t("stencil-route",{url:h.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),t("stencil-route",{url:h.Prefill,component:"sss-prefill"}),t("stencil-route",{url:h.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),t("stencil-route",{url:h.PrefillSMSFPage,component:"sss-prefill-smsf"}),t("stencil-route",{url:h.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),t("stencil-route",{url:h.SelfManagedFund,component:"sss-super-smsf-host"}),t("stencil-route",{url:h.DefaultFund,component:"sss-default-fund-router"}),t("stencil-route",{url:h.FeaturedFunds,component:"sss-super-campaign-featured-funds"}),t("stencil-route",{url:h.StandardChoice,component:"sss-standard-choice-form"}),t("stencil-route",{url:h.Success,component:"sss-success"})]);var y=function(){function e(){}e.prototype.navigateInternally=function(e,t){var n=""+this.appBaseUrl+this.toRouteWithLeadingSlash(t);f.navigation(n);e.push(n)};e.prototype.navigateInternallyToStandardChoice=function(e){l.handleSubmitFn=e.handleSubmitFn;l.fundName=e.fundName;l.fundDetails=e.fundDetails;l.promotedFundId=e.promotedFundId;this.navigateInternally(e.history,h.StandardChoice)};e.prototype.toExternalUrl=function(e){var t=new URL(e);t.searchParams.append("_extnav","true");return t.href};Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){var e=r.appBaseUrl;return e.replace(/\/$/,"")},enumerable:false,configurable:true});e.prototype.toRouteWithLeadingSlash=function(e){return e.length>0&&e[0]==="/"?e:"/"+e};return e}();var g=e("n",new y);var _=function(){function e(){}e.prototype.submitDefaultFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,i().url("super-choice/default").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.submitCustomFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,i().url("super-choice/custom-fund").post(e).badRequest((function(){throw new Error("Failed to process custom fund join request")})).text()]}))}))};e.prototype.submitSelfManagedFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,i().url("super-choice/smsf").post(e).badRequest((function(){throw new Error("Failed to process SMSF choice request")})).text()]}))}))};e.prototype.submitDefinedBenefitsChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,i().url("super-choice/defined-benefits").post(e).badRequest((function(){throw new Error("Failed to process Defined Benefits choice request")})).text()]}))}))};e.prototype.validateAbnForSMSF=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,i().url("super-choice/smsf/"+e+"/validate").get().badRequest((function(){throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()];case 1:t=n.sent();return[2,t.result]}}))}))};return e}();var m=e("c",new _);var w=function(){function e(){}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.PostAnalyticsEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,i().url("analytics-events").post(e).res()]}))}))};return e}();var S=function(){function e(){this.eventTrackingApi=w.Instance}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.TrackSuperFundPdsViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPdsViewed:e})]}))}))};e.prototype.TrackPromotedSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:e}})]}))}))};e.prototype.TrackPromotedDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedDefaultFund:e}})]}))}))};e.prototype.TrackMyOwnSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:e}})]}))}))};e.prototype.TrackSmsfSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{Smsf:e}})]}))}))};e.prototype.TrackDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:e}})]}))}))};e.prototype.TrackSuperFundNominationViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationViewed:e})]}))}))};e.prototype.TrackSuperFundNominationDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationDeclined:e})]}))}))};e.prototype.TrackSuperFundDisclaimerViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerViewed:e})]}))}))};e.prototype.TrackSuperFundDisclaimerAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerAccepted:e})]}))}))};e.prototype.TrackSuperFundPrefillViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillViewed:e})]}))}))};e.prototype.TrackSuperFundPrefillDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillDeclined:e})]}))}))};e.prototype.TrackSuperFundDetailChangeRequestedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailChangeRequested:e})]}))}))};e.prototype.TrackSuperCampaignActivationSucceededAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperCampaignActivationSucceeded:e})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepActivationSucceeded=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepActivationSucceeded:{fundUsi:e}})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepContinued=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepContinued:{fundUsi:e,reason:t}})]}))}))};e.prototype.TrackSuperSmsfEngagementStepActivationSucceeded=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.trackEventAsync({SuperSmsfEngagementStepActivationSucceeded:{}})]}))}))};e.prototype.TrackSuperSmsfEngagementStepContinued=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperSmsfEngagementStepContinued:{reason:e}})]}))}))};e.prototype.trackEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,this.eventTrackingApi.PostAnalyticsEventAsync({event:e})];case 1:n.sent();return[3,3];case 2:t=n.sent();return[2];case 3:return[2]}}))}))};return e}();e("E",S)}}}));
@@ -1 +0,0 @@
1
- import{f as s,O as n}from"./p-f8bb280b.js";const a=new class{async searchFundsAsync(n,a){return s.getAustralianFundsAsync({searchString:n,maxRecordCount:a})}async getFundAsync(a,r){const c=await s.getAustralianFundAsync(a,r);return n.some(c)}};export{a}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function u(e){try{c(r.next(e))}catch(e){o(e)}}function s(e){try{c(r["throw"](e))}catch(e){o(e)}}function c(e){e.done?n(e.value):i(e.value).then(u,s)}c((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function s(e){return function(t){return c([e,t])}}function c(u){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(o=u[0]&2?i["return"]:u[0]?i["throw"]||((o=i["return"])&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;if(i=0,o)u=[u[0]&2,o.value];switch(u[0]){case 0:case 1:o=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;i=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1];o=u;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(u);break}if(o[2])n.ops.pop();n.trys.pop();continue}u=t.call(e,n)}catch(e){u=[6,e];i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};import{h}from"./index-107d7c24.js";import{l as createStore,a as superSelectionAppService,c as buildBackendApiClient}from"./super-selection-app.service-50f199de.js";function appReady(){postMessage({type:"appReady"})}function postMessage(e,t){if(t===undefined)t="*";e.sender="flare";window.parent.postMessage(e,t)}function resize(e,t){postMessage({type:"contentResized",height:e,width:t})}function navigation(e){postMessage({type:"pageNavigated",url:e})}function complete(){postMessage({type:"complete"})}function submitSuccess(){postMessage({type:"submitSuccess"})}var iframe={appReady:appReady,resize:resize,navigation:navigation,complete:complete,submitSuccess:submitSuccess};var initial={handleSubmitFn:function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2]}))}))},fundName:"",fundDetails:{type:"null"},promotedFundId:undefined};var state=createStore(initial).state;var SuperSelectionAppRoutes;(function(e){e["ExistingChoicePage"]="/existing";e["SuperCampaign"]="/super-campaign";e["ChoicePage"]="/";e["MyOwnFund"]="/super-choice/my-own-fund/";e["MyOwnFundEngagementStep"]="/super-choice/my-own-fund-engagement/";e["SmsfEngagementStep"]="/super-choice/smsf-engagement/";e["Prefill"]="/super-choice/prefill/";e["PrefillInvalidMyOwnFundPage"]="/super-choice/sss-prefill-invalid-my-own-fund/";e["PrefillMyOwnFundPage"]="/super-choice/prefill-my-own-fund/";e["PrefillSMSFPage"]="/super-choice/prefill-smsf/";e["PrefillInvalidSMSFPage"]="/super-choice/prefill-invalid-smsf/";e["SelfManagedFund"]="/super-choice/smsf/";e["DefaultFund"]="/super-choice/default/";e["FeaturedFunds"]="/super-choice/featured-funds/";e["StandardChoice"]="/standard-choice/";e["Success"]="/success/"})(SuperSelectionAppRoutes||(SuperSelectionAppRoutes={}));var superSelectionAppStencilRoutes=[h("stencil-route",{url:SuperSelectionAppRoutes.ExistingChoicePage,component:"sss-existing-choice-page"}),h("stencil-route",{url:SuperSelectionAppRoutes.SuperCampaign,component:"sss-super-campaign-host"}),h("stencil-route",{exact:true,url:SuperSelectionAppRoutes.ChoicePage,component:"sss-choice-router"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFund,component:"sss-super-byof-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.MyOwnFundEngagementStep,component:"sss-my-own-fund-engagement-step-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.SmsfEngagementStep,component:"sss-smsf-engagement-step-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage,component:"sss-prefill-invalid-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.Prefill,component:"sss-prefill"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillMyOwnFundPage,component:"sss-prefill-my-own-fund"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillSMSFPage,component:"sss-prefill-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.PrefillInvalidSMSFPage,component:"sss-prefill-invalid-smsf"}),h("stencil-route",{url:SuperSelectionAppRoutes.SelfManagedFund,component:"sss-super-smsf-host"}),h("stencil-route",{url:SuperSelectionAppRoutes.DefaultFund,component:"sss-default-fund-router"}),h("stencil-route",{url:SuperSelectionAppRoutes.FeaturedFunds,component:"sss-super-campaign-featured-funds"}),h("stencil-route",{url:SuperSelectionAppRoutes.StandardChoice,component:"sss-standard-choice-form"}),h("stencil-route",{url:SuperSelectionAppRoutes.Success,component:"sss-success"})];var NavigationService=function(){function e(){}e.prototype.navigateInternally=function(e,t){var n=""+this.appBaseUrl+this.toRouteWithLeadingSlash(t);iframe.navigation(n);e.push(n)};e.prototype.navigateInternallyToStandardChoice=function(e){state.handleSubmitFn=e.handleSubmitFn;state.fundName=e.fundName;state.fundDetails=e.fundDetails;state.promotedFundId=e.promotedFundId;this.navigateInternally(e.history,SuperSelectionAppRoutes.StandardChoice)};e.prototype.toExternalUrl=function(e){var t=new URL(e);t.searchParams.append("_extnav","true");return t.href};Object.defineProperty(e.prototype,"appBaseUrl",{get:function(){var e=superSelectionAppService.appBaseUrl;return e.replace(/\/$/,"")},enumerable:false,configurable:true});e.prototype.toRouteWithLeadingSlash=function(e){return e.length>0&&e[0]==="/"?e:"/"+e};return e}();var navigationService=new NavigationService;var CustomFundChoiceApi=function(){function e(){}e.prototype.submitDefaultFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/default").post(e).badRequest((function(){throw new Error("Failed to process default fund join request")})).text()]}))}))};e.prototype.submitCustomFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/custom-fund").post(e).badRequest((function(){throw new Error("Failed to process custom fund join request")})).text()]}))}))};e.prototype.submitSelfManagedFundChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/smsf").post(e).badRequest((function(){throw new Error("Failed to process SMSF choice request")})).text()]}))}))};e.prototype.submitDefinedBenefitsChoiceAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("super-choice/defined-benefits").post(e).badRequest((function(){throw new Error("Failed to process Defined Benefits choice request")})).text()]}))}))};e.prototype.validateAbnForSMSF=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:return[4,buildBackendApiClient().url("super-choice/smsf/"+e+"/validate").get().badRequest((function(){throw new Error("Failed to verify that if the provided abn is used for regulated fund")})).json()];case 1:t=n.sent();return[2,t.result]}}))}))};return e}();var customFundChoiceApi=new CustomFundChoiceApi;var EventTrackingApi=function(){function e(){}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.PostAnalyticsEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,buildBackendApiClient().url("analytics-events").post(e).res()]}))}))};return e}();var EventTrackingService=function(){function e(){this.eventTrackingApi=EventTrackingApi.Instance}Object.defineProperty(e,"Instance",{get:function(){return this.instance||(this.instance=new this)},enumerable:false,configurable:true});e.prototype.TrackSuperFundPdsViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPdsViewed:e})]}))}))};e.prototype.TrackPromotedSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedFund:e}})]}))}))};e.prototype.TrackPromotedDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{PromotedDefaultFund:e}})]}))}))};e.prototype.TrackMyOwnSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{MyOwnFund:e}})]}))}))};e.prototype.TrackSmsfSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{Smsf:e}})]}))}))};e.prototype.TrackDefaultSuperFundDetailViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailViewed:{DefaultFund:e}})]}))}))};e.prototype.TrackSuperFundNominationViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationViewed:e})]}))}))};e.prototype.TrackSuperFundNominationDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundNominationDeclined:e})]}))}))};e.prototype.TrackSuperFundDisclaimerViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerViewed:e})]}))}))};e.prototype.TrackSuperFundDisclaimerAcceptedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDisclaimerAccepted:e})]}))}))};e.prototype.TrackSuperFundPrefillViewedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillViewed:e})]}))}))};e.prototype.TrackSuperFundPrefillDeclinedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundPrefillDeclined:e})]}))}))};e.prototype.TrackSuperFundDetailChangeRequestedAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperFundDetailChangeRequested:e})]}))}))};e.prototype.TrackSuperCampaignActivationSucceededAsync=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperCampaignActivationSucceeded:e})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepActivationSucceeded=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepActivationSucceeded:{fundUsi:e}})]}))}))};e.prototype.TrackSuperMyOwnFundEngagementStepContinued=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){return[2,this.trackEventAsync({SuperMyOwnFundEngagementStepContinued:{fundUsi:e,reason:t}})]}))}))};e.prototype.TrackSuperSmsfEngagementStepActivationSucceeded=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.trackEventAsync({SuperSmsfEngagementStepActivationSucceeded:{}})]}))}))};e.prototype.TrackSuperSmsfEngagementStepContinued=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.trackEventAsync({SuperSmsfEngagementStepContinued:{reason:e}})]}))}))};e.prototype.trackEventAsync=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,this.eventTrackingApi.PostAnalyticsEventAsync({event:e})];case 1:n.sent();return[3,3];case 2:t=n.sent();return[2];case 3:return[2]}}))}))};return e}();export{EventTrackingService as E,SuperSelectionAppRoutes as S,superSelectionAppStencilRoutes as a,customFundChoiceApi as c,iframe as i,navigationService as n,state as s};