From 9d0f883faa7a1e9428bb7f0fb41c6e0c5b32ca13 Mon Sep 17 00:00:00 2001 From: PhilippMDoerner Date: Thu, 12 Dec 2024 13:44:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2072e11?= =?UTF-8?q?34525946bc6b436ff1862a384a86eac3b5d=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../storybook-0c9aba2732f8798ca2ae104c09855acc | 2 +- .../storybook-21d6f40cfb511982e4424e0e250a9557 | 2 +- 1917.52d1f0f7.iframe.bundle.js | 1 + 1917.f1582b57.iframe.bundle.js | 1 - 3569.3325a123.iframe.bundle.js | 1 + 3569.533e5ce3.iframe.bundle.js | 1 - 3881.12b9c2c5.iframe.bundle.js | 1 - 3881.4a4d6216.iframe.bundle.js | 1 + 5483.c59eea1c.iframe.bundle.js | 1 - 5483.f87bf4fc.iframe.bundle.js | 1 + 6663.4c0357e8.iframe.bundle.js | 1 - 6663.d4189301.iframe.bundle.js | 1 + 7857.22fb8184.iframe.bundle.js | 1 + 7857.61d51647.iframe.bundle.js | 1 - app/_models/formly.ts | 2 ++ app/_services/formly/formly-service.service.ts | 4 +++- .../graph-help-modal.component.html | 9 +++++---- .../graph-help-modal.component.ts | 3 ++- .../graph-settings-modal.component.ts | 16 +++------------- ...r-accordion-stories.560f81f7.iframe.bundle.js | 1 + ...r-accordion-stories.9c4c68ac.iframe.bundle.js | 1 - ...r-encounter-stories.bb4452b4.iframe.bundle.js | 1 - ...r-encounter-stories.ec18daa4.iframe.bundle.js | 1 + ...quote-field-stories.0f655785.iframe.bundle.js | 1 + ...quote-field-stories.357b4567.iframe.bundle.js | 1 - ...ion-session-stories.1b7e4a70.iframe.bundle.js | 1 - ...ion-session-stories.e14c9221.iframe.bundle.js | 1 + ...paign-admin-stories.3a5b374c.iframe.bundle.js | 1 + ...paign-admin-stories.90918dcf.iframe.bundle.js | 1 - ...aign-update-stories.61a8ab7a.iframe.bundle.js | 1 + ...aign-update-stories.79579f80.iframe.bundle.js | 1 - ...login-login-stories.03175f41.iframe.bundle.js | 1 + ...login-login-stories.6f4ddf50.iframe.bundle.js | 1 - ...ile-profile-stories.c01d8f07.iframe.bundle.js | 1 - ...ile-profile-stories.f6e994fd.iframe.bundle.js | 1 + ...-site-admin-stories.2b613e4d.iframe.bundle.js | 1 + ...-site-admin-stories.68d04afe.iframe.bundle.js | 1 - design/organisms/graph/graph.service.ts | 4 ++-- iframe.html | 2 +- project.json | 2 +- ....js => runtime~main.dfad0a1c.iframe.bundle.js | 2 +- 41 files changed, 37 insertions(+), 41 deletions(-) create mode 100644 1917.52d1f0f7.iframe.bundle.js delete mode 100644 1917.f1582b57.iframe.bundle.js create mode 100644 3569.3325a123.iframe.bundle.js delete mode 100644 3569.533e5ce3.iframe.bundle.js delete mode 100644 3881.12b9c2c5.iframe.bundle.js create mode 100644 3881.4a4d6216.iframe.bundle.js delete mode 100644 5483.c59eea1c.iframe.bundle.js create mode 100644 5483.f87bf4fc.iframe.bundle.js delete mode 100644 6663.4c0357e8.iframe.bundle.js create mode 100644 6663.d4189301.iframe.bundle.js create mode 100644 7857.22fb8184.iframe.bundle.js delete mode 100644 7857.61d51647.iframe.bundle.js create mode 100644 design-organisms-encounter-accordion-encounter-accordion-stories.560f81f7.iframe.bundle.js delete mode 100644 design-organisms-encounter-accordion-encounter-accordion-stories.9c4c68ac.iframe.bundle.js delete mode 100644 design-organisms-encounter-encounter-stories.bb4452b4.iframe.bundle.js create mode 100644 design-organisms-encounter-encounter-stories.ec18daa4.iframe.bundle.js create mode 100644 design-organisms-quote-field-quote-field-stories.0f655785.iframe.bundle.js delete mode 100644 design-organisms-quote-field-quote-field-stories.357b4567.iframe.bundle.js delete mode 100644 design-organisms-session-session-stories.1b7e4a70.iframe.bundle.js create mode 100644 design-organisms-session-session-stories.e14c9221.iframe.bundle.js create mode 100644 design-templates-campaign-admin-campaign-admin-stories.3a5b374c.iframe.bundle.js delete mode 100644 design-templates-campaign-admin-campaign-admin-stories.90918dcf.iframe.bundle.js create mode 100644 design-templates-campaign-update-campaign-update-stories.61a8ab7a.iframe.bundle.js delete mode 100644 design-templates-campaign-update-campaign-update-stories.79579f80.iframe.bundle.js create mode 100644 design-templates-login-login-stories.03175f41.iframe.bundle.js delete mode 100644 design-templates-login-login-stories.6f4ddf50.iframe.bundle.js delete mode 100644 design-templates-profile-profile-stories.c01d8f07.iframe.bundle.js create mode 100644 design-templates-profile-profile-stories.f6e994fd.iframe.bundle.js create mode 100644 design-templates-site-admin-site-admin-stories.2b613e4d.iframe.bundle.js delete mode 100644 design-templates-site-admin-site-admin-stories.68d04afe.iframe.bundle.js rename runtime~main.9737e5bb.iframe.bundle.js => runtime~main.dfad0a1c.iframe.bundle.js (92%) diff --git a/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc b/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc index d35bb6a9e..0e1cb9468 100644 --- a/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc +++ b/.cache/storybook/default/dev-server/storybook-0c9aba2732f8798ca2ae104c09855acc @@ -1 +1 @@ -{"key":"lastEvents","content":{"boot":{"body":{"eventType":"boot","eventId":"_0nSNR75LcVFbbX9nrSVv","sessionId":"VZot8jf2ykKsvjrRI4vF7","payload":{"eventType":"build"},"context":{"inCI":true,"platform":"Linux","nodeVersion":"20.18.1","cliVersion":"8.4.4"}},"timestamp":1734009590506}}} \ No newline at end of file +{"key":"lastEvents","content":{"boot":{"body":{"eventType":"boot","eventId":"UGrvSyNudT1nbkhuEeMMc","sessionId":"6UcvjR3EnVMVxJttP3oF2","payload":{"eventType":"build"},"context":{"inCI":true,"platform":"Linux","nodeVersion":"20.18.1","cliVersion":"8.4.4"}},"timestamp":1734010977366}}} \ No newline at end of file diff --git a/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 b/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 index 5841db4c4..6b65a092f 100644 --- a/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 +++ b/.cache/storybook/default/dev-server/storybook-21d6f40cfb511982e4424e0e250a9557 @@ -1 +1 @@ -{"key":"session","content":{"id":"VZot8jf2ykKsvjrRI4vF7","lastUsed":1734009590490}} \ No newline at end of file +{"key":"session","content":{"id":"6UcvjR3EnVMVxJttP3oF2","lastUsed":1734010977350}} \ No newline at end of file diff --git a/1917.52d1f0f7.iframe.bundle.js b/1917.52d1f0f7.iframe.bundle.js new file mode 100644 index 000000000..ae30a439b --- /dev/null +++ b/1917.52d1f0f7.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1917],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/animations/slideDown.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V4:()=>slideOutFromBottom,sb:()=>slideUpFromBottom,st:()=>slideRight});var _angular_animations__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const inactiveStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:.2,transform:"translateY(50%)"}),activeStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:1,transform:"translateY(0%)"}),slideUpFromBottom=((0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideUpFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)])])),slideOutFromBottom=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideOutFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),inactiveSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(100%)"}),activeSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(0%)"}),slideRight=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideRight",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",activeSlideRightStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",inactiveSlideRightStyle)])])},"./src/design/atoms/arrow-button/arrow-button.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>ArrowButtonComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var arrow_button_componentngResource=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource"),arrow_button_componentngResource_default=__webpack_require__.n(arrow_button_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts");let ArrowButtonComponent=class ArrowButtonComponent{constructor(){this.icon=core.input.required(),this.kind=(0,core.input)("SECONDARY"),this.outline=(0,core.input)(!1),this.disabled=(0,core.input)(!1),this.iconName=(0,core.computed)((()=>`arrow-${this.icon()}-long`))}static{this.propDecorators={icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!0,transform:void 0}]}],kind:[{type:core.Input,args:[{isSignal:!0,alias:"kind",required:!1,transform:void 0}]}],outline:[{type:core.Input,args:[{isSignal:!0,alias:"outline",required:!1,transform:void 0}]}],disabled:[{type:core.Input,args:[{isSignal:!0,alias:"disabled",required:!1,transform:void 0}]}]}}};ArrowButtonComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-arrow-button",template:'\n',standalone:!0,imports:[icon_component.R,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[arrow_button_componentngResource_default()]})],ArrowButtonComponent)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>DiaryentryEncountersComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var diaryentry_encounters_componentngResource=__webpack_require__("./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource"),diaryentry_encounters_componentngResource_default=__webpack_require__.n(diaryentry_encounters_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");const ORDER_INDEX_INCREMENT=10;function hasShiftedOrderIndex(encounter){return encounter.order_index%ORDER_INDEX_INCREMENT>0}function getUnshiftedOrderIndex(encounter){return Math.floor(encounter.order_index/ORDER_INDEX_INCREMENT)*ORDER_INDEX_INCREMENT}function nextOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)+ORDER_INDEX_INCREMENT}var rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),ngrx_signals=__webpack_require__("./node_modules/@ngrx/signals/fesm2022/ngrx-signals.mjs"),shareReplay=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),switchMap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),clipboard=__webpack_require__("./src/utils/clipboard.ts");function httpErrorToast(err){if(!("number"===err.status?.constructor?.name.toLowerCase()))throw err;const buttons=500===err.status?[{label:"Copy to Clipboard",icon:"clipboard",onClick:()=>(0,clipboard.l)(err.error)}]:[];return{type:"DANGER",body:{text:`\n Please copy the error and send it to the developer:
\n ${error=err,JSON.stringify(error.error)}\n `,buttons},header:{text:getErrorHeading(err)}};var error}function getErrorHeading(error){switch(error.status){case 0:case 504:return"This can't be done without an internet connection";case 200:return"The target URL for the requested action does not seem to exist";case 500:return"The server exploded somehow!";default:return"An error occurred"}}var http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),base_service=__webpack_require__("./src/app/_services/base.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts");let CharacterService=class CharacterService extends base_service.d{constructor(routingService,http){super(http,"character"),this.routingService=routingService}getPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/playercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getNonPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/nonplayercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,characterName=data.name;return()=>this.routingService.getRoutePath("character",{name:characterName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};CharacterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],CharacterService);let DiaryentryService=class DiaryentryService extends base_service.d{constructor(routingService,http){super(http,"diaryentry"),this.routingService=routingService}readByParam(campaign,params){const authorName=params.name,url=`${this.baseUrl}/${campaign}/${params.sessionNumber}/${params.isMainSession}/${authorName}/`;return this.http.get(url).pipe((0,map.T)((diaryEntry=>this.parseDiaryEntry(diaryEntry))))}parseDiaryEntry(entry){return{...entry,author:entry?.author_details?.pk,session:entry?.session_details?.pk}}parseEntity(data){return{...data,author:data?.author_details?.pk,session:data?.session_details?.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,sessionNumber=data.session_details.session_number,isMainSession=data.session_details.is_main_session_int,authorName=data.author_details.name;return()=>this.routingService.getRoutePath("diaryentry",{sessionNumber,isMainSession,authorName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};DiaryentryService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],DiaryentryService);let EncounterConnectionService=class EncounterConnectionService extends base_service.d{constructor(http){super(http,"encounterconnection")}create(data){return super.create({...data,character:`${data.character}`})}parseEntity(data){return data}parseOverviewEntity(data){throw"CharacterPlayerClassConnection does not have an overview endpoint"}static{this.ctorParameters=()=>[{type:http.Qq}]}};EncounterConnectionService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterConnectionService);let EncounterService=class EncounterService extends base_service.d{constructor(routingService,http){super(http,"encounter"),this.routingService=routingService}getDiaryEntryEncounters(session_pk,authorName){const url=`${this.baseUrl}/session/${session_pk}/${authorName}`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}createForDiaryentry(encounter){const url=`${this.baseUrl}/`;return this.http.post(url,encounter).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}swapEncounterOrder(campaign,encounter1_pk,encounter2_pk){const url=`${this.baseUrl}/${campaign}/orderswap/`,requestBody={encounter1:encounter1_pk,encounter2:encounter2_pk};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}cutInsertEncounter(campaign,encounter,newOrderIndex){const url=`${this.baseUrl}/${campaign}/cutinsert/`,requestBody={encounter:encounter.pk,old_order_index:encounter.order_index,new_order_index:newOrderIndex};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}parseEntity(data){return{...data,pk:data.id??data.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details?.name,sessionNumber=data.diaryentry_details?.session_number,isMainSession=data.diaryentry_details?.is_main_session,authorName=data.diaryentry_details?.author_name,encounterTitle=data.title;return campaignName&&sessionNumber&&isMainSession&&authorName&&encounterTitle?()=>this.routingService.getRoutePath("diaryentry-encounter",{sessionNumber,isMainSession,authorName,campaign:campaignName,encounterTitle}):()=>""}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};EncounterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterService);let LocationService=class LocationService extends base_service.d{constructor(routingService,http){super(http,"location"),this.routingService=routingService}readByParam(campaign,params){const locationName=params.name,url=`${this.baseUrl}/${campaign}/${params.parentLocationName}/${locationName}/`;return this.http.get(url).pipe((0,map.T)((data=>this.parseEntity(data))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data),getAbsoluteRouterUrlForParentLocation:this.generateParentLocationUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,locationName=data.name,parentLocationName=data.parent_location_details.name??"NONE";return()=>this.routingService.getRoutePath("location",{name:locationName,parent_name:parentLocationName,campaign:campaignName})}generateParentLocationUrlCallback(data){if(!(null!=data.parent_location_details))return null;const campaignName=data.campaign_details.name,parentLocationName=data.parent_location_details.name,grandParentLocationName=data.parent_location_details.parent_location??"NONE";return()=>this.routingService.getRoutePath("location",{name:parentLocationName,parent_name:grandParentLocationName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};LocationService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],LocationService);var global_store=__webpack_require__("./src/app/global.store.ts"),toast_overlay_component=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.ts"),array=__webpack_require__("./src/utils/array.ts"),logging=__webpack_require__("./src/utils/logging.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts"),ngrx_operators=__webpack_require__("./node_modules/@ngrx/operators/fesm2022/ngrx-operators.mjs"),Subject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subject.js"),noop=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js"),isObservable=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isObservable.js");function rxMethod(generator,config){config?.injector||(0,core.assertInInjectionContext)(rxMethod);const sourceInjector=config?.injector??(0,core.inject)(core.Injector),source$=new Subject.B,sourceSub=generator(source$).subscribe();sourceInjector.get(core.DestroyRef).onDestroy((()=>sourceSub.unsubscribe()));const rxMethodFn=(input,config)=>{if(function isStatic(value){return!(0,core.isSignal)(value)&&!(0,isObservable.A)(value)}(input))return source$.next(input),{unsubscribe:noop.l};const instanceInjector=config?.injector??function getCallerInjector(){try{return(0,core.inject)(core.Injector)}catch{return null}}()??sourceInjector;if((0,core.isSignal)(input)){const watcher=(0,core.effect)((()=>{const value=input();(0,core.untracked)((()=>source$.next(value)))}),{injector:instanceInjector}),instanceSub={unsubscribe:()=>watcher.destroy()};return sourceSub.add(instanceSub),instanceSub}const instanceSub=input.subscribe((value=>source$.next(value)));return sourceSub.add(instanceSub),instanceInjector!==sourceInjector&&instanceInjector.get(core.DestroyRef).onDestroy((()=>instanceSub.unsubscribe())),instanceSub};return rxMethodFn.unsubscribe=sourceSub.unsubscribe.bind(sourceSub),rxMethodFn}var pipe=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/pipe.js"),tap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/tap.js"),string=__webpack_require__("./src/utils/string.ts");function getKeys(name){return{name,dataField:(0,string.YF)(name),errorField:`${(0,string.YF)(name)}Error`,queryStateField:`${(0,string.YF)(name)}QueryState`,loadMethod:`load${(0,string.ZH)(name)}`}}const initialState={diaryEntryDeleteState:"init",encounterServerModel:void 0,_encountersInUpdateStateIds:new Set,_encountersBeingCreated:[],isUpdatingGlobally:!1},DiaryentryPageStore=(0,ngrx_signals.Eu)({providedIn:"root"},(0,ngrx_signals.Q2)(initialState),function withQueries(queriesFactory){return store=>{const queries=queriesFactory({...store.stateSignals,...store.computedSignals,...store.methods}),storeWithState=function withQueriesState(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.Q2)((()=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.dataField]:void 0,[keys.errorField]:void 0,[keys.queryStateField]:"init"}))).reduce(((acc,RequestState)=>({...acc,...RequestState})),{}))))}(queries)(store);return function withQueryMethods(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.RI)((store=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.loadMethod]:rxMethod((0,pipe.F)((0,tap.M)((()=>(0,ngrx_signals.M8)(store,{[keys.queryStateField]:"loading",[keys.errorField]:void 0}))),(0,switchMap.n)((params=>queries[keys.name](params))),(0,ngrx_operators.Hn)({next:val=>(0,ngrx_signals.M8)(store,{[keys.dataField]:val,[keys.queryStateField]:"success"}),error:err=>{(0,ngrx_signals.M8)(store,{[keys.errorField]:err,[keys.queryStateField]:"error"})}})))}))).reduce(((acc,queryLoadFunction)=>({...acc,...queryLoadFunction})),{}))))}(queries)(storeWithState)}}((()=>{const diaryentryService=(0,core.inject)(DiaryentryService),characterService=(0,core.inject)(CharacterService),locationService=(0,core.inject)(LocationService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1));return{diaryentry:params=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>diaryentryService.readByParam(campaignName,params)))),campaignCharacters:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>characterService.getNonPlayerCharacters(campaignName)))),campaignLocations:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>locationService.campaignList(campaignName))))}})),(0,ngrx_signals.QO)((store=>({hasWritePermission:(0,core.inject)(global_store.v).hasRoleOrBetter("member"),diaryEntryEncounters:(0,core.computed)((()=>{const allEncounters=[...store.diaryentry()?.encounters??[],...store._encountersBeingCreated()];return(0,array.Z)(allEncounters,"order_index").map(((encounter,index)=>({encounter,isUpdating:store._encountersInUpdateStateIds().has(index)})))})),isUpdatingAnyEncounters:(0,core.computed)((()=>store._encountersInUpdateStateIds().size>0)),realEncounters:(0,core.computed)((()=>store.diaryentry()?.encounters??[]))}))),(0,ngrx_signals.RI)((store=>{const toastService=(0,core.inject)(toast_overlay_component.f),diaryentryService=(0,core.inject)(DiaryentryService),encounterConnectionService=(0,core.inject)(EncounterConnectionService),encounterService=(0,core.inject)(EncounterService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1)),updateEncounterList=newEncounterList=>{const newDiaryEntry={...store.diaryentry(),encounters:newEncounterList};(0,ngrx_signals.M8)(store,{diaryentry:newDiaryEntry})},markAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.add(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})},unmarkAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.delete(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})};return{reset:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"init",encounterServerModel:void 0,diaryentryQueryState:"init"}),addEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:[...store._encountersBeingCreated(),encounter]})},removeEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},addEncounter:encounter=>{encounterService.createForDiaryentry(encounter).pipe((0,take.s)(1)).subscribe({next:newEncounterList=>{updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},error:err=>toastService.addToast(httpErrorToast(err))})},removeEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.delete(encounter.pk).pipe((0,take.s)(1)).subscribe({next:()=>{unmarkAsBeingUpdated(encounter.pk);const newEncounterList=store.diaryentry()?.encounters?.filter((listEnc=>listEnc.pk!==encounter.pk))??[];updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},updateEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.update(encounter.pk,encounter).pipe((0,take.s)(1)).subscribe({next:newEncounter=>{unmarkAsBeingUpdated(encounter.pk);const diaryentry=store.diaryentry(),newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},swapEncounters:(encounter1Pk,encounter2Pk)=>{markAsBeingUpdated(encounter1Pk),markAsBeingUpdated(encounter2Pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.swapEncounterOrder(campaignName,encounter1Pk,encounter2Pk)))).subscribe({next:([updatedEnc1,updatedEnc2])=>{unmarkAsBeingUpdated(encounter1Pk),unmarkAsBeingUpdated(encounter2Pk);const newEncounterList1=(0,array.U1)(store.realEncounters(),updatedEnc1,"pk"),newEncounterList2=(0,array.U1)(newEncounterList1,updatedEnc2,"pk");updateEncounterList(newEncounterList2),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},cutInsertEncounter:(encounter,newOrderIndex)=>{markAsBeingUpdated(encounter.pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.cutInsertEncounter(campaignName,encounter,newOrderIndex)))).subscribe({next:newEncounterList=>{unmarkAsBeingUpdated(encounter.pk),updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},addEncounterConnection:connection=>encounterConnectionService.create(connection).pipe((0,take.s)(1)).subscribe({next:newConnection=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===newConnection.encounter)),newEncounter={...encounter,encounterConnections:[...encounter.encounterConnections??[],newConnection]},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))}),removeEncounterConnection:connection=>{encounterConnectionService.delete(connection.pk).pipe((0,take.s)(1)).subscribe((()=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===connection.encounter)),newEncounter={...encounter,encounterConnections:encounter.encounterConnections?.filter((con=>con.pk!==connection.pk))},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)}))},deleteDiaryEntry:()=>{(0,ngrx_signals.M8)(store,{diaryEntryDeleteState:"loading"}),diaryentryService.delete(store.diaryentry()?.pk).pipe((0,take.s)(1)).subscribe({next:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"success"}),error:err=>toastService.addToast(httpErrorToast(err))})}}})),(0,ngrx_signals.TK)((store=>({onInit:()=>{(0,logging.R)("DiaryEntryPageStore",store)}}))));var router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),arrow_button_component=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),encounter_component=__webpack_require__("./src/design/organisms/encounter/encounter.component.ts");let DiaryentryEncountersComponent=class DiaryentryEncountersComponent{constructor(){this.store=(0,core.inject)(DiaryentryPageStore),this.route=(0,core.inject)(router.nX),this.diaryEntryPk=(0,core.computed)((()=>this.store.diaryentry()?.pk)),this.campaignCharacters=this.store.campaignCharacters,this.campaignLocations=this.store.campaignLocations,this.encounterServerModel=this.store.encounterServerModel,this.canUpdate=this.store.hasWritePermission,this.canDelete=this.store.hasWritePermission,this.canCreate=this.store.hasWritePermission,this.state=(0,core.input)("READ"),this.encounterElements=(0,core.viewChildren)("encounter"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCutInsert=new core.EventEmitter,this.encounterSwap=new core.EventEmitter,this.addUnfinishedEncounter=(0,core.output)(),this.encountersToAdd=(0,core.signal)([]),this.isUpdatingGlobally=this.store.isUpdatingGlobally,this.isUpdatingAnything=this.store.isUpdatingAnyEncounters,this.cutEncounterIndex=(0,core.signal)(void 0),this.diaryEntryEncounters=this.store.diaryEntryEncounters;const encounterTitle=this.route.snapshot.params.encounterTitle;encounterTitle&&this.scrollToEncounter(encounterTitle)}addEmptyEncounterAtIndex(listIndex){const newOrderIndex=this.getOrderIndexForNewEncounter(listIndex),newEncounter={diaryentry:this.diaryEntryPk(),title:"New Encounter",order_index:newOrderIndex,description:""};this.store.addEmptyEncounterForCreation(newEncounter)}onInsertExcisedEncounter(insertionIndex){const cutEncounterIndex=this.cutEncounterIndex();if(null==cutEncounterIndex)return;if([cutEncounterIndex,cutEncounterIndex-1].includes(insertionIndex))return;let newOrderIndex;if(insertionIndex>this.diaryEntryEncounters().length){newOrderIndex=nextOrderIndex(this.diaryEntryEncounters()[this.diaryEntryEncounters().length-1].encounter)}else{newOrderIndex=this.diaryEntryEncounters()[insertionIndex].encounter.order_index}const encounterToInsert=this.diaryEntryEncounters()[cutEncounterIndex].encounter;this.store.cutInsertEncounter(encounterToInsert,newOrderIndex)}onExcisionClick(encounterIndex){const isAlreadyCuttingEncounter=null!=this.cutEncounterIndex(),isCuttingThisEncounter=this.cutEncounterIndex()===encounterIndex;isAlreadyCuttingEncounter&&isCuttingThisEncounter?this.cutEncounterIndex.set(void 0):isAlreadyCuttingEncounter||this.cutEncounterIndex.set(encounterIndex)}onEncounterOrderIncrease(encounterIndex){if(encounterIndex===this.diaryEntryEncounters().length-1)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,nextEncounter=this.nextRealEncounter(encounterIndex+1);nextEncounter&&this.store.swapEncounters(encounter.pk,nextEncounter.pk)}onEncounterOrderDecrease(encounterIndex){if(0===encounterIndex)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,priorEncounter=this.priorRealEncounter(encounterIndex-1);priorEncounter&&this.store.swapEncounters(encounter.pk,priorEncounter.pk)}onEncounterCreateCancel(encounterIndex){const createEncounterToRemove=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEmptyEncounterForCreation(createEncounterToRemove)}onEncounterDelete(encounterIndex){const encounterToDelete=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEncounter(encounterToDelete)}onEncounterCreate(encounter){const newEncounter={...encounter,order_index:nextOrderIndex(encounter)};this.encounterCreate.emit(newEncounter),this.store.removeEmptyEncounterForCreation(encounter)}scrollToEncounter(encounterTitle){(0,rxjs_interop.br)(this.encounterElements).pipe((0,rxjs_interop.pQ)(),(0,map.T)((elements=>elements.find((el=>el.nativeElement.id===encounterTitle)))),(0,rxjs_operators.u5)(),(0,take.s)(1)).subscribe((encounterElement=>encounterElement.nativeElement.scrollIntoView({behavior:"instant"})))}getOrderIndexForNewEncounter(insertionIndex){const isNewFirstEncounter=insertionIndex<0,isEmptyDiaryEntry=0===this.store.realEncounters().length,isNewFirstEncounterInFullDiaryentry=isNewFirstEncounter&&!isEmptyDiaryEntry,isLastEncounterInFullDiaryentry=insertionIndex>=this.store.realEncounters().length&&!isEmptyDiaryEntry;if(isEmptyDiaryEntry)return 0;if(isNewFirstEncounterInFullDiaryentry){return function priorOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)-ORDER_INDEX_INCREMENT}(this.store.realEncounters()[0])}if(isLastEncounterInFullDiaryentry){return nextOrderIndex(this.store.realEncounters()[this.store.realEncounters().length-1])}return function getShiftedOrderIndex(encounter){return hasShiftedOrderIndex(encounter)?encounter.order_index:encounter.order_index+1}(this.diaryEntryEncounters()[insertionIndex].encounter)}isRealEncounter(encounter){return"pk"in encounter}nextRealEncounter(encounterIndex){const realEncountersAfterIndex=this.diaryEntryEncounters().slice(encounterIndex).filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersAfterIndex[0]?.encounter}priorRealEncounter(encounterIndex){const realEncountersBeforeIndex=this.diaryEntryEncounters().slice(0,encounterIndex+1).reverse().filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersBeforeIndex[0]?.encounter}static{this.ctorParameters=()=>[]}static{this.propDecorators={state:[{type:core.Input,args:[{isSignal:!0,alias:"state",required:!1,transform:void 0}]}],encounterElements:[{type:core.ViewChildren,args:["encounter",{isSignal:!0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCutInsert:[{type:core.Output}],encounterSwap:[{type:core.Output}],addUnfinishedEncounter:[{type:core.Output,args:["addUnfinishedEncounter"]}]}}};DiaryentryEncountersComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-diaryentry-encounters",template:'
\n @if (!isUpdatingGlobally()) {\n \x3c!-- Insert new first Encounter --\x3e\n @if (state() === "EDIT") {\n
\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n
\n }\n\n \x3c!-- Diaryentry - Encounters --\x3e\n
\n @for (entryEncounter of diaryEntryEncounters(); track entryEncounter) {\n \x3c!-- Encounter --\x3e\n \n @switch (state()) {\n @case ("READ") {\n \n }\n @case ("EDIT") {\n \n }\n }\n\n \x3c!-- Insert new Encounter --\x3e\n @if (state() === "EDIT" && (canCreate() || canUpdate())) {\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n }\n
\n }\n
\n } @else {\n \n }\n\n\n\n

\n {{ entryEncounter.encounter?.title }}\n

\n \n
\n\n\n \n @if (!context.entry.isUpdating) {\n \n @if (canUpdate() && context.entry.encounter.pk != null) {\n
\n \n \n
\n }\n } @else {\n \n }\n
\n
\n\n\x3c!-- Loading Spinner --\x3e\n\n\n\n \n \n\n',standalone:!0,imports:[button_component.Q,card_component.i,html_text_component.m,encounter_component.L,arrow_button_component.R,spinner_component.t,common.NgTemplateOutlet],animations:[slideDown.sb],styles:[diaryentry_encounters_componentngResource_default()]})],DiaryentryEncountersComponent)},"./src/design/organisms/encounter/encounter.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>EncounterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_componentngResource=__webpack_require__("./src/design/organisms/encounter/encounter.component.scss?ngResource"),encounter_componentngResource_default=__webpack_require__.n(encounter_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),array=__webpack_require__("./src/utils/array.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts");let EncounterComponent=class EncounterComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.characters=core.input.required(),this.locations=core.input.required(),this.encounter=(0,core.input)(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.initialState=(0,core.input)("DISPLAY"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)({}),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>{const encounterConnections=this.encounter()?.encounterConnections??[];return this.parseConnection(encounterConnections)})),this.campaignName=(0,core.computed)((()=>this.encounter()?.campaign_details?.name)),this.locations$=(0,rxjs_interop.br)(this.locations).pipe((0,rxjs_operators.u5)()),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"title",inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"location",label:"Encounter Location",sortProp:"name_full",campaign:this.campaignName(),options$:this.locations$.pipe((0,map.T)((locs=>(0,array.Z)(locs,"name_full")))),labelProp:"name_full",required:!1}),this.formlyService.buildEditorConfig({key:"description",required:!0})]))}ngOnInit(){const model="CREATE"===this.initialState()&&this.canCreate()?{}:void 0;this.changeState(this.initialState(),model)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onEncounterCreate(encounter){this.encounterCreate.emit({...this.encounter(),...encounter}),this.changeState("DISPLAY",encounter)}onEncounterDelete(){this.encounterDelete.emit(this.encounter()),this.changeState("DISPLAY",void 0)}onEncounterUpdate(encounter){this.encounterUpdate.emit(encounter),this.changeState("DISPLAY",void 0)}onEncounterCreateCancel(){this.encounterCreateCancel.emit(),this.changeState("DISPLAY",void 0)}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){const newConnection={campaign:this.encounter()?.campaign_details?.id,encounter:this.encounter()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}onToggle(toggled){if("CREATE"===this.state())return void this.encounterCreateCancel.emit();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.encounter()}:void 0;this.changeState(nextState,nextModel)}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName()})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={characters:[{type:core.Input,args:[{isSignal:!0,alias:"characters",required:!0,transform:void 0}]}],locations:[{type:core.Input,args:[{isSignal:!0,alias:"locations",required:!0,transform:void 0}]}],encounter:[{type:core.Input,args:[{isSignal:!0,alias:"encounter",required:!1,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],initialState:[{type:core.Input,args:[{isSignal:!0,alias:"initialState",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCreateCancel:[{type:core.Output}]}}};EncounterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter",template:'@if (encounter() || state() === "CREATE") {\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n\n @if (canUpdate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ encounter()?.title }}\n\n\n\n \x3c!-- Encounter --\x3e\n @let encounterVal = encounter();\n @if (encounterVal) {\n
\n \n
\n }\n\n \n\n \x3c!-- Encounter Connections --\x3e\n
\n \n
\n\n \x3c!-- Encounter Footer/Delete Toggle --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update "{{ encounter()?.title }}" \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canUpdate() && state() === "UPDATE") {\n \n } @else if (canUpdate() && state() === "OUTDATEDUPDATE") {\n \n }\n\n\n Create new Encounter \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canCreate() && state() === "CREATE") {\n \n }\n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[encounter_componentngResource_default()]})],EncounterComponent)},"./src/design/organisms/toast-overlay/toast-overlay.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ToastOverlayComponent,f:()=>ToastService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var toast_overlay_componentngResource=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource"),toast_overlay_componentngResource_default=__webpack_require__.n(toast_overlay_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),logging=__webpack_require__("./src/utils/logging.ts");let ToastService=class ToastService{constructor(){this.toasts=(0,core.signal)([]),this.currentToast=(0,core.computed)((()=>this.toasts()[0]))}addToast(newToast){(0,logging.R)(this.addToast.name,newToast);const toasts=this.toasts();newToast.important?this.toasts.set([newToast,...toasts]):this.toasts.set([...toasts,newToast])}dismissToast(){const[_,...newToastList]=this.toasts();this.toasts.set(newToastList)}};ToastService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ToastService);let ToastOverlayComponent=class ToastOverlayComponent{constructor(){this.toastService=(0,core.inject)(ToastService),this.currentToast=this.toastService.currentToast,this.icon=(0,core.computed)((()=>{const currentToast=this.currentToast();if(currentToast)return this.toHeaderIcon(currentToast.type,currentToast.header?.icon)}))}dismissCurrentToast(){const currentToast=this.currentToast();if(!currentToast)return;const onHide=currentToast.onHide;onHide&&onHide(),this.toastService.dismissToast()}toHeaderIcon(toastType,icon){if(null!=icon)return icon;switch(toastType){case"DANGER":return"triangle-exclamation";case"WARNING":return"circle-exclamation";case"INFO":return"info-circle";case"SUCCESS":return"check";default:return"info"}}};ToastOverlayComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-toast-overlay",standalone:!0,imports:[ng_bootstrap.VR,button_component.Q,icon_component.R,common.NgTemplateOutlet],animations:[slideDown.st],template:'@let toast = currentToast();\n@let onToastClick = toast?.onToastClick;\n@if (toast && onToastClick) {\n \n \n \n} @else if (toast) {\n \n}\n\n\n @if (toast) {\n @if (toast.header) {\n \n \n \n @let headerIcon = icon();\n @if (headerIcon) {\n \n }\n \n \n \n\n \n \n } @else {\n \n \n \n }\n }\n\n\n\n
\n \n @let bodyIcon = toast?.body?.icon;\n @if (bodyIcon) {\n \n }\n\n @if (toast?.body?.text) {\n
\n }\n
\n\n
\n @let firstButton = toast?.body?.buttons?.[0];\n @if (firstButton) {\n \n }\n @let secondButton = toast?.body?.buttons?.[1];\n @if (secondButton) {\n \n }\n
\n
\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[toast_overlay_componentngResource_default()]})],ToastOverlayComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/clipboard.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function copyToClipboard(text){const windowSelection=window.getSelection(),documentSelection=window.getSelection();var userSelectedTextRange=void 0;(function userHasElementsSelected(){const selection=document.getSelection();if(null==selection)return!1;return selection?.rangeCount>0})()&&(userSelectedTextRange=documentSelection.getRangeAt(0),windowSelection.removeRange(userSelectedTextRange));const textContainerElement=function createTextContainerElement(text){const textContainerElement=document.createElement("div");textContainerElement.innerHTML=text;const strippedText=textContainerElement.textContent;return textContainerElement.innerHTML=strippedText.replaceAll(">","
> ").slice(4),textContainerElement.style.position="absolute",textContainerElement.style.left="-9999px",textContainerElement}(text);document.body.appendChild(textContainerElement);const copyRange=function selectElement(element){const selectedRange=document.createRange();return selectedRange.selectNode(element),window.getSelection()?.addRange(selectedRange),selectedRange}(textContainerElement);!function copyCurrentSelection(){try{document.execCommand("copy")}catch(err){window.alert("Your Browser Doesn't support this! Error : "+err)}}(),windowSelection.removeRange(copyRange),document.body.removeChild(textContainerElement),userSelectedTextRange&&windowSelection.addRange(userSelectedTextRange)}__webpack_require__.d(__webpack_exports__,{l:()=>copyToClipboard})},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".btn {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 2rem;\n padding: var(--spacer-3) var(--spacer-2);\n}\n.btn-disabled {\n cursor: not-allowed;\n}\n.btn-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".list {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}\n.list--loading {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.list__buttons {\n padding: 0;\n margin-bottom: var(--spacer-2);\n}\n\n.buttons {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.buttons__button {\n display: flex;\n}\n.buttons__button--right {\n display: none;\n}\n@media (min-width: 768px) {\n .buttons__button--right {\n display: flex;\n }\n}\n\n.repeated-unit {\n padding: 0;\n scroll-margin-top: var(--spacer-5);\n}\n@media (min-width: 768px) {\n .repeated-unit {\n padding: unset;\n }\n}\n\n.encounter-card {\n display: flex;\n justify-content: center;\n --card-flex-direction: column;\n --card-padding: var(--spacer-3);\n}\n@media (min-width: 768px) {\n .encounter-card {\n --card-flex-direction: row;\n }\n}\n.encounter-card__encounter {\n flex: 1;\n}\n.encounter-card__side-buttons {\n height: 100%;\n}\n\n.side-buttons {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n margin-left: var(--spacer-1);\n}\n@media (min-width: 768px) {\n .side-buttons {\n flex-direction: column;\n justify-content: unset;\n }\n}\n.side-buttons__button--edit {\n display: none;\n margin-bottom: var(--spacer-4);\n}\n@media (min-width: 768px) {\n .side-buttons__button--edit {\n display: unset;\n }\n}\n.side-buttons__button--arrow {\n padding: var(--spacer-1) var(--spacer-0);\n}\n\n.spinner {\n width: 100px;\n height: 100px;\n --thickness: 60px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter/encounter.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--spacer-4);\n}\n.card__heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.card__text {\n margin-bottom: var(--spacer-1);\n}\n.card__connections {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n.card__edit-button {\n align-self: flex-start;\n}\n\n.connections {\n display: inline-flex;\n}\n.connections__label {\n margin-right: var(--spacer-4);\n}\n.connections__list {\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.connections__connection, .connections__create-form {\n margin: var(--spacer-0) var(--spacer-2) var(--spacer-2) var(--spacer-1);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n position: absolute;\n}\n\n.toast:focus, .toast:focus-within, .toast:hover, .toast:focus-visible {\n outline: var(--focus-outline);\n}\n\n.toast {\n position: fixed;\n bottom: 10%;\n width: 93%;\n right: 3.5%;\n --bs-light-rgb: var(--bs-white);\n --bs-toast-header-color: var(--bs-white);\n --bs-toast-color: var(--bs-white);\n --toast-padding-x: var(--bs-toast-padding-x);\n --toast-padding-y: calc(var(--bs-toast-padding-y) / 2);\n --bs-toast-border-width: 3px;\n}\n.toast--primary {\n --bs-border-color-translucent: var(--bs-primary);\n}\n.toast--secondary {\n --bs-border-color-translucent: var(--bs-secondary);\n}\n.toast--success {\n --bs-border-color-translucent: var(--bs-success);\n}\n.toast--danger {\n --bs-border-color-translucent: var(--bs-danger);\n}\n.toast--warning {\n --bs-border-color-translucent: var(--bs-warning);\n}\n.toast--info {\n --bs-border-color-translucent: var(--bs-info);\n}\n.toast--light {\n --bs-border-color-translucent: var(--bs-light);\n}\n.toast--dark {\n --bs-border-color-translucent: var(--bs-dark);\n}\n@media (min-width: 576px) {\n .toast {\n width: fit-content;\n max-width: 50%;\n bottom: 5%;\n }\n}\n\n.toast-header__text {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--spacer-2);\n flex: 1;\n font-weight: bold;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n}\n.body__text {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--spacer-2);\n text-align: start;\n}\n.body__text-container {\n max-height: calc(var(--bs-body-font-size) * 8);\n max-width: 100%;\n overflow: auto;\n}\n.body__button {\n width: fit-content;\n}\n.body__button-container {\n display: flex;\n flex-direction: row;\n gap: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/1917.f1582b57.iframe.bundle.js b/1917.f1582b57.iframe.bundle.js deleted file mode 100644 index abb214fb6..000000000 --- a/1917.f1582b57.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1917],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/animations/slideDown.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{V4:()=>slideOutFromBottom,sb:()=>slideUpFromBottom,st:()=>slideRight});var _angular_animations__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const inactiveStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:.2,transform:"translateY(50%)"}),activeStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({opacity:1,transform:"translateY(0%)"}),slideUpFromBottom=((0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideUpFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-out",activeStyle)])])),slideOutFromBottom=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideOutFromBottom",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("500ms ease-in",inactiveStyle)])]),inactiveSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(100%)"}),activeSlideRightStyle=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.iF)({transform:"translateX(0%)"}),slideRight=(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.hZ)("slideRight",[(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":enter",[inactiveSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",activeSlideRightStyle)]),(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.kY)(":leave",[activeSlideRightStyle,(0,_angular_animations__WEBPACK_IMPORTED_MODULE_0__.i0)("250ms ease-in-out",inactiveSlideRightStyle)])])},"./src/design/atoms/arrow-button/arrow-button.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>ArrowButtonComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var arrow_button_componentngResource=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource"),arrow_button_componentngResource_default=__webpack_require__.n(arrow_button_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts");let ArrowButtonComponent=class ArrowButtonComponent{constructor(){this.icon=core.input.required(),this.kind=(0,core.input)("SECONDARY"),this.outline=(0,core.input)(!1),this.disabled=(0,core.input)(!1),this.iconName=(0,core.computed)((()=>`arrow-${this.icon()}-long`))}static{this.propDecorators={icon:[{type:core.Input,args:[{isSignal:!0,alias:"icon",required:!0,transform:void 0}]}],kind:[{type:core.Input,args:[{isSignal:!0,alias:"kind",required:!1,transform:void 0}]}],outline:[{type:core.Input,args:[{isSignal:!0,alias:"outline",required:!1,transform:void 0}]}],disabled:[{type:core.Input,args:[{isSignal:!0,alias:"disabled",required:!1,transform:void 0}]}]}}};ArrowButtonComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-arrow-button",template:'\n',standalone:!0,imports:[icon_component.R,button_component.Q],changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[arrow_button_componentngResource_default()]})],ArrowButtonComponent)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{j:()=>DiaryentryEncountersComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var diaryentry_encounters_componentngResource=__webpack_require__("./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource"),diaryentry_encounters_componentngResource_default=__webpack_require__.n(diaryentry_encounters_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");const ORDER_INDEX_INCREMENT=10;function hasShiftedOrderIndex(encounter){return encounter.order_index%ORDER_INDEX_INCREMENT>0}function getUnshiftedOrderIndex(encounter){return Math.floor(encounter.order_index/ORDER_INDEX_INCREMENT)*ORDER_INDEX_INCREMENT}function nextOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)+ORDER_INDEX_INCREMENT}var rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),ngrx_signals=__webpack_require__("./node_modules/@ngrx/signals/fesm2022/ngrx-signals.mjs"),shareReplay=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/shareReplay.js"),take=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/take.js"),switchMap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/switchMap.js"),clipboard=__webpack_require__("./src/utils/clipboard.ts");function httpErrorToast(err){if(!("number"===err.status?.constructor?.name.toLowerCase()))throw err;const buttons=500===err.status?[{label:"Copy to Clipboard",icon:"clipboard",onClick:()=>(0,clipboard.l)(err.error)}]:[];return{type:"DANGER",body:{text:`\n Please copy the error and send it to the developer:
\n ${error=err,JSON.stringify(error.error)}\n `,buttons},header:{text:getErrorHeading(err)}};var error}function getErrorHeading(error){switch(error.status){case 0:case 504:return"This can't be done without an internet connection";case 200:return"The target URL for the requested action does not seem to exist";case 500:return"The server exploded somehow!";default:return"An error occurred"}}var http=__webpack_require__("./node_modules/@angular/common/fesm2022/http.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),base_service=__webpack_require__("./src/app/_services/base.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts");let CharacterService=class CharacterService extends base_service.d{constructor(routingService,http){super(http,"character"),this.routingService=routingService}getPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/playercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}getNonPlayerCharacters(campaign){const url=`${this.baseUrl}/${campaign}/nonplayercharacters/`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseOverviewEntity(entry))))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,characterName=data.name;return()=>this.routingService.getRoutePath("character",{name:characterName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};CharacterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],CharacterService);let DiaryentryService=class DiaryentryService extends base_service.d{constructor(routingService,http){super(http,"diaryentry"),this.routingService=routingService}readByParam(campaign,params){const authorName=params.name,url=`${this.baseUrl}/${campaign}/${params.sessionNumber}/${params.isMainSession}/${authorName}/`;return this.http.get(url).pipe((0,map.T)((diaryEntry=>this.parseDiaryEntry(diaryEntry))))}parseDiaryEntry(entry){return{...entry,author:entry?.author_details?.pk,session:entry?.session_details?.pk}}parseEntity(data){return{...data,author:data?.author_details?.pk,session:data?.session_details?.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,sessionNumber=data.session_details.session_number,isMainSession=data.session_details.is_main_session_int,authorName=data.author_details.name;return()=>this.routingService.getRoutePath("diaryentry",{sessionNumber,isMainSession,authorName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};DiaryentryService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],DiaryentryService);let EncounterConnectionService=class EncounterConnectionService extends base_service.d{constructor(http){super(http,"encounterconnection")}create(data){return super.create({...data,character:`${data.character}`})}parseEntity(data){return data}parseOverviewEntity(data){throw"CharacterPlayerClassConnection does not have an overview endpoint"}static{this.ctorParameters=()=>[{type:http.Qq}]}};EncounterConnectionService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterConnectionService);let EncounterService=class EncounterService extends base_service.d{constructor(routingService,http){super(http,"encounter"),this.routingService=routingService}getDiaryEntryEncounters(session_pk,authorName){const url=`${this.baseUrl}/session/${session_pk}/${authorName}`;return this.http.get(url).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}createForDiaryentry(encounter){const url=`${this.baseUrl}/`;return this.http.post(url,encounter).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}swapEncounterOrder(campaign,encounter1_pk,encounter2_pk){const url=`${this.baseUrl}/${campaign}/orderswap/`,requestBody={encounter1:encounter1_pk,encounter2:encounter2_pk};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}cutInsertEncounter(campaign,encounter,newOrderIndex){const url=`${this.baseUrl}/${campaign}/cutinsert/`,requestBody={encounter:encounter.pk,old_order_index:encounter.order_index,new_order_index:newOrderIndex};return this.http.patch(url,requestBody).pipe((0,map.T)((entries=>entries.map((entry=>this.parseEntity(entry))))))}parseEntity(data){return{...data,pk:data.id??data.pk,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details?.name,sessionNumber=data.diaryentry_details?.session_number,isMainSession=data.diaryentry_details?.is_main_session,authorName=data.diaryentry_details?.author_name,encounterTitle=data.title;return campaignName&&sessionNumber&&isMainSession&&authorName&&encounterTitle?()=>this.routingService.getRoutePath("diaryentry-encounter",{sessionNumber,isMainSession,authorName,campaign:campaignName,encounterTitle}):()=>""}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};EncounterService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],EncounterService);let LocationService=class LocationService extends base_service.d{constructor(routingService,http){super(http,"location"),this.routingService=routingService}readByParam(campaign,params){const locationName=params.name,url=`${this.baseUrl}/${campaign}/${params.parentLocationName}/${locationName}/`;return this.http.get(url).pipe((0,map.T)((data=>this.parseEntity(data))))}parseEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data),getAbsoluteRouterUrlForParentLocation:this.generateParentLocationUrlCallback(data)}}parseOverviewEntity(data){return{...data,getAbsoluteRouterUrl:this.generateUrlCallback(data)}}generateUrlCallback(data){const campaignName=data.campaign_details.name,locationName=data.name,parentLocationName=data.parent_location_details.name??"NONE";return()=>this.routingService.getRoutePath("location",{name:locationName,parent_name:parentLocationName,campaign:campaignName})}generateParentLocationUrlCallback(data){if(!(null!=data.parent_location_details))return null;const campaignName=data.campaign_details.name,parentLocationName=data.parent_location_details.name,grandParentLocationName=data.parent_location_details.parent_location??"NONE";return()=>this.routingService.getRoutePath("location",{name:parentLocationName,parent_name:grandParentLocationName,campaign:campaignName})}static{this.ctorParameters=()=>[{type:routing_service.O},{type:http.Qq}]}};LocationService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],LocationService);var global_store=__webpack_require__("./src/app/global.store.ts"),toast_overlay_component=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.ts"),array=__webpack_require__("./src/utils/array.ts"),logging=__webpack_require__("./src/utils/logging.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts"),ngrx_operators=__webpack_require__("./node_modules/@ngrx/operators/fesm2022/ngrx-operators.mjs"),Subject=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/Subject.js"),noop=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/noop.js"),isObservable=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/isObservable.js");function rxMethod(generator,config){config?.injector||(0,core.assertInInjectionContext)(rxMethod);const sourceInjector=config?.injector??(0,core.inject)(core.Injector),source$=new Subject.B,sourceSub=generator(source$).subscribe();sourceInjector.get(core.DestroyRef).onDestroy((()=>sourceSub.unsubscribe()));const rxMethodFn=(input,config)=>{if(function isStatic(value){return!(0,core.isSignal)(value)&&!(0,isObservable.A)(value)}(input))return source$.next(input),{unsubscribe:noop.l};const instanceInjector=config?.injector??function getCallerInjector(){try{return(0,core.inject)(core.Injector)}catch{return null}}()??sourceInjector;if((0,core.isSignal)(input)){const watcher=(0,core.effect)((()=>{const value=input();(0,core.untracked)((()=>source$.next(value)))}),{injector:instanceInjector}),instanceSub={unsubscribe:()=>watcher.destroy()};return sourceSub.add(instanceSub),instanceSub}const instanceSub=input.subscribe((value=>source$.next(value)));return sourceSub.add(instanceSub),instanceInjector!==sourceInjector&&instanceInjector.get(core.DestroyRef).onDestroy((()=>instanceSub.unsubscribe())),instanceSub};return rxMethodFn.unsubscribe=sourceSub.unsubscribe.bind(sourceSub),rxMethodFn}var pipe=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/util/pipe.js"),tap=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/tap.js"),string=__webpack_require__("./src/utils/string.ts");function getKeys(name){return{name,dataField:(0,string.YF)(name),errorField:`${(0,string.YF)(name)}Error`,queryStateField:`${(0,string.YF)(name)}QueryState`,loadMethod:`load${(0,string.ZH)(name)}`}}const initialState={diaryEntryDeleteState:"init",encounterServerModel:void 0,_encountersInUpdateStateIds:new Set,_encountersBeingCreated:[],isUpdatingGlobally:!1},DiaryentryPageStore=(0,ngrx_signals.Eu)({providedIn:"root"},(0,ngrx_signals.Q2)(initialState),function withQueries(queriesFactory){return store=>{const queries=queriesFactory({...store.stateSignals,...store.computedSignals,...store.methods}),storeWithState=function withQueriesState(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.Q2)((()=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.dataField]:void 0,[keys.errorField]:void 0,[keys.queryStateField]:"init"}))).reduce(((acc,RequestState)=>({...acc,...RequestState})),{}))))}(queries)(store);return function withQueryMethods(queries){return(0,ngrx_signals.Mj)((0,ngrx_signals.RI)((store=>Object.keys(queries).map((queryName=>getKeys(queryName))).map((keys=>({[keys.loadMethod]:rxMethod((0,pipe.F)((0,tap.M)((()=>(0,ngrx_signals.M8)(store,{[keys.queryStateField]:"loading",[keys.errorField]:void 0}))),(0,switchMap.n)((params=>queries[keys.name](params))),(0,ngrx_operators.Hn)({next:val=>(0,ngrx_signals.M8)(store,{[keys.dataField]:val,[keys.queryStateField]:"success"}),error:err=>{(0,ngrx_signals.M8)(store,{[keys.errorField]:err,[keys.queryStateField]:"error"})}})))}))).reduce(((acc,queryLoadFunction)=>({...acc,...queryLoadFunction})),{}))))}(queries)(storeWithState)}}((()=>{const diaryentryService=(0,core.inject)(DiaryentryService),characterService=(0,core.inject)(CharacterService),locationService=(0,core.inject)(LocationService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1));return{diaryentry:params=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>diaryentryService.readByParam(campaignName,params)))),campaignCharacters:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>characterService.getNonPlayerCharacters(campaignName)))),campaignLocations:()=>campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>locationService.campaignList(campaignName))))}})),(0,ngrx_signals.QO)((store=>({hasWritePermission:(0,core.inject)(global_store.v).hasRoleOrBetter("member"),diaryEntryEncounters:(0,core.computed)((()=>{const allEncounters=[...store.diaryentry()?.encounters??[],...store._encountersBeingCreated()];return(0,array.Z)(allEncounters,"order_index").map(((encounter,index)=>({encounter,isUpdating:store._encountersInUpdateStateIds().has(index)})))})),isUpdatingAnyEncounters:(0,core.computed)((()=>store._encountersInUpdateStateIds().size>0)),realEncounters:(0,core.computed)((()=>store.diaryentry()?.encounters??[]))}))),(0,ngrx_signals.RI)((store=>{const toastService=(0,core.inject)(toast_overlay_component.f),diaryentryService=(0,core.inject)(DiaryentryService),encounterConnectionService=(0,core.inject)(EncounterConnectionService),encounterService=(0,core.inject)(EncounterService),globalStore=(0,core.inject)(global_store.v),campaignName$=(0,rxjs_interop.br)(globalStore.campaignName).pipe((0,rxjs_operators.u5)(),(0,shareReplay.t)(1)),updateEncounterList=newEncounterList=>{const newDiaryEntry={...store.diaryentry(),encounters:newEncounterList};(0,ngrx_signals.M8)(store,{diaryentry:newDiaryEntry})},markAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.add(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})},unmarkAsBeingUpdated=encounterPk=>{const updatedIds=new Set(store._encountersInUpdateStateIds());updatedIds.delete(encounterPk),(0,ngrx_signals.M8)(store,{_encountersInUpdateStateIds:updatedIds})};return{reset:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"init",encounterServerModel:void 0,diaryentryQueryState:"init"}),addEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:[...store._encountersBeingCreated(),encounter]})},removeEmptyEncounterForCreation:encounter=>{(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},addEncounter:encounter=>{encounterService.createForDiaryentry(encounter).pipe((0,take.s)(1)).subscribe({next:newEncounterList=>{updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{_encountersBeingCreated:store._encountersBeingCreated().filter((enc=>enc.order_index!==encounter.order_index))})},error:err=>toastService.addToast(httpErrorToast(err))})},removeEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.delete(encounter.pk).pipe((0,take.s)(1)).subscribe({next:()=>{unmarkAsBeingUpdated(encounter.pk);const newEncounterList=store.diaryentry()?.encounters?.filter((listEnc=>listEnc.pk!==encounter.pk))??[];updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},updateEncounter:encounter=>{markAsBeingUpdated(encounter.pk),encounterService.update(encounter.pk,encounter).pipe((0,take.s)(1)).subscribe({next:newEncounter=>{unmarkAsBeingUpdated(encounter.pk);const diaryentry=store.diaryentry(),newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))})},swapEncounters:(encounter1Pk,encounter2Pk)=>{markAsBeingUpdated(encounter1Pk),markAsBeingUpdated(encounter2Pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.swapEncounterOrder(campaignName,encounter1Pk,encounter2Pk)))).subscribe({next:([updatedEnc1,updatedEnc2])=>{unmarkAsBeingUpdated(encounter1Pk),unmarkAsBeingUpdated(encounter2Pk);const newEncounterList1=(0,array.U1)(store.realEncounters(),updatedEnc1,"pk"),newEncounterList2=(0,array.U1)(newEncounterList1,updatedEnc2,"pk");updateEncounterList(newEncounterList2),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},cutInsertEncounter:(encounter,newOrderIndex)=>{markAsBeingUpdated(encounter.pk),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!0}),campaignName$.pipe((0,take.s)(1),(0,switchMap.n)((campaignName=>encounterService.cutInsertEncounter(campaignName,encounter,newOrderIndex)))).subscribe({next:newEncounterList=>{unmarkAsBeingUpdated(encounter.pk),updateEncounterList(newEncounterList),(0,ngrx_signals.M8)(store,{isUpdatingGlobally:!1})},error:err=>toastService.addToast(httpErrorToast(err))})},addEncounterConnection:connection=>encounterConnectionService.create(connection).pipe((0,take.s)(1)).subscribe({next:newConnection=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===newConnection.encounter)),newEncounter={...encounter,encounterConnections:[...encounter.encounterConnections??[],newConnection]},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)},error:err=>toastService.addToast(httpErrorToast(err))}),removeEncounterConnection:connection=>{encounterConnectionService.delete(connection.pk).pipe((0,take.s)(1)).subscribe((()=>{const diaryentry=store.diaryentry(),encounter=diaryentry.encounters.find((enc=>enc.pk===connection.encounter)),newEncounter={...encounter,encounterConnections:encounter.encounterConnections?.filter((con=>con.pk!==connection.pk))},newEncounterList=(0,array.U1)(diaryentry.encounters??[],newEncounter,"pk");updateEncounterList(newEncounterList)}))},deleteDiaryEntry:()=>{(0,ngrx_signals.M8)(store,{diaryEntryDeleteState:"loading"}),diaryentryService.delete(store.diaryentry()?.pk).pipe((0,take.s)(1)).subscribe({next:()=>(0,ngrx_signals.M8)(store,{diaryentry:void 0,diaryentryError:void 0,diaryEntryDeleteState:"success"}),error:err=>toastService.addToast(httpErrorToast(err))})}}})),(0,ngrx_signals.TK)((store=>({onInit:()=>{(0,logging.R)("DiaryEntryPageStore",store)}}))));var router=__webpack_require__("./node_modules/@angular/router/fesm2022/router.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),arrow_button_component=__webpack_require__("./src/design/atoms/arrow-button/arrow-button.component.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),encounter_component=__webpack_require__("./src/design/organisms/encounter/encounter.component.ts");let DiaryentryEncountersComponent=class DiaryentryEncountersComponent{constructor(){this.store=(0,core.inject)(DiaryentryPageStore),this.route=(0,core.inject)(router.nX),this.diaryEntryPk=(0,core.computed)((()=>this.store.diaryentry()?.pk)),this.campaignCharacters=this.store.campaignCharacters,this.campaignLocations=this.store.campaignLocations,this.encounterServerModel=this.store.encounterServerModel,this.canUpdate=this.store.hasWritePermission,this.canDelete=this.store.hasWritePermission,this.canCreate=this.store.hasWritePermission,this.state=(0,core.input)("READ"),this.encounterElements=(0,core.viewChildren)("encounter"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCutInsert=new core.EventEmitter,this.encounterSwap=new core.EventEmitter,this.addUnfinishedEncounter=(0,core.output)(),this.encountersToAdd=(0,core.signal)([]),this.isUpdatingGlobally=this.store.isUpdatingGlobally,this.isUpdatingAnything=this.store.isUpdatingAnyEncounters,this.cutEncounterIndex=(0,core.signal)(void 0),this.diaryEntryEncounters=this.store.diaryEntryEncounters;const encounterTitle=this.route.snapshot.params.encounterTitle;encounterTitle&&this.scrollToEncounter(encounterTitle)}addEmptyEncounterAtIndex(listIndex){const newOrderIndex=this.getOrderIndexForNewEncounter(listIndex),newEncounter={diaryentry:this.diaryEntryPk(),title:"New Encounter",order_index:newOrderIndex,description:""};this.store.addEmptyEncounterForCreation(newEncounter)}onInsertExcisedEncounter(insertionIndex){const cutEncounterIndex=this.cutEncounterIndex();if(null==cutEncounterIndex)return;if([cutEncounterIndex,cutEncounterIndex-1].includes(insertionIndex))return;let newOrderIndex;if(insertionIndex>this.diaryEntryEncounters().length){newOrderIndex=nextOrderIndex(this.diaryEntryEncounters()[this.diaryEntryEncounters().length-1].encounter)}else{newOrderIndex=this.diaryEntryEncounters()[insertionIndex].encounter.order_index}const encounterToInsert=this.diaryEntryEncounters()[cutEncounterIndex].encounter;this.store.cutInsertEncounter(encounterToInsert,newOrderIndex)}onExcisionClick(encounterIndex){const isAlreadyCuttingEncounter=null!=this.cutEncounterIndex(),isCuttingThisEncounter=this.cutEncounterIndex()===encounterIndex;isAlreadyCuttingEncounter&&isCuttingThisEncounter?this.cutEncounterIndex.set(void 0):isAlreadyCuttingEncounter||this.cutEncounterIndex.set(encounterIndex)}onEncounterOrderIncrease(encounterIndex){if(encounterIndex===this.diaryEntryEncounters().length-1)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,nextEncounter=this.nextRealEncounter(encounterIndex+1);nextEncounter&&this.store.swapEncounters(encounter.pk,nextEncounter.pk)}onEncounterOrderDecrease(encounterIndex){if(0===encounterIndex)return;const encounter=this.diaryEntryEncounters()[encounterIndex].encounter,priorEncounter=this.priorRealEncounter(encounterIndex-1);priorEncounter&&this.store.swapEncounters(encounter.pk,priorEncounter.pk)}onEncounterCreateCancel(encounterIndex){const createEncounterToRemove=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEmptyEncounterForCreation(createEncounterToRemove)}onEncounterDelete(encounterIndex){const encounterToDelete=this.diaryEntryEncounters()[encounterIndex].encounter;this.store.removeEncounter(encounterToDelete)}onEncounterCreate(encounter){const newEncounter={...encounter,order_index:nextOrderIndex(encounter)};this.encounterCreate.emit(newEncounter),this.store.removeEmptyEncounterForCreation(encounter)}scrollToEncounter(encounterTitle){(0,rxjs_interop.br)(this.encounterElements).pipe((0,rxjs_interop.pQ)(),(0,map.T)((elements=>elements.find((el=>el.nativeElement.id===encounterTitle)))),(0,rxjs_operators.u5)(),(0,take.s)(1)).subscribe((encounterElement=>encounterElement.nativeElement.scrollIntoView({behavior:"instant"})))}getOrderIndexForNewEncounter(insertionIndex){const isNewFirstEncounter=insertionIndex<0,isEmptyDiaryEntry=0===this.store.realEncounters().length,isNewFirstEncounterInFullDiaryentry=isNewFirstEncounter&&!isEmptyDiaryEntry,isLastEncounterInFullDiaryentry=insertionIndex>=this.store.realEncounters().length&&!isEmptyDiaryEntry;if(isEmptyDiaryEntry)return 0;if(isNewFirstEncounterInFullDiaryentry){return function priorOrderIndex(encounter){return getUnshiftedOrderIndex(encounter)-ORDER_INDEX_INCREMENT}(this.store.realEncounters()[0])}if(isLastEncounterInFullDiaryentry){return nextOrderIndex(this.store.realEncounters()[this.store.realEncounters().length-1])}return function getShiftedOrderIndex(encounter){return hasShiftedOrderIndex(encounter)?encounter.order_index:encounter.order_index+1}(this.diaryEntryEncounters()[insertionIndex].encounter)}isRealEncounter(encounter){return"pk"in encounter}nextRealEncounter(encounterIndex){const realEncountersAfterIndex=this.diaryEntryEncounters().slice(encounterIndex).filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersAfterIndex[0]?.encounter}priorRealEncounter(encounterIndex){const realEncountersBeforeIndex=this.diaryEntryEncounters().slice(0,encounterIndex+1).reverse().filter((encounter=>this.isRealEncounter(encounter.encounter)));return realEncountersBeforeIndex[0]?.encounter}static{this.ctorParameters=()=>[]}static{this.propDecorators={state:[{type:core.Input,args:[{isSignal:!0,alias:"state",required:!1,transform:void 0}]}],encounterElements:[{type:core.ViewChildren,args:["encounter",{isSignal:!0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCutInsert:[{type:core.Output}],encounterSwap:[{type:core.Output}],addUnfinishedEncounter:[{type:core.Output,args:["addUnfinishedEncounter"]}]}}};DiaryentryEncountersComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-diaryentry-encounters",template:'
\n @if (!isUpdatingGlobally()) {\n \x3c!-- Insert new first Encounter --\x3e\n @if (state() === "EDIT") {\n
\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n
\n }\n\n \x3c!-- Diaryentry - Encounters --\x3e\n
\n @for (entryEncounter of diaryEntryEncounters(); track entryEncounter) {\n \x3c!-- Encounter --\x3e\n \n @switch (state()) {\n @case ("READ") {\n \n }\n @case ("EDIT") {\n \n }\n }\n\n \x3c!-- Insert new Encounter --\x3e\n @if (state() === "EDIT" && (canCreate() || canUpdate())) {\n
\n @if (canCreate()) {\n \n }\n @if (canUpdate()) {\n \n }\n
\n }\n
\n }\n
\n } @else {\n \n }\n\n\n\n

\n {{ entryEncounter.encounter?.title }}\n

\n \n
\n\n\n \n @if (!context.entry.isUpdating) {\n \n @if (canUpdate() && context.entry.encounter.pk != null) {\n
\n \n \n
\n }\n } @else {\n \n }\n
\n
\n\n\x3c!-- Loading Spinner --\x3e\n\n\n\n \n \n\n',standalone:!0,imports:[button_component.Q,card_component.i,html_text_component.m,encounter_component.L,arrow_button_component.R,spinner_component.t,common.NgTemplateOutlet],animations:[slideDown.sb],styles:[diaryentry_encounters_componentngResource_default()]})],DiaryentryEncountersComponent)},"./src/design/organisms/encounter/encounter.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{L:()=>EncounterComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var encounter_componentngResource=__webpack_require__("./src/design/organisms/encounter/encounter.component.scss?ngResource"),encounter_componentngResource_default=__webpack_require__.n(encounter_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs_interop=__webpack_require__("./node_modules/@angular/core/fesm2022/rxjs-interop.mjs"),map=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),routing_service=__webpack_require__("./src/app/_services/routing.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),array=__webpack_require__("./src/utils/array.ts"),rxjs_operators=__webpack_require__("./src/utils/rxjs-operators.ts");let EncounterComponent=class EncounterComponent{constructor(routingService,formlyService){this.routingService=routingService,this.formlyService=formlyService,this.characters=core.input.required(),this.locations=core.input.required(),this.encounter=(0,core.input)(),this.serverModel=(0,core.input)(),this.canUpdate=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canDelete=(0,core.input)(!1),this.initialState=(0,core.input)("DISPLAY"),this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.encounterDelete=new core.EventEmitter,this.encounterUpdate=new core.EventEmitter,this.encounterCreate=new core.EventEmitter,this.encounterCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)({}),this.state=(0,core.signal)("DISPLAY"),this.badgeEntries=(0,core.computed)((()=>{const encounterConnections=this.encounter()?.encounterConnections??[];return this.parseConnection(encounterConnections)})),this.campaignName=(0,core.computed)((()=>this.encounter()?.campaign_details?.name)),this.locations$=(0,rxjs_interop.br)(this.locations).pipe((0,rxjs_operators.u5)()),this.formlyFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"title",inputKind:"STRING"}),this.formlyService.buildOverviewSelectConfig({key:"location",label:"Encounter Location",sortProp:"name_full",campaign:this.campaignName(),options$:this.locations$.pipe((0,map.T)((locs=>(0,array.Z)(locs,"name_full")))),labelProp:"name_full",required:!1}),this.formlyService.buildEditorConfig({key:"description",required:!0})]))}ngOnInit(){const model="CREATE"===this.initialState()&&this.canCreate()?{}:void 0;this.changeState(this.initialState(),model)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onEncounterCreate(encounter){this.encounterCreate.emit({...this.encounter(),...encounter}),this.changeState("DISPLAY",encounter)}onEncounterDelete(){this.encounterDelete.emit(this.encounter()),this.changeState("DISPLAY",void 0)}onEncounterUpdate(encounter){this.encounterUpdate.emit(encounter),this.changeState("DISPLAY",void 0)}onEncounterCreateCancel(){this.encounterCreateCancel.emit(),this.changeState("DISPLAY",void 0)}onConnectionDelete(connection){this.canDelete()&&this.connectionDelete.emit(connection)}onConnectionCreate(character){const newConnection={campaign:this.encounter()?.campaign_details?.id,encounter:this.encounter()?.pk,character:character.pk};this.connectionCreate.emit(newConnection)}onToggle(toggled){if("CREATE"===this.state())return void this.encounterCreateCancel.emit();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.encounter()}:void 0;this.changeState(nextState,nextModel)}parseConnection(connections){return connections.map((con=>{const characterName=con.character_details?.name;return{text:characterName,badgeValue:con,link:this.routingService.getRoutePath("character",{name:characterName,campaign:this.campaignName()})}}))}static{this.ctorParameters=()=>[{type:routing_service.O},{type:formly_service_service.$}]}static{this.propDecorators={characters:[{type:core.Input,args:[{isSignal:!0,alias:"characters",required:!0,transform:void 0}]}],locations:[{type:core.Input,args:[{isSignal:!0,alias:"locations",required:!0,transform:void 0}]}],encounter:[{type:core.Input,args:[{isSignal:!0,alias:"encounter",required:!1,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],initialState:[{type:core.Input,args:[{isSignal:!0,alias:"initialState",required:!1,transform:void 0}]}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}],encounterDelete:[{type:core.Output}],encounterUpdate:[{type:core.Output}],encounterCreate:[{type:core.Output}],encounterCreateCancel:[{type:core.Output}]}}};EncounterComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-encounter",template:'@if (encounter() || state() === "CREATE") {\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n\n @if (canUpdate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATEDUPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ encounter()?.title }}\n\n\n\n \x3c!-- Encounter --\x3e\n @let encounterVal = encounter();\n @if (encounterVal) {\n
\n \n
\n }\n\n \n\n \x3c!-- Encounter Connections --\x3e\n
\n \n
\n\n \x3c!-- Encounter Footer/Delete Toggle --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update "{{ encounter()?.title }}" \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canUpdate() && state() === "UPDATE") {\n \n } @else if (canUpdate() && state() === "OUTDATEDUPDATE") {\n \n }\n\n\n Create new Encounter \n\n\x3c!-- Form to Update Encounters --\x3e\n\n @if (canCreate() && state() === "CREATE") {\n \n }\n\n',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[encounter_componentngResource_default()]})],EncounterComponent)},"./src/design/organisms/toast-overlay/toast-overlay.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ToastOverlayComponent,f:()=>ToastService});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var toast_overlay_componentngResource=__webpack_require__("./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource"),toast_overlay_componentngResource_default=__webpack_require__.n(toast_overlay_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),slideDown=__webpack_require__("./src/design/animations/slideDown.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),logging=__webpack_require__("./src/utils/logging.ts");let ToastService=class ToastService{constructor(){this.toasts=(0,core.signal)([]),this.currentToast=(0,core.computed)((()=>this.toasts()[0]))}addToast(newToast){(0,logging.R)(this.addToast.name,newToast);const toasts=this.toasts();newToast.important?this.toasts.set([newToast,...toasts]):this.toasts.set([...toasts,newToast])}dismissToast(){const[_,...newToastList]=this.toasts();this.toasts.set(newToastList)}};ToastService=(0,tslib_es6.Cg)([(0,core.Injectable)({providedIn:"root"})],ToastService);let ToastOverlayComponent=class ToastOverlayComponent{constructor(){this.toastService=(0,core.inject)(ToastService),this.currentToast=this.toastService.currentToast,this.icon=(0,core.computed)((()=>{const currentToast=this.currentToast();if(currentToast)return this.toHeaderIcon(currentToast.type,currentToast.header?.icon)}))}dismissCurrentToast(){const currentToast=this.currentToast();if(!currentToast)return;const onHide=currentToast.onHide;onHide&&onHide(),this.toastService.dismissToast()}toHeaderIcon(toastType,icon){if(null!=icon)return icon;switch(toastType){case"DANGER":return"triangle-exclamation";case"WARNING":return"circle-exclamation";case"INFO":return"info-circle";case"SUCCESS":return"check";default:return"info"}}};ToastOverlayComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-toast-overlay",standalone:!0,imports:[ng_bootstrap.VR,button_component.Q,icon_component.R,common.NgTemplateOutlet],animations:[slideDown.st],template:'@let toast = currentToast();\n@let onToastClick = toast?.onToastClick;\n@if (toast && onToastClick) {\n \n \n \n} @else if (toast) {\n \n}\n\n\n @if (toast) {\n @if (toast.header) {\n \n \n \n @let headerIcon = icon();\n @if (headerIcon) {\n \n }\n \n \n \n\n \n \n } @else {\n \n \n \n }\n }\n\n\n\n
\n \n @let bodyIcon = toast?.body?.icon;\n @if (bodyIcon) {\n \n }\n\n @if (toast?.body?.text) {\n
\n }\n
\n\n
\n @let firstButton = toast?.body?.buttons?.[0];\n @if (firstButton) {\n \n }\n @let secondButton = toast?.body?.buttons?.[1];\n @if (secondButton) {\n \n }\n
\n
\n
\n',changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[toast_overlay_componentngResource_default()]})],ToastOverlayComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./src/utils/clipboard.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";function copyToClipboard(text){const windowSelection=window.getSelection(),documentSelection=window.getSelection();var userSelectedTextRange=void 0;(function userHasElementsSelected(){const selection=document.getSelection();if(null==selection)return!1;return selection?.rangeCount>0})()&&(userSelectedTextRange=documentSelection.getRangeAt(0),windowSelection.removeRange(userSelectedTextRange));const textContainerElement=function createTextContainerElement(text){const textContainerElement=document.createElement("div");textContainerElement.innerHTML=text;const strippedText=textContainerElement.textContent;return textContainerElement.innerHTML=strippedText.replaceAll(">","
> ").slice(4),textContainerElement.style.position="absolute",textContainerElement.style.left="-9999px",textContainerElement}(text);document.body.appendChild(textContainerElement);const copyRange=function selectElement(element){const selectedRange=document.createRange();return selectedRange.selectNode(element),window.getSelection()?.addRange(selectedRange),selectedRange}(textContainerElement);!function copyCurrentSelection(){try{document.execCommand("copy")}catch(err){window.alert("Your Browser Doesn't support this! Error : "+err)}}(),windowSelection.removeRange(copyRange),document.body.removeChild(textContainerElement),userSelectedTextRange&&windowSelection.addRange(userSelectedTextRange)}__webpack_require__.d(__webpack_exports__,{l:()=>copyToClipboard})},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/arrow-button/arrow-button.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".btn {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 2rem;\n padding: var(--spacer-3) var(--spacer-2);\n}\n.btn-disabled {\n cursor: not-allowed;\n}\n.btn-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/diaryentry-encounters/diaryentry-encounters.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".list {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}\n.list--loading {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.list__buttons {\n padding: 0;\n margin-bottom: var(--spacer-2);\n}\n\n.buttons {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.buttons__button {\n display: flex;\n}\n.buttons__button--right {\n display: none;\n}\n@media (min-width: 768px) {\n .buttons__button--right {\n display: flex;\n }\n}\n\n.repeated-unit {\n padding: 0;\n scroll-margin-top: var(--spacer-5);\n}\n@media (min-width: 768px) {\n .repeated-unit {\n padding: unset;\n }\n}\n\n.encounter-card {\n display: flex;\n justify-content: center;\n --card-flex-direction: column;\n --card-padding: var(--spacer-3);\n}\n@media (min-width: 768px) {\n .encounter-card {\n --card-flex-direction: row;\n }\n}\n.encounter-card__encounter {\n flex: 1;\n}\n.encounter-card__side-buttons {\n height: 100%;\n}\n\n.side-buttons {\n display: flex;\n flex-direction: row;\n justify-content: space-evenly;\n margin-left: var(--spacer-1);\n}\n@media (min-width: 768px) {\n .side-buttons {\n flex-direction: column;\n justify-content: unset;\n }\n}\n.side-buttons__button--edit {\n display: none;\n margin-bottom: var(--spacer-4);\n}\n@media (min-width: 768px) {\n .side-buttons__button--edit {\n display: unset;\n }\n}\n.side-buttons__button--arrow {\n padding: var(--spacer-1) var(--spacer-0);\n}\n\n.spinner {\n width: 100px;\n height: 100px;\n --thickness: 60px;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/encounter/encounter.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card {\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--spacer-4);\n}\n.card__heading {\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.card__text {\n margin-bottom: var(--spacer-1);\n}\n.card__connections {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n.card__edit-button {\n align-self: flex-start;\n}\n\n.connections {\n display: inline-flex;\n}\n.connections__label {\n margin-right: var(--spacer-4);\n}\n.connections__list {\n display: inline-flex;\n align-items: flex-start;\n flex-wrap: wrap;\n}\n.connections__connection, .connections__create-form {\n margin: var(--spacer-0) var(--spacer-2) var(--spacer-2) var(--spacer-1);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/toast-overlay/toast-overlay.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n position: absolute;\n}\n\n.toast:focus, .toast:focus-within, .toast:hover, .toast:focus-visible {\n outline: var(--focus-outline);\n}\n\n.toast {\n position: fixed;\n bottom: 10%;\n width: 93%;\n right: 3.5%;\n --bs-light-rgb: var(--bs-white);\n --bs-toast-header-color: var(--bs-white);\n --bs-toast-color: var(--bs-white);\n --toast-padding-x: var(--bs-toast-padding-x);\n --toast-padding-y: calc(var(--bs-toast-padding-y) / 2);\n --bs-toast-border-width: 3px;\n}\n.toast--primary {\n --bs-border-color-translucent: var(--bs-primary);\n}\n.toast--secondary {\n --bs-border-color-translucent: var(--bs-secondary);\n}\n.toast--success {\n --bs-border-color-translucent: var(--bs-success);\n}\n.toast--danger {\n --bs-border-color-translucent: var(--bs-danger);\n}\n.toast--warning {\n --bs-border-color-translucent: var(--bs-warning);\n}\n.toast--info {\n --bs-border-color-translucent: var(--bs-info);\n}\n.toast--light {\n --bs-border-color-translucent: var(--bs-light);\n}\n.toast--dark {\n --bs-border-color-translucent: var(--bs-dark);\n}\n@media (min-width: 576px) {\n .toast {\n width: fit-content;\n max-width: 50%;\n bottom: 5%;\n }\n}\n\n.toast-header__text {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: var(--spacer-2);\n flex: 1;\n font-weight: bold;\n}\n\n.body {\n display: flex;\n flex-direction: column;\n}\n.body__text {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: var(--spacer-2);\n text-align: start;\n}\n.body__text-container {\n max-height: calc(var(--bs-body-font-size) * 8);\n max-width: 100%;\n overflow: auto;\n}\n.body__button {\n width: fit-content;\n}\n.body__button-container {\n display: flex;\n flex-direction: row;\n gap: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/3569.3325a123.iframe.bundle.js b/3569.3325a123.iframe.bundle.js new file mode 100644 index 000000000..373d17563 --- /dev/null +++ b/3569.3325a123.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[3569],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/rule/rule.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>RuleComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var rule_componentngResource=__webpack_require__("./src/design/organisms/rule/rule.component.scss?ngResource"),rule_componentngResource_default=__webpack_require__.n(rule_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts");let RuleComponent=class RuleComponent{constructor(formlyService){this.formlyService=formlyService,this.rule=core.input.required(),this.canUpdate=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.serverModel=core.input.required(),this.cancelButtonType=(0,core.input)("SECONDARY"),this.submitButtonType=(0,core.input)("PRIMARY"),this.ruleDelete=new core.EventEmitter,this.ruleCreate=new core.EventEmitter,this.ruleUpdate=new core.EventEmitter,this.ruleCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)(void 0),this.state=(0,core.signal)("DISPLAY"),this.formlyFields=[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"}),this.formlyService.buildEditorConfig({key:"description"})]}ngOnInit(){null==this.rule()?.pk&&this.canCreate?this.changeState("CREATE",{}):this.changeState("DISPLAY",void 0)}onToggle(toggled){if("CREATE"===this.state())return void this.onRuleCreateCancel();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.rule()}:void 0;this.changeState(nextState,nextModel)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onRuleCreate(rule){this.ruleCreate.emit(rule),this.changeState("DISPLAY",void 0)}onRuleDelete(){this.ruleDelete.emit(this.rule())}onRuleUpdate(rule){this.ruleUpdate.emit(rule),this.changeState("DISPLAY",void 0)}onRuleCreateCancel(){this.changeState("DISPLAY",void 0),this.ruleCreateCancel.emit()}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={rule:[{type:core.Input,args:[{isSignal:!0,alias:"rule",required:!0,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],cancelButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"cancelButtonType",required:!1,transform:void 0}]}],submitButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"submitButtonType",required:!1,transform:void 0}]}],ruleDelete:[{type:core.Output}],ruleCreate:[{type:core.Output}],ruleUpdate:[{type:core.Output}],ruleCreateCancel:[{type:core.Output}]}}};RuleComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-rule",template:'@if (rule() || state() === "CREATE") {\n

\n \n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n }\n \n\n @if (canUpdate() || canCreate()) {\n \n }\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n }\n}\n\n\n {{ rule()?.name }}\n\n\n\n @let ruleVal = rule();\n @if (ruleVal) {\n \n }\n\n \x3c!-- Delete Toggler --\x3e\n @if (canDelete()) {\n \n }\n\n\n Update \'{{ rule()?.name }}\' \n\n\n \n\n\n Create new Rule \n\n\n @if (canCreate()) {\n \n }\n\n\n\n \n\n',standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,molecules.Ts,molecules.s2,molecules.zx],styles:[rule_componentngResource_default()]})],RuleComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/rule/rule.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card__heading {\n display: flex;\n justify-content: space-between;\n margin-bottom: var(--spacer-3);\n}\n.card__body {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n\n.heading__subtext {\n --bs-text-opacity: 1;\n color: #9b9a9a;\n}\n\n.body {\n margin-bottom: var(--spacer-4);\n}\n.body__entry {\n margin-bottom: var(--spacer-4);\n}\n.body__subheading {\n margin-bottom: var(--spacer-1);\n}\n.body__subbody {\n display: flex;\n flex-direction: column;\n margin-left: var(--spacer-4);\n}\n.body__subbody--list {\n margin-left: var(--spacer-2);\n}\n.body__link {\n width: fit-content;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/3569.533e5ce3.iframe.bundle.js b/3569.533e5ce3.iframe.bundle.js deleted file mode 100644 index a1b23934a..000000000 --- a/3569.533e5ce3.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[3569],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/rule/rule.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{M:()=>RuleComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var rule_componentngResource=__webpack_require__("./src/design/organisms/rule/rule.component.scss?ngResource"),rule_componentngResource_default=__webpack_require__.n(rule_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts");let RuleComponent=class RuleComponent{constructor(formlyService){this.formlyService=formlyService,this.rule=core.input.required(),this.canUpdate=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.serverModel=core.input.required(),this.cancelButtonType=(0,core.input)("SECONDARY"),this.submitButtonType=(0,core.input)("PRIMARY"),this.ruleDelete=new core.EventEmitter,this.ruleCreate=new core.EventEmitter,this.ruleUpdate=new core.EventEmitter,this.ruleCreateCancel=new core.EventEmitter,this.userModel=(0,core.signal)(void 0),this.state=(0,core.signal)("DISPLAY"),this.formlyFields=[this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"}),this.formlyService.buildEditorConfig({key:"description"})]}ngOnInit(){null==this.rule()?.pk&&this.canCreate?this.changeState("CREATE",{}):this.changeState("DISPLAY",void 0)}onToggle(toggled){if("CREATE"===this.state())return void this.onRuleCreateCancel();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.rule()}:void 0;this.changeState(nextState,nextModel)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onRuleCreate(rule){this.ruleCreate.emit(rule),this.changeState("DISPLAY",void 0)}onRuleDelete(){this.ruleDelete.emit(this.rule())}onRuleUpdate(rule){this.ruleUpdate.emit(rule),this.changeState("DISPLAY",void 0)}onRuleCreateCancel(){this.changeState("DISPLAY",void 0),this.ruleCreateCancel.emit()}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={rule:[{type:core.Input,args:[{isSignal:!0,alias:"rule",required:!0,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],cancelButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"cancelButtonType",required:!1,transform:void 0}]}],submitButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"submitButtonType",required:!1,transform:void 0}]}],ruleDelete:[{type:core.Output}],ruleCreate:[{type:core.Output}],ruleUpdate:[{type:core.Output}],ruleCreateCancel:[{type:core.Output}]}}};RuleComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-rule",template:'@if (rule() || state() === "CREATE") {\n

\n \n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n }\n \n\n @if (canUpdate() || canCreate()) {\n \n }\n

\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n }\n}\n\n\n {{ rule()?.name }}\n\n\n\n @let ruleVal = rule();\n @if (ruleVal) {\n \n }\n\n \x3c!-- Delete Toggler --\x3e\n @if (canDelete()) {\n \n }\n\n\n Update \'{{ rule()?.name }}\' \n\n\n \n\n\n Create new Rule \n\n\n @if (canCreate()) {\n \n }\n\n\n\n \n\n',standalone:!0,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,molecules.Ts,molecules.s2,molecules.zx],styles:[rule_componentngResource_default()]})],RuleComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/rule/rule.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".card__heading {\n display: flex;\n justify-content: space-between;\n margin-bottom: var(--spacer-3);\n}\n.card__body {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n\n.heading__subtext {\n --bs-text-opacity: 1;\n color: #9b9a9a;\n}\n\n.body {\n margin-bottom: var(--spacer-4);\n}\n.body__entry {\n margin-bottom: var(--spacer-4);\n}\n.body__subheading {\n margin-bottom: var(--spacer-1);\n}\n.body__subbody {\n display: flex;\n flex-direction: column;\n margin-left: var(--spacer-4);\n}\n.body__subbody--list {\n margin-left: var(--spacer-2);\n}\n.body__link {\n width: fit-content;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/3881.12b9c2c5.iframe.bundle.js b/3881.12b9c2c5.iframe.bundle.js deleted file mode 100644 index 96294f0d1..000000000 --- a/3881.12b9c2c5.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[3881],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/spell/spell.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>SpellComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var spell_componentngResource=__webpack_require__("./src/design/organisms/spell/spell.component.scss?ngResource"),spell_componentngResource_default=__webpack_require__.n(spell_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts");const SPELL_CASTING_TIME=[{label:"1 Action",value:"1 Action"},{label:"1 Bonus Action",value:"1 Bonus Action"},{label:"1 Reaction",value:"1 Reaction"},{label:"1 Minute",value:"1 Minute"},{label:"10 Minutes",value:"10 Minutes"},{label:"1 Hour",value:"1 Hour"},{label:"8 Hours",value:"8 Hours"},{label:"12 Hours",value:"12 Hours"},{label:"24 Hours",value:"24 Hours"}],SPELL_SAVES=[{value:"ATK",label:"Attack"},{value:"STR",label:"Strength"},{value:"CON",label:"Constitution"},{value:"DEX",label:"Dexterity"},{value:"INT",label:"Intelligence"},{value:"WIS",label:"Wisdom"},{value:"CHA",label:"Charisma"}],SPELL_LEVELS=[{value:0,label:"Cantrip"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"},{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"}],SPELL_DURATION=[{value:"Instantaneous",label:"Instantaneous"},{value:"1 Round",label:"1 Round"},{value:"6 Rounds",label:"6 Rounds"},{value:"1 Minute",label:"1 Minute"},{value:"10 Minutes",label:"10 Minutes"},{value:"1 Hour",label:"1 Hour"},{value:"2 Hours",label:"2 Hours"},{value:"8 Hours",label:"8 Hours"},{value:"24 Hours",label:"24 Hours"},{value:"1 Day",label:"1 Day"},{value:"7 Day",label:"7 Days"},{value:"10 Day",label:"10 Days"},{value:"30 Day",label:"30 Days"},{value:"Special",label:"Special"},{value:"Until Dispelled",label:"Until Dispelled"}],SPELL_RANGES=[{value:"Self",label:"Self"},{value:"5 Feet",label:"5 Feet"},{value:"10 Feet",label:"10 Feet"},{value:"15 Feet",label:"15 Feet"},{value:"30 Feet",label:"30 Feet"},{value:"60 Feet",label:"60 Feet"},{value:"90 Feet",label:"90 Feet"},{value:"100 Feet",label:"100 Feet"},{value:"120 Feet",label:"120 Feet"},{value:"150 Feet",label:"150 Feet"},{value:"1 Mile",label:"1 Mile"},{value:"3 Miles",label:"3 Miles"},{value:"10 Miles",label:"10 Miles"}],SPELL_COMPONENTS=[{value:"V",label:"V"},{value:"S",label:"S"},{value:"M",label:"M"},{value:"VS",label:"VS"},{value:"VM",label:"VM"},{value:"SM",label:"SM"},{value:"VSM",label:"VSM"},{value:"VSM*",label:"VSM*"}],SPELL_SCHOOLS=[{value:"Abjuration",label:"Abjuration"},{value:"Conjuration",label:"Conjuration"},{value:"Divination",label:"Divination"},{value:"Enchantment",label:"Enchantment"},{value:"Evocation",label:"Evocation"},{value:"Illusion",label:"Illusion"},{value:"Necromancy",label:"Necromancy"},{value:"Transmutation",label:"Transmutation"}];let SpellComponent=class SpellComponent{constructor(formlyService){this.formlyService=formlyService,this.spell=core.input.required(),this.playerClasses=core.input.required(),this.canUpdate=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.serverModel=core.input.required(),this.cancelButtonType=(0,core.input)("SECONDARY"),this.submitButtonType=(0,core.input)("PRIMARY"),this.spellDelete=new core.EventEmitter,this.spellCreate=new core.EventEmitter,this.spellUpdate=new core.EventEmitter,this.spellCreateCancel=new core.EventEmitter,this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.userModel=(0,core.signal)(void 0),this.state=(0,core.signal)("DISPLAY"),this.playerClassConnections=(0,core.computed)((()=>(this.spell()?.player_class_connections??[]).map((con=>({badgeValue:con,text:con.player_class_details?.name,link:void 0}))))),this.playerClassOptions=(0,core.computed)((()=>{const playerClassInSpell=new Set(this.playerClassConnections().map((con=>con.badgeValue.player_class)));return this.playerClasses().filter((playerClass=>playerClass.pk&&!playerClassInSpell.has(playerClass.pk)))})),this.formlyFields=[this.formlyService.buildCheckboxConfig({key:"concentration",label:"Concentration",defaultValue:!1,required:!1}),this.formlyService.buildCheckboxConfig({key:"ritual",defaultValue:!1,required:!1}),this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"}),this.formlyService.buildStaticSelectConfig({key:"spell_level",label:"Spell Level",options:SPELL_LEVELS}),this.formlyService.buildStaticSelectConfig({key:"casting_time",label:"Casting Time",options:SPELL_CASTING_TIME}),this.formlyService.buildStaticSelectConfig({key:"duration",options:SPELL_DURATION}),this.formlyService.buildStaticSelectConfig({key:"range",options:SPELL_RANGES}),this.formlyService.buildStaticSelectConfig({key:"components",options:SPELL_COMPONENTS}),this.formlyService.buildStaticSelectConfig({key:"school",options:SPELL_SCHOOLS}),this.formlyService.buildStaticSelectConfig({key:"saving_throw",label:"Saving Throw",options:SPELL_SAVES,required:!1}),this.formlyService.buildInputConfig({key:"damage",label:"Effect",maxLength:40,required:!1,inputKind:"STRING"}),this.formlyService.buildEditorConfig({key:"description",required:!1})]}ngOnInit(){null==this.spell()?.pk&&this.canCreate()&&this.changeState("CREATE",{})}onToggle(toggled){if("CREATE"===this.state())return void this.onSpellCreateCancel();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.spell()}:void 0;this.changeState(nextState,nextModel)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onSpellCreate(spell){this.spellCreate.emit(spell),this.changeState("DISPLAY",void 0)}onSpellDelete(){this.spellDelete.emit(this.spell())}onSpellUpdate(spell){this.spellUpdate.emit(spell),this.changeState("DISPLAY",void 0)}onConnectionCreate(selectedClass){const connection={spell:this.spell()?.pk,player_class:selectedClass.pk};this.connectionCreate.emit(connection)}onSpellCreateCancel(){this.changeState("DISPLAY",void 0),this.spellCreateCancel.emit()}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={spell:[{type:core.Input,args:[{isSignal:!0,alias:"spell",required:!0,transform:void 0}]}],playerClasses:[{type:core.Input,args:[{isSignal:!0,alias:"playerClasses",required:!0,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],cancelButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"cancelButtonType",required:!1,transform:void 0}]}],submitButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"submitButtonType",required:!1,transform:void 0}]}],spellDelete:[{type:core.Output}],spellCreate:[{type:core.Output}],spellUpdate:[{type:core.Output}],spellCreateCancel:[{type:core.Output}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}]}}};SpellComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-spell",template:'@if (spell() || state() === "CREATE") {\n

\n \n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n }\n \n\n @if (canUpdate() || canCreate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ spell()?.name }}\n\n\n\n \x3c!-- Spell Table --\x3e\n
\n
\n \x3c!-- Spell Level --\x3e\n
\n SPELL LEVEL \n
\n {{ spell()?.spell_level }}\n
\n
\n\n \x3c!-- Casting Time --\x3e\n
\n CASTING TIME \n
\n {{ spell()?.casting_time }}\n
\n
\n\n \x3c!-- Range/Area --\x3e\n
\n RANGE/AREA \n
\n {{ spell()?.range }}\n
\n
\n\n \x3c!-- Components --\x3e\n
\n COMPONENTS \n
\n {{ spell()?.components }}\n
\n
\n\n \x3c!-- Duration --\x3e\n
\n DURATION \n
\n {{ spell()?.duration }}\n
\n
\n\n \x3c!-- School --\x3e\n
\n SCHOOL\n
\n {{ spell()?.school }}\n
\n
\n\n \x3c!-- Attack/Save --\x3e\n
\n ATTACK/SAVE \n
\n {{ spell()?.saving_throw }}\n
\n
\n\n \x3c!-- Damage/Effect --\x3e\n
\n EFFECT\n
\n {{ spell()?.damage }}\n
\n
\n\n \x3c!-- Description --\x3e\n
\n DESCRIPTION\n
\n \n
\n
\n
\n
\n\n \n\n \n\n \x3c!-- Delete Toggler --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update \'{{ spell()?.name }}\' \n\n\n \n\n\n Create new Spell \n\n\n @if (canCreate()) {\n \n }\n\n\n\n \n\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[spell_componentngResource_default()]})],SpellComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/spell/spell.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n --spell-heading-bg-color: hsla(0, 0%, 100%, 0.05);\n --spell-body-bg-color: rgba(27, 31, 34, 0.95);\n}\n\n.card__heading {\n display: flex;\n justify-content: space-between;\n margin-bottom: var(--spacer-3);\n}\n.card__body {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n\n.spell__entry {\n display: flex;\n flex-direction: column;\n padding: var(--spacer-0);\n}\n.spell__heading {\n border-bottom: solid 1px var(--bs-gray);\n background-color: var(--spell-heading-bg-color);\n padding: var(--spacer-2);\n}\n.spell__body {\n height: 100%;\n background-color: var(--spell-body-bg-color);\n padding: var(--spacer-2);\n}\n\n.heading__subtext {\n --bs-text-opacity: 1;\n color: #9b9a9a;\n}\n\n.body {\n margin-bottom: var(--spacer-4);\n}\n.body__entry {\n margin-bottom: var(--spacer-4);\n}\n.body__subheading {\n margin-bottom: var(--spacer-1);\n}\n.body__subbody {\n display: flex;\n flex-direction: column;\n margin-left: var(--spacer-4);\n}\n.body__subbody--list {\n margin-left: var(--spacer-2);\n}\n.body__link {\n width: fit-content;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/3881.4a4d6216.iframe.bundle.js b/3881.4a4d6216.iframe.bundle.js new file mode 100644 index 000000000..e6be54838 --- /dev/null +++ b/3881.4a4d6216.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[3881],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/html-text/html-text.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{m:()=>HtmlTextComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var html_text_componentngResource=__webpack_require__("./src/design/atoms/html-text/html-text.component.scss?ngResource"),html_text_componentngResource_default=__webpack_require__.n(html_text_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let HtmlTextComponent=class HtmlTextComponent{constructor(){this.text=core.input.required()}static{this.propDecorators={text:[{type:core.Input,args:[{isSignal:!0,alias:"text",required:!0,transform:void 0}]}]}}};HtmlTextComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-html-text",template:'
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,styles:[html_text_componentngResource_default()]})],HtmlTextComponent)},"./src/design/organisms/spell/spell.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{o:()=>SpellComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var spell_componentngResource=__webpack_require__("./src/design/organisms/spell/spell.component.scss?ngResource"),spell_componentngResource_default=__webpack_require__.n(spell_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),html_text_component=__webpack_require__("./src/design/atoms/html-text/html-text.component.ts"),separator_component=__webpack_require__("./src/design/atoms/separator/separator.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts");const SPELL_CASTING_TIME=[{label:"1 Action",value:"1 Action"},{label:"1 Bonus Action",value:"1 Bonus Action"},{label:"1 Reaction",value:"1 Reaction"},{label:"1 Minute",value:"1 Minute"},{label:"10 Minutes",value:"10 Minutes"},{label:"1 Hour",value:"1 Hour"},{label:"8 Hours",value:"8 Hours"},{label:"12 Hours",value:"12 Hours"},{label:"24 Hours",value:"24 Hours"}],SPELL_SAVES=[{value:"ATK",label:"Attack"},{value:"STR",label:"Strength"},{value:"CON",label:"Constitution"},{value:"DEX",label:"Dexterity"},{value:"INT",label:"Intelligence"},{value:"WIS",label:"Wisdom"},{value:"CHA",label:"Charisma"}],SPELL_LEVELS=[{value:0,label:"Cantrip"},{value:1,label:"1"},{value:2,label:"2"},{value:3,label:"3"},{value:4,label:"4"},{value:5,label:"5"},{value:6,label:"6"},{value:7,label:"7"},{value:8,label:"8"},{value:9,label:"9"}],SPELL_DURATION=[{value:"Instantaneous",label:"Instantaneous"},{value:"1 Round",label:"1 Round"},{value:"6 Rounds",label:"6 Rounds"},{value:"1 Minute",label:"1 Minute"},{value:"10 Minutes",label:"10 Minutes"},{value:"1 Hour",label:"1 Hour"},{value:"2 Hours",label:"2 Hours"},{value:"8 Hours",label:"8 Hours"},{value:"24 Hours",label:"24 Hours"},{value:"1 Day",label:"1 Day"},{value:"7 Day",label:"7 Days"},{value:"10 Day",label:"10 Days"},{value:"30 Day",label:"30 Days"},{value:"Special",label:"Special"},{value:"Until Dispelled",label:"Until Dispelled"}],SPELL_RANGES=[{value:"Self",label:"Self"},{value:"5 Feet",label:"5 Feet"},{value:"10 Feet",label:"10 Feet"},{value:"15 Feet",label:"15 Feet"},{value:"30 Feet",label:"30 Feet"},{value:"60 Feet",label:"60 Feet"},{value:"90 Feet",label:"90 Feet"},{value:"100 Feet",label:"100 Feet"},{value:"120 Feet",label:"120 Feet"},{value:"150 Feet",label:"150 Feet"},{value:"1 Mile",label:"1 Mile"},{value:"3 Miles",label:"3 Miles"},{value:"10 Miles",label:"10 Miles"}],SPELL_COMPONENTS=[{value:"V",label:"V"},{value:"S",label:"S"},{value:"M",label:"M"},{value:"VS",label:"VS"},{value:"VM",label:"VM"},{value:"SM",label:"SM"},{value:"VSM",label:"VSM"},{value:"VSM*",label:"VSM*"}],SPELL_SCHOOLS=[{value:"Abjuration",label:"Abjuration"},{value:"Conjuration",label:"Conjuration"},{value:"Divination",label:"Divination"},{value:"Enchantment",label:"Enchantment"},{value:"Evocation",label:"Evocation"},{value:"Illusion",label:"Illusion"},{value:"Necromancy",label:"Necromancy"},{value:"Transmutation",label:"Transmutation"}];let SpellComponent=class SpellComponent{constructor(formlyService){this.formlyService=formlyService,this.spell=core.input.required(),this.playerClasses=core.input.required(),this.canUpdate=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.serverModel=core.input.required(),this.cancelButtonType=(0,core.input)("SECONDARY"),this.submitButtonType=(0,core.input)("PRIMARY"),this.spellDelete=new core.EventEmitter,this.spellCreate=new core.EventEmitter,this.spellUpdate=new core.EventEmitter,this.spellCreateCancel=new core.EventEmitter,this.connectionDelete=new core.EventEmitter,this.connectionCreate=new core.EventEmitter,this.userModel=(0,core.signal)(void 0),this.state=(0,core.signal)("DISPLAY"),this.playerClassConnections=(0,core.computed)((()=>(this.spell()?.player_class_connections??[]).map((con=>({badgeValue:con,text:con.player_class_details?.name,link:void 0}))))),this.playerClassOptions=(0,core.computed)((()=>{const playerClassInSpell=new Set(this.playerClassConnections().map((con=>con.badgeValue.player_class)));return this.playerClasses().filter((playerClass=>playerClass.pk&&!playerClassInSpell.has(playerClass.pk)))})),this.formlyFields=[this.formlyService.buildCheckboxConfig({key:"concentration",label:"Concentration",defaultValue:!1,required:!1}),this.formlyService.buildCheckboxConfig({key:"ritual",defaultValue:!1,required:!1}),this.formlyService.buildInputConfig({key:"name",inputKind:"NAME"}),this.formlyService.buildStaticSelectConfig({key:"spell_level",label:"Spell Level",options:SPELL_LEVELS}),this.formlyService.buildStaticSelectConfig({key:"casting_time",label:"Casting Time",options:SPELL_CASTING_TIME}),this.formlyService.buildStaticSelectConfig({key:"duration",options:SPELL_DURATION}),this.formlyService.buildStaticSelectConfig({key:"range",options:SPELL_RANGES}),this.formlyService.buildStaticSelectConfig({key:"components",options:SPELL_COMPONENTS}),this.formlyService.buildStaticSelectConfig({key:"school",options:SPELL_SCHOOLS}),this.formlyService.buildStaticSelectConfig({key:"saving_throw",label:"Saving Throw",options:SPELL_SAVES,required:!1}),this.formlyService.buildInputConfig({key:"damage",label:"Effect",maxLength:40,required:!1,inputKind:"STRING"}),this.formlyService.buildEditorConfig({key:"description",required:!1})]}ngOnInit(){null==this.spell()?.pk&&this.canCreate()&&this.changeState("CREATE",{})}onToggle(toggled){if("CREATE"===this.state())return void this.onSpellCreateCancel();const nextState="DISPLAY"===this.state()?"UPDATE":"DISPLAY",nextModel=toggled?{...this.spell()}:void 0;this.changeState(nextState,nextModel)}changeState(newState,newModel){this.state.set(newState),this.userModel.set({...newModel})}onSpellCreate(spell){this.spellCreate.emit(spell),this.changeState("DISPLAY",void 0)}onSpellDelete(){this.spellDelete.emit(this.spell())}onSpellUpdate(spell){this.spellUpdate.emit(spell),this.changeState("DISPLAY",void 0)}onConnectionCreate(selectedClass){const connection={spell:this.spell()?.pk,player_class:selectedClass.pk};this.connectionCreate.emit(connection)}onSpellCreateCancel(){this.changeState("DISPLAY",void 0),this.spellCreateCancel.emit()}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={spell:[{type:core.Input,args:[{isSignal:!0,alias:"spell",required:!0,transform:void 0}]}],playerClasses:[{type:core.Input,args:[{isSignal:!0,alias:"playerClasses",required:!0,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],serverModel:[{type:core.Input,args:[{isSignal:!0,alias:"serverModel",required:!0,transform:void 0}]}],cancelButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"cancelButtonType",required:!1,transform:void 0}]}],submitButtonType:[{type:core.Input,args:[{isSignal:!0,alias:"submitButtonType",required:!1,transform:void 0}]}],spellDelete:[{type:core.Output}],spellCreate:[{type:core.Output}],spellUpdate:[{type:core.Output}],spellCreateCancel:[{type:core.Output}],connectionDelete:[{type:core.Output}],connectionCreate:[{type:core.Output}]}}};SpellComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-spell",template:'@if (spell() || state() === "CREATE") {\n

\n \n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n }\n \n\n @if (canUpdate() || canCreate()) {\n \n }\n

\n\n @switch (state()) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("OUTDATED_UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n }\n}\n\n\n {{ spell()?.name }}\n\n\n\n \x3c!-- Spell Table --\x3e\n
\n
\n \x3c!-- Spell Level --\x3e\n
\n SPELL LEVEL \n
\n {{ spell()?.spell_level }}\n
\n
\n\n \x3c!-- Casting Time --\x3e\n
\n CASTING TIME \n
\n {{ spell()?.casting_time }}\n
\n
\n\n \x3c!-- Range/Area --\x3e\n
\n RANGE/AREA \n
\n {{ spell()?.range }}\n
\n
\n\n \x3c!-- Components --\x3e\n
\n COMPONENTS \n
\n {{ spell()?.components }}\n
\n
\n\n \x3c!-- Duration --\x3e\n
\n DURATION \n
\n {{ spell()?.duration }}\n
\n
\n\n \x3c!-- School --\x3e\n
\n SCHOOL\n
\n {{ spell()?.school }}\n
\n
\n\n \x3c!-- Attack/Save --\x3e\n
\n ATTACK/SAVE \n
\n {{ spell()?.saving_throw }}\n
\n
\n\n \x3c!-- Damage/Effect --\x3e\n
\n EFFECT\n
\n {{ spell()?.damage }}\n
\n
\n\n \x3c!-- Description --\x3e\n
\n DESCRIPTION\n
\n \n
\n
\n
\n
\n\n \n\n \n\n \x3c!-- Delete Toggler --\x3e\n @if (canDelete()) {\n \n }\n
\n\n Update \'{{ spell()?.name }}\' \n\n\n \n\n\n Create new Spell \n\n\n @if (canCreate()) {\n \n }\n\n\n\n \n\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[common.NgTemplateOutlet,molecules.aU,html_text_component.m,separator_component.F,molecules.pn,molecules.Ts,molecules.s2,molecules.zx],styles:[spell_componentngResource_default()]})],SpellComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/html-text/html-text.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/spell/spell.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n --spell-heading-bg-color: hsla(0, 0%, 100%, 0.05);\n --spell-body-bg-color: rgba(27, 31, 34, 0.95);\n}\n\n.card__heading {\n display: flex;\n justify-content: space-between;\n margin-bottom: var(--spacer-3);\n}\n.card__body {\n margin-bottom: var(--spacer-3);\n}\n.card__delete-confirmer {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n display: flex;\n justify-content: flex-end;\n width: 100%;\n --confirmation-bg-color: var(--bs-dark);\n}\n\n.spell__entry {\n display: flex;\n flex-direction: column;\n padding: var(--spacer-0);\n}\n.spell__heading {\n border-bottom: solid 1px var(--bs-gray);\n background-color: var(--spell-heading-bg-color);\n padding: var(--spacer-2);\n}\n.spell__body {\n height: 100%;\n background-color: var(--spell-body-bg-color);\n padding: var(--spacer-2);\n}\n\n.heading__subtext {\n --bs-text-opacity: 1;\n color: #9b9a9a;\n}\n\n.body {\n margin-bottom: var(--spacer-4);\n}\n.body__entry {\n margin-bottom: var(--spacer-4);\n}\n.body__subheading {\n margin-bottom: var(--spacer-1);\n}\n.body__subbody {\n display: flex;\n flex-direction: column;\n margin-left: var(--spacer-4);\n}\n.body__subbody--list {\n margin-left: var(--spacer-2);\n}\n.body__link {\n width: fit-content;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/5483.c59eea1c.iframe.bundle.js b/5483.c59eea1c.iframe.bundle.js deleted file mode 100644 index d89deeb8c..000000000 --- a/5483.c59eea1c.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[5483],{"./src/app/_services/article/organization.service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>dummyOrganizations});const dummyOrganizations=[{article_type:"organization",description:" Magic is Chaos and sometimes people are in touch with this force. Though understanding and control we order the Chaos. It is only when we allow it to overcome us that...",pk:17,name_full:"Academy Of Schools",name:"Academy Of Schools",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-10-12T15:33:07.176299Z"},{article_type:"organization",description:" The ruling family of Hallan. Loyal to Duke Aspen. Somewhat politically powerful as Hallan is an important trading post. Further make an effort to be very presentable and are well-practiced in...",pk:13,name_full:"Affingtons",name:"Affingtons",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-12-22T16:40:48.834877Z"},{article_type:"organization",description:" The Aspen blood line is one of the main noble blood lines in Aldrune.\nTheir innate ability to sense motion and vibration has led to them being excellent hunters in the dark...",pk:5,name_full:"Aspen Blood",name:"Aspen Blood",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-11T16:55:59.479546Z"},{article_type:"organization",description:" \nThe black feather blood line is one of the main noble blood lines in Aldrune.\nThose of this lineage have innate control over animals and can communicate with them freely and without...",pk:6,name_full:"Black Feather Blood",name:"Black Feather Blood",campaign_details:{name:"Aldrune",id:1},update_datetime:"2021-07-19T10:15:03.064474Z"},{article_type:"organization",description:" A guild of mercenaries protecting caravan's.\nAround for 20 years or so. Part of the guild faction supporting Mordred. Used to be led by Orman Ethelwick until I killed him.",pk:14,name_full:"Bronze Hoof guild",name:"Bronze Hoof guild",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-12-06T21:19:17.466740Z"},{article_type:"organization",description:" A village made up of an unknown species, located somewhere in the desert hellscape we were telported to after our fight with Prince Somnis.\nRoughly somewhere upwards of 50 people in size,...",pk:41,name_full:"Bug people village",name:"Bug people village",campaign_details:{name:"Aldrune",id:1},update_datetime:"2021-07-31T12:53:45.845264Z"},{article_type:"organization",description:" The group of archangels that have their own stars. All of them have their own solar systems, as Lucifer's planetoid had.\nFen managed to find where Lucifer's star used to be. Fen...",pk:55,name_full:"Celestial Archangelic Beings",name:"Celestial Archangelic Beings",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-10-12T09:23:03.231654Z"},{article_type:"organization",description:" \nHolding more favour with the people than even that of the Aspen family, the Church of Brigantia has a presence in every common folks life. Their clerics care for the land...",pk:1,name_full:"Church of Brigantia",name:"Church of Brigantia",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-03T16:15:22.612710Z"},{article_type:"organization",description:" \nThis Church keeps mostly to itself and its worshipers, exercising as little force over others as possible, however in times of tense relations between the Dwarves of the mountain who supply...",pk:2,name_full:"Church of Dunatis",name:"Church of Dunatis",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-03T16:15:07.906083Z"},{article_type:"organization",description:" \nGeneral\nAdjudicators of battles. Healers of the wounded and in times gone by, hunters of the chaos touched who had given in to the power.\nThe Church of Morrigan has a bloody history,...",pk:3,name_full:"Church of Morrigan",name:"Church of Morrigan",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-05-21T18:46:34.125916Z"},{article_type:"organization",description:" \nThe Church of Silvanus holds power over the North in particular, where it's cathedral is located. The Church attracts many talented hunters and skilled explorers. The Church is in charge of...",pk:4,name_full:"Church of Silvanus",name:"Church of Silvanus",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-03T16:14:50.614549Z"},{article_type:"organization",description:" An institution designed to create a diverse and thus group of individuals from all stratum who will determine who will be the next King when no clear line of succession is...",pk:18,name_full:"Council Of Succession",name:"Council Of Succession",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-06-10T12:00:00.000000Z"},{article_type:"organization",description:" A group of scoundrels in Merren that are of key importance. Their leader is pretty well liked within the underground ecosystem, as they have the best scouts. She used to work...",pk:37,name_full:"Dock Hawks",name:"Dock Hawks",campaign_details:{name:"Aldrune",id:1},update_datetime:"2021-05-02T12:04:47.463005Z"},{article_type:"organization",description:" Were a group of dwarves from Fen's Era famed for their gems",pk:23,name_full:"Dwarrow {Status Unknown}",name:"Dwarrow {Status Unknown}",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-07-13T12:00:00.000000Z"}].map((entry=>({...entry,getAbsoluteRouterUrl:()=>"/organization/123"})))},"./src/app/_services/article/player-class.service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>dummyClasses});const dummyClasses=[{name:"Artificer",pk:1,update_datetime:"2021-04-20T14:31:24.033655Z"},{name:"Barbarian",pk:2,update_datetime:"2021-04-20T14:31:27.810089Z"},{name:"Bard",pk:3,update_datetime:"2021-04-20T14:31:36.408312Z"},{name:"Cleric",pk:4,update_datetime:"2021-04-20T14:31:39.485140Z"},{name:"Druid",pk:5,update_datetime:"2021-04-20T14:31:50.431678Z"},{name:"Fighter",pk:6,update_datetime:"2021-04-20T14:31:53.562771Z"},{name:"Monk",pk:7,update_datetime:"2021-04-20T14:31:56.226259Z"},{name:"Paladin",pk:8,update_datetime:"2021-04-20T14:31:58.897597Z"},{name:"Ranger",pk:9,update_datetime:"2021-04-20T14:32:06.986455Z"},{name:"Rogue",pk:10,update_datetime:"2021-04-20T14:32:09.472989Z"},{name:"Sorcerer",pk:11,update_datetime:"2021-04-20T14:32:11.740394Z"},{name:"Warlock",pk:12,update_datetime:"2021-04-20T14:32:13.937586Z"},{name:"Wizard",pk:13,update_datetime:"2021-04-20T14:32:16.277146Z"}]},"./src/app/_services/formly/formly-service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>FormlyProvider});var _formly_service_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/app/_services/formly/formly-service.service.ts");const FormlyProvider={provide:_formly_service_service__WEBPACK_IMPORTED_MODULE_0__.$,useFactory:()=>new _formly_service_service__WEBPACK_IMPORTED_MODULE_0__.$}},"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/5483.f87bf4fc.iframe.bundle.js b/5483.f87bf4fc.iframe.bundle.js new file mode 100644 index 000000000..a2471a9f7 --- /dev/null +++ b/5483.f87bf4fc.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[5483],{"./src/app/_services/article/organization.service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>dummyOrganizations});const dummyOrganizations=[{article_type:"organization",description:" Magic is Chaos and sometimes people are in touch with this force. Though understanding and control we order the Chaos. It is only when we allow it to overcome us that...",pk:17,name_full:"Academy Of Schools",name:"Academy Of Schools",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-10-12T15:33:07.176299Z"},{article_type:"organization",description:" The ruling family of Hallan. Loyal to Duke Aspen. Somewhat politically powerful as Hallan is an important trading post. Further make an effort to be very presentable and are well-practiced in...",pk:13,name_full:"Affingtons",name:"Affingtons",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-12-22T16:40:48.834877Z"},{article_type:"organization",description:" The Aspen blood line is one of the main noble blood lines in Aldrune.\nTheir innate ability to sense motion and vibration has led to them being excellent hunters in the dark...",pk:5,name_full:"Aspen Blood",name:"Aspen Blood",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-11T16:55:59.479546Z"},{article_type:"organization",description:" \nThe black feather blood line is one of the main noble blood lines in Aldrune.\nThose of this lineage have innate control over animals and can communicate with them freely and without...",pk:6,name_full:"Black Feather Blood",name:"Black Feather Blood",campaign_details:{name:"Aldrune",id:1},update_datetime:"2021-07-19T10:15:03.064474Z"},{article_type:"organization",description:" A guild of mercenaries protecting caravan's.\nAround for 20 years or so. Part of the guild faction supporting Mordred. Used to be led by Orman Ethelwick until I killed him.",pk:14,name_full:"Bronze Hoof guild",name:"Bronze Hoof guild",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-12-06T21:19:17.466740Z"},{article_type:"organization",description:" A village made up of an unknown species, located somewhere in the desert hellscape we were telported to after our fight with Prince Somnis.\nRoughly somewhere upwards of 50 people in size,...",pk:41,name_full:"Bug people village",name:"Bug people village",campaign_details:{name:"Aldrune",id:1},update_datetime:"2021-07-31T12:53:45.845264Z"},{article_type:"organization",description:" The group of archangels that have their own stars. All of them have their own solar systems, as Lucifer's planetoid had.\nFen managed to find where Lucifer's star used to be. Fen...",pk:55,name_full:"Celestial Archangelic Beings",name:"Celestial Archangelic Beings",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-10-12T09:23:03.231654Z"},{article_type:"organization",description:" \nHolding more favour with the people than even that of the Aspen family, the Church of Brigantia has a presence in every common folks life. Their clerics care for the land...",pk:1,name_full:"Church of Brigantia",name:"Church of Brigantia",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-03T16:15:22.612710Z"},{article_type:"organization",description:" \nThis Church keeps mostly to itself and its worshipers, exercising as little force over others as possible, however in times of tense relations between the Dwarves of the mountain who supply...",pk:2,name_full:"Church of Dunatis",name:"Church of Dunatis",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-03T16:15:07.906083Z"},{article_type:"organization",description:" \nGeneral\nAdjudicators of battles. Healers of the wounded and in times gone by, hunters of the chaos touched who had given in to the power.\nThe Church of Morrigan has a bloody history,...",pk:3,name_full:"Church of Morrigan",name:"Church of Morrigan",campaign_details:{name:"Aldrune",id:1},update_datetime:"2022-05-21T18:46:34.125916Z"},{article_type:"organization",description:" \nThe Church of Silvanus holds power over the North in particular, where it's cathedral is located. The Church attracts many talented hunters and skilled explorers. The Church is in charge of...",pk:4,name_full:"Church of Silvanus",name:"Church of Silvanus",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-08-03T16:14:50.614549Z"},{article_type:"organization",description:" An institution designed to create a diverse and thus group of individuals from all stratum who will determine who will be the next King when no clear line of succession is...",pk:18,name_full:"Council Of Succession",name:"Council Of Succession",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-06-10T12:00:00.000000Z"},{article_type:"organization",description:" A group of scoundrels in Merren that are of key importance. Their leader is pretty well liked within the underground ecosystem, as they have the best scouts. She used to work...",pk:37,name_full:"Dock Hawks",name:"Dock Hawks",campaign_details:{name:"Aldrune",id:1},update_datetime:"2021-05-02T12:04:47.463005Z"},{article_type:"organization",description:" Were a group of dwarves from Fen's Era famed for their gems",pk:23,name_full:"Dwarrow {Status Unknown}",name:"Dwarrow {Status Unknown}",campaign_details:{name:"Aldrune",id:1},update_datetime:"2020-07-13T12:00:00.000000Z"}].map((entry=>({...entry,getAbsoluteRouterUrl:()=>"/organization/123"})))},"./src/app/_services/article/player-class.service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{T:()=>dummyClasses});const dummyClasses=[{name:"Artificer",pk:1,update_datetime:"2021-04-20T14:31:24.033655Z"},{name:"Barbarian",pk:2,update_datetime:"2021-04-20T14:31:27.810089Z"},{name:"Bard",pk:3,update_datetime:"2021-04-20T14:31:36.408312Z"},{name:"Cleric",pk:4,update_datetime:"2021-04-20T14:31:39.485140Z"},{name:"Druid",pk:5,update_datetime:"2021-04-20T14:31:50.431678Z"},{name:"Fighter",pk:6,update_datetime:"2021-04-20T14:31:53.562771Z"},{name:"Monk",pk:7,update_datetime:"2021-04-20T14:31:56.226259Z"},{name:"Paladin",pk:8,update_datetime:"2021-04-20T14:31:58.897597Z"},{name:"Ranger",pk:9,update_datetime:"2021-04-20T14:32:06.986455Z"},{name:"Rogue",pk:10,update_datetime:"2021-04-20T14:32:09.472989Z"},{name:"Sorcerer",pk:11,update_datetime:"2021-04-20T14:32:11.740394Z"},{name:"Warlock",pk:12,update_datetime:"2021-04-20T14:32:13.937586Z"},{name:"Wizard",pk:13,update_datetime:"2021-04-20T14:32:16.277146Z"}]},"./src/app/_services/formly/formly-service.mock.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{p:()=>FormlyProvider});var _formly_service_service__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/app/_services/formly/formly-service.service.ts");const FormlyProvider={provide:_formly_service_service__WEBPACK_IMPORTED_MODULE_0__.$,useFactory:()=>new _formly_service_service__WEBPACK_IMPORTED_MODULE_0__.$}},"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/6663.4c0357e8.iframe.bundle.js b/6663.4c0357e8.iframe.bundle.js deleted file mode 100644 index 01268911d..000000000 --- a/6663.4c0357e8.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6663],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/molecules/link-entry/link-entry.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>LinkEntryComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var link_entry_componentngResource=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.scss?ngResource"),link_entry_componentngResource_default=__webpack_require__.n(link_entry_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let LinkEntryComponent=class LinkEntryComponent{constructor(){this.entry=core.input.required(),this.canDelete=(0,core.input)(!1),this.deleteMessage=(0,core.input)("Delete entry?"),this.delete=new core.EventEmitter,this.linkClick=new core.EventEmitter,this.state=(0,core.signal)("DISPLAY")}changeState(newState){this.state.set(newState)}static{this.propDecorators={entry:[{type:core.Input,args:[{isSignal:!0,alias:"entry",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],deleteMessage:[{type:core.Input,args:[{isSignal:!0,alias:"deleteMessage",required:!1,transform:void 0}]}],delete:[{type:core.Output}],linkClick:[{type:core.Output}]}}};LinkEntryComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-link-entry",template:'
\n \n
\n\n\n \x3c!-- Entry Linktext --\x3e\n \n {{ entry().linkText }}\n \n\n \x3c!-- Entry Name --\x3e\n
\n {{ entry().label }}\n
\n\n \x3c!-- Delete Entry --\x3e\n
\n @if (canDelete()) {\n \n }\n
\n
\n\n\n
\n \n {{ deleteMessage() }}\n \n \n \n
\n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[button_component.Q,common.NgTemplateOutlet],styles:[link_entry_componentngResource_default()]})],LinkEntryComponent)},"./src/design/organisms/player/player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>PlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var player_componentngResource=__webpack_require__("./src/design/organisms/player/player.component.scss?ngResource"),player_componentngResource_default=__webpack_require__.n(player_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),plyr_min=__webpack_require__("./node_modules/plyr/dist/plyr.min.js"),plyr_min_default=__webpack_require__.n(plyr_min);let PlayerComponent=class PlayerComponent{constructor(){this.SEEK_TIME=5,this.VOLUME_STEP=.05,this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.playTime=core.input.required(),this.audioPlayer=(0,core.viewChild)("audioPlayer"),(0,core.effect)((()=>{const playerElement=this.audioPlayer()?.nativeElement;playerElement&&(this.plyr=new(plyr_min_default())(playerElement,{controls:["play","progress","current-time","mute","volume","download","settings"],invertTime:!1,seekTime:this.SEEK_TIME,volume:0}))})),(0,core.effect)((()=>{this.plyr.download=this.downloadSource()})),(0,core.effect)((()=>this.setPlayTime(this.playTime())))}triggerHotkeyAction(keyPressEvent){keyPressEvent.stopPropagation();switch(keyPressEvent.code){case"Space":case"Enter":this.play();break;case"KeyM":this.mute();break;case"ArrowRight":this.seekForward();break;case"ArrowLeft":this.seekBackward()}}setPlayTime(time){null!=time&&(this.plyr.currentTime=time)}play(){this.plyr.togglePlay()}seekBackward(){this.plyr.rewind(this.SEEK_TIME)}seekForward(){this.plyr.forward(this.SEEK_TIME)}increaseVolume(){this.plyr.increaseVolume(this.VOLUME_STEP)}decreaseVolume(){this.plyr.decreaseVolume(this.VOLUME_STEP)}mute(){this.plyr.muted=!this.plyr.muted}static{this.ctorParameters=()=>[]}static{this.propDecorators={serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],playTime:[{type:core.Input,args:[{isSignal:!0,alias:"playTime",required:!0,transform:void 0}]}],audioPlayer:[{type:core.ViewChild,args:["audioPlayer",{isSignal:!0}]}]}}};PlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-player",template:'\n',standalone:!0,imports:[],styles:[player_componentngResource_default()]})],PlayerComponent)},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>SessionaudioPlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var sessionaudio_player_componentngResource=__webpack_require__("./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource"),sessionaudio_player_componentngResource_default=__webpack_require__.n(sessionaudio_player_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),link_entry_component=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.ts"),player_component=__webpack_require__("./src/design/organisms/player/player.component.ts");let SessionaudioPlayerComponent=class SessionaudioPlayerComponent{constructor(formlyService){this.formlyService=formlyService,this.sessionAudioPk=core.input.required(),this.timestamps=core.input.required(),this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.deleteTimestamp=new core.EventEmitter,this.createTimestamp=new core.EventEmitter,this.timestampEntries=(0,core.computed)((()=>this.timestamps()?.map((timestamp=>({value:timestamp,label:timestamp.name,linkText:this.timeToString(timestamp.time)}))))),this.timestampState=(0,core.signal)("DISPLAY"),this.currentTime=(0,core.signal)(0),this.timestampForm=new fesm2022_forms.gE({}),this.timestampFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"time",maxLength:8,minLength:8,placeholder:"hh:mm:ss",className:"timestamp-input black-background px-0 col-lg-2 col-3",validators:["time"],required:!0,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"name",label:"Title",className:"timestamp-input black-background px-0 col-lg-10 col-9",required:!0,inputKind:"STRING"})])),this.timestampModel=(0,core.signal)({})}changeTimestampState(newState){this.timestampState.set(newState)}onLinkClick(timestamp){this.currentTime.set(timestamp.time),setTimeout((()=>this.currentTime.set(void 0)),1)}onSubmit(timestamp){const newTimestamp={name:timestamp.name,time:this.stringToTime(timestamp.time),session_audio:this.sessionAudioPk()};this.createTimestamp.emit(newTimestamp),this.timestampState.set("DISPLAY"),this.timestampModel.set({})}timeToString(seconds){const hours=Math.floor(seconds/3600),minutes=Math.floor((seconds-3600*hours)/60),remainingSeconds=Math.floor(seconds-3600*hours-60*minutes);return`${hours.toString().padStart(2,"0")}:${minutes.toString().padStart(2,"0")}:${remainingSeconds.toString().padStart(2,"0")}`}stringToTime(timeString){const[hours,minutes,seconds]=timeString.split(":").map(Number);return 3600*hours+60*minutes+seconds}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={sessionAudioPk:[{type:core.Input,args:[{isSignal:!0,alias:"sessionAudioPk",required:!0,transform:void 0}]}],timestamps:[{type:core.Input,args:[{isSignal:!0,alias:"timestamps",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],deleteTimestamp:[{type:core.Output}],createTimestamp:[{type:core.Output}]}}};SessionaudioPlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-sessionaudio-player",template:'
\n
\n \n
\n \n\n @if (canCreate()) {\n @switch (timestampState()) {\n @case ("DISPLAY") {\n \n }\n @case ("CREATE") {\n \n }\n }\n }\n\n
\n @for (entry of timestampEntries(); track entry.value.pk) {\n \n }\n
\n
\n\n\n
\n \n
\n
\n\n\n \n
Create Timestamp
\n \n
\n
\n',standalone:!0,imports:[player_component.D,link_entry_component.i,button_component.Q,molecules.s2,card_component.i,common.NgTemplateOutlet],styles:[sessionaudio_player_componentngResource_default()]})],SessionaudioPlayerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/molecules/link-entry/link-entry.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".linkentry {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--spacer-4);\n}\n.linkentry--delete {\n justify-content: center;\n}\n.linkentry__link {\n text-align: end;\n cursor: pointer;\n}\n.linkentry__label {\n flex: 1;\n text-align: start;\n text-overflow: ellipsis;\n}\n.linkentry__box {\n background-color: var(--bs-secondary);\n padding: var(--spacer-2);\n}\n.linkentry__delete {\n display: flex;\n justify-content: flex-end;\n}\n.linkentry__delete-button {\n width: fit-content;\n display: inline-block;\n}\n\n.box {\n display: flex;\n flex-direction: row;\n width: fit-content;\n border-radius: var(--bs-border-radius);\n border-color: var(--bs-danger);\n border-style: solid;\n border-width: 1px;\n}\n.box__message {\n font-weight: bold;\n}\n.box__button {\n width: fit-content;\n margin-left: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/player/player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".timestamp__list {\n margin-top: var(--spacer-3);\n}\n.timestamp__create-button {\n margin-top: var(--spacer-4);\n margin-bottom: var(--spacer-4);\n}\n.timestamp__create-form {\n width: 100%;\n text-align: center;\n font-weight: bold;\n}\n\n.list {\n gap: var(--spacer-1);\n display: flex;\n flex-direction: column;\n}\n.list__timestamp {\n padding-bottom: var(--spacer-1);\n display: block;\n}\n\n.container {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/6663.d4189301.iframe.bundle.js b/6663.d4189301.iframe.bundle.js new file mode 100644 index 000000000..65c864e85 --- /dev/null +++ b/6663.d4189301.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[6663],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/atoms/card/card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>CardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var card_componentngResource=__webpack_require__("./src/design/atoms/card/card.component.scss?ngResource"),card_componentngResource_default=__webpack_require__.n(card_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs");let CardComponent=class CardComponent{};CardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-card",template:'
\n \n
',changeDetection:core.ChangeDetectionStrategy.OnPush,standalone:!0,imports:[],styles:[card_componentngResource_default()]})],CardComponent)},"./src/design/molecules/link-entry/link-entry.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>LinkEntryComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var link_entry_componentngResource=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.scss?ngResource"),link_entry_componentngResource_default=__webpack_require__.n(link_entry_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let LinkEntryComponent=class LinkEntryComponent{constructor(){this.entry=core.input.required(),this.canDelete=(0,core.input)(!1),this.deleteMessage=(0,core.input)("Delete entry?"),this.delete=new core.EventEmitter,this.linkClick=new core.EventEmitter,this.state=(0,core.signal)("DISPLAY")}changeState(newState){this.state.set(newState)}static{this.propDecorators={entry:[{type:core.Input,args:[{isSignal:!0,alias:"entry",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],deleteMessage:[{type:core.Input,args:[{isSignal:!0,alias:"deleteMessage",required:!1,transform:void 0}]}],delete:[{type:core.Output}],linkClick:[{type:core.Output}]}}};LinkEntryComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-link-entry",template:'
\n \n
\n\n\n \x3c!-- Entry Linktext --\x3e\n \n {{ entry().linkText }}\n \n\n \x3c!-- Entry Name --\x3e\n
\n {{ entry().label }}\n
\n\n \x3c!-- Delete Entry --\x3e\n
\n @if (canDelete()) {\n \n }\n
\n
\n\n\n
\n \n {{ deleteMessage() }}\n \n \n \n
\n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[button_component.Q,common.NgTemplateOutlet],styles:[link_entry_componentngResource_default()]})],LinkEntryComponent)},"./src/design/organisms/player/player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{D:()=>PlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var player_componentngResource=__webpack_require__("./src/design/organisms/player/player.component.scss?ngResource"),player_componentngResource_default=__webpack_require__.n(player_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),plyr_min=__webpack_require__("./node_modules/plyr/dist/plyr.min.js"),plyr_min_default=__webpack_require__.n(plyr_min);let PlayerComponent=class PlayerComponent{constructor(){this.SEEK_TIME=5,this.VOLUME_STEP=.05,this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.playTime=core.input.required(),this.audioPlayer=(0,core.viewChild)("audioPlayer"),(0,core.effect)((()=>{const playerElement=this.audioPlayer()?.nativeElement;playerElement&&(this.plyr=new(plyr_min_default())(playerElement,{controls:["play","progress","current-time","mute","volume","download","settings"],invertTime:!1,seekTime:this.SEEK_TIME,volume:0}))})),(0,core.effect)((()=>{this.plyr.download=this.downloadSource()})),(0,core.effect)((()=>this.setPlayTime(this.playTime())))}triggerHotkeyAction(keyPressEvent){keyPressEvent.stopPropagation();switch(keyPressEvent.code){case"Space":case"Enter":this.play();break;case"KeyM":this.mute();break;case"ArrowRight":this.seekForward();break;case"ArrowLeft":this.seekBackward()}}setPlayTime(time){null!=time&&(this.plyr.currentTime=time)}play(){this.plyr.togglePlay()}seekBackward(){this.plyr.rewind(this.SEEK_TIME)}seekForward(){this.plyr.forward(this.SEEK_TIME)}increaseVolume(){this.plyr.increaseVolume(this.VOLUME_STEP)}decreaseVolume(){this.plyr.decreaseVolume(this.VOLUME_STEP)}mute(){this.plyr.muted=!this.plyr.muted}static{this.ctorParameters=()=>[]}static{this.propDecorators={serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],playTime:[{type:core.Input,args:[{isSignal:!0,alias:"playTime",required:!0,transform:void 0}]}],audioPlayer:[{type:core.ViewChild,args:["audioPlayer",{isSignal:!0}]}]}}};PlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-player",template:'\n',standalone:!0,imports:[],styles:[player_componentngResource_default()]})],PlayerComponent)},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{X:()=>SessionaudioPlayerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var sessionaudio_player_componentngResource=__webpack_require__("./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource"),sessionaudio_player_componentngResource_default=__webpack_require__.n(sessionaudio_player_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),card_component=__webpack_require__("./src/design/atoms/card/card.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),link_entry_component=__webpack_require__("./src/design/molecules/link-entry/link-entry.component.ts"),player_component=__webpack_require__("./src/design/organisms/player/player.component.ts");let SessionaudioPlayerComponent=class SessionaudioPlayerComponent{constructor(formlyService){this.formlyService=formlyService,this.sessionAudioPk=core.input.required(),this.timestamps=core.input.required(),this.serverUrl=core.input.required(),this.audioSource=core.input.required(),this.downloadSource=core.input.required(),this.canDelete=core.input.required(),this.canCreate=core.input.required(),this.deleteTimestamp=new core.EventEmitter,this.createTimestamp=new core.EventEmitter,this.timestampEntries=(0,core.computed)((()=>this.timestamps()?.map((timestamp=>({value:timestamp,label:timestamp.name,linkText:this.timeToString(timestamp.time)}))))),this.timestampState=(0,core.signal)("DISPLAY"),this.currentTime=(0,core.signal)(0),this.timestampForm=new fesm2022_forms.gE({}),this.timestampFields=(0,core.computed)((()=>[this.formlyService.buildInputConfig({key:"time",maxLength:8,minLength:8,placeholder:"hh:mm:ss",className:"timestamp-input black-background px-0 col-lg-2 col-3",validators:["time"],required:!0,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"name",label:"Title",className:"timestamp-input black-background px-0 col-lg-10 col-9",required:!0,inputKind:"STRING"})])),this.timestampModel=(0,core.signal)({})}changeTimestampState(newState){this.timestampState.set(newState)}onLinkClick(timestamp){this.currentTime.set(timestamp.time),setTimeout((()=>this.currentTime.set(void 0)),1)}onSubmit(timestamp){const newTimestamp={name:timestamp.name,time:this.stringToTime(timestamp.time),session_audio:this.sessionAudioPk()};this.createTimestamp.emit(newTimestamp),this.timestampState.set("DISPLAY"),this.timestampModel.set({})}timeToString(seconds){const hours=Math.floor(seconds/3600),minutes=Math.floor((seconds-3600*hours)/60),remainingSeconds=Math.floor(seconds-3600*hours-60*minutes);return`${hours.toString().padStart(2,"0")}:${minutes.toString().padStart(2,"0")}:${remainingSeconds.toString().padStart(2,"0")}`}stringToTime(timeString){const[hours,minutes,seconds]=timeString.split(":").map(Number);return 3600*hours+60*minutes+seconds}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={sessionAudioPk:[{type:core.Input,args:[{isSignal:!0,alias:"sessionAudioPk",required:!0,transform:void 0}]}],timestamps:[{type:core.Input,args:[{isSignal:!0,alias:"timestamps",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],audioSource:[{type:core.Input,args:[{isSignal:!0,alias:"audioSource",required:!0,transform:void 0}]}],downloadSource:[{type:core.Input,args:[{isSignal:!0,alias:"downloadSource",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!0,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!0,transform:void 0}]}],deleteTimestamp:[{type:core.Output}],createTimestamp:[{type:core.Output}]}}};SessionaudioPlayerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-sessionaudio-player",template:'
\n
\n \n
\n \n\n @if (canCreate()) {\n @switch (timestampState()) {\n @case ("DISPLAY") {\n \n }\n @case ("CREATE") {\n \n }\n }\n }\n\n
\n @for (entry of timestampEntries(); track entry.value.pk) {\n \n }\n
\n
\n\n\n
\n \n
\n
\n\n\n \n
Create Timestamp
\n \n
\n
\n',standalone:!0,imports:[player_component.D,link_entry_component.i,button_component.Q,molecules.s2,card_component.i,common.NgTemplateOutlet],styles:[sessionaudio_player_componentngResource_default()]})],SessionaudioPlayerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/atoms/card/card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".accordion {\n --bs-accordion-active-bg: var(--bs-gray-900) !important;\n}\n\nbutton.btn.btn-link:hover {\n text-decoration: none !important;\n}\n\nbutton.btn.btn-link:focus {\n text-decoration: none !important;\n box-shadow: none !important;\n}\n\n.card button.btn.btn-link {\n width: 100%;\n text-align: left;\n}\n\n.form-control {\n height: 2.75rem;\n font-size: 1.2rem;\n}\n\ninput.form-control {\n background-color: transparent !important;\n color: white !important;\n border: solid white 1px !important;\n}\n\ninput.form-control:focus {\n box-shadow: 3px blue;\n color: white;\n}\n\nselect.form-select {\n color: white !important;\n background-color: #4c4c4c !important;\n}\n\nselect:focus {\n background-color: #4c4c4c;\n box-shadow: 3px blue;\n color: white;\n}\n\noption {\n background-color: #1b1f22;\n color: white;\n font-size: 18px;\n}\n\n.custom-control.custom-checkbox {\n transform: scale(1.2);\n transform-origin: 0;\n}\n\n.visually-hidden {\n display: none;\n}\n\n.tooltip-inner {\n --bs-tooltip-bg: var(--bs-info-bg-subtle);\n --bs-tooltip-color: var(--bs-emphasis-color);\n}\n\n:host {\n --card-bg-color: #393e41 !important;\n --card-flex-direction: column;\n --card-padding: var(--spacer-4);\n}\n\n.card {\n background-color: var(--card-bg-color);\n margin-top: var(--spacer-3);\n margin-bottom: var(--spacer-3);\n padding: var(--card-padding);\n flex-direction: var(--card-flex-direction);\n width: 100%;\n height: 100%;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/molecules/link-entry/link-entry.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".linkentry {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n gap: var(--spacer-4);\n}\n.linkentry--delete {\n justify-content: center;\n}\n.linkentry__link {\n text-align: end;\n cursor: pointer;\n}\n.linkentry__label {\n flex: 1;\n text-align: start;\n text-overflow: ellipsis;\n}\n.linkentry__box {\n background-color: var(--bs-secondary);\n padding: var(--spacer-2);\n}\n.linkentry__delete {\n display: flex;\n justify-content: flex-end;\n}\n.linkentry__delete-button {\n width: fit-content;\n display: inline-block;\n}\n\n.box {\n display: flex;\n flex-direction: row;\n width: fit-content;\n border-radius: var(--bs-border-radius);\n border-color: var(--bs-danger);\n border-style: solid;\n border-width: 1px;\n}\n.box__message {\n font-weight: bold;\n}\n.box__button {\n width: fit-content;\n margin-left: var(--spacer-3);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/player/player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,"",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/sessionaudio-player/sessionaudio-player.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".timestamp__list {\n margin-top: var(--spacer-3);\n}\n.timestamp__create-button {\n margin-top: var(--spacer-4);\n margin-bottom: var(--spacer-4);\n}\n.timestamp__create-form {\n width: 100%;\n text-align: center;\n font-weight: bold;\n}\n\n.list {\n gap: var(--spacer-1);\n display: flex;\n flex-direction: column;\n}\n.list__timestamp {\n padding-bottom: var(--spacer-1);\n display: block;\n}\n\n.container {\n padding-left: var(--spacer-0);\n padding-right: var(--spacer-0);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/7857.22fb8184.iframe.bundle.js b/7857.22fb8184.iframe.bundle.js new file mode 100644 index 000000000..81c24faa3 --- /dev/null +++ b/7857.22fb8184.iframe.bundle.js @@ -0,0 +1 @@ +(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[7857],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,max:config.max,minLength:config.minLength,min:config.min,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/image-carousel-card/image-carousel-card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ImageCarouselCardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_card_componentngResource=__webpack_require__("./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource"),image_carousel_card_componentngResource_default=__webpack_require__.n(image_carousel_card_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),image_carousel_component=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.ts");let ImageCarouselCardComponent=class ImageCarouselCardComponent{constructor(formlyService){this.formlyService=formlyService,this.canUpdate=!1,this.canCreate=!1,this.canDelete=!1,this.createImage=new core.EventEmitter,this.deleteImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.currentImageIndex=0,this.state="DISPLAY",this.userModel={},this.isLoading=!1,this.createFields=[this.formlyService.buildInputConfig({key:"name",label:"Image Title",required:!1,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"character_article",label:"Character Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"location_article",label:"Location Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"creature_article",label:"Creature Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"organization_article",label:"Organization Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"encounter_article",label:"Encounter Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"item_article",label:"Item Article",hide:!0,inputKind:"NUMBER",required:!1,placeholder:void 0}),this.formlyService.buildFileFieldConfig({label:"Image file",key:"image",fileButtonType:"DARK"})],this.updateFields=this.formlyService.toUpdateForm(this.createFields)}ngOnInit(){this.currentImage=this.images[this.currentImageIndex]}ngOnChanges(){this.currentImage=this.images[this.currentImageIndex]}changeState(event,newState){this.userModel=event??null,this.state=newState}onSlide(slideEvent){this.currentImageIndex=slideEvent.index,this.currentImage=this.images[this.currentImageIndex]}onCancel(){this.changeState(null,"DISPLAY")}onSubmit(event){switch(this.state){case"DELETE":this.deleteImage.emit(this.currentImage);break;case"UPDATE":case"UPDATE_OUTDATED":this.updateImage.emit(this.userModel);break;case"CREATE":this.createImage.emit(this.userModel);break;default:throw`ImageCarouselCard - Submitted form while in state '${this.state}', which is not possible.`}this.userModel={},this.changeState(null,"DISPLAY")}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={images:[{type:core.Input}],serverUrl:[{type:core.Input}],serverModel:[{type:core.Input}],canUpdate:[{type:core.Input}],canCreate:[{type:core.Input}],canDelete:[{type:core.Input}],createImage:[{type:core.Output}],deleteImage:[{type:core.Output}],updateImage:[{type:core.Output}]}}};ImageCarouselCardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel-card",template:'@switch (state) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\n
\n
\n \n Updating:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n \n
\n
\n\n\n
\n
\n \n Upload new image\n @if (isLoading) {\n \n }\n
\n\n \n
\n
\n\n\n
\n
\n \n Deleting:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n
\n \n Do you really want to delete this image?\n \n
\n \n \n
\n
\n
\n
\n',standalone:!0,imports:[image_carousel_component.H,spinner_component.t,icon_component.R,molecules.s2,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_card_componentngResource_default()]})],ImageCarouselCardComponent)},"./src/design/organisms/image-carousel/image-carousel.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ImageCarouselComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_componentngResource=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource"),image_carousel_componentngResource_default=__webpack_require__.n(image_carousel_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let ImageCarouselComponent=class ImageCarouselComponent{constructor(){this.images=core.input.required(),this.serverUrl=core.input.required(),this.canDelete=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.currentSlideIndex=core.input.required(),this.deleteImage=new core.EventEmitter,this.createImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.slide=new core.EventEmitter,this.slideEnd=new core.EventEmitter}onSlide(event){const slideIndexStr=event.current.split("-").pop();if(null==slideIndexStr)throw`ImageCarousel - Image with id '${event.current}' does not match the expected pattern of 'imageIndex-'!`;const nextSlideIndex=parseInt(slideIndexStr);this.slide.emit({event,index:nextSlideIndex})}onSlideEnd(event){this.slide.emit({event,index:this.currentSlideIndex()})}onImageCreate(){this.canCreate()&&this.createImage.emit()}onImageUpdate(){if(!this.canUpdate())return;const image=this.images()[this.currentSlideIndex()];this.updateImage.emit(image)}onImageDelete(){if(!this.canDelete())return;const image=this.images()[this.currentSlideIndex()];this.deleteImage.emit(image)}static{this.propDecorators={images:[{type:core.Input,args:[{isSignal:!0,alias:"images",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],currentSlideIndex:[{type:core.Input,args:[{isSignal:!0,alias:"currentSlideIndex",required:!0,transform:void 0}]}],deleteImage:[{type:core.Output}],createImage:[{type:core.Output}],updateImage:[{type:core.Output}],slide:[{type:core.Output}],slideEnd:[{type:core.Output}]}}};ImageCarouselComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel",template:'@if (images() && images().length > 0) {\n \n @for (image of images(); track image.pk) {\n \n
\n \n
\n
\n }\n \n} @else {\n \n}\n\n\x3c!-- Image Edit/Delete/Create Buttons --\x3e\n
\n \x3c!-- Create Image Button --\x3e\n @if (canCreate()) {\n \n }\n\n \x3c!-- Update Image button --\x3e\n @if (images().length > 0 && canUpdate()) {\n \n }\n\n \x3c!-- Delete Image Button --\x3e\n @if (images().length > 1 && canDelete()) {\n \n }\n
\n\n\n \n \n
\n \n
\n

This article doesn\'t have an image yet

\n
\n
\n
\n \n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[ng_bootstrap.wA,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_componentngResource_default()]})],ImageCarouselComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__image-container {\n display: flex;\n justify-content: center;\n flex-direction: row;\n width: 100%;\n}\n.form-card__image {\n max-height: 20rem;\n max-width: 100%;\n object-fit: contain;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n.confirmation {\n display: flex;\n flex-direction: column;\n}\n.confirmation__question {\n text-align: center;\n}\n.confirmation__button-container {\n margin-top: var(--spacer-2);\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".image-container img {\n object-fit: contain;\n width: 100%;\n max-height: 10rem;\n}\n@media (min-width: 768px) {\n .image-container img {\n max-height: 18rem;\n }\n}\n\n.image-caption {\n position: absolute;\n background: var(--wiki-bg-transparent);\n width: 50%;\n text-align: center;\n bottom: 20%;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n}\n.image-caption p {\n margin: 0;\n}\n\n.edit-image-buttons {\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n transition: opacity 0.2s;\n margin-top: var(--spacer-2);\n}\n\n.defaultImage {\n position: relative;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/7857.61d51647.iframe.bundle.js b/7857.61d51647.iframe.bundle.js deleted file mode 100644 index 2f7c0c85f..000000000 --- a/7857.61d51647.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[7857],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/image-carousel-card/image-carousel-card.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{r:()=>ImageCarouselCardComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_card_componentngResource=__webpack_require__("./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource"),image_carousel_card_componentngResource_default=__webpack_require__.n(image_carousel_card_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts"),icon_component=__webpack_require__("./src/design/atoms/icon/icon.component.ts"),spinner_component=__webpack_require__("./src/design/atoms/spinner/spinner.component.ts"),molecules=__webpack_require__("./src/design/molecules/index.ts"),image_carousel_component=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.ts");let ImageCarouselCardComponent=class ImageCarouselCardComponent{constructor(formlyService){this.formlyService=formlyService,this.canUpdate=!1,this.canCreate=!1,this.canDelete=!1,this.createImage=new core.EventEmitter,this.deleteImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.currentImageIndex=0,this.state="DISPLAY",this.userModel={},this.isLoading=!1,this.createFields=[this.formlyService.buildInputConfig({key:"name",label:"Image Title",required:!1,inputKind:"STRING"}),this.formlyService.buildInputConfig({key:"character_article",label:"Character Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"location_article",label:"Location Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"creature_article",label:"Creature Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"organization_article",label:"Organization Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"encounter_article",label:"Encounter Article",hide:!0,inputKind:"NUMBER",required:!1}),this.formlyService.buildInputConfig({key:"item_article",label:"Item Article",hide:!0,inputKind:"NUMBER",required:!1,placeholder:void 0}),this.formlyService.buildFileFieldConfig({label:"Image file",key:"image",fileButtonType:"DARK"})],this.updateFields=this.formlyService.toUpdateForm(this.createFields)}ngOnInit(){this.currentImage=this.images[this.currentImageIndex]}ngOnChanges(){this.currentImage=this.images[this.currentImageIndex]}changeState(event,newState){this.userModel=event??null,this.state=newState}onSlide(slideEvent){this.currentImageIndex=slideEvent.index,this.currentImage=this.images[this.currentImageIndex]}onCancel(){this.changeState(null,"DISPLAY")}onSubmit(event){switch(this.state){case"DELETE":this.deleteImage.emit(this.currentImage);break;case"UPDATE":case"UPDATE_OUTDATED":this.updateImage.emit(this.userModel);break;case"CREATE":this.createImage.emit(this.userModel);break;default:throw`ImageCarouselCard - Submitted form while in state '${this.state}', which is not possible.`}this.userModel={},this.changeState(null,"DISPLAY")}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={images:[{type:core.Input}],serverUrl:[{type:core.Input}],serverModel:[{type:core.Input}],canUpdate:[{type:core.Input}],canCreate:[{type:core.Input}],canDelete:[{type:core.Input}],createImage:[{type:core.Output}],deleteImage:[{type:core.Output}],updateImage:[{type:core.Output}]}}};ImageCarouselCardComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel-card",template:'@switch (state) {\n @case ("DISPLAY") {\n \n }\n @case ("UPDATE") {\n \n }\n @case ("CREATE") {\n \n }\n @case ("DELETE") {\n \n }\n}\n\n\n \n\n\n\n
\n
\n \n Updating:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n \n
\n
\n\n\n
\n
\n \n Upload new image\n @if (isLoading) {\n \n }\n
\n\n \n
\n
\n\n\n
\n
\n \n Deleting:\n @if (isLoading) {\n \n }\n
\n\n
\n \n
\n\n
\n \n Do you really want to delete this image?\n \n
\n \n \n
\n
\n
\n
\n',standalone:!0,imports:[image_carousel_component.H,spinner_component.t,icon_component.R,molecules.s2,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_card_componentngResource_default()]})],ImageCarouselCardComponent)},"./src/design/organisms/image-carousel/image-carousel.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{H:()=>ImageCarouselComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var image_carousel_componentngResource=__webpack_require__("./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource"),image_carousel_componentngResource_default=__webpack_require__.n(image_carousel_componentngResource),common=__webpack_require__("./node_modules/@angular/common/fesm2022/common.mjs"),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),ng_bootstrap=__webpack_require__("./node_modules/@ng-bootstrap/ng-bootstrap/fesm2022/ng-bootstrap.mjs"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let ImageCarouselComponent=class ImageCarouselComponent{constructor(){this.images=core.input.required(),this.serverUrl=core.input.required(),this.canDelete=(0,core.input)(!1),this.canCreate=(0,core.input)(!1),this.canUpdate=(0,core.input)(!1),this.currentSlideIndex=core.input.required(),this.deleteImage=new core.EventEmitter,this.createImage=new core.EventEmitter,this.updateImage=new core.EventEmitter,this.slide=new core.EventEmitter,this.slideEnd=new core.EventEmitter}onSlide(event){const slideIndexStr=event.current.split("-").pop();if(null==slideIndexStr)throw`ImageCarousel - Image with id '${event.current}' does not match the expected pattern of 'imageIndex-'!`;const nextSlideIndex=parseInt(slideIndexStr);this.slide.emit({event,index:nextSlideIndex})}onSlideEnd(event){this.slide.emit({event,index:this.currentSlideIndex()})}onImageCreate(){this.canCreate()&&this.createImage.emit()}onImageUpdate(){if(!this.canUpdate())return;const image=this.images()[this.currentSlideIndex()];this.updateImage.emit(image)}onImageDelete(){if(!this.canDelete())return;const image=this.images()[this.currentSlideIndex()];this.deleteImage.emit(image)}static{this.propDecorators={images:[{type:core.Input,args:[{isSignal:!0,alias:"images",required:!0,transform:void 0}]}],serverUrl:[{type:core.Input,args:[{isSignal:!0,alias:"serverUrl",required:!0,transform:void 0}]}],canDelete:[{type:core.Input,args:[{isSignal:!0,alias:"canDelete",required:!1,transform:void 0}]}],canCreate:[{type:core.Input,args:[{isSignal:!0,alias:"canCreate",required:!1,transform:void 0}]}],canUpdate:[{type:core.Input,args:[{isSignal:!0,alias:"canUpdate",required:!1,transform:void 0}]}],currentSlideIndex:[{type:core.Input,args:[{isSignal:!0,alias:"currentSlideIndex",required:!0,transform:void 0}]}],deleteImage:[{type:core.Output}],createImage:[{type:core.Output}],updateImage:[{type:core.Output}],slide:[{type:core.Output}],slideEnd:[{type:core.Output}]}}};ImageCarouselComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-image-carousel",template:'@if (images() && images().length > 0) {\n \n @for (image of images(); track image.pk) {\n \n
\n \n
\n
\n }\n \n} @else {\n \n}\n\n\x3c!-- Image Edit/Delete/Create Buttons --\x3e\n
\n \x3c!-- Create Image Button --\x3e\n @if (canCreate()) {\n \n }\n\n \x3c!-- Update Image button --\x3e\n @if (images().length > 0 && canUpdate()) {\n \n }\n\n \x3c!-- Delete Image Button --\x3e\n @if (images().length > 1 && canDelete()) {\n \n }\n
\n\n\n \n \n
\n \n
\n

This article doesn\'t have an image yet

\n
\n
\n
\n \n
\n',standalone:!0,changeDetection:core.ChangeDetectionStrategy.OnPush,imports:[ng_bootstrap.wA,button_component.Q,common.NgTemplateOutlet],styles:[image_carousel_componentngResource_default()]})],ImageCarouselComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/organisms/image-carousel-card/image-carousel-card.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".form-card {\n padding: var(--spacer-4);\n margin: var(--spacer-2);\n}\n.form-card__heading {\n text-align: center;\n}\n.form-card__image-container {\n display: flex;\n justify-content: center;\n flex-direction: row;\n width: 100%;\n}\n.form-card__image {\n max-height: 20rem;\n max-width: 100%;\n object-fit: contain;\n}\n.form-card__form {\n margin-top: var(--spacer-3);\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n\n.confirmation {\n display: flex;\n flex-direction: column;\n}\n.confirmation__question {\n text-align: center;\n}\n.confirmation__button-container {\n margin-top: var(--spacer-2);\n display: flex;\n flex-direction: row;\n justify-content: center;\n}\n.confirmation__button {\n margin-left: var(--spacer-2);\n margin-right: var(--spacer-2);\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/organisms/image-carousel/image-carousel.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".image-container img {\n object-fit: contain;\n width: 100%;\n max-height: 10rem;\n}\n@media (min-width: 768px) {\n .image-container img {\n max-height: 18rem;\n }\n}\n\n.image-caption {\n position: absolute;\n background: var(--wiki-bg-transparent);\n width: 50%;\n text-align: center;\n bottom: 20%;\n margin-left: auto;\n margin-right: auto;\n left: 0;\n right: 0;\n}\n.image-caption p {\n margin: 0;\n}\n\n.edit-image-buttons {\n display: flex;\n align-items: center;\n align-content: center;\n justify-content: center;\n transition: opacity 0.2s;\n margin-top: var(--spacer-2);\n}\n\n.defaultImage {\n position: relative;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/app/_models/formly.ts b/app/_models/formly.ts index cd9db6cbb..41166fc8e 100644 --- a/app/_models/formly.ts +++ b/app/_models/formly.ts @@ -53,6 +53,8 @@ export interface FormlyInputConfig extends FormlyInterface { placeholder?: string; maxLength?: number; minLength?: number; + max?: number; + min?: number; parsers?: any; inputKind: InputKind; } diff --git a/app/_services/formly/formly-service.service.ts b/app/_services/formly/formly-service.service.ts index ab4b67ddb..400abf713 100644 --- a/app/_services/formly/formly-service.service.ts +++ b/app/_services/formly/formly-service.service.ts @@ -82,7 +82,7 @@ export class FormlyService { warningMessage: config.warningMessage, additionalProperties: { disabledExpression: config.disabledExpression, - tooltipMessage: config.tooltipMessage ?? 'WHAT', + tooltipMessage: config.tooltipMessage ?? '', showWrapperLabel: config.showWrapperLabel ?? true, }, }, @@ -165,7 +165,9 @@ export class FormlyService { parsers: config.parsers, props: { maxLength: config.maxLength, + max: config.max, minLength: config.minLength, + min: config.min, label: config.label ?? capitalize(`${config.key}`), type: innerInputType, required: config.required ?? true, diff --git a/app/campaign/components/graph-help-modal/graph-help-modal.component.html b/app/campaign/components/graph-help-modal/graph-help-modal.component.html index f8f9d614a..c305dc986 100644 --- a/app/campaign/components/graph-help-modal/graph-help-modal.component.html +++ b/app/campaign/components/graph-help-modal/graph-help-modal.component.html @@ -1,11 +1,12 @@ +> \n',standalone:!0,imports:[page_container_component.i,fesm2022_forms.YN,ngx_formly_core.qy,ngx_formly_bootstrap.u,button_component.Q],animations:[backInUp,flip.S],styles:[login_componentngResource_default()]})],LoginComponent);const login_stories={title:"DesignSystem/Templates/LoginComponent",component:LoginComponent,decorators:[(0,angular_dist.moduleMetadata)({imports:[testing.c,formly_constants.d_],declarations:[]})],args:{extraMessage:"Extra message of some sort",resetErrorMessage:"Message for error during reset"}},Default=(args=>({props:{...args,login:(0,dist.XI)("login"),resetPassword:(0,dist.XI)("resetPassword")}})).bind({});Default.args={};const __namedExportsOrder=["Default"];Default.parameters={...Default.parameters,docs:{...Default.parameters?.docs,source:{originalSource:"args => ({\n props: {\n ...args,\n login: action('login'),\n resetPassword: action('resetPassword')\n }\n})",...Default.parameters?.docs?.source}}}},"./src/design/organisms/page-container/page-container.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,".page {\n width: 100%;\n display: flex;\n justify-content: center;\n}\n.page__background {\n position: fixed;\n top: 0;\n left: 0;\n z-index: -2;\n width: 100%;\n height: 100mvh;\n}\n.page__foreground {\n max-width: 60rem;\n width: 100%;\n background-color: var(--wiki-bg-transparent);\n padding: var(--spacer-3) var(--spacer-3) var(--spacer-5) var(--spacer-3);\n margin-bottom: var(--spacer-4);\n color: white;\n}\n@media (min-width: 768px) {\n .page__foreground {\n border-radius: var(--bs-border-radius);\n }\n}\n@media (min-width: 992px) {\n .page__foreground {\n padding: var(--spacer-4);\n }\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()},"./src/design/templates/login/login.component.scss?ngResource":(module,__unused_webpack_exports,__webpack_require__)=>{var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/noSourceMaps.js"),___CSS_LOADER_EXPORT___=__webpack_require__("./node_modules/css-loader/dist/runtime/api.js")(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);___CSS_LOADER_EXPORT___.push([module.id,":host {\n width: 100%;\n max-width: 30rem;\n}\n\n.login {\n --animate-duration: 1000ms;\n}\n.login__subtitle-warning {\n margin-bottom: var(--spacer-3);\n color: var(--bs-warning);\n}\n.login__form {\n display: flex;\n flex-direction: column;\n}\n.login__button {\n margin-top: var(--spacer-4);\n}\n.login__button-left {\n margin-right: var(--spacer-2);\n}\n.login__reset-link {\n cursor: pointer;\n width: fit-content;\n}",""]),module.exports=___CSS_LOADER_EXPORT___.toString()}}]); \ No newline at end of file diff --git a/design-templates-login-login-stories.6f4ddf50.iframe.bundle.js b/design-templates-login-login-stories.6f4ddf50.iframe.bundle.js deleted file mode 100644 index 144f39e9a..000000000 --- a/design-templates-login-login-stories.6f4ddf50.iframe.bundle.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunknimstoryfont_gui=self.webpackChunknimstoryfont_gui||[]).push([[1063],{"./src/app/_services/formly/formly-service.service.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{$:()=>FormlyService});var tslib__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__("./node_modules/tslib/tslib.es6.mjs"),_angular_core__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),rxjs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/observable/of.js"),rxjs__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/rxjs/dist/esm5/internal/operators/map.js"),src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/design/organisms/formly-select-disable/formly-select-disable-field.component.ts"),src_utils_array__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__("./src/utils/array.ts"),src_utils_string__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./src/utils/string.ts");let FormlyService=class FormlyService{buildOverviewSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildDisableSelectConfig(config){const options$=config.required??!0?config.options$:this.addEmptyOption(config.options$,config),sortedOptions$=this.sortOptions(options$,config),validators=this.getValidators(config);return{key:config.key,type:"select-disable",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),labelProp:config.labelProp,valueProp:config.valueProp??"pk",options:sortedOptions$,required:config.required??!0,warningMessage:config.warningMessage,additionalProperties:{disabledExpression:config.disabledExpression,tooltipMessage:config.tooltipMessage??"WHAT",showWrapperLabel:config.showWrapperLabel??!0}},validators:{validation:validators}}}buildStaticSelectConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"select",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),options:config.options,required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildStaticStringSelectConfig(partialConfig){let options=partialConfig.options.map((str=>({label:str,value:str})));const config={...partialConfig,options};return this.buildStaticSelectConfig(config)}buildInputConfig(config){const validators=this.getValidators(config);switch(config.inputKind){case"NUMBER":validators.push("notInteger");break;case"NAME":validators.push("hasSpecialCharacters");break;case"NUMBER_FRACTION":validators.push("notNumber")}let innerInputType;if("NUMBER"===config.inputKind)innerInputType="number";else innerInputType="string";return{key:config.key,type:"input",className:config.className,wrappers:config.wrappers,hideExpression:config.hide??!1,parsers:config.parsers,props:{maxLength:config.maxLength,minLength:config.minLength,label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),type:innerInputType,required:config.required??!0,disabled:!!config.disabled,placeholder:config.placeholder??void 0},validators:{validation:validators}}}buildSinglePasswordConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"input",className:config.className,fieldGroupClassName:config.fieldGroupClassName,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Your password",disabled:config.disabled},validators:{validation:validators}}}buildConfirmedPasswordConfig(config){const validators=config.validators??[];validators.push("required");return{validators:{validation:[{name:"fieldMatch",options:{errorPath:"passwordConfirm"}}]},fieldGroup:[{key:"password",type:"input",className:config.className,templateOptions:{label:config.label??"Password",type:"password",required:!0,placeholder:"Password, at least 7 characters",disabled:config.disabled},validators:{validation:validators}},{key:"passwordConfirm",type:"input",className:config.className,templateOptions:{label:config.label?"Confirm "+config.label:"Password Confirmation",type:"password",required:!0,placeholder:"Please re-enter your password",disabled:config.disabled}}]}}buildCheckboxConfig(config){return{key:config.key,type:"checkbox",className:config.className,wrappers:config.wrappers,defaultValue:config.defaultValue,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled}}}buildDatepickerConfig(config){const validators=this.getValidators(config);return validators.push("date"),{key:config.key,type:"datepicker",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildFileFieldConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"file",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{buttonType:config.fileButtonType??"SECONDARY",fileFieldKind:config.fileFieldKind??"IMAGE",label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:!!config.disabled},validators:{validation:validators}}}buildEditorConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"text-editor",className:config.className,wrappers:config.wrappers,hideExpression:config.hide,props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled},validators:{validation:validators}}}buildAutocompleteConfig(config){const validators=this.getValidators(config);return{key:config.key,type:"autocomplete",className:config.className,wrappers:[...config.wrappers??[],"form-field"],props:{label:config.label??(0,src_utils_string__WEBPACK_IMPORTED_MODULE_1__.ZH)(`${config.key}`),required:config.required??!0,disabled:config.disabled,additionalProperties:{optionLabelProp:config.optionLabelProp,optionValueProp:config.optionValueProp,optionKeyProp:config.optionKeyProp,loadOptions:config.loadOptions,initialValue$:config.initialValue$}},validators:{validation:validators}}}toUpdateForm(fields){return fields.filter((field=>!("file"===field.type)))}getValidators(config){const validators=config.validators??[];return config.required&&validators.push("required"),validators}addEmptyOption(list,config){return Array.isArray(list)?(0,rxjs__WEBPACK_IMPORTED_MODULE_2__.of)([this.createEmptyOption(config),...list]):list.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((values=>[this.createEmptyOption(config),...values])))}createEmptyOption(config){const emptyOption={};emptyOption[config.labelProp]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_LABEL;return emptyOption[config.valueProp??config.key]=src_design_organisms_formly_select_disable_formly_select_disable_field_component__WEBPACK_IMPORTED_MODULE_0__.D.EMPTY_OPTION_VALUE,emptyOption}sortOptions(list$,config){const{sortProp,sortDirection}=config;return sortProp?list$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__.T)((list=>(0,src_utils_array__WEBPACK_IMPORTED_MODULE_4__.Z)(list,sortProp,sortDirection??"asc")))):list$}};FormlyService=(0,tslib__WEBPACK_IMPORTED_MODULE_5__.Cg)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_6__.Injectable)({providedIn:"root"})],FormlyService)},"./src/design/organisms/page-container/page-container.component.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{i:()=>PageContainerComponent});var tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var page_container_componentngResource=__webpack_require__("./src/design/organisms/page-container/page-container.component.scss?ngResource"),page_container_componentngResource_default=__webpack_require__.n(page_container_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const fadeIn=(0,animations.hZ)("fadeIn",[(0,animations.kY)(":enter",[(0,animations.iF)({opacity:0}),(0,animations.i0)("250ms ease-in",(0,animations.iF)({opacity:1}))]),(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);(0,animations.hZ)("fadeOut",[(0,animations.kY)(":leave",[(0,animations.iF)({opacity:1}),(0,animations.i0)("250ms ease-out",(0,animations.iF)({opacity:0}))])]);let PageContainerComponent=class PageContainerComponent{};PageContainerComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-page-container",template:'
\n
\n \n
\n
\n',standalone:!0,imports:[],animations:[fadeIn],styles:[page_container_componentngResource_default()]})],PageContainerComponent)},"./src/utils/array.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{U1:()=>replaceItem,Z:()=>sortByProp});const replaceItem=(list,item,key)=>{const newList=[...list],itemIndex=newList.findIndex((listItem=>listItem[key]===item[key]));if(-1===itemIndex)throw"Failed to find item in list";return newList[itemIndex]=item,newList},sortByProp=(list,prop,sortDirection="asc")=>{const newList=[...list];return newList.sort(((a,b)=>{const sortValue=a[prop]>b[prop]?1:-1;return"desc"===sortDirection?-1*sortValue:sortValue})),newList}},"./node_modules/@storybook/addon-actions/dist/index.mjs":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{XI:()=>action});var external_STORYBOOK_MODULE_PREVIEW_API_=__webpack_require__("storybook/internal/preview-api"),external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_=__webpack_require__("storybook/internal/preview-errors"),external_STORYBOOK_MODULE_GLOBAL_=__webpack_require__("@storybook/global"),v4=__webpack_require__("./node_modules/uuid/dist/esm-browser/v4.js"),ADDON_ID="storybook/actions",EVENT_ID=`${ADDON_ID}/action-event`,config={depth:10,clearOnStoryChange:!0,limit:50},findProto=(obj,callback)=>{let proto=Object.getPrototypeOf(obj);return!proto||callback(proto)?proto:findProto(proto,callback)},serializeArg=a=>{if("object"==typeof(e=a)&&e&&findProto(e,(proto=>/^Synthetic(?:Base)?Event$/.test(proto.constructor.name)))&&"function"==typeof e.persist){let e=Object.create(a.constructor.prototype,Object.getOwnPropertyDescriptors(a));e.persist();let viewDescriptor=Object.getOwnPropertyDescriptor(e,"view"),view=viewDescriptor?.value;return"object"==typeof view&&"Window"===view?.constructor.name&&Object.defineProperty(e,"view",{...viewDescriptor,value:Object.create(view.constructor.prototype)}),e}var e;return a},generateId=()=>"object"==typeof crypto&&"function"==typeof crypto.getRandomValues?(0,v4.A)():Date.now().toString(36)+Math.random().toString(36).substring(2);function action(name,options={}){let actionOptions={...config,...options},handler=function(...args){if(options.implicit){let storyRenderer=("__STORYBOOK_PREVIEW__"in external_STORYBOOK_MODULE_GLOBAL_.global?external_STORYBOOK_MODULE_GLOBAL_.global.__STORYBOOK_PREVIEW__:void 0)?.storyRenders.find((render=>"playing"===render.phase||"rendering"===render.phase));if(storyRenderer){let deprecated=!window?.FEATURES?.disallowImplicitActionsInRenderV8,error=new external_STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS_.ImplicitActionsDuringRendering({phase:storyRenderer.phase,name,deprecated});if(!deprecated)throw error;console.warn(error)}}let channel=external_STORYBOOK_MODULE_PREVIEW_API_.addons.getChannel(),id=generateId(),serializedArgs=args.map(serializeArg),normalizedArgs=args.length>1?serializedArgs:serializedArgs[0],actionDisplayToEmit={id,count:0,data:{name,args:normalizedArgs},options:{...actionOptions,maxDepth:5+(actionOptions.depth||3),allowFunction:actionOptions.allowFunction||!1}};channel.emit(EVENT_ID,actionDisplayToEmit)};return handler.isAction=!0,handler.implicit=options.implicit,handler}},"./src/design/templates/login/login.stories.ts":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Default:()=>Default,__namedExportsOrder:()=>__namedExportsOrder,default:()=>login_stories});var testing=__webpack_require__("./node_modules/@angular/router/fesm2022/testing.mjs"),dist=__webpack_require__("./node_modules/@storybook/addon-actions/dist/index.mjs"),angular_dist=__webpack_require__("./node_modules/@storybook/angular/dist/index.mjs"),formly_constants=__webpack_require__("./src/app/_modules/formly_constants.ts"),tslib_es6=__webpack_require__("./node_modules/tslib/tslib.es6.mjs");var login_componentngResource=__webpack_require__("./src/design/templates/login/login.component.scss?ngResource"),login_componentngResource_default=__webpack_require__.n(login_componentngResource),core=__webpack_require__("./node_modules/@angular/core/fesm2022/core.mjs"),fesm2022_forms=__webpack_require__("./node_modules/@angular/forms/fesm2022/forms.mjs"),ngx_formly_core=__webpack_require__("./node_modules/@ngx-formly/core/fesm2020/ngx-formly-core.mjs"),formly_service_service=__webpack_require__("./src/app/_services/formly/formly-service.service.ts"),page_container_component=__webpack_require__("./src/design/organisms/page-container/page-container.component.ts"),ngx_formly_bootstrap=__webpack_require__("./node_modules/@ngx-formly/bootstrap/fesm2020/ngx-formly-bootstrap.mjs"),animations=__webpack_require__("./node_modules/@angular/animations/fesm2022/animations.mjs");const backInUp=(0,animations.hZ)("backInUp",[(0,animations.kY)(":enter",[(0,animations.iF)({transform:"translateY(800px) scale(0.7)",opacity:.7}),(0,animations.i0)("800ms ease-out",(0,animations.i7)([(0,animations.iF)({offset:.8,transform:"translateY(0px) scale(0.7)",opacity:.7}),(0,animations.iF)({offset:1,transform:"scale(1)",opacity:1})]))]),(0,animations.kY)(":leave",[(0,animations.iF)({transform:"scale(1)",opacity:1}),(0,animations.i0)("800ms ease-in",(0,animations.i7)([(0,animations.iF)({offset:.2,transform:"translateY(0px) scale(0.7)",opacity:.7}),(0,animations.iF)({offset:1,transform:"translateY(-800px) scale(0.7)",opacity:.7})]))])]);var flip=__webpack_require__("./src/design/animations/flip.ts"),button_component=__webpack_require__("./src/design/atoms/button/button.component.ts");let LoginComponent=class LoginComponent{constructor(formlyService){this.formlyService=formlyService,this.login=new core.EventEmitter,this.resetPassword=new core.EventEmitter,this.loginMessages={"token-expired":"Your Session expired, please log in again","token-null":"You do not have a valid token, please log in","invalid-login":"No active account found with the given credentials","logged-out":"Log out successful. Log in again?","no-token":"You are not logged in. Please enter your credentials"},this.model={},this.form=new fesm2022_forms.gE({}),this.fields=[this.formlyService.buildInputConfig({key:"username",placeholder:"Username",inputKind:"STRING"}),this.formlyService.buildSinglePasswordConfig({key:"password",className:"mb-0",fieldGroupClassName:"mb-0"})],this.recoveryModel={},this.recoveryForm=new fesm2022_forms.gE({}),this.recoveryFields=[this.formlyService.buildInputConfig({key:"username",placeholder:"Username",inputKind:"STRING"})],this.state="LOGIN",this.isWaitingForPasswordReset=!1}setState(newState){this.state=newState,this.recoveryModel={},this.model={}}onLogin(){this.login.emit(this.model)}onPasswordReset(){this.resetPassword.emit(this.recoveryModel.username)}static{this.ctorParameters=()=>[{type:formly_service_service.$}]}static{this.propDecorators={loginState:[{type:core.Input}],resetErrorMessage:[{type:core.Input}],login:[{type:core.Output}],resetPassword:[{type:core.Output}]}}};LoginComponent=(0,tslib_es6.Cg)([(0,core.Component)({selector:"app-login",template:'