dealposbooks 5.48.0 → 5.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/3rdpartylicenses.txt +5 -5
  2. package/assets/scss/layouts/_sidebar.scss +2 -1
  3. package/assets/scss/style.scss +10 -0
  4. package/{chunk-DDM2KWNX.js → chunk-2LNMV22E.js} +1 -1
  5. package/chunk-3KWJOHNE.js +1 -0
  6. package/chunk-3ZDXMXR7.js +1 -0
  7. package/chunk-4CT2IUWQ.js +1 -0
  8. package/chunk-5DRALZZF.js +1 -0
  9. package/{chunk-VKT27VPR.js → chunk-64PX5TMF.js} +2 -2
  10. package/chunk-6JPM6TG4.js +1 -0
  11. package/chunk-75DDNXGP.js +1 -0
  12. package/chunk-7A5MPGKC.js +1 -0
  13. package/{chunk-YPOBALKC.js → chunk-AFKKNLDY.js} +1 -1
  14. package/chunk-AQYWE6TS.js +1 -0
  15. package/chunk-AYUYBSUN.js +1 -0
  16. package/chunk-BGO4VAXH.js +1 -0
  17. package/chunk-BRKRIPYY.js +1 -0
  18. package/{chunk-NNNKDAA2.js → chunk-CAS5GLLU.js} +1 -1
  19. package/{chunk-FUCKNGW4.js → chunk-CB44HQLK.js} +2 -2
  20. package/chunk-CUCSYZR2.js +202 -0
  21. package/{chunk-F6LZM7H5.js → chunk-DGACZ747.js} +1 -1
  22. package/chunk-DNH5W432.js +1 -0
  23. package/{chunk-FSB3LHPU.js → chunk-EBEY2MBR.js} +1 -1
  24. package/{chunk-RXR5DXWS.js → chunk-ELMSU4U7.js} +1 -1
  25. package/{chunk-2JNXKEYZ.js → chunk-EMJBQMMM.js} +1 -1
  26. package/{chunk-VW2FJYIZ.js → chunk-ES2YST7G.js} +1 -1
  27. package/{chunk-CEK7MQW2.js → chunk-F7JOE6RA.js} +1 -1
  28. package/{chunk-LBREDZL5.js → chunk-FWAGEKIF.js} +1 -1
  29. package/chunk-G75NZLKG.js +1 -0
  30. package/chunk-GPXKVMG6.js +1 -0
  31. package/{chunk-LXLOWSN6.js → chunk-HCJK6VTO.js} +1 -1
  32. package/chunk-IU5ELUD3.js +1 -0
  33. package/chunk-IUM4NWIG.js +1 -0
  34. package/chunk-L5U2UBAI.js +1 -0
  35. package/chunk-LJYIEJUY.js +1 -0
  36. package/{chunk-W63NE6LU.js → chunk-LKOCOLCM.js} +4 -4
  37. package/{chunk-ZQWFATZY.js → chunk-LUNMW7NC.js} +1 -1
  38. package/chunk-LWPIHDR2.js +130 -0
  39. package/chunk-MJZFJU44.js +1 -0
  40. package/chunk-MMRINCFB.js +1 -0
  41. package/chunk-MR3OGQ2R.js +1 -0
  42. package/chunk-N3QZNL7B.js +7 -0
  43. package/chunk-NGLRDAET.js +1 -0
  44. package/chunk-NMU2YBAB.js +1 -0
  45. package/chunk-O26EFRQ7.js +1 -0
  46. package/chunk-O7CGBSJM.js +1 -0
  47. package/chunk-PDW76PO5.js +1 -0
  48. package/{chunk-BG6BR7KI.js → chunk-PKO36DGM.js} +1 -1
  49. package/{chunk-FVYL3BQ7.js → chunk-PMLX776V.js} +1 -1
  50. package/{chunk-SFMFIWMX.js → chunk-PNWKXR6W.js} +1 -1
  51. package/{chunk-UEFTMQDF.js → chunk-Q4KG7LH6.js} +1 -1
  52. package/chunk-QB5TEFDM.js +1 -0
  53. package/{chunk-NPXVSAMB.js → chunk-R6JSPQYG.js} +1 -1
  54. package/chunk-RYDK5DLZ.js +1 -0
  55. package/chunk-TXDQN45R.js +8 -0
  56. package/chunk-UHYWK6PC.js +129 -0
  57. package/{chunk-EQTP2O7O.js → chunk-UJQIYFRL.js} +1 -1
  58. package/chunk-UKAT6MZE.js +1 -0
  59. package/chunk-UQIX3KIP.js +1 -0
  60. package/chunk-V62KSQJI.js +1 -0
  61. package/chunk-VIKI37CB.js +1 -0
  62. package/{chunk-T367AQJ2.js → chunk-VKNINE5Q.js} +1 -1
  63. package/chunk-WUBLGOX2.js +1 -0
  64. package/chunk-XVQLGYG2.js +1 -0
  65. package/chunk-YP2RRUG5.js +1 -0
  66. package/chunk-ZC3INGLB.js +1 -0
  67. package/index.html +2 -2
  68. package/main-SFIF6D5T.js +1 -0
  69. package/package.json +1 -1
  70. package/{styles-4L5CAR46.css → styles-FYY2LVCE.css} +1 -1
  71. package/chunk-2H7KQZEC.js +0 -8
  72. package/chunk-3NWFEFT2.js +0 -1
  73. package/chunk-4LI7GDDM.js +0 -1
  74. package/chunk-5FV7K5RQ.js +0 -1
  75. package/chunk-6GQ4PTPT.js +0 -7
  76. package/chunk-7OP477BS.js +0 -1
  77. package/chunk-7WCUKMRG.js +0 -1
  78. package/chunk-ACDLAA4B.js +0 -1
  79. package/chunk-B3VZ2ZHJ.js +0 -1
  80. package/chunk-BNPR5SPH.js +0 -1
  81. package/chunk-CVDRHTES.js +0 -1
  82. package/chunk-CZSVRFCL.js +0 -1
  83. package/chunk-DSZOROE6.js +0 -1
  84. package/chunk-F3RSX7TC.js +0 -1
  85. package/chunk-G42V3ZZU.js +0 -1
  86. package/chunk-H7GQCGCR.js +0 -1
  87. package/chunk-IDHDHBFV.js +0 -202
  88. package/chunk-JE4XET33.js +0 -1
  89. package/chunk-LCKRY7CZ.js +0 -1
  90. package/chunk-O76TW6JA.js +0 -1
  91. package/chunk-OVDG3ZBT.js +0 -1
  92. package/chunk-PQL4GCC5.js +0 -1
  93. package/chunk-RE5GBQH6.js +0 -1
  94. package/chunk-S2BFXF7C.js +0 -1
  95. package/chunk-SUXEBUIX.js +0 -1
  96. package/chunk-SV6BE4HG.js +0 -130
  97. package/chunk-TOGXYKTE.js +0 -1
  98. package/chunk-UI2UMYSE.js +0 -1
  99. package/chunk-V22QPBAO.js +0 -1
  100. package/chunk-VVAI7ZGN.js +0 -1
  101. package/chunk-W5E37PZP.js +0 -1
  102. package/chunk-WKHQICFW.js +0 -1
  103. package/chunk-WOYTUHJD.js +0 -1
  104. package/chunk-WPJGKTVO.js +0 -129
  105. package/chunk-XCTUTMD3.js +0 -1
  106. package/chunk-XOSALV7T.js +0 -1
  107. package/chunk-Y7SF5NXD.js +0 -1
  108. package/main-XTOQBEFQ.js +0 -1
@@ -1,4 +1,9 @@
1
1
 
2
+ --------------------------------------------------------------------------------
3
+ Package: highcharts
4
+ License: "https://www.highcharts.com/license"
5
+
6
+
2
7
  --------------------------------------------------------------------------------
3
8
  Package: primeng
4
9
  License: "SEE LICENSE IN LICENSE.md"
@@ -137,11 +142,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
137
142
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
138
143
  THE SOFTWARE.
139
144
 
140
- --------------------------------------------------------------------------------
141
- Package: highcharts
142
- License: "https://www.highcharts.com/license"
143
-
144
-
145
145
  --------------------------------------------------------------------------------
146
146
  Package: uuid
147
147
  License: "MIT"
@@ -16,7 +16,7 @@ Main sidebar
16
16
  width: $sidebar-width-full;
17
17
  height: 100%;
18
18
  top: 0px;
19
- z-index: 99;
19
+ z-index: 2000;
20
20
 
21
21
  background: #202123;
22
22
 
@@ -42,6 +42,7 @@ Main sidebar
42
42
  opacity: 0;
43
43
  transition: opacity 0.3s ease-in;
44
44
  cursor: pointer;
45
+ z-index: 3000; /* ← Tambahkan ini */
45
46
  }
46
47
 
47
48
  #burger-menu:hover {
@@ -322,3 +322,13 @@ p-tablecheckbox {
322
322
  .toast-container {
323
323
  z-index: 2147483647 !important;
324
324
  }
325
+
326
+ .p-popover {
327
+ z-index: 3000 !important;
328
+ }
329
+
330
+ // issued with primeng datepicker when using appendTo="body" in dialog
331
+ .p-datepicker-panel.p-component {
332
+ width: auto !important;
333
+ max-width: 329px !important;
334
+ }
@@ -198,4 +198,4 @@ input.p-select-label {
198
198
  .p-select.ng-invalid.ng-dirty .p-select-label.p-placeholder {
199
199
  color: ${t("select.invalid.placeholder.color")};
200
200
  }
201
- `,en={root:({instance:t})=>["p-dropdown p-select p-component p-inputwrapper",{"p-disabled":t.disabled,"p-variant-filled":t.variant==="filled"||t.config.inputVariant()==="filled"||t.config.inputStyle()==="filled","p-focus":t.focused,"p-inputwrapper-filled":t.modelValue()!==void 0&&t.modelValue()!==null&&!t.modelValue().length,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-select-open":t.overlayVisible,"p-select-fluid":t.hasFluid,"p-select-sm p-inputfield-sm":t.size==="small","p-select-lg p-inputfield-lg":t.size==="large"}],label:({instance:t,props:l})=>["p-select-label",{"p-placeholder":!l.editable&&t.label===l.placeholder,"p-select-label-empty":!l.editable&&!t.$slots.value&&(t.label==="p-emptylabel"||t.label.length===0)}],clearIcon:"p-select-clear-icon",dropdown:"p-select-dropdown",loadingicon:"p-select-loading-icon",dropdownIcon:"p-select-dropdown-icon",overlay:"p-select-overlay p-component",header:"p-select-header",pcFilter:"p-select-filter",listContainer:"p-select-list-container",list:"p-select-list",optionGroup:"p-select-option-group",optionGroupLabel:"p-select-option-group-label",option:({instance:t,props:l,state:e,option:n,focusedOption:i})=>["p-select-option",{"p-select-option-selected":t.isSelected(n)&&l.highlightOnSelect,"p-focus":e.focusedOptionIndex===i,"p-disabled":t.isOptionDisabled(n)}],optionLabel:"p-select-option-label",optionCheckIcon:"p-select-option-check-icon",optionBlankIcon:"p-select-option-blank-icon",emptyMessage:"p-select-empty-message"},Ct=(()=>{class t extends ut{name="select";theme=Xi;classes=en;static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275prov=N({token:t,factory:t.\u0275fac})}return t})(),Ot;Ot||(Ot={});var tn={provide:qe,useExisting:Te(()=>Ce),multi:!0},nn=(()=>{class t extends ce{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;checkmark;onClick=new I;onMouseEnter=new I;onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-dropdownItem"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",f],focused:[2,"focused","focused",f],label:"label",disabled:[2,"disabled","disabled",f],visible:[2,"visible","visible",f],itemSize:[2,"itemSize","itemSize",H],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkmark:[2,"checkmark","checkmark",f]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},standalone:!1,features:[te],decls:4,vars:22,consts:[["role","option","pRipple","",3,"click","mouseenter","id","ngStyle","ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"styleClass",4,"ngIf"],[3,"styleClass"]],template:function(n,i){n&1&&(d(0,"li",0),b("click",function(p){return i.onOptionClick(p)})("mouseenter",function(p){return i.onOptionMouseEnter(p)}),u(1,Pt,3,2,"ng-container",1)(2,$t,2,1,"span",1)(3,zt,1,0,"ng-container",2),c()),n&2&&(a("id",i.id)("ngStyle",V(14,G,i.itemSize+"px"))("ngClass",ze(16,Dt,i.selected,i.disabled,i.focused)),x("aria-label",i.label)("aria-setsize",i.ariaSetSize)("aria-posinset",i.ariaPosInset)("aria-selected",i.selected)("data-p-focused",i.focused)("data-p-highlight",i.selected)("data-p-disabled",i.disabled),s(),a("ngIf",i.checkmark),s(),a("ngIf",!i.template),s(),a("ngTemplateOutlet",i.template)("ngTemplateOutletContext",V(20,we,i.option)))},dependencies:()=>[oe,le,ae,re,mt,de,ue],encapsulation:2})}return t})(),Ce=(()=>{class t extends ce{zone;filterService;id;scrollHeight="200px";filter;name;style;panelStyle;styleClass;panelStyleClass;readonly;required;editable;appendTo;tabindex=0;set placeholder(e){this._placeholder.set(e)}get placeholder(){return this._placeholder.asReadonly()}loadingIcon;filterPlaceholder;filterLocale;variant;inputId;dataKey;filterBy;filterFields;autofocus;resetFilterOnHide=!1;checkmark=!1;dropdownIcon;loading=!1;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";autoDisplayFirst=!0;group;showClear;emptyFilterMessage="";emptyMessage="";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;ariaLabel;ariaLabelledBy;filterMatchMode="contains";maxlength;tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;focusOnHover=!1;selectOnFocus=!1;autoOptionFocus=!0;autofocusFilter=!0;fluid;get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.log("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}_itemSize;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.log("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_autoZIndex;get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.log("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_baseZIndex;get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_showTransitionOptions;get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_hideTransitionOptions;get filterValue(){return this._filterValue()}set filterValue(e){setTimeout(()=>{this._filterValue.set(e)})}get options(){return this._options()}set options(e){rt(e,this._options())||this._options.set(e)}onChange=new I;onFilter=new I;onFocus=new I;onBlur=new I;onClick=new I;onShow=new I;onHide=new I;onClear=new I;onLazyLoad=new I;_componentStyle=k(Ct);containerViewChild;filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;get hostClass(){return this._componentStyle.classes.root({instance:this}).map(n=>typeof n=="string"?n:Object.keys(n).filter(i=>n[i]).join(" ")).join(" ")+" "+this.styleClass}get hostStyle(){return this.style}_disabled;itemsWrapper;itemTemplate;groupTemplate;loaderTemplate;selectedItemTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;dropdownIconTemplate;loadingIconTemplate;clearIconTemplate;filterIconTemplate;filterOptions;_options=D(null);_placeholder=D(void 0);modelValue=D(null);value;onModelChange=()=>{};onModelTouched=()=>{};hover;focused;overlayVisible;optionsChanged;panel;selectedOptionUpdated;_filterValue=D(null);searchValue;searchTimeout;preventModelTouched;focusedOptionIndex=D(-1);clicked=D(!1);get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(W.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(W.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.disabled}get listLabel(){return this.config.getTranslation(W.ARIA).listLabel}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}get inputClass(){let e=this.label();return{"p-select-label":!0,"p-placeholder":this.placeholder()&&e===this.placeholder(),"p-select-label-empty":!this.editable&&!this.selectedItemTemplate&&(e==null||e==="p-emptylabel"||e.length===0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}visibleOptions=B(()=>{let e=this.getAllVisibleAndNonVisibleOptions();if(this._filterValue()){let i=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(o=>o.label?o.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1:o.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1):this.filterService.filter(e,this.searchFields(),this._filterValue().trim(),this.filterMatchMode,this.filterLocale);if(this.group){let o=this.options||[],p=[];return o.forEach(y=>{let Oe=this.getOptionGroupChildren(y).filter(Ft=>i.includes(Ft));Oe.length>0&&p.push(Ie(ve({},y),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...Oe]}))}),this.flatOptions(p)}return i}return e});label=B(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),n=e.findIndex(i=>this.isOptionValueEqualsModelValue(i));return n!==-1?this.getOptionLabel(e[n]):this.placeholder()||"p-emptylabel"});filled=B(()=>typeof this.modelValue()=="string"?!!this.modelValue():this.label()!=="p-emptylabel"&&this.modelValue()!==void 0&&this.modelValue()!==null);selectedOption;editableInputValue=B(()=>this.getOptionLabel(this.selectedOption)||this.modelValue()||"");constructor(e,n){super(),this.zone=e,this.filterService=n,Ae(()=>{let i=this.modelValue(),o=this.visibleOptions();if(o&&U(o)){let p=this.findSelectedOptionIndex();(p!==-1||i===void 0||typeof i=="string"&&i.length===0||this.isModelValueNotSet()||this.editable)&&(this.selectedOption=o[p])}lt(o)&&(i===void 0||this.isModelValueNotSet())&&U(this.selectedOption)&&(this.selectedOption=null),i!==void 0&&this.editable&&this.updateEditableLabel(),this.cd.markForCheck()})}isModelValueNotSet(){return this.modelValue()===null&&!this.isOptionValueEqualsModelValue(this.selectedOption)}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}ngOnInit(){super.ngOnInit(),console.log("Dropdown component is deprecated as of v18, use Select component instead."),this.id=this.id||pt("pn_id_"),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=A(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-highlight");e&&ot(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"filtericon":this.filterIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}flatOptions(e){return(e||[]).reduce((n,i,o)=>{n.push({optionGroup:i,group:!0,index:o});let p=this.getOptionGroupChildren(i);return p&&p.forEach(y=>n.push(y)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)),this.autoDisplayFirst&&(this.modelValue()===null||this.modelValue()===void 0)&&!this.placeholder()){let e=this.findFirstOptionIndex();this.onOptionSelect(null,this.visibleOptions()[e],!1,!0)}}onOptionSelect(e,n,i=!0,o=!1){if(!this.isSelected(n)){let p=this.getOptionValue(n);this.updateModel(p,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),o===!1&&this.onChange.emit({originalEvent:e,value:p})}i&&this.hide(!0)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e),this.selectedOptionUpdated=!0}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),this.modelValue.set(this.value),this.updateEditableLabel(),this.cd.markForCheck()}allowModelChange(){return this.autoDisplayFirst&&!this.placeholder()&&(this.modelValue()===void 0||this.modelValue()===null)&&!this.editable&&this.options&&this.options.length}isSelected(e){return this.isValidOption(e)&&this.isOptionValueEqualsModelValue(e)}isOptionValueEqualsModelValue(e){return at(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){super.ngAfterViewInit(),this.editable&&this.updateEditableLabel(),this.updatePlaceHolderForFloatingLabel()}updatePlaceHolderForFloatingLabel(){let e=this.el.nativeElement.parentElement,n=e?.classList.contains("p-float-label");if(e&&n&&!this.selectedOption){let i=e.querySelector("label");i&&this._placeholder.set(i.textContent)}}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?K(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?K(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isOptionDisabled(e){return this.getOptionValue(this.modelValue())===this.getOptionValue(e)||this.getOptionLabel(this.modelValue()===this.getOptionLabel(e))&&e.disabled===!1?!1:this.optionDisabled?K(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?K(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?K(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onContainerClick(e){this.disabled||this.readonly||this.loading||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(e),this.clicked.set(!0),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(e){let n=e.target.value;this.searchValue="",!this.searchOptions(e,n)&&this.focusedOptionIndex.set(-1),this.onModelChange(n),this.updateModel(n,e),setTimeout(()=>{this.onChange.emit({originalEvent:e,value:n})},1),!this.overlayVisible&&U(n)&&this.show()}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex();this.focusedOptionIndex.set(n),e&&L(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=A(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=A(this.itemsWrapper,".p-dropdown-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&!this.editable&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.clicked.set(!1),this.searchValue="",this.overlayOptions?.mode==="modal"&&et(),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&L(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&L(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.disabled)return;this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onKeyDown(e,n){if(!(this.disabled||this.readonly||this.loading)){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,n);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!e.metaKey&&st(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}this.clicked.set(!1)}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,!0);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onArrowDownKey(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n)}e.preventDefault(),e.stopPropagation()}changeFocusedOptionIndex(e,n){if(this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),this.selectOnFocus)){let i=this.visibleOptions()[n];this.onOptionSelect(e,i,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let i=A(this.itemsViewChild.nativeElement,`li[id="${n}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let n=e<this.visibleOptions().length-1?this.visibleOptions().slice(e+1).findIndex(i=>this.isValidOption(i)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?se(this.visibleOptions().slice(0,e),i=>this.isValidOption(i)):-1;return n>-1?n:e}findLastOptionIndex(){return se(this.visibleOptions(),e=>this.isValidOption(e))}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}isValidOption(e){return e!=null&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionGroup(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&e.optionGroup!==void 0&&e.optionGroup!==null&&e.group}onArrowUpKey(e,n=!1){if(e.altKey&&!n){if(this.focusedOptionIndex()!==-1){let i=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,i)}this.overlayVisible&&this.hide()}else{let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show()}e.preventDefault(),e.stopPropagation()}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,n=!1){if(n){let i=e.currentTarget;e.shiftKey?i.setSelectionRange(0,i.value.length):(i.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,n=!1){if(n){let i=e.currentTarget;if(e.shiftKey)i.setSelectionRange(0,i.value.length);else{let o=i.value.length;i.setSelectionRange(o,o),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onSpaceKey(e,n=!1){!this.editable&&!n&&this.onEnterKey(e)}onEnterKey(e,n=!1){if(!this.overlayVisible)this.focusedOptionIndex.set(-1),this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let i=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,i)}!n&&this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e,n=!1){if(!n)if(this.overlayVisible&&this.hasFocusableElements())L(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let i=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,i)}this.overlayVisible&&this.hide(this.filter)}e.stopPropagation()}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?it(this.overlayViewChild.el?.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild?.nativeElement;L(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?nt(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;L(n)}hasFocusableElements(){return tt(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,n=!1){n&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let i=-1,o=!1;return i=this.visibleOptions().findIndex(p=>this.isOptionExactMatched(p)),i===-1&&(i=this.visibleOptions().findIndex(p=>this.isOptionStartsWith(p))),i!==-1&&(o=!0),i===-1&&this.focusedOptionIndex()===-1&&(i=this.findFirstFocusedOptionIndex()),i!==-1&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionStartsWith(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isOptionExactMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale)===this.searchValue.toLocaleLowerCase(this.filterLocale)}onFilterInputChange(e){let n=e.target.value;this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()}),this.cd.markForCheck()}applyFocus(){this.editable?A(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():L(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(e){this.updateModel(null,e),this.clearEditableLabel(),this.onModelTouched(),this.onChange.emit({originalEvent:e,value:this.value}),this.onClear.emit(e),this.resetFilter()}static \u0275fac=function(n){return new(n||t)(ee(Ee),ee(ct))};static \u0275cmp=P({type:t,selectors:[["p-dropdown"]],contentQueries:function(n,i,o){if(n&1&&De(o,dt,4),n&2){let p;S(p=T())&&(i.templates=p)}},viewQuery:function(n,i){if(n&1&&(F(At,5),F(Kt,5),F(Rt,5),F(Ht,5),F(Bt,5),F(Gt,5),F(Nt,5),F(qt,5),F(Qt,5)),n&2){let o;S(o=T())&&(i.containerViewChild=o.first),S(o=T())&&(i.filterViewChild=o.first),S(o=T())&&(i.focusInputViewChild=o.first),S(o=T())&&(i.editableInputViewChild=o.first),S(o=T())&&(i.itemsViewChild=o.first),S(o=T())&&(i.scroller=o.first),S(o=T())&&(i.overlayViewChild=o.first),S(o=T())&&(i.firstHiddenFocusableElementOnOverlay=o.first),S(o=T())&&(i.lastHiddenFocusableElementOnOverlay=o.first)}},hostVars:5,hostBindings:function(n,i){n&1&&b("click",function(p){return i.onContainerClick(p)}),n&2&&(x("id",i.id),q(i.hostStyle),Q(i.hostClass))},inputs:{id:"id",scrollHeight:"scrollHeight",filter:[2,"filter","filter",f],name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:[2,"readonly","readonly",f],required:[2,"required","required",f],editable:[2,"editable","editable",f],appendTo:"appendTo",tabindex:[2,"tabindex","tabindex",H],placeholder:"placeholder",loadingIcon:"loadingIcon",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",variant:"variant",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:[2,"autofocus","autofocus",f],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",f],checkmark:[2,"checkmark","checkmark",f],dropdownIcon:"dropdownIcon",loading:[2,"loading","loading",f],optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:[2,"autoDisplayFirst","autoDisplayFirst",f],group:[2,"group","group",f],showClear:[2,"showClear","showClear",f],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:[2,"lazy","lazy",f],virtualScroll:[2,"virtualScroll","virtualScroll",f],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",H],virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:[2,"maxlength","maxlength",H],tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:[2,"focusOnHover","focusOnHover",f],selectOnFocus:[2,"selectOnFocus","selectOnFocus",f],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",f],autofocusFilter:[2,"autofocusFilter","autofocusFilter",f],fluid:[2,"fluid","fluid",f],disabled:"disabled",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",filterValue:"filterValue",options:"options"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear",onLazyLoad:"onLazyLoad"},standalone:!1,features:[$e([tn,Ct]),te],decls:11,vars:15,consts:[["elseBlock",""],["overlay",""],["content",""],["focusInput",""],["defaultPlaceholder",""],["editableInput",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["filter",""],["scroller",""],["loader",""],["items",""],["emptyFilter",""],["role","combobox",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus","focus","blur","keydown",4,"ngIf"],["type","text","aria-haspopup","listbox",3,"ngClass","disabled","pAutoFocus","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-select-dropdown"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions"],["role","combobox",3,"focus","blur","keydown","ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","aria-haspopup","listbox",3,"input","keydown","focus","blur","ngClass","disabled","pAutoFocus"],["class","p-select-clear-icon",3,"click",4,"ngIf"],[1,"p-select-clear-icon",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["aria-hidden","true",3,"ngClass",4,"ngIf"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true",3,"ngClass"],["aria-hidden","true"],["class","p-select-dropdown-icon",4,"ngIf"],["class","p-select-dropdown-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-select-dropdown-icon",3,"ngClass"],[3,"styleClass"],[1,"p-select-dropdown-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["class","p-select-header",3,"click",4,"ngIf"],[1,"p-select-list-container"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],[1,"p-select-header",3,"click"],["pInputText","","type","text","role","searchbox","autocomplete","off",1,"p-select-filter",3,"input","keydown","blur","value","variant"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox",1,"p-select-list",3,"ngClass"],["ngFor","",3,"ngForOf"],["class","p-select-empty-message","role","option",3,"ngStyle",4,"ngIf"],["role","option",1,"p-select-option-group",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","checkmark","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize"],["role","option",1,"p-select-empty-message",3,"ngStyle"]],template:function(n,i){if(n&1){let o=v();u(0,ei,6,20,"span",15)(1,ti,2,8,"input",16)(2,ri,3,2,"ng-container",17),d(3,"div",18),u(4,ui,3,2,"ng-container",19)(5,xi,2,2,"ng-template",null,0,M),c(),d(7,"p-overlay",20,1),Pe("visibleChange",function(y){return h(o),Le(i.overlayVisible,y)||(i.overlayVisible=y),_(y)}),b("onAnimationStart",function(y){return h(o),_(i.onOverlayAnimationStart(y))})("onHide",function(){return h(o),_(i.hide())}),u(9,Ji,13,17,"ng-template",null,2,M),c()}if(n&2){let o,p=z(6);a("ngIf",!i.editable),s(),a("ngIf",i.editable),s(),a("ngIf",i.isVisibleClearIcon),s(),x("aria-expanded",(o=i.overlayVisible)!==null&&o!==void 0?o:!1)("data-pc-section","trigger"),s(),a("ngIf",i.loading)("ngIfElse",p),s(3),Me("visible",i.overlayVisible),a("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("autoZIndex",i.autoZIndex)("baseZIndex",i.baseZIndex)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:()=>[oe,Ke,le,ae,re,yt,bt,be,ht,_e,me,he,Y,fe,ge,nn],encapsulation:2,changeDetection:0})}return t})(),St=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Fe({type:t});static \u0275inj=Ve({imports:[j,xe,pe,xt,be,_t,_e,me,he,de,ue,J,fe,ge,xe,pe]})}return t})();var Tt=(()=>{class t{constructor(){this.httpService=k(Re),this.toastr=k(Ne)}register(e){return this.httpService.post("/api/Trial/Register",e).pipe(Se(i=>{let o=i.error?.message||"Registration failed";throw this.toastr.error(o,"Registration Error",{timeOut:1e4}),i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Vt(){return t=>{if(!t.value)return null;let l=t.value.replace(/[\s\-().]/g,"");return[/^(\+62|62)8[1-9][0-9]{7,10}$/,/^08[1-9][0-9]{7,10}$/,/^(\+62|62|0)[2-7][0-9]{7,9}$/].some(i=>i.test(l))?null:{invalidPhone:!0}}}var Et=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-signup-confirmation"]],decls:13,vars:0,consts:[[1,"card","py-4",2,"width","36rem"],[1,"card-header","text-center","py-0","bg-white"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","45px"],[1,"fw-bold","mb-2","mt-3"],[1,"card-body","py-0"],[1,"mb-0","text-center"],["target","_blank",1,"link-primary","link-anchor"]],template:function(n,i){n&1&&(d(0,"div",0)(1,"div",1),g(2,"i",2),d(3,"h2",3),m(4,"Registration Successful"),c()(),d(5,"div",4)(6,"p",5),m(7," Please wait for the DealPOS team to approve your request."),g(8,"br"),m(9," The Approval will be sent to your email address, or you can contact our "),d(10,"a",6),m(11,"support"),c(),m(12," team for more information. "),c()()())},dependencies:[j],styles:[".link-anchor[_ngcontent-%COMP%]{text-decoration:none}.link-anchor[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return t})();function ln(t,l){t&1&&(d(0,"div",2),g(1,"app-signup-confirmation"),c())}function rn(t,l){t&1&&(d(0,"small",21),m(1,"Domain is required"),c())}function an(t,l){t&1&&(d(0,"small",21),m(1," Email is required "),c())}function sn(t,l){t&1&&(d(0,"small",21),m(1," Please enter a valid email address "),c())}function pn(t,l){if(t&1&&u(0,an,2,0,"small",21)(1,sn,2,0,"small",21),t&2){let e,n,i=r(2);E((e=i.registrationForm.get("email"))!=null&&e.getError("required")?0:-1),s(),E((n=i.registrationForm.get("email"))!=null&&n.getError("email")?1:-1)}}function cn(t,l){t&1&&(d(0,"small",21),m(1," Please enter a valid phone number "),c())}function dn(t,l){if(t&1){let e=v();d(0,"div",3)(1,"div",7)(2,"div",8)(3,"div",9)(4,"h2",10),m(5,"Books Registration"),c(),d(6,"p",11),m(7," Register now and take control with all-in-one accounting solution - built for modern retail. See our "),d(8,"a",12),m(9,"pricing"),c(),m(10," plan "),c()(),d(11,"div",13)(12,"section")(13,"form",14)(14,"div",15)(15,"div",16)(16,"label",17),m(17," Domain "),c(),d(18,"div",18),g(19,"input",19)(20,"p-dropdown",20),c(),u(21,rn,2,0,"small",21),c(),d(22,"div",16)(23,"label",22),m(24," Email "),c(),g(25,"input",23),u(26,pn,2,2),c(),d(27,"div",16)(28,"label",24),m(29,"Phone Number"),c(),g(30,"input",25),u(31,cn,2,0,"small",21),c(),d(32,"div",16)(33,"label",26),m(34,"Note"),c(),g(35,"input",27),c()(),d(36,"p-button",28),b("click",function(){h(e);let i=r();return _(i.onRegister())}),c(),d(37,"p",29),m(38," Already have an account? "),d(39,"a",30),m(40,"Sign in"),c()()()()()()()()}if(t&2){let e=r();s(13),a("formGroup",e.registrationForm),s(7),a("options",e.domainSuffixOptions),x("aria-label","Domain suffix"),s(),E(e.domainError?21:-1),s(5),E(e.emailError?26:-1),s(5),E(e.phoneError?31:-1)}}var _o=(()=>{class t{constructor(){this.formBuilder=k(Je),this.registerService=k(Tt),this.route=k(He),this.isRegisterSuccess=D(!1),this.domainSuffixOptions=[{label:".dealpos.co.id",value:".dealpos.co.id"},{label:".dealpos.net",value:".dealpos.net"},{label:".dealpos.com",value:".dealpos.com"},{label:".dealpos.app",value:".dealpos.app"}],this.initializeForm()}initializeForm(){let e=this.getDomainFromQueryParams();this.registrationForm=this.formBuilder.group({domain:[{value:e.domain||"",disabled:e.disableForm},[$.required,$.minLength(3),$.maxLength(63)]],domainSuffix:[{value:e.domainSuffix,disabled:e.disableForm},$.required],email:["",[$.required,$.email]],mobile:["",[Vt()]],note:[""]})}getDomainFromQueryParams(){let n=this.route.snapshot.queryParams.domain||"",i={domain:null,domainSuffix:".dealpos.co.id",disableForm:!1};if(n){let o=n.split(".");o.length>1&&(i.domain=o[0],i.domainSuffix="."+o?.slice(1)?.join("."),i.disableForm=!0)}return i}onRegister(){if(this.registrationForm.markAllAsTouched(),this.registrationForm.invalid)return;let e=this.registrationForm.getRawValue(),n={subDomain:`${e.domain}${e.domainSuffix}`,mobile:e.mobile,email:e.email,note:e.note};this.registerService.register(n).subscribe(()=>{this.isRegisterSuccess.set(!0),this.resetForm()})}resetForm(){this.registrationForm.reset({domain:"",domainSuffix:".dealpos.co.id",email:"",mobile:"",note:""}),this.registrationForm.markAsPristine(),this.registrationForm.markAsUntouched()}get domainError(){let e=this.registrationForm.get("domain");return e?.invalid&&(e?.dirty||e?.touched)||!1}get emailError(){let e=this.registrationForm.get("email");return e?.invalid&&(e?.dirty||e?.touched)||!1}get phoneError(){let e=this.registrationForm.get("mobile");return e?.invalid&&(e?.dirty||e?.touched)||!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-signup"]],decls:7,vars:1,consts:[[1,"h-100","h-custom"],[1,"container","h-100"],[1,"d-flex","justify-content-center","w-100","pt-5"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"d-flex","copyright"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","DealPOS Logo"],[1,"col-xxl-5","col-lg-7","col-xl-6","px-0","px-sm-2","px-lg-2"],[1,"card","rounded-3","mt-0","mt-sm-4","py-8"],[1,"card-header","text-center","px-5","py-0","bg-white"],[1,"fw-bold"],[1,"mb-0"],["href","https://www.dealpos.co.id/pricing","target","_blank",1,"link-anchor","link-primary"],[1,"card-body","px-5","pb-0","pt-4"],["id","registration-form","novalidate","",3,"formGroup"],[1,"d-flex","flex-column","align-items-center","gap-3"],[1,"form-field","w-100"],["for","domain",1,"field-label"],[1,"domain-input-group"],["pInputText","","id","domain","formControlName","domain","placeholder","Enter your store address","styleClass","domain-input","autocomplete","organization","name","domain",1,"rounded-end-0"],["formControlName","domainSuffix","optionLabel","label","optionValue","value","styleClass","domain-suffix",3,"options"],["role","alert",1,"field-error"],["for","email",1,"field-label"],["formControlName","email","pInputText","","id","email","type","email","placeholder","Enter your email","autocomplete","email","name","email"],["for","mobile",1,"field-label"],["formControlName","mobile","pInputText","","id","mobile","type","tel","placeholder","Enter your phone number","autocomplete","tel","name","mobile"],["for","note",1,"field-label"],["formControlName","note","pInputText","","id","note","placeholder","e.g., requesting trial access books","autoResize","false","name","note"],["type","submit","label","Register","styleClass","register-button",1,"w-100","mt-10",3,"click"],[1,"signin-text"],["routerLink","/",1,"link-anchor","link-primary"]],template:function(n,i){n&1&&(d(0,"section",0)(1,"div",1),u(2,ln,2,0,"div",2)(3,dn,41,6,"div",3),c(),d(4,"div",4)(5,"a",5),g(6,"img",6),c()()()),n&2&&(s(2),E(i.isRegisterSuccess()?2:3))},dependencies:[Ge,Be,J,Y,Xe,Ue,Qe,Ze,je,We,Ye,gt,ft,wt,St,Ce,Et],styles:["[_nghost-%COMP%] .container[_ngcontent-%COMP%]{background-color:#f4f4f4}@media (min-width: 1025px){[_nghost-%COMP%] .h-custom[_ngcontent-%COMP%]{height:100vh!important}}[_nghost-%COMP%] .form-field[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] .field-label[_ngcontent-%COMP%]{font-weight:600;color:#333;margin-bottom:.2rem;font-size:.9rem}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%] .domain-input{border-radius:6px 0 0 6px!important;border-right:none!important;flex:1}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%] .domain-suffix{border-radius:0 6px 6px 0!important;border-left:none!important;min-width:160px;padding-top:4px!important}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%] .domain-suffix .p-dropdown-label{font-size:.9rem}[_nghost-%COMP%] .p-inputtext{border:1px solid #e0e0e0;border-radius:6px;padding:.75rem;font-size:.9rem;transition:all .2s ease;width:100%}[_nghost-%COMP%] .p-inputtext:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 .2rem rgba(var(--p-primary-color),.25)}[_nghost-%COMP%] .p-inputtext.ng-invalid.ng-touched{border-color:#dc3545}[_nghost-%COMP%] .p-inputtext.ng-invalid.ng-touched:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem #dc354540}[_nghost-%COMP%] .p-dropdown{border:1px solid #e0e0e0;border-radius:6px}[_nghost-%COMP%] .p-dropdown:not(.p-disabled):hover{border-color:var(--p-primary-color)}[_nghost-%COMP%] .p-dropdown:not(.p-disabled).p-focus{border-color:var(--p-primary-color);box-shadow:0 0 0 .2rem rgba(var(--p-primary-color),.25)}[_nghost-%COMP%] .p-dropdown .p-dropdown-label{padding:.75rem;font-size:.9rem}[_nghost-%COMP%] .p-textarea{border:1px solid #e0e0e0;border-radius:6px;padding:.75rem;font-size:.9rem;font-family:inherit;resize:vertical;min-height:80px}[_nghost-%COMP%] .p-textarea:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 .2rem rgba(var(--p-primary-color),.25)}[_nghost-%COMP%] .p-button.register-button{background-color:var(--p-primary-color);border-color:var(--p-primary-color);color:#fff;font-weight:600;border-radius:6px;width:100%;margin-bottom:1rem}[_nghost-%COMP%] .p-button.register-button .p-button-label{font-size:1rem}[_nghost-%COMP%] .p-button.register-button:hover:not(:disabled){background-color:var(--p-primary-color);border-color:var(--p-primary-color);box-shadow:0 4px 12px rgba(var(--p-primary-color),.3)}[_nghost-%COMP%] .p-button.register-button:disabled{background-color:#6c757d;border-color:#6c757d;transform:none;box-shadow:none}[_nghost-%COMP%] .field-error[_ngcontent-%COMP%]{color:#dc3545;font-size:.8rem;margin-top:.25rem}[_nghost-%COMP%] .rate-limit-warning[_ngcontent-%COMP%]{margin-bottom:1rem}[_nghost-%COMP%] .signin-text[_ngcontent-%COMP%]{color:#6c757d;font-size:.9rem;margin:0;text-align:center}[_nghost-%COMP%] .link-anchor[_ngcontent-%COMP%]{text-decoration:none}[_nghost-%COMP%] .link-anchor[_ngcontent-%COMP%]:hover{text-decoration:underline}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:fixed;bottom:1rem;right:1.25rem;margin-left:20px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:8.125rem}@media (max-width: 768px){[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:static;margin-top:10px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{justify-content:center}}"]})}}return t})();export{_o as SignupComponent};
201
+ `,en={root:({instance:t})=>["p-dropdown p-select p-component p-inputwrapper",{"p-disabled":t.disabled,"p-variant-filled":t.variant==="filled"||t.config.inputVariant()==="filled"||t.config.inputStyle()==="filled","p-focus":t.focused,"p-inputwrapper-filled":t.modelValue()!==void 0&&t.modelValue()!==null&&!t.modelValue().length,"p-inputwrapper-focus":t.focused||t.overlayVisible,"p-select-open":t.overlayVisible,"p-select-fluid":t.hasFluid,"p-select-sm p-inputfield-sm":t.size==="small","p-select-lg p-inputfield-lg":t.size==="large"}],label:({instance:t,props:l})=>["p-select-label",{"p-placeholder":!l.editable&&t.label===l.placeholder,"p-select-label-empty":!l.editable&&!t.$slots.value&&(t.label==="p-emptylabel"||t.label.length===0)}],clearIcon:"p-select-clear-icon",dropdown:"p-select-dropdown",loadingicon:"p-select-loading-icon",dropdownIcon:"p-select-dropdown-icon",overlay:"p-select-overlay p-component",header:"p-select-header",pcFilter:"p-select-filter",listContainer:"p-select-list-container",list:"p-select-list",optionGroup:"p-select-option-group",optionGroupLabel:"p-select-option-group-label",option:({instance:t,props:l,state:e,option:n,focusedOption:i})=>["p-select-option",{"p-select-option-selected":t.isSelected(n)&&l.highlightOnSelect,"p-focus":e.focusedOptionIndex===i,"p-disabled":t.isOptionDisabled(n)}],optionLabel:"p-select-option-label",optionCheckIcon:"p-select-option-check-icon",optionBlankIcon:"p-select-option-blank-icon",emptyMessage:"p-select-empty-message"},Ct=(()=>{class t extends ut{name="select";theme=Xi;classes=en;static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275prov=N({token:t,factory:t.\u0275fac})}return t})(),Ot;Ot||(Ot={});var tn={provide:qe,useExisting:Te(()=>Ce),multi:!0},nn=(()=>{class t extends ce{id;option;selected;focused;label;disabled;visible;itemSize;ariaPosInset;ariaSetSize;template;checkmark;onClick=new I;onMouseEnter=new I;onOptionClick(e){this.onClick.emit(e)}onOptionMouseEnter(e){this.onMouseEnter.emit(e)}static \u0275fac=(()=>{let e;return function(i){return(e||(e=X(t)))(i||t)}})();static \u0275cmp=P({type:t,selectors:[["p-dropdownItem"]],inputs:{id:"id",option:"option",selected:[2,"selected","selected",f],focused:[2,"focused","focused",f],label:"label",disabled:[2,"disabled","disabled",f],visible:[2,"visible","visible",f],itemSize:[2,"itemSize","itemSize",H],ariaPosInset:"ariaPosInset",ariaSetSize:"ariaSetSize",template:"template",checkmark:[2,"checkmark","checkmark",f]},outputs:{onClick:"onClick",onMouseEnter:"onMouseEnter"},standalone:!1,features:[te],decls:4,vars:22,consts:[["role","option","pRipple","",3,"click","mouseenter","id","ngStyle","ngClass"],[4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"styleClass",4,"ngIf"],[3,"styleClass"]],template:function(n,i){n&1&&(d(0,"li",0),b("click",function(p){return i.onOptionClick(p)})("mouseenter",function(p){return i.onOptionMouseEnter(p)}),u(1,Pt,3,2,"ng-container",1)(2,$t,2,1,"span",1)(3,zt,1,0,"ng-container",2),c()),n&2&&(a("id",i.id)("ngStyle",V(14,G,i.itemSize+"px"))("ngClass",ze(16,Dt,i.selected,i.disabled,i.focused)),x("aria-label",i.label)("aria-setsize",i.ariaSetSize)("aria-posinset",i.ariaPosInset)("aria-selected",i.selected)("data-p-focused",i.focused)("data-p-highlight",i.selected)("data-p-disabled",i.disabled),s(),a("ngIf",i.checkmark),s(),a("ngIf",!i.template),s(),a("ngTemplateOutlet",i.template)("ngTemplateOutletContext",V(20,we,i.option)))},dependencies:()=>[oe,le,ae,re,mt,de,ue],encapsulation:2})}return t})(),Ce=(()=>{class t extends ce{zone;filterService;id;scrollHeight="200px";filter;name;style;panelStyle;styleClass;panelStyleClass;readonly;required;editable;appendTo;tabindex=0;set placeholder(e){this._placeholder.set(e)}get placeholder(){return this._placeholder.asReadonly()}loadingIcon;filterPlaceholder;filterLocale;variant;inputId;dataKey;filterBy;filterFields;autofocus;resetFilterOnHide=!1;checkmark=!1;dropdownIcon;loading=!1;optionLabel;optionValue;optionDisabled;optionGroupLabel="label";optionGroupChildren="items";autoDisplayFirst=!0;group;showClear;emptyFilterMessage="";emptyMessage="";lazy=!1;virtualScroll;virtualScrollItemSize;virtualScrollOptions;overlayOptions;ariaFilterLabel;ariaLabel;ariaLabelledBy;filterMatchMode="contains";maxlength;tooltip="";tooltipPosition="right";tooltipPositionStyle="absolute";tooltipStyleClass;focusOnHover=!1;selectOnFocus=!1;autoOptionFocus=!0;autofocusFilter=!0;fluid;get disabled(){return this._disabled}set disabled(e){e&&(this.focused=!1,this.overlayVisible&&this.hide()),this._disabled=e,this.cd.destroyed||this.cd.detectChanges()}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=e,console.log("The itemSize property is deprecated, use virtualScrollItemSize property instead.")}_itemSize;get autoZIndex(){return this._autoZIndex}set autoZIndex(e){this._autoZIndex=e,console.log("The autoZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_autoZIndex;get baseZIndex(){return this._baseZIndex}set baseZIndex(e){this._baseZIndex=e,console.log("The baseZIndex property is deprecated since v14.2.0, use overlayOptions property instead.")}_baseZIndex;get showTransitionOptions(){return this._showTransitionOptions}set showTransitionOptions(e){this._showTransitionOptions=e,console.log("The showTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_showTransitionOptions;get hideTransitionOptions(){return this._hideTransitionOptions}set hideTransitionOptions(e){this._hideTransitionOptions=e,console.log("The hideTransitionOptions property is deprecated since v14.2.0, use overlayOptions property instead.")}_hideTransitionOptions;get filterValue(){return this._filterValue()}set filterValue(e){setTimeout(()=>{this._filterValue.set(e)})}get options(){return this._options()}set options(e){rt(e,this._options())||this._options.set(e)}onChange=new I;onFilter=new I;onFocus=new I;onBlur=new I;onClick=new I;onShow=new I;onHide=new I;onClear=new I;onLazyLoad=new I;_componentStyle=k(Ct);containerViewChild;filterViewChild;focusInputViewChild;editableInputViewChild;itemsViewChild;scroller;overlayViewChild;firstHiddenFocusableElementOnOverlay;lastHiddenFocusableElementOnOverlay;get hostClass(){return this._componentStyle.classes.root({instance:this}).map(n=>typeof n=="string"?n:Object.keys(n).filter(i=>n[i]).join(" ")).join(" ")+" "+this.styleClass}get hostStyle(){return this.style}_disabled;itemsWrapper;itemTemplate;groupTemplate;loaderTemplate;selectedItemTemplate;headerTemplate;filterTemplate;footerTemplate;emptyFilterTemplate;emptyTemplate;dropdownIconTemplate;loadingIconTemplate;clearIconTemplate;filterIconTemplate;filterOptions;_options=D(null);_placeholder=D(void 0);modelValue=D(null);value;onModelChange=()=>{};onModelTouched=()=>{};hover;focused;overlayVisible;optionsChanged;panel;selectedOptionUpdated;_filterValue=D(null);searchValue;searchTimeout;preventModelTouched;focusedOptionIndex=D(-1);clicked=D(!1);get emptyMessageLabel(){return this.emptyMessage||this.config.getTranslation(W.EMPTY_MESSAGE)}get emptyFilterMessageLabel(){return this.emptyFilterMessage||this.config.getTranslation(W.EMPTY_FILTER_MESSAGE)}get isVisibleClearIcon(){return this.modelValue()!=null&&this.hasSelectedOption()&&this.showClear&&!this.disabled}get listLabel(){return this.config.getTranslation(W.ARIA).listLabel}get hasFluid(){let n=this.el.nativeElement.closest("p-fluid");return this.fluid||!!n}get inputClass(){let e=this.label();return{"p-select-label":!0,"p-placeholder":this.placeholder()&&e===this.placeholder(),"p-select-label-empty":!this.editable&&!this.selectedItemTemplate&&(e==null||e==="p-emptylabel"||e.length===0)}}get focusedOptionId(){return this.focusedOptionIndex()!==-1?`${this.id}_${this.focusedOptionIndex()}`:null}visibleOptions=B(()=>{let e=this.getAllVisibleAndNonVisibleOptions();if(this._filterValue()){let i=!(this.filterBy||this.optionLabel)&&!this.filterFields&&!this.optionValue?this.options.filter(o=>o.label?o.label.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1:o.toString().toLowerCase().indexOf(this._filterValue().toLowerCase().trim())!==-1):this.filterService.filter(e,this.searchFields(),this._filterValue().trim(),this.filterMatchMode,this.filterLocale);if(this.group){let o=this.options||[],p=[];return o.forEach(y=>{let Oe=this.getOptionGroupChildren(y).filter(Ft=>i.includes(Ft));Oe.length>0&&p.push(Ie(ve({},y),{[typeof this.optionGroupChildren=="string"?this.optionGroupChildren:"items"]:[...Oe]}))}),this.flatOptions(p)}return i}return e});label=B(()=>{let e=this.getAllVisibleAndNonVisibleOptions(),n=e.findIndex(i=>this.isOptionValueEqualsModelValue(i));return n!==-1?this.getOptionLabel(e[n]):this.placeholder()||"p-emptylabel"});filled=B(()=>typeof this.modelValue()=="string"?!!this.modelValue():this.label()!=="p-emptylabel"&&this.modelValue()!==void 0&&this.modelValue()!==null);selectedOption;editableInputValue=B(()=>this.getOptionLabel(this.selectedOption)||this.modelValue()||"");constructor(e,n){super(),this.zone=e,this.filterService=n,Ae(()=>{let i=this.modelValue(),o=this.visibleOptions();if(o&&U(o)){let p=this.findSelectedOptionIndex();(p!==-1||i===void 0||typeof i=="string"&&i.length===0||this.isModelValueNotSet()||this.editable)&&(this.selectedOption=o[p])}lt(o)&&(i===void 0||this.isModelValueNotSet())&&U(this.selectedOption)&&(this.selectedOption=null),i!==void 0&&this.editable&&this.updateEditableLabel(),this.cd.markForCheck()})}isModelValueNotSet(){return this.modelValue()===null&&!this.isOptionValueEqualsModelValue(this.selectedOption)}getAllVisibleAndNonVisibleOptions(){return this.group?this.flatOptions(this.options):this.options||[]}ngOnInit(){super.ngOnInit(),console.log("Dropdown component is deprecated as of v18, use Select component instead."),this.id=this.id||pt("pn_id_"),this.autoUpdateModel(),this.filterBy&&(this.filterOptions={filter:e=>this.onFilterInputChange(e),reset:()=>this.resetFilter()})}ngAfterViewChecked(){if(this.optionsChanged&&this.overlayVisible&&(this.optionsChanged=!1,this.zone.runOutsideAngular(()=>{setTimeout(()=>{this.overlayViewChild&&this.overlayViewChild.alignOverlay()},1)})),this.selectedOptionUpdated&&this.itemsWrapper){let e=A(this.overlayViewChild?.overlayViewChild?.nativeElement,"li.p-highlight");e&&ot(this.itemsWrapper,e),this.selectedOptionUpdated=!1}}templates;ngAfterContentInit(){this.templates.forEach(e=>{switch(e.getType()){case"item":this.itemTemplate=e.template;break;case"selectedItem":this.selectedItemTemplate=e.template;break;case"header":this.headerTemplate=e.template;break;case"filter":this.filterTemplate=e.template;break;case"footer":this.footerTemplate=e.template;break;case"emptyfilter":this.emptyFilterTemplate=e.template;break;case"empty":this.emptyTemplate=e.template;break;case"group":this.groupTemplate=e.template;break;case"loader":this.loaderTemplate=e.template;break;case"dropdownicon":this.dropdownIconTemplate=e.template;break;case"loadingicon":this.loadingIconTemplate=e.template;break;case"clearicon":this.clearIconTemplate=e.template;break;case"filtericon":this.filterIconTemplate=e.template;break;default:this.itemTemplate=e.template;break}})}flatOptions(e){return(e||[]).reduce((n,i,o)=>{n.push({optionGroup:i,group:!0,index:o});let p=this.getOptionGroupChildren(i);return p&&p.forEach(y=>n.push(y)),n},[])}autoUpdateModel(){if(this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption()&&(this.focusedOptionIndex.set(this.findFirstFocusedOptionIndex()),this.onOptionSelect(null,this.visibleOptions()[this.focusedOptionIndex()],!1)),this.autoDisplayFirst&&(this.modelValue()===null||this.modelValue()===void 0)&&!this.placeholder()){let e=this.findFirstOptionIndex();this.onOptionSelect(null,this.visibleOptions()[e],!1,!0)}}onOptionSelect(e,n,i=!0,o=!1){if(!this.isSelected(n)){let p=this.getOptionValue(n);this.updateModel(p,e),this.focusedOptionIndex.set(this.findSelectedOptionIndex()),o===!1&&this.onChange.emit({originalEvent:e,value:p})}i&&this.hide(!0)}onOptionMouseEnter(e,n){this.focusOnHover&&this.changeFocusedOptionIndex(e,n)}updateModel(e,n){this.value=e,this.onModelChange(e),this.modelValue.set(e),this.selectedOptionUpdated=!0}writeValue(e){this.filter&&this.resetFilter(),this.value=e,this.allowModelChange()&&this.onModelChange(e),this.modelValue.set(this.value),this.updateEditableLabel(),this.cd.markForCheck()}allowModelChange(){return this.autoDisplayFirst&&!this.placeholder()&&(this.modelValue()===void 0||this.modelValue()===null)&&!this.editable&&this.options&&this.options.length}isSelected(e){return this.isValidOption(e)&&this.isOptionValueEqualsModelValue(e)}isOptionValueEqualsModelValue(e){return at(this.modelValue(),this.getOptionValue(e),this.equalityKey())}ngAfterViewInit(){super.ngAfterViewInit(),this.editable&&this.updateEditableLabel(),this.updatePlaceHolderForFloatingLabel()}updatePlaceHolderForFloatingLabel(){let e=this.el.nativeElement.parentElement,n=e?.classList.contains("p-float-label");if(e&&n&&!this.selectedOption){let i=e.querySelector("label");i&&this._placeholder.set(i.textContent)}}updateEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value=this.getOptionLabel(this.selectedOption)||this.modelValue()||"")}clearEditableLabel(){this.editableInputViewChild&&(this.editableInputViewChild.nativeElement.value="")}getOptionIndex(e,n){return this.virtualScrollerDisabled?e:n&&n.getItemOptions(e).index}getOptionLabel(e){return this.optionLabel!==void 0&&this.optionLabel!==null?K(e,this.optionLabel):e&&e.label!==void 0?e.label:e}getOptionValue(e){return this.optionValue&&this.optionValue!==null?K(e,this.optionValue):!this.optionLabel&&e&&e.value!==void 0?e.value:e}isOptionDisabled(e){return this.getOptionValue(this.modelValue())===this.getOptionValue(e)||this.getOptionLabel(this.modelValue()===this.getOptionLabel(e))&&e.disabled===!1?!1:this.optionDisabled?K(e,this.optionDisabled):e&&e.disabled!==void 0?e.disabled:!1}getOptionGroupLabel(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null?K(e,this.optionGroupLabel):e&&e.label!==void 0?e.label:e}getOptionGroupChildren(e){return this.optionGroupChildren!==void 0&&this.optionGroupChildren!==null?K(e,this.optionGroupChildren):e.items}getAriaPosInset(e){return(this.optionGroupLabel?e-this.visibleOptions().slice(0,e).filter(n=>this.isOptionGroup(n)).length:e)+1}get ariaSetSize(){return this.visibleOptions().filter(e=>!this.isOptionGroup(e)).length}resetFilter(){this._filterValue.set(null),this.filterViewChild&&this.filterViewChild.nativeElement&&(this.filterViewChild.nativeElement.value="")}registerOnChange(e){this.onModelChange=e}registerOnTouched(e){this.onModelTouched=e}setDisabledState(e){this.disabled=e,this.cd.markForCheck()}onContainerClick(e){this.disabled||this.readonly||this.loading||(this.focusInputViewChild?.nativeElement.focus({preventScroll:!0}),!(e.target.tagName==="INPUT"||e.target.getAttribute("data-pc-section")==="clearicon"||e.target.closest('[data-pc-section="clearicon"]'))&&((!this.overlayViewChild||!this.overlayViewChild.el.nativeElement.contains(e.target))&&(this.overlayVisible?this.hide(!0):this.show(!0)),this.onClick.emit(e),this.clicked.set(!0),this.cd.detectChanges()))}isEmpty(){return!this._options()||this.visibleOptions()&&this.visibleOptions().length===0}onEditableInput(e){let n=e.target.value;this.searchValue="",!this.searchOptions(e,n)&&this.focusedOptionIndex.set(-1),this.onModelChange(n),this.updateModel(n,e),setTimeout(()=>{this.onChange.emit({originalEvent:e,value:n})},1),!this.overlayVisible&&U(n)&&this.show()}show(e){this.overlayVisible=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex();this.focusedOptionIndex.set(n),e&&L(this.focusInputViewChild?.nativeElement),this.cd.markForCheck()}onOverlayAnimationStart(e){if(e.toState==="visible"){if(this.itemsWrapper=A(this.overlayViewChild?.overlayViewChild?.nativeElement,this.virtualScroll?".p-scroller":".p-dropdown-items-wrapper"),this.virtualScroll&&this.scroller?.setContentEl(this.itemsViewChild?.nativeElement),this.options&&this.options.length)if(this.virtualScroll){let n=this.modelValue()?this.focusedOptionIndex():-1;n!==-1&&this.scroller?.scrollToIndex(n)}else{let n=A(this.itemsWrapper,".p-dropdown-item.p-highlight");n&&n.scrollIntoView({block:"nearest",inline:"nearest"})}this.filterViewChild&&this.filterViewChild.nativeElement&&(this.preventModelTouched=!0,this.autofocusFilter&&!this.editable&&this.filterViewChild.nativeElement.focus()),this.onShow.emit(e)}e.toState==="void"&&(this.itemsWrapper=null,this.onModelTouched(),this.onHide.emit(e))}hide(e){this.overlayVisible=!1,this.focusedOptionIndex.set(-1),this.clicked.set(!1),this.searchValue="",this.overlayOptions?.mode==="modal"&&et(),this.filter&&this.resetFilterOnHide&&this.resetFilter(),e&&(this.focusInputViewChild&&L(this.focusInputViewChild?.nativeElement),this.editable&&this.editableInputViewChild&&L(this.editableInputViewChild?.nativeElement)),this.cd.markForCheck()}onInputFocus(e){if(this.disabled)return;this.focused=!0;let n=this.focusedOptionIndex()!==-1?this.focusedOptionIndex():this.overlayVisible&&this.autoOptionFocus?this.findFirstFocusedOptionIndex():-1;this.focusedOptionIndex.set(n),this.overlayVisible&&this.scrollInView(this.focusedOptionIndex()),this.onFocus.emit(e)}onInputBlur(e){this.focused=!1,this.onBlur.emit(e),this.preventModelTouched||this.onModelTouched(),this.preventModelTouched=!1}onKeyDown(e,n){if(!(this.disabled||this.readonly||this.loading)){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);break;case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,n);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!e.metaKey&&st(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key));break}this.clicked.set(!1)}}onFilterKeyDown(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e,!0);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0);break;default:break}}onFilterBlur(e){this.focusedOptionIndex.set(-1)}onArrowDownKey(e){if(!this.overlayVisible)this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());else{let n=this.focusedOptionIndex()!==-1?this.findNextOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,n)}e.preventDefault(),e.stopPropagation()}changeFocusedOptionIndex(e,n){if(this.focusedOptionIndex()!==n&&(this.focusedOptionIndex.set(n),this.scrollInView(),this.selectOnFocus)){let i=this.visibleOptions()[n];this.onOptionSelect(e,i,!1)}}get virtualScrollerDisabled(){return!this.virtualScroll}scrollInView(e=-1){let n=e!==-1?`${this.id}_${e}`:this.focusedOptionId;if(this.itemsViewChild&&this.itemsViewChild.nativeElement){let i=A(this.itemsViewChild.nativeElement,`li[id="${n}"]`);i?i.scrollIntoView&&i.scrollIntoView({block:"nearest",inline:"nearest"}):this.virtualScrollerDisabled||setTimeout(()=>{this.virtualScroll&&this.scroller?.scrollToIndex(e!==-1?e:this.focusedOptionIndex())},0)}}hasSelectedOption(){return this.modelValue()!==void 0}isValidSelectedOption(e){return this.isValidOption(e)&&this.isSelected(e)}equalityKey(){return this.optionValue?null:this.dataKey}findFirstFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e}findFirstOptionIndex(){return this.visibleOptions().findIndex(e=>this.isValidOption(e))}findSelectedOptionIndex(){return this.hasSelectedOption()?this.visibleOptions().findIndex(e=>this.isValidSelectedOption(e)):-1}findNextOptionIndex(e){let n=e<this.visibleOptions().length-1?this.visibleOptions().slice(e+1).findIndex(i=>this.isValidOption(i)):-1;return n>-1?n+e+1:e}findPrevOptionIndex(e){let n=e>0?se(this.visibleOptions().slice(0,e),i=>this.isValidOption(i)):-1;return n>-1?n:e}findLastOptionIndex(){return se(this.visibleOptions(),e=>this.isValidOption(e))}findLastFocusedOptionIndex(){let e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e}isValidOption(e){return e!=null&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))}isOptionGroup(e){return this.optionGroupLabel!==void 0&&this.optionGroupLabel!==null&&e.optionGroup!==void 0&&e.optionGroup!==null&&e.group}onArrowUpKey(e,n=!1){if(e.altKey&&!n){if(this.focusedOptionIndex()!==-1){let i=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,i)}this.overlayVisible&&this.hide()}else{let i=this.focusedOptionIndex()!==-1?this.findPrevOptionIndex(this.focusedOptionIndex()):this.clicked()?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,i),!this.overlayVisible&&this.show()}e.preventDefault(),e.stopPropagation()}onArrowLeftKey(e,n=!1){n&&this.focusedOptionIndex.set(-1)}onDeleteKey(e){this.showClear&&(this.clear(e),e.preventDefault())}onHomeKey(e,n=!1){if(n){let i=e.currentTarget;e.shiftKey?i.setSelectionRange(0,i.value.length):(i.setSelectionRange(0,0),this.focusedOptionIndex.set(-1))}else this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onEndKey(e,n=!1){if(n){let i=e.currentTarget;if(e.shiftKey)i.setSelectionRange(0,i.value.length);else{let o=i.value.length;i.setSelectionRange(o,o),this.focusedOptionIndex.set(-1)}}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()}onPageDownKey(e){this.scrollInView(this.visibleOptions().length-1),e.preventDefault()}onPageUpKey(e){this.scrollInView(0),e.preventDefault()}onSpaceKey(e,n=!1){!this.editable&&!n&&this.onEnterKey(e)}onEnterKey(e,n=!1){if(!this.overlayVisible)this.focusedOptionIndex.set(-1),this.onArrowDownKey(e);else{if(this.focusedOptionIndex()!==-1){let i=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,i)}!n&&this.hide()}e.preventDefault()}onEscapeKey(e){this.overlayVisible&&this.hide(!0),e.preventDefault()}onTabKey(e,n=!1){if(!n)if(this.overlayVisible&&this.hasFocusableElements())L(e.shiftKey?this.lastHiddenFocusableElementOnOverlay.nativeElement:this.firstHiddenFocusableElementOnOverlay.nativeElement),e.preventDefault();else{if(this.focusedOptionIndex()!==-1&&this.overlayVisible){let i=this.visibleOptions()[this.focusedOptionIndex()];this.onOptionSelect(e,i)}this.overlayVisible&&this.hide(this.filter)}e.stopPropagation()}onFirstHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?it(this.overlayViewChild.el?.nativeElement,":not(.p-hidden-focusable)"):this.focusInputViewChild?.nativeElement;L(n)}onLastHiddenFocus(e){let n=e.relatedTarget===this.focusInputViewChild?.nativeElement?nt(this.overlayViewChild?.overlayViewChild?.nativeElement,':not([data-p-hidden-focusable="true"])'):this.focusInputViewChild?.nativeElement;L(n)}hasFocusableElements(){return tt(this.overlayViewChild.overlayViewChild.nativeElement,':not([data-p-hidden-focusable="true"])').length>0}onBackspaceKey(e,n=!1){n&&!this.overlayVisible&&this.show()}searchFields(){return this.filterBy?.split(",")||this.filterFields||[this.optionLabel]}searchOptions(e,n){this.searchValue=(this.searchValue||"")+n;let i=-1,o=!1;return i=this.visibleOptions().findIndex(p=>this.isOptionExactMatched(p)),i===-1&&(i=this.visibleOptions().findIndex(p=>this.isOptionStartsWith(p))),i!==-1&&(o=!0),i===-1&&this.focusedOptionIndex()===-1&&(i=this.findFirstFocusedOptionIndex()),i!==-1&&this.changeFocusedOptionIndex(e,i),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout(()=>{this.searchValue="",this.searchTimeout=null},500),o}isOptionStartsWith(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale))}isOptionExactMatched(e){return this.isValidOption(e)&&this.getOptionLabel(e).toString().toLocaleLowerCase(this.filterLocale)===this.searchValue.toLocaleLowerCase(this.filterLocale)}onFilterInputChange(e){let n=e.target.value;this._filterValue.set(n),this.focusedOptionIndex.set(-1),this.onFilter.emit({originalEvent:e,filter:this._filterValue()}),!this.virtualScrollerDisabled&&this.scroller.scrollToIndex(0),setTimeout(()=>{this.overlayViewChild.alignOverlay()}),this.cd.markForCheck()}applyFocus(){this.editable?A(this.el.nativeElement,".p-dropdown-label.p-inputtext").focus():L(this.focusInputViewChild?.nativeElement)}focus(){this.applyFocus()}clear(e){this.updateModel(null,e),this.clearEditableLabel(),this.onModelTouched(),this.onChange.emit({originalEvent:e,value:this.value}),this.onClear.emit(e),this.resetFilter()}static \u0275fac=function(n){return new(n||t)(ee(Ee),ee(ct))};static \u0275cmp=P({type:t,selectors:[["p-dropdown"]],contentQueries:function(n,i,o){if(n&1&&De(o,dt,4),n&2){let p;S(p=T())&&(i.templates=p)}},viewQuery:function(n,i){if(n&1&&(F(At,5),F(Kt,5),F(Rt,5),F(Ht,5),F(Bt,5),F(Gt,5),F(Nt,5),F(qt,5),F(Qt,5)),n&2){let o;S(o=T())&&(i.containerViewChild=o.first),S(o=T())&&(i.filterViewChild=o.first),S(o=T())&&(i.focusInputViewChild=o.first),S(o=T())&&(i.editableInputViewChild=o.first),S(o=T())&&(i.itemsViewChild=o.first),S(o=T())&&(i.scroller=o.first),S(o=T())&&(i.overlayViewChild=o.first),S(o=T())&&(i.firstHiddenFocusableElementOnOverlay=o.first),S(o=T())&&(i.lastHiddenFocusableElementOnOverlay=o.first)}},hostVars:5,hostBindings:function(n,i){n&1&&b("click",function(p){return i.onContainerClick(p)}),n&2&&(x("id",i.id),q(i.hostStyle),Q(i.hostClass))},inputs:{id:"id",scrollHeight:"scrollHeight",filter:[2,"filter","filter",f],name:"name",style:"style",panelStyle:"panelStyle",styleClass:"styleClass",panelStyleClass:"panelStyleClass",readonly:[2,"readonly","readonly",f],required:[2,"required","required",f],editable:[2,"editable","editable",f],appendTo:"appendTo",tabindex:[2,"tabindex","tabindex",H],placeholder:"placeholder",loadingIcon:"loadingIcon",filterPlaceholder:"filterPlaceholder",filterLocale:"filterLocale",variant:"variant",inputId:"inputId",dataKey:"dataKey",filterBy:"filterBy",filterFields:"filterFields",autofocus:[2,"autofocus","autofocus",f],resetFilterOnHide:[2,"resetFilterOnHide","resetFilterOnHide",f],checkmark:[2,"checkmark","checkmark",f],dropdownIcon:"dropdownIcon",loading:[2,"loading","loading",f],optionLabel:"optionLabel",optionValue:"optionValue",optionDisabled:"optionDisabled",optionGroupLabel:"optionGroupLabel",optionGroupChildren:"optionGroupChildren",autoDisplayFirst:[2,"autoDisplayFirst","autoDisplayFirst",f],group:[2,"group","group",f],showClear:[2,"showClear","showClear",f],emptyFilterMessage:"emptyFilterMessage",emptyMessage:"emptyMessage",lazy:[2,"lazy","lazy",f],virtualScroll:[2,"virtualScroll","virtualScroll",f],virtualScrollItemSize:[2,"virtualScrollItemSize","virtualScrollItemSize",H],virtualScrollOptions:"virtualScrollOptions",overlayOptions:"overlayOptions",ariaFilterLabel:"ariaFilterLabel",ariaLabel:"ariaLabel",ariaLabelledBy:"ariaLabelledBy",filterMatchMode:"filterMatchMode",maxlength:[2,"maxlength","maxlength",H],tooltip:"tooltip",tooltipPosition:"tooltipPosition",tooltipPositionStyle:"tooltipPositionStyle",tooltipStyleClass:"tooltipStyleClass",focusOnHover:[2,"focusOnHover","focusOnHover",f],selectOnFocus:[2,"selectOnFocus","selectOnFocus",f],autoOptionFocus:[2,"autoOptionFocus","autoOptionFocus",f],autofocusFilter:[2,"autofocusFilter","autofocusFilter",f],fluid:[2,"fluid","fluid",f],disabled:"disabled",itemSize:"itemSize",autoZIndex:"autoZIndex",baseZIndex:"baseZIndex",showTransitionOptions:"showTransitionOptions",hideTransitionOptions:"hideTransitionOptions",filterValue:"filterValue",options:"options"},outputs:{onChange:"onChange",onFilter:"onFilter",onFocus:"onFocus",onBlur:"onBlur",onClick:"onClick",onShow:"onShow",onHide:"onHide",onClear:"onClear",onLazyLoad:"onLazyLoad"},standalone:!1,features:[$e([tn,Ct]),te],decls:11,vars:15,consts:[["elseBlock",""],["overlay",""],["content",""],["focusInput",""],["defaultPlaceholder",""],["editableInput",""],["firstHiddenFocusableEl",""],["buildInItems",""],["lastHiddenFocusableEl",""],["builtInFilterElement",""],["filter",""],["scroller",""],["loader",""],["items",""],["emptyFilter",""],["role","combobox",3,"ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus","focus","blur","keydown",4,"ngIf"],["type","text","aria-haspopup","listbox",3,"ngClass","disabled","pAutoFocus","input","keydown","focus","blur",4,"ngIf"],[4,"ngIf"],["role","button","aria-label","dropdown trigger","aria-haspopup","listbox",1,"p-select-dropdown"],[4,"ngIf","ngIfElse"],[3,"visibleChange","onAnimationStart","onHide","visible","options","target","appendTo","autoZIndex","baseZIndex","showTransitionOptions","hideTransitionOptions"],["role","combobox",3,"focus","blur","keydown","ngClass","pTooltip","tooltipPosition","positionStyle","tooltipStyleClass","pAutoFocus"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["type","text","aria-haspopup","listbox",3,"input","keydown","focus","blur","ngClass","disabled","pAutoFocus"],["class","p-select-clear-icon",3,"click",4,"ngIf"],[1,"p-select-clear-icon",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["aria-hidden","true",3,"ngClass",4,"ngIf"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true",3,"ngClass"],["aria-hidden","true"],["class","p-select-dropdown-icon",4,"ngIf"],["class","p-select-dropdown-icon",3,"ngClass",4,"ngIf"],[3,"styleClass",4,"ngIf"],[1,"p-select-dropdown-icon",3,"ngClass"],[3,"styleClass"],[1,"p-select-dropdown-icon"],[3,"ngClass","ngStyle"],["role","presentation",1,"p-hidden-accessible","p-hidden-focusable",3,"focus"],["class","p-select-header",3,"click",4,"ngIf"],[1,"p-select-list-container"],[3,"items","style","itemSize","autoSize","lazy","options","onLazyLoad",4,"ngIf"],[1,"p-select-header",3,"click"],["pInputText","","type","text","role","searchbox","autocomplete","off",1,"p-select-filter",3,"input","keydown","blur","value","variant"],[3,"onLazyLoad","items","itemSize","autoSize","lazy","options"],["role","listbox",1,"p-select-list",3,"ngClass"],["ngFor","",3,"ngForOf"],["class","p-select-empty-message","role","option",3,"ngStyle",4,"ngIf"],["role","option",1,"p-select-option-group",3,"ngStyle"],[3,"onClick","onMouseEnter","id","option","checkmark","selected","label","disabled","template","focused","ariaPosInset","ariaSetSize"],["role","option",1,"p-select-empty-message",3,"ngStyle"]],template:function(n,i){if(n&1){let o=v();u(0,ei,6,20,"span",15)(1,ti,2,8,"input",16)(2,ri,3,2,"ng-container",17),d(3,"div",18),u(4,ui,3,2,"ng-container",19)(5,xi,2,2,"ng-template",null,0,M),c(),d(7,"p-overlay",20,1),Pe("visibleChange",function(y){return h(o),Le(i.overlayVisible,y)||(i.overlayVisible=y),_(y)}),b("onAnimationStart",function(y){return h(o),_(i.onOverlayAnimationStart(y))})("onHide",function(){return h(o),_(i.hide())}),u(9,Ji,13,17,"ng-template",null,2,M),c()}if(n&2){let o,p=z(6);a("ngIf",!i.editable),s(),a("ngIf",i.editable),s(),a("ngIf",i.isVisibleClearIcon),s(),x("aria-expanded",(o=i.overlayVisible)!==null&&o!==void 0?o:!1)("data-pc-section","trigger"),s(),a("ngIf",i.loading)("ngIfElse",p),s(3),Me("visible",i.overlayVisible),a("options",i.overlayOptions)("target","@parent")("appendTo",i.appendTo)("autoZIndex",i.autoZIndex)("baseZIndex",i.baseZIndex)("showTransitionOptions",i.showTransitionOptions)("hideTransitionOptions",i.hideTransitionOptions)}},dependencies:()=>[oe,Ke,le,ae,re,yt,bt,be,ht,_e,me,he,Y,fe,ge,nn],encapsulation:2,changeDetection:0})}return t})(),St=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275mod=Fe({type:t});static \u0275inj=Ve({imports:[j,xe,pe,xt,be,_t,_e,me,he,de,ue,J,fe,ge,xe,pe]})}return t})();var Tt=(()=>{class t{constructor(){this.httpService=k(Re),this.toastr=k(Ne)}register(e){return this.httpService.post("/api/Trial/Register",e).pipe(Se(i=>{let o=i.error?.message||"Registration failed";throw this.toastr.error(o,"Registration Error",{timeOut:1e4}),i}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=N({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Vt(){return t=>{if(!t.value)return null;let l=t.value;if(!/^\d+$/.test(l))return{invalidPhone:!0};let e=l.length;return e<11||e>15?{invalidPhone:!0}:null}}var Et=(()=>{class t{static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-signup-confirmation"]],decls:13,vars:0,consts:[[1,"card","py-4",2,"width","36rem"],[1,"card-header","text-center","py-0","bg-white"],[1,"fa-solid","fa-circle-check","text-success",2,"font-size","45px"],[1,"fw-bold","mb-2","mt-3"],[1,"card-body","py-0"],[1,"mb-0","text-center"],["target","_blank",1,"link-primary","link-anchor"]],template:function(n,i){n&1&&(d(0,"div",0)(1,"div",1),g(2,"i",2),d(3,"h2",3),m(4,"Registration Successful"),c()(),d(5,"div",4)(6,"p",5),m(7," Please wait for the DealPOS team to approve your request."),g(8,"br"),m(9," The Approval will be sent to your email address, or you can contact our "),d(10,"a",6),m(11,"support"),c(),m(12," team for more information. "),c()()())},dependencies:[j],styles:[".link-anchor[_ngcontent-%COMP%]{text-decoration:none}.link-anchor[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})}}return t})();function ln(t,l){t&1&&(d(0,"div",2),g(1,"app-signup-confirmation"),c())}function rn(t,l){t&1&&(d(0,"small",21),m(1,"Domain is required"),c())}function an(t,l){t&1&&(d(0,"small",21),m(1," Email is required "),c())}function sn(t,l){t&1&&(d(0,"small",21),m(1," Please enter a valid email address "),c())}function pn(t,l){if(t&1&&u(0,an,2,0,"small",21)(1,sn,2,0,"small",21),t&2){let e,n,i=r(2);E((e=i.registrationForm.get("email"))!=null&&e.getError("required")?0:-1),s(),E((n=i.registrationForm.get("email"))!=null&&n.getError("email")?1:-1)}}function cn(t,l){t&1&&(d(0,"small",21),m(1," Please enter a valid phone number "),c())}function dn(t,l){if(t&1){let e=v();d(0,"div",3)(1,"div",7)(2,"div",8)(3,"div",9)(4,"h2",10),m(5,"Books Registration"),c(),d(6,"p",11),m(7," Register now and take control with all-in-one accounting solution - built for modern retail. See our "),d(8,"a",12),m(9,"pricing"),c(),m(10," plan "),c()(),d(11,"div",13)(12,"section")(13,"form",14)(14,"div",15)(15,"div",16)(16,"label",17),m(17," Domain "),c(),d(18,"div",18),g(19,"input",19)(20,"p-dropdown",20),c(),u(21,rn,2,0,"small",21),c(),d(22,"div",16)(23,"label",22),m(24," Email "),c(),g(25,"input",23),u(26,pn,2,2),c(),d(27,"div",16)(28,"label",24),m(29,"Phone Number"),c(),g(30,"input",25),u(31,cn,2,0,"small",21),c(),d(32,"div",16)(33,"label",26),m(34,"Note"),c(),g(35,"input",27),c()(),d(36,"p-button",28),b("click",function(){h(e);let i=r();return _(i.onRegister())}),c(),d(37,"p",29),m(38," Already have an account? "),d(39,"a",30),m(40,"Sign in"),c()()()()()()()()}if(t&2){let e=r();s(13),a("formGroup",e.registrationForm),s(7),a("options",e.domainSuffixOptions),x("aria-label","Domain suffix"),s(),E(e.domainError?21:-1),s(5),E(e.emailError?26:-1),s(5),E(e.phoneError?31:-1)}}var _o=(()=>{class t{constructor(){this.formBuilder=k(Je),this.registerService=k(Tt),this.route=k(He),this.isRegisterSuccess=D(!1),this.domainSuffixOptions=[{label:".dealpos.co.id",value:".dealpos.co.id"},{label:".dealpos.net",value:".dealpos.net"},{label:".dealpos.com",value:".dealpos.com"},{label:".dealpos.app",value:".dealpos.app"}],this.initializeForm()}initializeForm(){let e=this.getDomainFromQueryParams();this.registrationForm=this.formBuilder.group({domain:[{value:e.domain||"",disabled:e.disableForm},[$.required,$.minLength(3),$.maxLength(63)]],domainSuffix:[{value:e.domainSuffix,disabled:e.disableForm},$.required],email:["",[$.required,$.email]],mobile:["",[Vt()]],note:[""]})}getDomainFromQueryParams(){let n=this.route.snapshot.queryParams.domain||"",i={domain:null,domainSuffix:".dealpos.co.id",disableForm:!1};if(n){let o=n.split(".");o.length>1&&(i.domain=o[0],i.domainSuffix="."+o?.slice(1)?.join("."),i.disableForm=!0)}return i}onRegister(){if(this.registrationForm.markAllAsTouched(),this.registrationForm.invalid)return;let e=this.registrationForm.getRawValue(),n={subDomain:`${e.domain}${e.domainSuffix}`,mobile:e.mobile,email:e.email,note:e.note};this.registerService.register(n).subscribe(()=>{this.isRegisterSuccess.set(!0),this.resetForm()})}resetForm(){this.registrationForm.reset({domain:"",domainSuffix:".dealpos.co.id",email:"",mobile:"",note:""}),this.registrationForm.markAsPristine(),this.registrationForm.markAsUntouched()}get domainError(){let e=this.registrationForm.get("domain");return e?.invalid&&(e?.dirty||e?.touched)||!1}get emailError(){let e=this.registrationForm.get("email");return e?.invalid&&(e?.dirty||e?.touched)||!1}get phoneError(){let e=this.registrationForm.get("mobile");return e?.invalid&&(e?.dirty||e?.touched)||!1}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=P({type:t,selectors:[["app-signup"]],decls:7,vars:1,consts:[[1,"h-100","h-custom"],[1,"container","h-100"],[1,"d-flex","justify-content-center","w-100","pt-5"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"d-flex","copyright"],["target","_blank","href","http://www.dealpos.com"],["src","//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png","alt","DealPOS Logo"],[1,"col-xxl-5","col-lg-7","col-xl-6","px-0","px-sm-2","px-lg-2"],[1,"card","rounded-3","mt-0","mt-sm-4","py-8"],[1,"card-header","text-center","px-5","py-0","bg-white"],[1,"fw-bold"],[1,"mb-0"],["href","https://www.dealpos.co.id/pricing","target","_blank",1,"link-anchor","link-primary"],[1,"card-body","px-5","pb-0","pt-4"],["id","registration-form","novalidate","",3,"formGroup"],[1,"d-flex","flex-column","align-items-center","gap-3"],[1,"form-field","w-100"],["for","domain",1,"field-label"],[1,"domain-input-group"],["pInputText","","id","domain","formControlName","domain","placeholder","Enter your store address","styleClass","domain-input","autocomplete","organization","name","domain",1,"rounded-end-0"],["formControlName","domainSuffix","optionLabel","label","optionValue","value","styleClass","domain-suffix",3,"options"],["role","alert",1,"field-error"],["for","email",1,"field-label"],["formControlName","email","pInputText","","id","email","type","email","placeholder","Enter your email","autocomplete","email","name","email"],["for","mobile",1,"field-label"],["formControlName","mobile","pInputText","","id","mobile","type","tel","placeholder","Enter your phone number","autocomplete","tel","name","mobile"],["for","note",1,"field-label"],["formControlName","note","pInputText","","id","note","placeholder","e.g., requesting trial access books","autoResize","false","name","note"],["type","submit","label","Register","styleClass","register-button",1,"w-100","mt-10",3,"click"],[1,"signin-text"],["routerLink","/",1,"link-anchor","link-primary"]],template:function(n,i){n&1&&(d(0,"section",0)(1,"div",1),u(2,ln,2,0,"div",2)(3,dn,41,6,"div",3),c(),d(4,"div",4)(5,"a",5),g(6,"img",6),c()()()),n&2&&(s(2),E(i.isRegisterSuccess()?2:3))},dependencies:[Ge,Be,J,Y,Xe,Ue,Qe,Ze,je,We,Ye,gt,ft,wt,St,Ce,Et],styles:["[_nghost-%COMP%] .container[_ngcontent-%COMP%]{background-color:#f4f4f4}@media (min-width: 1025px){[_nghost-%COMP%] .h-custom[_ngcontent-%COMP%]{height:100vh!important}}[_nghost-%COMP%] .form-field[_ngcontent-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] .field-label[_ngcontent-%COMP%]{font-weight:600;color:#333;margin-bottom:.2rem;font-size:.9rem}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%] .domain-input{border-radius:6px 0 0 6px!important;border-right:none!important;flex:1}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%] .domain-suffix{border-radius:0 6px 6px 0!important;border-left:none!important;min-width:160px;padding-top:4px!important}[_nghost-%COMP%] .domain-input-group[_ngcontent-%COMP%] .domain-suffix .p-dropdown-label{font-size:.9rem}[_nghost-%COMP%] .p-inputtext{border:1px solid #e0e0e0;border-radius:6px;padding:.75rem;font-size:.9rem;transition:all .2s ease;width:100%}[_nghost-%COMP%] .p-inputtext:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 .2rem rgba(var(--p-primary-color),.25)}[_nghost-%COMP%] .p-inputtext.ng-invalid.ng-touched{border-color:#dc3545}[_nghost-%COMP%] .p-inputtext.ng-invalid.ng-touched:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem #dc354540}[_nghost-%COMP%] .p-dropdown{border:1px solid #e0e0e0;border-radius:6px}[_nghost-%COMP%] .p-dropdown:not(.p-disabled):hover{border-color:var(--p-primary-color)}[_nghost-%COMP%] .p-dropdown:not(.p-disabled).p-focus{border-color:var(--p-primary-color);box-shadow:0 0 0 .2rem rgba(var(--p-primary-color),.25)}[_nghost-%COMP%] .p-dropdown .p-dropdown-label{padding:.75rem;font-size:.9rem}[_nghost-%COMP%] .p-textarea{border:1px solid #e0e0e0;border-radius:6px;padding:.75rem;font-size:.9rem;font-family:inherit;resize:vertical;min-height:80px}[_nghost-%COMP%] .p-textarea:focus{border-color:var(--p-primary-color);box-shadow:0 0 0 .2rem rgba(var(--p-primary-color),.25)}[_nghost-%COMP%] .p-button.register-button{background-color:var(--p-primary-color);border-color:var(--p-primary-color);color:#fff;font-weight:600;border-radius:6px;width:100%;margin-bottom:1rem}[_nghost-%COMP%] .p-button.register-button .p-button-label{font-size:1rem}[_nghost-%COMP%] .p-button.register-button:hover:not(:disabled){background-color:var(--p-primary-color);border-color:var(--p-primary-color);box-shadow:0 4px 12px rgba(var(--p-primary-color),.3)}[_nghost-%COMP%] .p-button.register-button:disabled{background-color:#6c757d;border-color:#6c757d;transform:none;box-shadow:none}[_nghost-%COMP%] .field-error[_ngcontent-%COMP%]{color:#dc3545;font-size:.8rem;margin-top:.25rem}[_nghost-%COMP%] .rate-limit-warning[_ngcontent-%COMP%]{margin-bottom:1rem}[_nghost-%COMP%] .signin-text[_ngcontent-%COMP%]{color:#6c757d;font-size:.9rem;margin:0;text-align:center}[_nghost-%COMP%] .link-anchor[_ngcontent-%COMP%]{text-decoration:none}[_nghost-%COMP%] .link-anchor[_ngcontent-%COMP%]:hover{text-decoration:underline}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:fixed;bottom:1rem;right:1.25rem;margin-left:20px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%] > img[_ngcontent-%COMP%]{width:8.125rem}@media (max-width: 768px){[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{position:static;margin-top:10px}[_nghost-%COMP%] .copyright[_ngcontent-%COMP%]{justify-content:center}}"]})}}return t})();export{_o as SignupComponent};
@@ -0,0 +1 @@
1
+ import{b as Se}from"./chunk-AFKKNLDY.js";import{a as I,b as V}from"./chunk-3VQUNDVT.js";import{d as _e,k as xe}from"./chunk-DGACZ747.js";import{a as be,b as Ce}from"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import{b as ge}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as he}from"./chunk-LKOCOLCM.js";import"./chunk-S27Z7D3D.js";import{a as ae,b as re}from"./chunk-AD247LWQ.js";import{b as T,c as se,d as me,e as ce,f as de,g as fe,h as ue}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{y as le,z as pe}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as Y,f as Z,k as $,l as ee,o as te,u as ie,w as oe,x as ne}from"./chunk-VMI3QWC6.js";import{e as z,l as J}from"./chunk-F7PVAVLQ.js";import"./chunk-GPXKVMG6.js";import{a as X}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{q as W,s as q}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{D as M,Dc as H,Eb as F,Ec as Q,Fc as P,Ha as O,Mb as f,Oc as u,Pc as h,Sc as g,Wb as o,Xb as n,Y as D,Yb as E,ac as L,bd as B,c as v,ca as N,cd as U,fc as w,gc as k,ia as d,ib as p,qa as x,ra as S,sc as r,tc as y,uc as C,xc as j,yb as R,yc as G,zc as K}from"./chunk-6QJHEOXN.js";import{a as m,b as c}from"./chunk-YQFG5XE2.js";var ke=(()=>{class e{constructor(){this.httpService=d(X)}fetchCashAndBankLoader(){return this.httpService.get("","api/CashAndBankLoader/GetCashAndBank")}fetchCashAndBankData(t){return this.httpService.get("","api/CashAndBank/GetCashAndBank",{params:t})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=N({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var ve={data:{data:[],pageTitle:"",pageSubTitle:""},filter:null,options:{hasGeneralLedger:!1}},A=se(ue("cash-bank-store"),fe(ve),me(e=>({totalBalance:B(()=>e.data().data.reduce((l,t)=>l+t.balance,0)),subTotalDebit:B(()=>e.data().data.reduce((l,t)=>l+t.debit,0)),subTotalCredit:B(()=>e.data().data.reduce((l,t)=>l+t.credit,0))})),de(e=>{let l=d(ke);return{updateFilterQuery(i){T(e,a=>c(m({},a),{filter:c(m({},i),{pageNumber:1})}))},loadCashAndBankLoader:I(v(D(()=>l.fetchCashAndBankLoader().pipe(V({next:i=>{T(e,a=>c(m({},a),{options:i.options,filter:i.filter}))},error:i=>{console.log("error",i)}}))))),loadCashAndBankData:I(v(M(i=>!!i),D(i=>l.fetchCashAndBankData(i).pipe(V({next:a=>{T(e,s=>c(m({},s),{data:a}))},error:a=>{console.log("error",a)}})))))}}),ce({onInit(e){e.loadCashAndBankLoader(),e.loadCashAndBankData(e.filter)}}));var De=["class","page"],Fe=e=>[e],Ee=()=>["/pages/report/general-ledger"],we=e=>({id:e});function Pe(e,l){e&1&&(o(0,"tr")(1,"th"),r(2,"Code"),n(),o(3,"th"),r(4,"Name"),n(),o(5,"th",8)(6,"span",9),r(7," Debit "),n()(),o(8,"th",8)(9,"span",10),r(10," Credit "),n()(),o(11,"th",8)(12,"span",11),r(13," Current Balance"),n()()())}function Ie(e,l){if(e&1&&(o(0,"tr")(1,"td"),r(2),n(),o(3,"td")(4,"a",12),r(5),n()(),o(6,"td",13),r(7),u(8,"number"),n(),o(9,"td",14),r(10),u(11,"number"),n(),o(12,"td",8)(13,"a",15),r(14),u(15,"number"),n()()()),e&2){let t=l.$implicit;p(2),y(t.code),p(2),f("routerLink",P(14,Fe,"/pages/chart-of-account/account/"+t.accountID)),p(),y(t.name),p(2),C(" ",h(8,8,t.debit)," "),p(3),C(" ",h(11,10,t.credit)," "),p(3),f("routerLink",Q(16,Ee))("queryParams",P(17,we,t.accountID)),p(),y(h(15,12,t.balance))}}function Ve(e,l){if(e&1&&(o(0,"tr"),E(1,"td"),o(2,"td",16),r(3,"Total"),n(),o(4,"td",17),r(5),u(6,"number"),n(),o(7,"td",18),r(8),u(9,"number"),n(),o(10,"td",19),r(11),u(12,"number"),n()()),e&2){let t=k(2);p(5),C(" ",h(6,3,t.store.subTotalDebit())," "),p(3),C(" ",h(9,5,t.store.subTotalCredit())," "),p(3),C(" ",h(12,7,t.store.totalBalance())," ")}}function Ae(e,l){e&1&&(o(0,"tr")(1,"td",20)(2,"span"),r(3,"No records found."),n()()())}function Me(e,l){if(e&1&&(o(0,"p-panel")(1,"p-table",7),F(2,Pe,14,0,"ng-template",null,2,g)(4,Ie,16,19,"ng-template",null,3,g)(6,Ve,13,9,"ng-template",null,4,g)(8,Ae,4,0,"ng-template",null,5,g),n()()),e&2){let t=k();p(),f("value",t.store.data().data)}}function Ne(e,l){if(e&1&&(o(0,"form",21)(1,"div",22)(2,"label",23),r(3,"From - To"),n(),o(4,"div",24),E(5,"p-datepicker",25)(6,"p-datepicker",26),n()()()),e&2){let t=k();f("formGroup",t.filterForm),p(5),f("iconDisplay","input")("showIcon",!0),p(),f("iconDisplay","input")("showIcon",!0)}}var ye=(()=>{class e{constructor(){this.store=d(A),this.isDialogFilterVisible=O(!1),this.routeInfo=Be,this.fb=d(ie),this.dayjsService=d(Se),U(()=>{let t=this.store.filter();if(t){let i=Object.entries(t).reduce((a,[s,b])=>(s==="from"||s==="to"?a[s]=b?new Date(b):null:a[s]=b,a),{});this.filterForm?.patchValue(i)}})}ngOnInit(){this.initForm()}initForm(){this.filterForm=this.fb.group({text:this.fb.control(""),listOutletID:this.fb.control([]),listCategoryID:this.fb.control([]),isInRoleEmptyOutlets:this.fb.control(!1),discontinued:this.fb.control("all"),discontinuedValue:this.fb.control(!1),from:this.fb.control(null),to:this.fb.control(null),pageNumber:this.fb.control(1),pageSize:this.fb.control(10),export:this.fb.control(!1),exportPageNumber:this.fb.control(1),exportPageSize:this.fb.control(10)})}onSearch(t){this.store.updateFilterQuery(c(m({},this.store.filter()),{text:t}))}onFilterOKEvent(){let t=this.filterForm.getRawValue();console.log("\u{1F680} ~ CashBankPageComponent ~ onFilterOKEvent ~ formValue:",t);let i=c(m({},t),{from:t.from?this.dayjsService.format(t.from):void 0,to:t.to?this.dayjsService.format(t.to):void 0});this.store.updateFilterQuery(i),this.isDialogFilterVisible.set(!1)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=R({type:e,selectors:[["app-cash-bank",8,"page"]],features:[H([A])],attrs:De,decls:5,vars:6,consts:[["content",""],["filters",""],["header",""],["body",""],["footer",""],["emptymessage",""],[3,"search","isDialogFilterVisibleChange","filterConfirmed","pageTitle","pageSubTitle","scrollable","isSearchableInput","isFilterable","isDialogFilterVisible"],[3,"value"],[1,"text-end"],["pTooltip","Total debit based on the selected date filter","tooltipPosition","top"],["pTooltip","Total credit based on the selected date filter","tooltipPosition","top"],["pTooltip","Current balance based on the selected date filter","tooltipPosition","top"],[1,"link","link-primary",3,"routerLink"],[1,"text-end","text-success"],[1,"text-end","text-danger"],[1,"link","link-primary",3,"routerLink","queryParams"],[1,"fw-bold"],[1,"fw-bold","text-end","text-success"],[1,"fw-bold","text-end","text-danger"],[1,"text-end","fw-bold"],["colspan","5"],[1,"d-flex","flex-column","row-gap-3",3,"formGroup"],[1,"d-flex","flex-column"],["for","outlet"],[1,"d-flex","flex-column","gap-2"],["formControlName","from","styleClass","w-100 mb-0","appendTo","body","dataType","string","inputId","icondisplay",3,"iconDisplay","showIcon"],["formControlName","to","styleClass","w-100","appendTo","body","inputId","icondisplay",3,"iconDisplay","showIcon"]],template:function(i,a){if(i&1){let s=L();o(0,"app-main-panel",6),w("search",function(_){return x(s),S(a.onSearch(_))}),K("isDialogFilterVisibleChange",function(_){return x(s),G(a.isDialogFilterVisible,_)||(a.isDialogFilterVisible=_),S(_)}),w("filterConfirmed",function(){return x(s),S(a.onFilterOKEvent())}),F(1,Me,10,1,"ng-template",null,0,g)(3,Ne,7,5,"ng-template",null,1,g),n()}i&2&&(f("pageTitle",a.store.data().pageTitle)("pageSubTitle",a.store.data().pageSubTitle)("scrollable",!0)("isSearchableInput",!0)("isFilterable",!0),j("isDialogFilterVisible",a.isDialogFilterVisible))},dependencies:[q,W,he,oe,$,Y,Z,xe,_e,ge,J,z,re,ae,pe,le,ne,ee,te,Ce,be],styles:[".card[_ngcontent-%COMP%]{height:calc(100vh - 120px)}.card[_ngcontent-%COMP%] .card-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:inherit;overflow-y:auto}"],changeDetection:0})}}return e})();var St=[{path:"",component:ye,children:[]}],Be={path:"cash-of-account",title:"COA",iconName:"fa fa-calculator",class:"",label:"",labelClass:"",extralink:!1,submenu:[]};export{St as CASH_BANK_ROUTES,Be as CASH_BANK_ROUTE_PAGE};
@@ -0,0 +1 @@
1
+ import{a as x,b as L}from"./chunk-LUNMW7NC.js";import"./chunk-AFKKNLDY.js";import{a as E,b as V}from"./chunk-DJXQKSLT.js";import"./chunk-WXIG4CXY.js";import{i as H}from"./chunk-LKOCOLCM.js";import"./chunk-S27Z7D3D.js";import{a as R,b as D}from"./chunk-AD247LWQ.js";import"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as j,x as O,y as N,z as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import"./chunk-GPXKVMG6.js";import"./chunk-5DRALZZF.js";import{a as I}from"./chunk-2BI7WNJP.js";import{n as $,s as F}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as w,Eb as A,Ec as _,Mb as p,Oc as c,Pb as h,Pc as s,Sc as C,W as v,Wb as n,Xb as o,Y as T,Yb as l,_ as M,ac as B,fc as y,gc as m,h as P,ia as f,ib as a,qa as g,ra as d,s as u,sa as S,ta as b,yb as k}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";var q=()=>({height:"calc(100vh - 100px)"});function J(i,z){if(i&1){let e=B();n(0,"div",3)(1,"p-button",4),y("onClick",function(){g(e);let r=m();return d(r.onFormat())}),o(),n(2,"p-button",5),c(3,"async"),c(4,"async"),y("onClick",function(){g(e);let r=m();return d(r.migratePaymentAccount())}),o()()}if(i&2){let e=m();a(2),p("disabled",s(3,2,e.countInBooks$)!==0)("pTooltip",s(4,4,e.countInBooks$)!==0?"Books already has entries. Please format before re-migrating.":null)}}function K(i,z){if(i&1&&(n(0,"p-scroll-panel")(1,"p-panel")(2,"div",6),l(3,"app-migration-cards",7),c(4,"async"),S(),n(5,"svg",8),l(6,"path",9),o(),b(),l(7,"app-migration-cards",10),c(8,"async"),o()()()),i&2){let e=m();h(_(12,q)),a(),h(_(13,q)),a(2),p("migrationCount",s(4,8,e.countInPOS$))("migrationTitle",e.pageTitle),a(4),p("migrationCount",s(8,10,e.countInBooks$))("migrationTitle",e.pageTitle)}}var ue=(()=>{class i{constructor(){this.migrateService=f(x),this.toastr=f(I),this.refresh$=new P(void 0),this.pageTitle="Payment Account"}ngOnInit(){let e=this.refresh$.pipe(T(()=>this.migrateService.getPaymentMethodAccountCount()),M(t=>console.log("API response:",t)),v(1));this.countInPOS$=e.pipe(u(t=>Number(t.pos))),this.countInBooks$=e.pipe(u(t=>Number(t.books)))}migratePaymentAccount(){this.migrateService.migratePaymentMethod().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Migration Successful")})}onFormat(){confirm("Are you sure you want to format?")&&this.migrateService.formatPaymentAccount().subscribe(e=>{this.refresh$.next(),this.toastr.success(e.message,"Format Successful")})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=k({type:i,selectors:[["app-payment-account"]],features:[w([x])],decls:5,vars:1,consts:[["actionButton",""],["content",""],[3,"pageTitle"],[1,"d-flex","gap-2"],["label","Format","severity","danger",3,"onClick"],["label","Migrate","tooltipPosition","left",3,"onClick","disabled","pTooltip"],[1,"flex","gap-30","flex-wrap",2,"display","flex","justify-content","center","align-items","center","gap","1rem","margin-top","40px"],["migrationPlace","Accounting",3,"migrationCount","migrationTitle"],["width","40","height","40","viewBox","0 0 24 24","fill","none"],["d","M8 5l8 7-8 7","stroke","#007bff","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],["migrationPlace","Books",3,"migrationCount","migrationTitle"]],template:function(t,r){t&1&&(n(0,"app-main-panel",2),A(1,J,5,6,"ng-template",null,0,C)(3,K,9,14,"ng-template",null,1,C),o()),t&2&&p("pageTitle",r.pageTitle)},dependencies:[H,F,$,V,E,D,R,G,N,L,O,j],encapsulation:2})}}return i})();export{ue as PaymentAccountComponent};
@@ -0,0 +1 @@
1
+ import{a as y}from"./chunk-PKO36DGM.js";import{a as D,b as H}from"./chunk-3VQUNDVT.js";import{d as Y,i as Z,j as ee,k as te}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as X}from"./chunk-LKOCOLCM.js";import"./chunk-S27Z7D3D.js";import{b as f,c as $,d as q,e as G,f as J,g as Q,h as W}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{w as K,x as O}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import"./chunk-VMI3QWC6.js";import{e as L}from"./chunk-F7PVAVLQ.js";import"./chunk-GPXKVMG6.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{k as j,p as F,s as A}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as B,Eb as E,Mb as h,Oc as v,Qc as M,Sc as _,Wb as r,Xb as l,Y as k,Yb as S,_ as N,ac as R,bd as b,c as P,fc as T,gc as g,ia as x,ib as d,qa as u,ra as C,s as V,sc as p,tc as w,wc as z,yb as U}from"./chunk-6QJHEOXN.js";import{a,b as c}from"./chunk-YQFG5XE2.js";var ne={data:[],count:0,filter:{PageSize:20,PageNumber:1}},I=$(Q(ne),W("Closing Entries Store"),q(t=>({first:b(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:b(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.count())),hasCheckedRows:b(()=>t.data().some(s=>s.checked)),selectedItems:b(()=>t.data().filter(s=>s.checked))})),J(t=>{let s=x(y),e={updateFilter:o=>{f(t,n=>c(a({},n),{filter:a(a({},n.filter),o)}))},onRowSelect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!0}):m);return c(a({},n),{data:i})})},onRowUnselect(o){f(t,n=>{let i=n.data.map(m=>m.id===o.id?c(a({},m),{checked:!1}):m);return c(a({},n),{data:i})})},onHeaderCheckboxToggle(o){f(t,n=>{let i=n.data.map(m=>c(a({},m),{checked:o}));return c(a({},n),{data:i})})},getClosingEntries:D(P(k(o=>s.getClosingEntries(o).pipe(V(n=>n.map(i=>c(a({},i),{checked:!1}))),H({next:n=>{f(t,i=>c(a({},i),{data:n})),e.getClosingEntryCount()},error:n=>{console.error("Error fetching closing entries:",n)}}))))),getClosingEntryCount:D(P(k(()=>s.getClosingEntryCount().pipe(H({next:({count:o})=>{f(t,n=>c(a({},n),{count:o}))},error:o=>{console.error("Error fetching closing entry count:",o)}})))))};return e}),G(t=>({onInit:()=>{t.getClosingEntries(t.filter)}})));function oe(t,s){if(t&1){let e=R();r(0,"p-button",11),T("onClick",function(){u(e);let n=g(2);return C(n.onDeleteClosingEntries())}),l()}}function ie(t,s){if(t&1&&(r(0,"div",7),E(1,oe,1,0,"p-button",8),r(2,"a",9),S(3,"i",10),p(4," Add"),l()()),t&2){let e=g();d(),h("ngIf",e.store.hasCheckedRows())}}function re(t,s){t&1&&(r(0,"tr")(1,"th",13),S(2,"p-tableHeaderCheckbox"),l(),r(3,"th"),p(4,"Period"),l(),r(5,"th"),p(6,"Note"),l(),r(7,"th"),p(8,"Created"),l(),r(9,"th"),p(10,"CreatedBy"),l()())}function ae(t,s){if(t&1&&(r(0,"tr")(1,"td"),S(2,"p-tableCheckbox",14),l(),r(3,"td"),p(4),v(5,"date"),l(),r(6,"td"),p(7),l(),r(8,"td"),p(9),v(10,"date"),l(),r(11,"td"),p(12),l()()),t&2){let e=s.$implicit;d(2),h("value",e),d(2),w(M(5,5,e.period,"d MMM y")),d(3),w(e.note),d(2),w(M(10,8,e.created,"d MMM y")),d(3),w(e.creatorName)}}function le(t,s){if(t&1&&p(0),t&2){let e=g(2);z(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.count()," entries ")}}function se(t,s){t&1&&(r(0,"tr")(1,"td",15)(2,"span"),p(3," No journal entries found. "),l()()())}function ce(t,s){if(t&1){let e=R();r(0,"p-table",12),T("onPage",function(n){u(e);let i=g();return C(i.onPageChange(n))})("onRowSelect",function(n){u(e);let i=g();return C(i.onRowSelect(n))})("onRowUnselect",function(n){u(e);let i=g();return C(i.onRowUnselect(n))})("onHeaderCheckboxToggle",function(n){u(e);let i=g();return C(i.onHeaderCheckboxToggle(n))}),E(1,re,11,0,"ng-template",null,2,_)(3,ae,13,11,"ng-template",null,3,_)(5,le,1,3,"ng-template",null,4,_)(7,se,4,0,"ng-template",null,5,_),l()}if(t&2){let e=g();h("value",e.store.data())("paginator",!0)("totalRecords",e.store.count())("lazy",!0)("rows",e.store.filter().PageSize)("scrollHeight","calc(100vh - 142px)")}}var Ve=(()=>{class t{constructor(){this.store=x(I),this.closingEntryService=x(y)}onPageChange(e){let o=e.first/e.rows+1;this.store.updateFilter(c(a({},this.store.filter()),{PageSize:o}))}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){if(Array.isArray(e.data)){e.data.forEach(o=>{this.store.onRowUnselect(o)});return}else this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}onDeleteClosingEntries(){let e=this.store.selectedItems().map(o=>o.id).join(",");console.log("Deleting closing entries with IDs:",e),this.closingEntryService.deleteClosingEntry(e).pipe(N(()=>{this.store.updateFilter(a({},this.store.filter()))})).subscribe()}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=U({type:t,selectors:[["app-closing-page"]],features:[B([I])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Closing Entries List",3,"scrollable"],[1,"d-flex","gap-2"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick",4,"ngIf"],["routerLink","create",1,"p-button"],[1,"fa-solid","fa-plus"],["label","Delete","severity","danger","icon","fa-solid fa-trash",3,"onClick"],["dataKey","id","styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","paginator","totalRecords","lazy","rows","scrollHeight"],[2,"width","1rem"],[3,"value"],["colspan","5"]],template:function(o,n){o&1&&(r(0,"app-main-panel",6),E(1,ie,5,1,"ng-template",null,0,_)(3,ce,9,6,"ng-template",null,1,_),l()),o&2&&h("scrollable",!0)},dependencies:[X,A,j,F,te,Y,Z,ee,L,O,K],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();export{Ve as ClosingPageComponent};
@@ -0,0 +1 @@
1
+ import{a as g}from"./chunk-2BI7WNJP.js";import{C as u,D as l,E as m}from"./chunk-ZK43JB4A.js";import{I as n,_ as d,ca as b,ia as c,n as f,s as h}from"./chunk-6QJHEOXN.js";import{a as o,b as p}from"./chunk-YQFG5XE2.js";var w=(()=>{class a{constructor(){this.httpClient=c(m),this.toastr=c(g)}get(t="",e,r={}){return this.httpClient.get(`${t}${e}`,r).pipe(n(this.handleError.bind(this)))}post(t="",e,r,i={observe:"response"}){return this.httpClient.post(`${t}${e}`,r,o({},i)).pipe(d(this.handleResponse.bind(this)),h(s=>s instanceof u&&Object.prototype.hasOwnProperty.call(i,"observe")&&i.observe==="response"?s.body instanceof Blob?s:s.body:s),n(this.handleError.bind(this)))}put(t="",e,r,i={}){return this.httpClient.put(`${t}${e}`,r,p(o({},i),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(s=>s.body),n(this.handleError.bind(this)))}delete(t="",e,r={}){return this.httpClient.delete(`${t}${e}`,p(o({},r),{observe:"response"})).pipe(d(this.handleResponse.bind(this)),h(i=>i.body),n(this.handleError.bind(this)))}handleResponse(t){if(t instanceof u&&t.status===200&&t.body){let e;typeof t.body=="object"&&t.body!==null&&(e=t.body.message||t.body.Message),typeof e=="string"&&e.length>0&&this.toastr.success(e,"Success")}}handleError(t){let e={header:"API Error",message:"An unknown error occurred"};if(t instanceof l)switch(t.status){case 0:e.message="CORS error: Request blocked or server not responding with proper CORS headers",e.header="CORS Error";break;case 504:e.message=t.statusText||"Gateway Timeout",e.header=`API Error: ${t.status}`;break;default:e.header=`API Error: ${t.status}`,e.message=t.error&&(t.error.Message||t.error.message||t.error.error)||t.message}return t instanceof l&&(t.status>=200&&t.status<300?this.toastr.success(e.message,e.header):t.status>=400&&t.status<500?this.toastr.warning(e.message,e.header):t.status>=500&&t.status<600&&this.toastr.error(e.message,e.header)),f(()=>e)}static{this.\u0275fac=function(e){return new(e||a)}}static{this.\u0275prov=b({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();export{w as a};