File "interface.LOAN.gpl.js"

Full Path: /home/adniftyx/public_html/wp-content/plugins/fc-loan-calculator/dist/js/interface.LOAN.gpl.js
File size: 114.04 KB
MIME-type: text/plain
Charset: utf-8

/**
 * @preserve Copyright 2016-2025 Pine Grove Software, LLC
 * AccurateCalculators.com
 * License: GPL2
 * strs.LOAN.gpl.js
 */
class LoanCalculatorStrings{static get strs(){return{s000:wp.i18n.__("en","fc-loan-calculator"),s001:wp.i18n.__("Please use the backspace key to delete.","fc-loan-calculator"),s002:wp.i18n.__("Left, up & down arrow keys are disabled. So are the home, end, pgup and pgdn keys.","fc-loan-calculator"),s003:wp.i18n.__("Use backspace to delete.","fc-loan-calculator"),s004:wp.i18n.__("If value is selected, just start typing new value to clear prior value.","fc-loan-calculator"),s005:wp.i18n.__("When a number is selected (value shown in inverse), use right arrow key to clear selection without clearing value. Then backspace to edit.","fc-loan-calculator"),s006:wp.i18n.__("TIP: Generally it is best to use the TAB or SHIFT-TAB keys to move from one input to the next or previous input.","fc-loan-calculator"),s007:wp.i18n.__("TIP 2: Generally, editing a value is inefficient. Since values are auto selected, just type the number you want.","fc-loan-calculator"),s008:wp.i18n.__("Do not type the thousand separator character.","fc-loan-calculator"),s009:wp.i18n.__("(If using U.S. convention, that would be the comma.)","fc-loan-calculator"),s010:wp.i18n.__("I'm smart enough to enter them for you!","fc-loan-calculator"),s011:wp.i18n.__("An unknown date calculation error occurred.","fc-loan-calculator"),s012:wp.i18n.__("Please provide us with your inputs and settings so that we can fix this. Thank you.","fc-loan-calculator"),s013:wp.i18n.__("Date is not valid - bad year.","fc-loan-calculator"),s014:wp.i18n.__("Jan","fc-loan-calculator"),s015:wp.i18n.__("Feb","fc-loan-calculator"),s016:wp.i18n.__("Mar","fc-loan-calculator"),s017:wp.i18n.__("Apr","fc-loan-calculator"),s018:wp.i18n.__("May","fc-loan-calculator"),s019:wp.i18n.__("Jun","fc-loan-calculator"),s020:wp.i18n.__("Jul","fc-loan-calculator"),s021:wp.i18n.__("Aug","fc-loan-calculator"),s022:wp.i18n.__("Sept","fc-loan-calculator"),s023:wp.i18n.__("Oct","fc-loan-calculator"),s024:wp.i18n.__("Nov","fc-loan-calculator"),s025:wp.i18n.__("Dec","fc-loan-calculator"),s026:wp.i18n.__("Error: dates out of sequence.","fc-loan-calculator"),s027:wp.i18n.__("Exception","fc-loan-calculator"),s028:wp.i18n.__("occurred when accessing","fc-loan-calculator"),s029:wp.i18n.__("Invalid index","fc-loan-calculator"),s030:wp.i18n.__("Unknown","fc-loan-calculator"),s031:wp.i18n.__("u","fc-loan-calculator"),s032:wp.i18n.__("U","fc-loan-calculator"),s100:wp.i18n.__("Internal limit reached. Balance exceeds +/- 99 trillion.","fc-loan-calculator"),s101:wp.i18n.__("YTD","fc-loan-calculator"),s102:wp.i18n.__("Running Totals","fc-loan-calculator"),s103:wp.i18n.__("Normal","fc-loan-calculator"),s2012:wp.i18n.__("Your Personalized Loan Schedule","fc-loan-calculator"),s202:wp.i18n.__("Last payment amount decreased by","fc-loan-calculator"),s203:wp.i18n.__("due to rounding","fc-loan-calculator"),s204:wp.i18n.__("Last payment amount increased by","fc-loan-calculator"),s2052:wp.i18n.__("Loan Summary","fc-loan-calculator"),s208:wp.i18n.__("Loan Amount","fc-loan-calculator"),s209:wp.i18n.__("Number of Payments","fc-loan-calculator"),s210:wp.i18n.__("Annual Interest Rate","fc-loan-calculator"),s211:wp.i18n.__("Periodic Payment","fc-loan-calculator"),s212:wp.i18n.__("Loan Date","fc-loan-calculator"),s213:wp.i18n.__("1st Payment Due","fc-loan-calculator"),s214:wp.i18n.__("Payment Frequency","fc-loan-calculator"),s215:wp.i18n.__("Last Payment Due","fc-loan-calculator"),s216:wp.i18n.__("Total Interest Due","fc-loan-calculator"),s217:wp.i18n.__("Total All Payments","fc-loan-calculator"),s218:wp.i18n.__("Payment Schedule","fc-loan-calculator"),s219:wp.i18n.__("Year","fc-loan-calculator"),s220:wp.i18n.__("Date","fc-loan-calculator"),s221:wp.i18n.__("Payment","fc-loan-calculator"),s222:wp.i18n.__("Interest","fc-loan-calculator"),s223:wp.i18n.__("Principal","fc-loan-calculator"),s224:wp.i18n.__("Balance","fc-loan-calculator"),s225:wp.i18n.__("Calculation method: Normal","fc-loan-calculator"),s226:wp.i18n.__("Total Principal","fc-loan-calculator"),s227:wp.i18n.__("Total Interest","fc-loan-calculator"),s228:wp.i18n.__("Pct. of Total Payments","fc-loan-calculator"),s229:wp.i18n.__("Annual Principal and Interest Totals","fc-loan-calculator"),s230:wp.i18n.__("Accumulated Principal and Interest with Remaining Balance","fc-loan-calculator"),s231:wp.i18n.__("Total Principal and Interest","fc-loan-calculator"),s232:wp.i18n.__("Loan","fc-loan-calculator"),s4052:wp.i18n.__("There are too many unknown values.","fc-loan-calculator"),s4072:wp.i18n.__('Enter "Loan Amount", "Number of Payments" and "Annual Interest Rate".',"fc-loan-calculator"),s4082:wp.i18n.__("<strong>Loan Calculator Help...</strong>","fc-loan-calculator"),s4092:wp.i18n.__("<p>Using the calculator is straightforward. User enters a &quot;loan amount&quot;, &quot;number of months&quot;, &quot;annual interest rate&quot;. The calculator calculates the monthly payment amount.</p>","fc-loan-calculator"),s410b:wp.i18n.__("<p>The &quot;Payment Method&quot; determines when the first payment is due. With the default selection, &quot;End-of-Period&quot;, the first payment will be due one month after the loan is made. If &quot;Start-of-Period&quot; is selected, then the first payment will be due on the loan date.</p>","fc-loan-calculator"),s411b:wp.i18n.__('<p class="tail">The term (duration) of the loan is expressed as a number of months.</p>',"fc-loan-calculator"),s412b:wp.i18n.__('<ul class="mono tail"><li>&nbsp;60 months = &nbsp;5 years</li><li>120 months = 10 years</li><li>180 months = 15 years</li><li>240 months = 20 years</li><li class="tail">360 months = 30 years</li></ul>',"fc-loan-calculator"),s413b:wp.i18n.__('<p class="small" style="font-size: 85%; line-height: 1.5; color:red; user-select: text">Need more options including the ability to solve for other unknowns? Set the dates? Set or change the payment and compounding frequencies? Print the schedule? Export to MS Word&trade; (.docx) or MS Excel&trade; (.xlsx) files? Please visit, <b>https://accuratecalculators.com/loan-calculator</b></p>',"fc-loan-calculator"),s0414:wp.i18n.__("Dates must be the first of the month.","fc-loan-calculator"),s0415:wp.i18n.__("An invalid JavaScript date object.","fc-loan-calculator"),s416b:wp.i18n.__("Monthly","fc-loan-calculator"),s417b:wp.i18n.__('<p class="small" style="font-size: 85%; line-height: 1.5; color:red; user-select: text">Need more options including the ability to solve for other unknowns? Set the dates? Set or change the payment and compounding frequencies? Print the charts? Export to MS Word&trade; (.docx) or MS Excel&trade; (.xlsx) files? Please visit, <b>https://accuratecalculators.com/loan-calculator</b></p>',"fc-loan-calculator"),s601b:wp.i18n.__("Your Personalized Loan Schedule","fc-loan-calculator"),s603:wp.i18n.__("Prepared for","fc-loan-calculator")+":",s604:wp.i18n.__("Address","fc-loan-calculator")+":",s605:wp.i18n.__("City, State  ZIP","fc-loan-calculator")+":",s606:wp.i18n.__("Prepared On","fc-loan-calculator")+":",s607:wp.i18n.__("Prepared by","fc-loan-calculator")+":",s608:wp.i18n.__("Address","fc-loan-calculator")+":",s609:wp.i18n.__("Phone","fc-loan-calculator")+":",s610:wp.i18n.__("Email","fc-loan-calculator")+":",s611:wp.i18n.__("Website","fc-loan-calculator")+":"}}}
/**
 * @preserve Copyright 2016-2025 Pine Grove Software, LLC
 * AccurateCalculators.com
 * License: GPL2
 * locales.gpl.js
 */const e="ccy_format",s="date_format";class Locales{static moneyConventions=null;static rateConventions=null;static numConventions=null;static dateConventions=null;static sortConventions=null;static CCY_FORMATS={USD1:0,USD2:1,GBH:2,NON:3,EUR1:4,EUR2:5,EUR3:6,EUR4:7,RND:8,NOK:9,NGN:10,THB:11,DEFAULT:12,AFZA:62,ENZA:62,AZAZ:84,ENAZ:84,BEBY:54,ENBY:54,BGBG:27,ENBG:27,CSCZ:15,ENCZ:15,DADK:30,DA:30,ENDK:30,DEAT:43,ENAT:43,DECH:103,ENCH:103,DEDE:34,DE:34,ENDE:34,DELI:103,ENLI:103,DELU:34,ENLU:34,DVMV:99,ELGR:33,EL:33,ENGR:33,ENAE:87,ARAE:87,ENAU:49,ENBH:89,ARBH:89,ENBZ:53,ENCA:50,ENDZ:90,ARDZ:90,ENEG:70,AREG:70,ENGB:71,ENIE:80,ENIQ:92,ARIQ:92,ENJM:57,ENJO:93,ARJO:93,ENKW:95,ARKW:95,ENLB:70,ARLB:70,ENLY:96,ARLY:96,ENMA:97,ARMA:97,ENNZ:49,ENOM:86,AROM:86,ENPH:82,ENQA:85,ARQA:85,ENSA:85,AR:85,ARSA:85,ENSY:69,ARSY:69,ENTN:100,ARTN:100,ENTT:66,ENUS:48,EN:48,ENYE:85,ARYE:85,ENZW:101,ESAR:36,ENAR:36,ESBO:38,ENBO:38,ESCL:35,ENCL:35,ESCO:36,ENCO:36,ESCR:26,ENCR:26,ESDO:63,ENDO:63,ESEC:36,ENEC:36,ESES:33,ES:33,ENES:33,ESGT:61,ENGT:61,ESHN:58,ENHN:58,ESMX:49,ENMX:49,ESNI:55,ENNI:55,ESPA:52,ENPA:52,ESPE:65,ENPE:65,ESPR:48,ENPR:48,ESPY:39,ENPY:39,ESSV:49,ENSV:49,ESUY:37,ENUY:37,ESVE:46,ENVE:46,ETEE:20,ENEE:20,FAIR:85,FA:85,ENIR:85,FIFI:20,FI:20,ENFI:20,FOFO:68,FO:68,ENFO:68,FRBE:18,ENBE:18,FRCA:13,FRCH:47,FRFR:18,FR:18,ENFR:18,FRLU:33,FRMC:18,ENMC:18,HEIL:78,ENIL:78,HIIN:83,HI:83,ENIN:83,HRHR:29,ENHR:29,HUHU:14,HU:14,ENHU:14,HYAM:88,IDID:41,ENID:41,ISIS:67,IS:67,ENIS:67,ITCH:102,ITIT:33,IT:33,ENIT:33,JAJP:72,JA:72,ENJP:72,KAGE:91,ENGE:91,KKKZ:74,ENKZ:74,KOKR:77,KO:77,ENKR:77,KYKG:74,KY:74,ENKG:74,LTLT:19,ENLT:19,LVLV:21,ENLV:21,MNMN:81,ENMN:81,MSBN:49,ENBN:49,MSMY:64,ENMY:64,MTMT:79,NBNO:25,NB:25,ENNO:25,NLBE:42,NLNL:44,ENNL:44,NNNO:68,NN:68,PLPL:17,PL:17,ENPL:17,PTBR:40,ENBR:40,PTPT:18,PT:18,ENPT:18,RORO:31,RO:31,ENRO:31,RURU:23,RU:23,ENRU:23,SKSK:20,ENSK:20,SLSI:34,ENSI:34,SQAL:59,SRBA:28,SR:28,ENBA:28,SVSE:16,SV:16,ENSE:16,SWKE:94,SW:94,ENKE:94,THTH:75,TH:75,ENTH:75,TRTR:45,TR:45,ENTR:45,UKUA:22,UK:22,ENUA:22,URPK:76,UR:76,ENPK:76,UZUZ:74,ENUZ:74,VIVN:32,ENVN:32,ZHCN:73,ZH:73,ENCN:73,ZHHK:56,ENHK:56,ZHMO:98,ENMO:98,ZHSG:51,ENSG:51,ZHTW:60,ENTW:60,ENNG:104};static DEFAULT={sep:",",dPnt:".",ccy:"$",ccy_r:""};static CCY_CONVENTIONS=[{ccy_format:0,sep:",",dPnt:".",ccy:"$",ccy_r:"",precision:2,enum_date:0},{ccy_format:1,sep:".",dPnt:",",ccy:"$",ccy_r:"",precision:2,enum_date:0},{ccy_format:2,sep:",",dPnt:".",ccy:"£",ccy_r:"",precision:2,enum_date:1},{ccy_format:3,sep:",",dPnt:".",ccy:"",ccy_r:"",precision:2,enum_date:2},{ccy_format:4,sep:",",dPnt:".",ccy:"€",ccy_r:"",precision:2,enum_date:2},{ccy_format:5,sep:".",dPnt:",",ccy:"€",ccy_r:"",precision:2,enum_date:2},{ccy_format:6,sep:" ",dPnt:",",ccy:"",ccy_r:"€",precision:2,enum_date:2},{ccy_format:7,sep:".",dPnt:",",ccy:"",ccy_r:"€",precision:2,enum_date:2},{ccy_format:8,sep:" ",dPnt:".",ccy:"R",ccy_r:"",precision:2,enum_date:2},{ccy_format:9,sep:" ",dPnt:",",ccy:"kr",ccy_r:"",precision:2,enum_date:2},{ccy_format:10,sep:",",dPnt:".",ccy:"₦",ccy_r:"",precision:2,enum_date:2},{ccy_format:11,sep:",",dPnt:".",ccy:"฿",ccy_r:"",precision:2,enum_date:2},{ccy_format:12,dPnt:".",sep:",",ccy:"$",ccy_r:"",precision:2,enum_date:0},{ccy_format:13,dPnt:",",sep:" ",ccy:"",ccy_r:"$",precision:2,enum_date:2},{ccy_format:14,dPnt:",",sep:" ",ccy:"",ccy_r:"Ft",precision:2,enum_date:5},{ccy_format:15,dPnt:",",sep:" ",ccy:"",ccy_r:"Kč",precision:2,enum_date:3},{ccy_format:16,dPnt:",",sep:" ",ccy:"",ccy_r:"kr",precision:2,enum_date:2},{ccy_format:17,dPnt:",",sep:" ",ccy:"",ccy_r:"zł",precision:2,enum_date:3},{ccy_format:18,dPnt:",",sep:" ",ccy:"",ccy_r:"€",precision:2,enum_date:1},{ccy_format:19,dPnt:",",sep:" ",ccy:"",ccy_r:"€",precision:2,enum_date:2},{ccy_format:20,dPnt:",",sep:" ",ccy:"",ccy_r:"€",precision:2,enum_date:3},{ccy_format:21,dPnt:",",sep:" ",ccy:"",ccy_r:"€",precision:2,enum_date:5},{ccy_format:22,dPnt:",",sep:" ",ccy:"",ccy_r:"₴",precision:2,enum_date:3},{ccy_format:23,dPnt:",",sep:" ",ccy:"",ccy_r:"₽",precision:2,enum_date:3},{ccy_format:24,dPnt:",",sep:" ",ccy:"R",ccy_r:"",precision:2,enum_date:6},{ccy_format:25,dPnt:",",sep:" ",ccy:"kr",ccy_r:"",precision:2,enum_date:3},{ccy_format:26,dPnt:",",sep:" ",ccy:"₡",ccy_r:"",precision:2,enum_date:1},{ccy_format:27,dPnt:",",sep:"",ccy:"",ccy_r:"лв",precision:2,enum_date:3},{ccy_format:28,dPnt:",",sep:".",ccy:"",ccy_r:"KM",precision:2,enum_date:3},{ccy_format:29,dPnt:",",sep:".",ccy:"",ccy_r:"kn",precision:2,enum_date:3},{ccy_format:30,dPnt:",",sep:".",ccy:"",ccy_r:"kr",precision:2,enum_date:3},{ccy_format:31,dPnt:",",sep:".",ccy:"",ccy_r:"lei",precision:2,enum_date:3},{ccy_format:32,dPnt:",",sep:".",ccy:"",ccy_r:"₫",precision:0,enum_date:1},{ccy_format:33,dPnt:",",sep:".",ccy:"",ccy_r:"€",precision:2,enum_date:1},{ccy_format:34,dPnt:",",sep:".",ccy:"",ccy_r:"€",precision:2,enum_date:3},{ccy_format:35,dPnt:",",sep:".",ccy:"$",ccy_r:"",precision:0,enum_date:4},{ccy_format:36,dPnt:",",sep:".",ccy:"$",ccy_r:"",precision:2,enum_date:1},{ccy_format:37,dPnt:",",sep:".",ccy:"$U",ccy_r:"",precision:2,enum_date:1},{ccy_format:38,dPnt:",",sep:".",ccy:"$b",ccy_r:"",precision:2,enum_date:1},{ccy_format:39,dPnt:",",sep:".",ccy:"Gs",ccy_r:"",precision:0,enum_date:1},{ccy_format:40,dPnt:",",sep:".",ccy:"R$",ccy_r:"",precision:2,enum_date:1},{ccy_format:41,dPnt:",",sep:".",ccy:"Rp",ccy_r:"",precision:2,enum_date:1},{ccy_format:42,dPnt:",",sep:".",ccy:"€",ccy_r:"",precision:2,enum_date:1},{ccy_format:43,dPnt:",",sep:".",ccy:"€",ccy_r:"",precision:2,enum_date:3},{ccy_format:44,dPnt:",",sep:".",ccy:"€",ccy_r:"",precision:2,enum_date:4},{ccy_format:45,dPnt:",",sep:".",ccy:"₺",ccy_r:"",precision:2,enum_date:3},{ccy_format:46,dPnt:",",sep:".",ccy:"VES",ccy_r:"",precision:2,enum_date:1},{ccy_format:47,dPnt:".",sep:" ",ccy:"",ccy_r:"CHF",precision:2,enum_date:3},{ccy_format:48,dPnt:".",sep:",",ccy:"$",ccy_r:"",precision:2,enum_date:0},{ccy_format:49,dPnt:".",sep:",",ccy:"$",ccy_r:"",precision:2,enum_date:1},{ccy_format:50,dPnt:".",sep:",",ccy:"$",ccy_r:"",precision:2,enum_date:2},{ccy_format:51,dPnt:".",sep:",",ccy:"$",ccy_r:"",precision:2,enum_date:6},{ccy_format:52,dPnt:".",sep:",",ccy:"B/.",ccy_r:"",precision:2,enum_date:0},{ccy_format:53,dPnt:".",sep:",",ccy:"BZ$",ccy_r:"",precision:2,enum_date:1},{ccy_format:54,dPnt:".",sep:",",ccy:"Br",ccy_r:"",precision:2,enum_date:0},{ccy_format:55,dPnt:".",sep:",",ccy:"C$",ccy_r:"",precision:2,enum_date:1},{ccy_format:56,dPnt:".",sep:",",ccy:"HK$",ccy_r:"",precision:2,enum_date:1},{ccy_format:57,dPnt:".",sep:",",ccy:"J$",ccy_r:"",precision:2,enum_date:1},{ccy_format:58,dPnt:".",sep:",",ccy:"L",ccy_r:"",precision:2,enum_date:1},{ccy_format:59,dPnt:".",sep:",",ccy:"Lek",ccy_r:"",precision:2,enum_date:0},{ccy_format:60,dPnt:".",sep:",",ccy:"NT$",ccy_r:"",precision:2,enum_date:6},{ccy_format:61,dPnt:".",sep:",",ccy:"Q",ccy_r:"",precision:2,enum_date:1},{ccy_format:62,dPnt:".",sep:",",ccy:"R",ccy_r:"",precision:2,enum_date:0},{ccy_format:63,dPnt:".",sep:",",ccy:"RD$",ccy_r:"",precision:2,enum_date:1},{ccy_format:64,dPnt:".",sep:",",ccy:"RM",ccy_r:"",precision:2,enum_date:1},{ccy_format:65,dPnt:".",sep:",",ccy:"S/.",ccy_r:"",precision:2,enum_date:1},{ccy_format:66,dPnt:".",sep:",",ccy:"TT$",ccy_r:"",precision:2,enum_date:1},{ccy_format:67,dPnt:".",sep:",",ccy:"kr",ccy_r:"",precision:0,enum_date:0},{ccy_format:68,dPnt:".",sep:",",ccy:"kr",ccy_r:"",precision:2,enum_date:0},{ccy_format:69,dPnt:".",sep:",",ccy:"£",ccy_r:"",precision:0,enum_date:0},{ccy_format:70,dPnt:".",sep:",",ccy:"£",ccy_r:"",precision:2,enum_date:0},{ccy_format:71,dPnt:".",sep:",",ccy:"£",ccy_r:"",precision:2,enum_date:1},{ccy_format:72,dPnt:".",sep:",",ccy:"¥",ccy_r:"",precision:0,enum_date:6},{ccy_format:73,dPnt:".",sep:",",ccy:"¥",ccy_r:"",precision:2,enum_date:6},{ccy_format:74,dPnt:".",sep:",",ccy:"лв",ccy_r:"",precision:2,enum_date:0},{ccy_format:75,dPnt:".",sep:",",ccy:"฿",ccy_r:"",precision:2,enum_date:1},{ccy_format:76,dPnt:".",sep:",",ccy:"₨",ccy_r:"",precision:2,enum_date:0},{ccy_format:77,dPnt:".",sep:",",ccy:"₩",ccy_r:"",precision:0,enum_date:5},{ccy_format:78,dPnt:".",sep:",",ccy:"₪",ccy_r:"",precision:2,enum_date:3},{ccy_format:79,dPnt:".",sep:",",ccy:"€",ccy_r:"",precision:2,enum_date:0},{ccy_format:80,dPnt:".",sep:",",ccy:"€",ccy_r:"",precision:2,enum_date:1},{ccy_format:81,dPnt:".",sep:",",ccy:"₮",ccy_r:"",precision:2,enum_date:0},{ccy_format:82,dPnt:".",sep:",",ccy:"₱",ccy_r:"",precision:2,enum_date:1},{ccy_format:83,dPnt:".",sep:",",ccy:"₹",ccy_r:"",precision:2,enum_date:1},{ccy_format:84,dPnt:".",sep:",",ccy:"₼",ccy_r:"",precision:2,enum_date:0},{ccy_format:85,dPnt:".",sep:",",ccy:"﷼",ccy_r:"",precision:2,enum_date:0},{ccy_format:86,dPnt:".",sep:",",ccy:"﷼",ccy_r:"",precision:3,enum_date:0},{ccy_format:87,dPnt:".",sep:",",ccy:"AED",ccy_r:"",precision:2,enum_date:0},{ccy_format:88,dPnt:".",sep:",",ccy:"AMD",ccy_r:"",precision:2,enum_date:0},{ccy_format:89,dPnt:".",sep:",",ccy:"BHD",ccy_r:"",precision:3,enum_date:0},{ccy_format:90,dPnt:".",sep:",",ccy:"DZD",ccy_r:"",precision:2,enum_date:0},{ccy_format:91,dPnt:".",sep:",",ccy:"GEL",ccy_r:"",precision:2,enum_date:0},{ccy_format:92,dPnt:".",sep:",",ccy:"IQD",ccy_r:"",precision:3,enum_date:0},{ccy_format:93,dPnt:".",sep:",",ccy:"JOD",ccy_r:"",precision:3,enum_date:0},{ccy_format:94,dPnt:".",sep:",",ccy:"KES",ccy_r:"",precision:2,enum_date:1},{ccy_format:95,dPnt:".",sep:",",ccy:"KWD",ccy_r:"",precision:3,enum_date:0},{ccy_format:96,dPnt:".",sep:",",ccy:"LYD",ccy_r:"",precision:3,enum_date:0},{ccy_format:97,dPnt:".",sep:",",ccy:"MAD",ccy_r:"",precision:2,enum_date:0},{ccy_format:98,dPnt:".",sep:",",ccy:"MOP",ccy_r:"",precision:2,enum_date:6},{ccy_format:99,dPnt:".",sep:",",ccy:"MVR",ccy_r:"",precision:2,enum_date:0},{ccy_format:100,dPnt:".",sep:",",ccy:"TND",ccy_r:"",precision:3,enum_date:0},{ccy_format:101,dPnt:".",sep:",",ccy:"ZWL",ccy_r:"",precision:2,enum_date:1},{ccy_format:102,dPnt:".",sep:"’",ccy:"CHF",ccy_r:"",precision:2,enum_date:1},{ccy_format:103,dPnt:".",sep:"’",ccy:"CHF",ccy_r:"",precision:2,enum_date:3},{ccy_format:104,dPnt:".",sep:",",ccy:"₦",ccy_r:"",precision:2,enum_date:3}];static DATE_FORMATS={MDY:0,DMY:1,YMD:2,DMY2:3,DMY3:4,YMD2:5,YMD3:6};static DATE_FORMAT_STRS=["MM/DD/YYYY","DD/MM/YYYY","YYYY-MM-DD","DD.MM.YYYY","DD-MM-YYYY","YYYY.MM.DD","YYYY/MM/DD"];static DATE_CONVENTIONS=[{date_format:0,date_mask:"MM/DD/YYYY",date_sep:"/",sep_pos1:2,sep_pos2:5},{date_format:1,date_mask:"DD/MM/YYYY",date_sep:"/",sep_pos1:2,sep_pos2:5},{date_format:2,date_mask:"YYYY-MM-DD",date_sep:"-",sep_pos1:4,sep_pos2:7},{date_format:3,date_mask:"DD.MM.YYYY",date_sep:".",sep_pos1:2,sep_pos2:5},{date_format:4,date_mask:"DD-MM-YYYY",date_sep:"-",sep_pos1:2,sep_pos2:5},{date_format:5,date_mask:"YYYY.MM.DD",date_sep:".",sep_pos1:4,sep_pos2:7},{date_format:6,date_mask:"YYYY/MM/DD",date_sep:"/",sep_pos1:4,sep_pos2:7}];static getCcyConventions(){let e,s,a=(new Intl.NumberFormat).resolvedOptions();return a.locale&&(e=a.locale.replace("-",""),e=e.toUpperCase(),s=this.CCY_FORMATS[e],void 0!==s&&void 0!==this.CCY_CONVENTIONS[s]||(s=null)),s}static getDateConventions(){let e,s;return e=this.getCcyConventions(),s=null!==e?this.CCY_CONVENTIONS[e].enum_date:null,s}static setRateConventions(e){this.rateConventions={...this.CCY_CONVENTIONS[e]},this.rateConventions.ccy="",this.rateConventions.ccy_r="%",this.rateConventions.precision=4}static setNumConventions(e){this.numConventions={...this.CCY_CONVENTIONS[e]},this.numConventions.ccy="",this.numConventions.ccy_r="",this.numConventions.precision=this.moneyConventions.precision}static resetCcyConventions(s){s!==this.moneyConventions.ccy_format&&void 0!==this.CCY_CONVENTIONS[s]&&(this.moneyConventions=this.CCY_CONVENTIONS[s],this.setRateConventions(s),this.setNumConventions(s),localStorage.setItem(e,parseInt(s,10)))}static resetDateConventions(e){e!==this.dateConventions.date_format&&void 0!==this.DATE_CONVENTIONS[e]&&(this.dateConventions=this.DATE_CONVENTIONS[e],localStorage.setItem(s,parseInt(e,10)))}static initLocale(){let a,c,l=localStorage.getItem(e);l||(l=document.getElementById("ac-currency").value),a=l&&"999"!==l?parseInt(l,10):this.getCcyConventions(),isNaN(a)||void 0===this.CCY_CONVENTIONS[a]?this.moneyConventions=this.CCY_CONVENTIONS[this.CCY_FORMATS.ENUA]:this.moneyConventions=this.CCY_CONVENTIONS[a],this.setRateConventions(this.moneyConventions.ccy_format),this.setNumConventions(this.moneyConventions.ccy_format);let d=localStorage.getItem(s);d||(d=document.getElementById("ac-date_mask").value),c=d&&"999"!==d?parseInt(d,10):this.getDateConventions(),isNaN(c)||void 0===this.DATE_CONVENTIONS[c]?this.dateConventions=this.DATE_CONVENTIONS[this.DATE_FORMATS.MDY]:this.dateConventions=this.DATE_CONVENTIONS[c],this.sortConventions=this.DATE_CONVENTIONS[this.DATE_FORMATS.YMD]}}Locales.initLocale();
/**
 * @preserve Copyright 2016-2025 Pine Grove Software, LLC
 * AccurateCalculators.com
 * License: GPL2
 * strs.GLOBAL.gpl.js
 */
class GlobalStrings{static get strs(){return{s000:wp.i18n.__("en","fc-loan-calculator"),s001:wp.i18n.__("Please use the backspace key to delete.","fc-loan-calculator"),s002:wp.i18n.__("Left, up & down arrow keys are disabled. So are the home, end, pgup and pgdn keys.","fc-loan-calculator"),s003:wp.i18n.__("Use backspace to delete.","fc-loan-calculator"),s004:wp.i18n.__("If value is selected, just start typing new value to clear prior value.","fc-loan-calculator"),s005:wp.i18n.__("When a number is selected (value shown in inverse), use right arrow key to clear selection without clearing value. Then backspace to edit.","fc-loan-calculator"),s006:wp.i18n.__("TIP: Generally it is best to use the TAB or SHIFT-TAB keys to move from one input to the next or previous input.","fc-loan-calculator"),s007:wp.i18n.__("TIP 2: Generally, editing a value is inefficient. Since values are auto selected, just type the number you want.","fc-loan-calculator"),s008:wp.i18n.__("Do not type the thousand separator character.","fc-loan-calculator"),s009:wp.i18n.__("(If using U.S. convention, that would be the comma.)","fc-loan-calculator"),s010:wp.i18n.__("I'm smart enough to enter them for you!","fc-loan-calculator"),s011:wp.i18n.__("An unknown date calculation error occurred.","fc-loan-calculator"),s012:wp.i18n.__("Please provide us with your inputs and settings so that we can fix this. Thank you.","fc-loan-calculator"),s013:wp.i18n.__("Date is not valid - bad year.","fc-loan-calculator"),s014:wp.i18n.__("Jan","fc-loan-calculator"),s015:wp.i18n.__("Feb","fc-loan-calculator"),s016:wp.i18n.__("Mar","fc-loan-calculator"),s017:wp.i18n.__("Apr","fc-loan-calculator"),s018:wp.i18n.__("May","fc-loan-calculator"),s019:wp.i18n.__("Jun","fc-loan-calculator"),s020:wp.i18n.__("Jul","fc-loan-calculator"),s021:wp.i18n.__("Aug","fc-loan-calculator"),s022:wp.i18n.__("Sept","fc-loan-calculator"),s023:wp.i18n.__("Oct","fc-loan-calculator"),s024:wp.i18n.__("Nov","fc-loan-calculator"),s025:wp.i18n.__("Dec","fc-loan-calculator"),s030:wp.i18n.__("Unknown","fc-loan-calculator"),s031:wp.i18n.__("u","fc-loan-calculator"),s032:wp.i18n.__("U","fc-loan-calculator"),s0414:wp.i18n.__("Dates must be the first of the month.","fc-loan-calculator"),s0415:wp.i18n.__("An invalid JavaScript date object.","fc-loan-calculator"),s0416:wp.i18n.__("Monthly","fc-loan-calculator")}}}const a=GlobalStrings.strs.s013+"\n"+GlobalStrings.strs.s014,c=GlobalStrings.strs.s013,l=GlobalStrings.strs.s0414,d=GlobalStrings.strs.s0415;class Globals{static COPYRIGHT_HOLDER_DOMAIN="AccurateCalculators.com";static PCT="%";static US_DECIMAL=".";static MONTHS=[GlobalStrings.strs.s014,GlobalStrings.strs.s015,GlobalStrings.strs.s016,GlobalStrings.strs.s017,GlobalStrings.strs.s018,GlobalStrings.strs.s019,GlobalStrings.strs.s020,GlobalStrings.strs.s021,GlobalStrings.strs.s022,GlobalStrings.strs.s023,GlobalStrings.strs.s024,GlobalStrings.strs.s025];static MIN_YEAR=1970;static MIN_DATE=new Date(this.MIN_YEAR,0,1,0,0,0,0);static MAX_YEAR=(new Date).getFullYear()+Math.ceil(83.25);static MAX_DATE=new Date(this.MAX_YEAR,11,31,0,0,0,0);static INITIAL_CASH_FLOWS=500;static DIY=0;static PPY=[void 0,void 0,void 0,void 0,void 0,void 0,12];static CPY=[void 0,void 0,void 0,void 0,void 0,void 0,12];static STR_FREQUENCIES=[void 0,void 0,void 0,void 0,void 0,void 0,GlobalStrings.strs.s0416];static INDIAN_RUPEE="₹";static get ERR_MSGS(){return{noDelKey:"<p>"+GlobalStrings.strs.s001+"</p>",noCurKeys:"<p>"+GlobalStrings.strs.s002+"</p><p>"+GlobalStrings.strs.s003+"</p><p><b>"+GlobalStrings.strs.s004+"</b></p><p>"+GlobalStrings.strs.s005+"</p><p><b>"+GlobalStrings.strs.s006+"</b>&nbsp;"+GlobalStrings.strs.s007+"</p><p><b>"+GlobalStrings.strs.s008+"</b>&nbsp;"+GlobalStrings.strs.s009+"</p>",noSeparators:"<p>"+GlobalStrings.strs.s008+"</p><p>"+GlobalStrings.strs.s009+"</p><p>"+GlobalStrings.strs.s010+"</p>"}}static erInvalidDateMath=new Error(a);static erInvalidYear=new Error(c);static erInvalidDate=new Error(l);static erInvalidDateObj=new Error(d);static PMT_FREQUENCY={MONTHLY:6};static CMP_FREQUENCY={MONTHLY:6};static PMT_METHOD={ARREARS:0,ADVANCE:1};static AMORT_MTHD={AM_NORMAL:0};static ROW_TYPES={DETAIL:0,ANNUAL_TOTALS:1,RUNNING_TOTALS:2}}class DateMath{static isValidDateObj(e){return e instanceof Date&&!isNaN(e.getTime())}static dateToDateStr(e,s){let a,c,l,d,u,p=e.getFullYear();if(p<Globals.MIN_YEAR||p>Globals.MAX_YEAR)throw Globals.erInvalidYear;switch(s?(c=Locales.DATE_CONVENTIONS[s].date_format,a=Locales.DATE_CONVENTIONS[s].date_sep):(c=Locales.dateConventions.date_format,a=Locales.dateConventions.date_sep),u=("0"+(e.getMonth()+1)).slice(-2),d=("0"+e.getDate()).slice(-2),c){case Locales.DATE_FORMATS.MDY:l=u+a+d+a+p;break;case Locales.DATE_FORMATS.DMY:case Locales.DATE_FORMATS.DMY2:case Locales.DATE_FORMATS.DMY3:l=d+a+u+a+p;break;case Locales.DATE_FORMATS.YMD:case Locales.DATE_FORMATS.YMD2:case Locales.DATE_FORMATS.YMD3:l=p+a+u+a+d}return l}static getFirstNextMonth(e=new Date){if(!this.isValidDateObj(e))throw Globals.erInvalidDateObj;let s=new Date(e.getFullYear(),e.getMonth()+1);return s.setHours(0,0,0,0),s}static getTodayMidnight(){const e=new Date;return e.setHours(0,0,0,0),e}static#t(e,s){return e.setMonth(e.getMonth()+s),e}static incPeriods(e,s){let a=new Date(e.getTime());return a.setHours(0,0,0,0),this.#t(a,s),a}static countMonths(e,s){if(1!==e.getDate()||1!==s.getDate())throw Globals.erInvalidDate;return 12*(s.getFullYear()-e.getFullYear())+(s.getMonth()-e.getMonth())}}var u="top",p="bottom",h="right",m="left",_="auto",g=[u,p,h,m],y="start",b="end",v="clippingParents",E="viewport",w="popper",N="reference",S=g.reduce(function(e,s){return e.concat([s+"-"+y,s+"-"+b])},[]),A=[].concat(g,[_]).reduce(function(e,s){return e.concat([s,s+"-"+y,s+"-"+b])},[]),L="beforeRead",D="read",Z="afterRead",Q="beforeMain",X="main",tt="afterMain",et="beforeWrite",nt="write",ot="afterWrite",_t=[L,D,Z,Q,X,tt,et,nt,ot];function O(e){return e?(e.nodeName||"").toLowerCase():null}function x(e){if(null==e)return window;if("[object Window]"!==e.toString()){var s=e.ownerDocument;return s&&s.defaultView||window}return e}function T(e){return e instanceof x(e).Element||e instanceof Element}function C(e){return e instanceof x(e).HTMLElement||e instanceof HTMLElement}function k(e){return"undefined"!=typeof ShadowRoot&&(e instanceof x(e).ShadowRoot||e instanceof ShadowRoot)}var yt={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var s=e.state;Object.keys(s.elements).forEach(function(e){var a=s.styles[e]||{},c=s.attributes[e]||{},l=s.elements[e];C(l)&&O(l)&&(Object.assign(l.style,a),Object.keys(c).forEach(function(e){var s=c[e];!1===s?l.removeAttribute(e):l.setAttribute(e,!0===s?"":s)}))})},effect:function(e){var s=e.state,a={popper:{position:s.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(s.elements.popper.style,a.popper),s.styles=a,s.elements.arrow&&Object.assign(s.elements.arrow.style,a.arrow),function(){Object.keys(s.elements).forEach(function(e){var c=s.elements[e],l=s.attributes[e]||{},d=Object.keys(s.styles.hasOwnProperty(e)?s.styles[e]:a[e]).reduce(function(e,s){return e[s]="",e},{});C(c)&&O(c)&&(Object.assign(c.style,d),Object.keys(l).forEach(function(e){c.removeAttribute(e)}))})}},requires:["computeStyles"]};function j(e){return e.split("-")[0]}var Et=Math.max,wt=Math.min,Nt=Math.round;function P(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function M(){return!/^((?!chrome|android).)*safari/i.test(P())}function F(e,s,a){void 0===s&&(s=!1),void 0===a&&(a=!1);var c=e.getBoundingClientRect(),l=1,d=1;s&&C(e)&&(l=e.offsetWidth>0&&Nt(c.width)/e.offsetWidth||1,d=e.offsetHeight>0&&Nt(c.height)/e.offsetHeight||1);var u=(T(e)?x(e):window).visualViewport,p=!M()&&a,h=(c.left+(p&&u?u.offsetLeft:0))/l,m=(c.top+(p&&u?u.offsetTop:0))/d,_=c.width/l,g=c.height/d;return{width:_,height:g,top:m,right:h+_,bottom:m+g,left:h,x:h,y:m}}function $(e){var s=F(e),a=e.offsetWidth,c=e.offsetHeight;return Math.abs(s.width-a)<=1&&(a=s.width),Math.abs(s.height-c)<=1&&(c=s.height),{x:e.offsetLeft,y:e.offsetTop,width:a,height:c}}function H(e,s){var a=s.getRootNode&&s.getRootNode();if(e.contains(s))return!0;if(a&&k(a)){var c=s;do{if(c&&e.isSameNode(c))return!0;c=c.parentNode||c.host}while(c)}return!1}function W(e){return x(e).getComputedStyle(e)}function B(e){return["table","td","th"].indexOf(O(e))>=0}function z(e){return((T(e)?e.ownerDocument:e.document)||window.document).documentElement}function R(e){return"html"===O(e)?e:e.assignedSlot||e.parentNode||(k(e)?e.host:null)||z(e)}function I(e){return C(e)&&"fixed"!==W(e).position?e.offsetParent:null}function q(e){for(var s=x(e),a=I(e);a&&B(a)&&"static"===W(a).position;)a=I(a);return a&&("html"===O(a)||"body"===O(a)&&"static"===W(a).position)?s:a||function(e){var s=/firefox/i.test(P());if(/Trident/i.test(P())&&C(e)&&"fixed"===W(e).position)return null;var a=R(e);for(k(a)&&(a=a.host);C(a)&&["html","body"].indexOf(O(a))<0;){var c=W(a);if("none"!==c.transform||"none"!==c.perspective||"paint"===c.contain||-1!==["transform","perspective"].indexOf(c.willChange)||s&&"filter"===c.willChange||s&&c.filter&&"none"!==c.filter)return a;a=a.parentNode}return null}(e)||s}function V(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Y(e,s,a){return Et(e,wt(s,a))}function K(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function U(e,s){return s.reduce(function(s,a){return s[a]=e,s},{})}var St={name:"arrow",enabled:!0,phase:"main",fn:function(e){var s,a=e.state,c=e.name,l=e.options,d=a.elements.arrow,_=a.modifiersData.popperOffsets,y=j(a.placement),b=V(y),v=[m,h].indexOf(y)>=0?"height":"width";if(d&&_){var E=function(e,s){return K("number"!=typeof(e="function"==typeof e?e(Object.assign({},s.rects,{placement:s.placement})):e)?e:U(e,g))}(l.padding,a),w=$(d),N="y"===b?u:m,S="y"===b?p:h,A=a.rects.reference[v]+a.rects.reference[b]-_[b]-a.rects.popper[v],L=_[b]-a.rects.reference[b],D=q(d),Z=D?"y"===b?D.clientHeight||0:D.clientWidth||0:0,Q=A/2-L/2,X=E[N],tt=Z-w[v]-E[S],et=Z/2-w[v]/2+Q,nt=Y(X,et,tt),ot=b;a.modifiersData[c]=((s={})[ot]=nt,s.centerOffset=nt-et,s)}},effect:function(e){var s=e.state,a=e.options.element,c=void 0===a?"[data-popper-arrow]":a;null!=c&&("string"!=typeof c||(c=s.elements.popper.querySelector(c)))&&H(s.elements.popper,c)&&(s.elements.arrow=c)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function G(e){return e.split("-")[1]}var Tt={top:"auto",right:"auto",bottom:"auto",left:"auto"};function J(e){var s,a=e.popper,c=e.popperRect,l=e.placement,d=e.variation,_=e.offsets,g=e.position,y=e.gpuAcceleration,v=e.adaptive,E=e.roundOffsets,w=e.isFixed,N=_.x,S=void 0===N?0:N,A=_.y,L=void 0===A?0:A,D="function"==typeof E?E({x:S,y:L}):{x:S,y:L};S=D.x,L=D.y;var Z=_.hasOwnProperty("x"),Q=_.hasOwnProperty("y"),X=m,tt=u,et=window;if(v){var nt=q(a),ot="clientHeight",_t="clientWidth";nt===x(a)&&"static"!==W(nt=z(a)).position&&"absolute"===g&&(ot="scrollHeight",_t="scrollWidth"),(l===u||(l===m||l===h)&&d===b)&&(tt=p,L-=(w&&nt===et&&et.visualViewport?et.visualViewport.height:nt[ot])-c.height,L*=y?1:-1),l!==m&&(l!==u&&l!==p||d!==b)||(X=h,S-=(w&&nt===et&&et.visualViewport?et.visualViewport.width:nt[_t])-c.width,S*=y?1:-1)}var yt,Et=Object.assign({position:g},v&&Tt),wt=!0===E?function(e,s){var a=e.x,c=e.y,l=s.devicePixelRatio||1;return{x:Nt(a*l)/l||0,y:Nt(c*l)/l||0}}({x:S,y:L},x(a)):{x:S,y:L};return S=wt.x,L=wt.y,y?Object.assign({},Et,((yt={})[tt]=Q?"0":"",yt[X]=Z?"0":"",yt.transform=(et.devicePixelRatio||1)<=1?"translate("+S+"px, "+L+"px)":"translate3d("+S+"px, "+L+"px, 0)",yt)):Object.assign({},Et,((s={})[tt]=Q?L+"px":"",s[X]=Z?S+"px":"",s.transform="",s))}var At={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var s=e.state,a=e.options,c=a.gpuAcceleration,l=void 0===c||c,d=a.adaptive,u=void 0===d||d,p=a.roundOffsets,h=void 0===p||p,m={placement:j(s.placement),variation:G(s.placement),popper:s.elements.popper,popperRect:s.rects.popper,gpuAcceleration:l,isFixed:"fixed"===s.options.strategy};null!=s.modifiersData.popperOffsets&&(s.styles.popper=Object.assign({},s.styles.popper,J(Object.assign({},m,{offsets:s.modifiersData.popperOffsets,position:s.options.strategy,adaptive:u,roundOffsets:h})))),null!=s.modifiersData.arrow&&(s.styles.arrow=Object.assign({},s.styles.arrow,J(Object.assign({},m,{offsets:s.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:h})))),s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-placement":s.placement})},data:{}},Pt={passive:!0},Lt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var s=e.state,a=e.instance,c=e.options,l=c.scroll,d=void 0===l||l,u=c.resize,p=void 0===u||u,h=x(s.elements.popper),m=[].concat(s.scrollParents.reference,s.scrollParents.popper);return d&&m.forEach(function(e){e.addEventListener("scroll",a.update,Pt)}),p&&h.addEventListener("resize",a.update,Pt),function(){d&&m.forEach(function(e){e.removeEventListener("scroll",a.update,Pt)}),p&&h.removeEventListener("resize",a.update,Pt)}},data:{}},Dt={left:"right",right:"left",bottom:"top",top:"bottom"};function it(e){return e.replace(/left|right|bottom|top/g,function(e){return Dt[e]})}var Mt={start:"end",end:"start"};function rt(e){return e.replace(/start|end/g,function(e){return Mt[e]})}function st(e){var s=x(e);return{scrollLeft:s.pageXOffset,scrollTop:s.pageYOffset}}function at(e){return F(z(e)).left+st(e).scrollLeft}function lt(e){var s=W(e),a=s.overflow,c=s.overflowX,l=s.overflowY;return/auto|scroll|overlay|hidden/.test(a+l+c)}function ct(e){return["html","body","#document"].indexOf(O(e))>=0?e.ownerDocument.body:C(e)&&lt(e)?e:ct(R(e))}function ut(e,s){var a;void 0===s&&(s=[]);var c=ct(e),l=c===(null==(a=e.ownerDocument)?void 0:a.body),d=x(c),u=l?[d].concat(d.visualViewport||[],lt(c)?c:[]):c,p=s.concat(u);return l?p:p.concat(ut(R(u)))}function ft(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function dt(e,s,a){return s===E?ft(function(e,s){var a=x(e),c=z(e),l=a.visualViewport,d=c.clientWidth,u=c.clientHeight,p=0,h=0;if(l){d=l.width,u=l.height;var m=M();(m||!m&&"fixed"===s)&&(p=l.offsetLeft,h=l.offsetTop)}return{width:d,height:u,x:p+at(e),y:h}}(e,a)):T(s)?function(e,s){var a=F(e,!1,"fixed"===s);return a.top=a.top+e.clientTop,a.left=a.left+e.clientLeft,a.bottom=a.top+e.clientHeight,a.right=a.left+e.clientWidth,a.width=e.clientWidth,a.height=e.clientHeight,a.x=a.left,a.y=a.top,a}(s,a):ft(function(e){var s,a=z(e),c=st(e),l=null==(s=e.ownerDocument)?void 0:s.body,d=Et(a.scrollWidth,a.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),u=Et(a.scrollHeight,a.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),p=-c.scrollLeft+at(e),h=-c.scrollTop;return"rtl"===W(l||a).direction&&(p+=Et(a.clientWidth,l?l.clientWidth:0)-d),{width:d,height:u,x:p,y:h}}(z(e)))}function ht(e,s,a,c){var l="clippingParents"===s?function(e){var s=ut(R(e)),a=["absolute","fixed"].indexOf(W(e).position)>=0&&C(e)?q(e):e;return T(a)?s.filter(function(e){return T(e)&&H(e,a)&&"body"!==O(e)}):[]}(e):[].concat(s),d=[].concat(l,[a]),u=d[0],p=d.reduce(function(s,a){var l=dt(e,a,c);return s.top=Et(l.top,s.top),s.right=wt(l.right,s.right),s.bottom=wt(l.bottom,s.bottom),s.left=Et(l.left,s.left),s},dt(e,u,c));return p.width=p.right-p.left,p.height=p.bottom-p.top,p.x=p.left,p.y=p.top,p}function pt(e){var s,a=e.reference,c=e.element,l=e.placement,d=l?j(l):null,_=l?G(l):null,g=a.x+a.width/2-c.width/2,v=a.y+a.height/2-c.height/2;switch(d){case u:s={x:g,y:a.y-c.height};break;case p:s={x:g,y:a.y+a.height};break;case h:s={x:a.x+a.width,y:v};break;case m:s={x:a.x-c.width,y:v};break;default:s={x:a.x,y:a.y}}var E=d?V(d):null;if(null!=E){var w="y"===E?"height":"width";switch(_){case y:s[E]=s[E]-(a[w]/2-c[w]/2);break;case b:s[E]=s[E]+(a[w]/2-c[w]/2)}}return s}function mt(e,s){void 0===s&&(s={});var a=s,c=a.placement,l=void 0===c?e.placement:c,d=a.strategy,m=void 0===d?e.strategy:d,_=a.boundary,y=void 0===_?v:_,b=a.rootBoundary,S=void 0===b?E:b,A=a.elementContext,L=void 0===A?w:A,D=a.altBoundary,Z=void 0!==D&&D,Q=a.padding,X=void 0===Q?0:Q,tt=K("number"!=typeof X?X:U(X,g)),et=L===w?N:w,nt=e.rects.popper,ot=e.elements[Z?et:L],_t=ht(T(ot)?ot:ot.contextElement||z(e.elements.popper),y,S,m),yt=F(e.elements.reference),Et=pt({reference:yt,element:nt,placement:l}),wt=ft(Object.assign({},nt,Et)),Nt=L===w?wt:yt,St={top:_t.top-Nt.top+tt.top,bottom:Nt.bottom-_t.bottom+tt.bottom,left:_t.left-Nt.left+tt.left,right:Nt.right-_t.right+tt.right},Tt=e.modifiersData.offset;if(L===w&&Tt){var At=Tt[l];Object.keys(St).forEach(function(e){var s=[h,p].indexOf(e)>=0?1:-1,a=[u,p].indexOf(e)>=0?"y":"x";St[e]+=At[a]*s})}return St}function gt(e,s){void 0===s&&(s={});var a=s,c=a.placement,l=a.boundary,d=a.rootBoundary,u=a.padding,p=a.flipVariations,h=a.allowedAutoPlacements,m=void 0===h?A:h,_=G(c),y=_?p?S:S.filter(function(e){return G(e)===_}):g,b=y.filter(function(e){return m.indexOf(e)>=0});0===b.length&&(b=y);var v=b.reduce(function(s,a){return s[a]=mt(e,{placement:a,boundary:l,rootBoundary:d,padding:u})[j(a)],s},{});return Object.keys(v).sort(function(e,s){return v[e]-v[s]})}var Gt={name:"flip",enabled:!0,phase:"main",fn:function(e){var s=e.state,a=e.options,c=e.name;if(!s.modifiersData[c]._skip){for(var l=a.mainAxis,d=void 0===l||l,g=a.altAxis,b=void 0===g||g,v=a.fallbackPlacements,E=a.padding,w=a.boundary,N=a.rootBoundary,S=a.altBoundary,A=a.flipVariations,L=void 0===A||A,D=a.allowedAutoPlacements,Z=s.options.placement,Q=j(Z),X=v||(Q!==Z&&L?function(e){if(j(e)===_)return[];var s=it(e);return[rt(e),s,rt(s)]}(Z):[it(Z)]),tt=[Z].concat(X).reduce(function(e,a){return e.concat(j(a)===_?gt(s,{placement:a,boundary:w,rootBoundary:N,padding:E,flipVariations:L,allowedAutoPlacements:D}):a)},[]),et=s.rects.reference,nt=s.rects.popper,ot=new Map,_t=!0,yt=tt[0],Et=0;Et<tt.length;Et++){var wt=tt[Et],Nt=j(wt),St=G(wt)===y,Tt=[u,p].indexOf(Nt)>=0,At=Tt?"width":"height",Pt=mt(s,{placement:wt,boundary:w,rootBoundary:N,altBoundary:S,padding:E}),Lt=Tt?St?h:m:St?p:u;et[At]>nt[At]&&(Lt=it(Lt));var Dt=it(Lt),Mt=[];if(d&&Mt.push(Pt[Nt]<=0),b&&Mt.push(Pt[Lt]<=0,Pt[Dt]<=0),Mt.every(function(e){return e})){yt=wt,_t=!1;break}ot.set(wt,Mt)}if(_t)for(var R=function(e){var s=tt.find(function(s){var a=ot.get(s);if(a)return a.slice(0,e).every(function(e){return e})});if(s)return yt=s,"break"},Gt=L?3:1;Gt>0&&"break"!==R(Gt);Gt--);s.placement!==yt&&(s.modifiersData[c]._skip=!0,s.placement=yt,s.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(e,s,a){return void 0===a&&(a={x:0,y:0}),{top:e.top-s.height-a.y,right:e.right-s.width+a.x,bottom:e.bottom-s.height+a.y,left:e.left-s.width-a.x}}function vt(e){return[u,h,p,m].some(function(s){return e[s]>=0})}var jt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var s=e.state,a=e.name,c=s.rects.reference,l=s.rects.popper,d=s.modifiersData.preventOverflow,u=mt(s,{elementContext:"reference"}),p=mt(s,{altBoundary:!0}),h=bt(u,c),m=bt(p,l,d),_=vt(h),g=vt(m);s.modifiersData[a]={referenceClippingOffsets:h,popperEscapeOffsets:m,isReferenceHidden:_,hasPopperEscaped:g},s.attributes.popper=Object.assign({},s.attributes.popper,{"data-popper-reference-hidden":_,"data-popper-escaped":g})}},Vt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var s=e.state,a=e.options,c=e.name,l=a.offset,d=void 0===l?[0,0]:l,p=A.reduce(function(e,a){return e[a]=function(e,s,a){var c=j(e),l=[m,u].indexOf(c)>=0?-1:1,d="function"==typeof a?a(Object.assign({},s,{placement:e})):a,p=d[0],_=d[1];return p=p||0,_=(_||0)*l,[m,h].indexOf(c)>=0?{x:_,y:p}:{x:p,y:_}}(a,s.rects,d),e},{}),_=p[s.placement],g=_.x,y=_.y;null!=s.modifiersData.popperOffsets&&(s.modifiersData.popperOffsets.x+=g,s.modifiersData.popperOffsets.y+=y),s.modifiersData[c]=p}},Zt={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var s=e.state,a=e.name;s.modifiersData[a]=pt({reference:s.rects.reference,element:s.rects.popper,placement:s.placement})},data:{}},Jt={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var s=e.state,a=e.options,c=e.name,l=a.mainAxis,d=void 0===l||l,_=a.altAxis,g=void 0!==_&&_,b=a.boundary,v=a.rootBoundary,E=a.altBoundary,w=a.padding,N=a.tether,S=void 0===N||N,A=a.tetherOffset,L=void 0===A?0:A,D=mt(s,{boundary:b,rootBoundary:v,padding:w,altBoundary:E}),Z=j(s.placement),Q=G(s.placement),X=!Q,tt=V(Z),et="x"===tt?"y":"x",nt=s.modifiersData.popperOffsets,ot=s.rects.reference,_t=s.rects.popper,yt="function"==typeof L?L(Object.assign({},s.rects,{placement:s.placement})):L,Nt="number"==typeof yt?{mainAxis:yt,altAxis:yt}:Object.assign({mainAxis:0,altAxis:0},yt),St=s.modifiersData.offset?s.modifiersData.offset[s.placement]:null,Tt={x:0,y:0};if(nt){if(d){var At,Pt="y"===tt?u:m,Lt="y"===tt?p:h,Dt="y"===tt?"height":"width",Mt=nt[tt],Gt=Mt+D[Pt],jt=Mt-D[Lt],Vt=S?-_t[Dt]/2:0,Zt=Q===y?ot[Dt]:_t[Dt],Jt=Q===y?-_t[Dt]:-ot[Dt],Xt=s.elements.arrow,te=S&&Xt?$(Xt):{width:0,height:0},ee=s.modifiersData["arrow#persistent"]?s.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},ne=ee[Pt],me=ee[Lt],fe=Y(0,ot[Dt],te[Dt]),ye=X?ot[Dt]/2-Vt-fe-ne-Nt.mainAxis:Zt-fe-ne-Nt.mainAxis,ve=X?-ot[Dt]/2+Vt+fe+me+Nt.mainAxis:Jt+fe+me+Nt.mainAxis,Ee=s.elements.arrow&&q(s.elements.arrow),Ce=Ee?"y"===tt?Ee.clientTop||0:Ee.clientLeft||0:0,we=null!=(At=null==St?void 0:St[tt])?At:0,Ne=Mt+ve-we,Se=Y(S?wt(Gt,Mt+ye-we-Ce):Gt,Mt,S?Et(jt,Ne):jt);nt[tt]=Se,Tt[tt]=Se-Mt}if(g){var Te,Ae="x"===tt?u:m,Pe="x"===tt?p:h,De=nt[et],Me="y"===et?"height":"width",Oe=De+D[Ae],Ie=De-D[Pe],Re=-1!==[u,m].indexOf(Z),ke=null!=(Te=null==St?void 0:St[et])?Te:0,Ye=Re?Oe:De-ot[Me]-_t[Me]-ke+Nt.altAxis,Ue=Re?De+ot[Me]+_t[Me]-ke-Nt.altAxis:Ie,He=S&&Re?function(e,s,a){var c=Y(e,s,a);return c>a?a:c}(Ye,De,Ue):Y(S?Ye:Oe,De,S?Ue:Ie);nt[et]=He,Tt[et]=He-De}s.modifiersData[c]=Tt}},requiresIfExists:["offset"]};function Ot(e,s,a){void 0===a&&(a=!1);var c,l,d=C(s),u=C(s)&&function(e){var s=e.getBoundingClientRect(),a=Nt(s.width)/e.offsetWidth||1,c=Nt(s.height)/e.offsetHeight||1;return 1!==a||1!==c}(s),p=z(s),h=F(e,u,a),m={scrollLeft:0,scrollTop:0},_={x:0,y:0};return(d||!d&&!a)&&(("body"!==O(s)||lt(p))&&(m=(c=s)!==x(c)&&C(c)?{scrollLeft:(l=c).scrollLeft,scrollTop:l.scrollTop}:st(c)),C(s)?((_=F(s,!0)).x+=s.clientLeft,_.y+=s.clientTop):p&&(_.x=at(p))),{x:h.left+m.scrollLeft-_.x,y:h.top+m.scrollTop-_.y,width:h.width,height:h.height}}function xt(e){var s=new Map,a=new Set,c=[];function o(e){a.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!a.has(e)){var c=s.get(e);c&&o(c)}}),c.push(e)}return e.forEach(function(e){s.set(e.name,e)}),e.forEach(function(e){a.has(e.name)||o(e)}),c}var Xt={placement:"bottom",modifiers:[],strategy:"absolute"};function Ct(){for(var e=arguments.length,s=new Array(e),a=0;a<e;a++)s[a]=arguments[a];return!s.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function kt(e){void 0===e&&(e={});var s=e,a=s.defaultModifiers,c=void 0===a?[]:a,l=s.defaultOptions,d=void 0===l?Xt:l;return function(e,s,a){void 0===a&&(a=d);var l,u,p={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xt,d),modifiersData:{},elements:{reference:e,popper:s},attributes:{},styles:{}},h=[],m=!1,_={state:p,setOptions:function(a){var l="function"==typeof a?a(p.options):a;f(),p.options=Object.assign({},d,p.options,l),p.scrollParents={reference:T(e)?ut(e):e.contextElement?ut(e.contextElement):[],popper:ut(s)};var u,m,g=function(e){var s=xt(e);return _t.reduce(function(e,a){return e.concat(s.filter(function(e){return e.phase===a}))},[])}((u=[].concat(c,p.options.modifiers),m=u.reduce(function(e,s){var a=e[s.name];return e[s.name]=a?Object.assign({},a,s,{options:Object.assign({},a.options,s.options),data:Object.assign({},a.data,s.data)}):s,e},{}),Object.keys(m).map(function(e){return m[e]})));return p.orderedModifiers=g.filter(function(e){return e.enabled}),p.orderedModifiers.forEach(function(e){var s=e.name,a=e.options,c=void 0===a?{}:a,l=e.effect;if("function"==typeof l){var d=l({state:p,name:s,instance:_,options:c});h.push(d||function(){})}}),_.update()},forceUpdate:function(){if(!m){var e=p.elements,s=e.reference,a=e.popper;if(Ct(s,a)){p.rects={reference:Ot(s,q(a),"fixed"===p.options.strategy),popper:$(a)},p.reset=!1,p.placement=p.options.placement,p.orderedModifiers.forEach(function(e){return p.modifiersData[e.name]=Object.assign({},e.data)});for(var c=0;c<p.orderedModifiers.length;c++)if(!0!==p.reset){var l=p.orderedModifiers[c],d=l.fn,u=l.options,h=void 0===u?{}:u,g=l.name;"function"==typeof d&&(p=d({state:p,options:h,name:g,instance:_})||p)}else p.reset=!1,c=-1}}},update:(l=function(){return new Promise(function(e){_.forceUpdate(),e(p)})},function(){return u||(u=new Promise(function(e){Promise.resolve().then(function(){u=void 0,e(l())})})),u}),destroy:function(){f(),m=!0}};if(!Ct(e,s))return _;function f(){h.forEach(function(e){return e()}),h=[]}return _.setOptions(a).then(function(e){!m&&a.onFirstUpdate&&a.onFirstUpdate(e)}),_}}var te=kt(),ee=kt({defaultModifiers:[Lt,Zt,At,yt]}),ne=kt({defaultModifiers:[Lt,Zt,At,yt,Vt,Gt,Jt,St,jt]}),me=Object.freeze({__proto__:null,afterMain:tt,afterRead:Z,afterWrite:ot,applyStyles:yt,arrow:St,auto:_,basePlacements:g,beforeMain:Q,beforeRead:L,beforeWrite:et,bottom:p,clippingParents:v,computeStyles:At,createPopper:ne,createPopperBase:te,createPopperLite:ee,detectOverflow:mt,end:b,eventListeners:Lt,flip:Gt,hide:jt,left:m,main:X,modifierPhases:_t,offset:Vt,placements:A,popper:w,popperGenerator:kt,popperOffsets:Zt,preventOverflow:Jt,read:D,reference:N,right:h,start:y,top:u,variationPlacements:S,viewport:E,write:nt});const fe=new Map;var ye={set(e,s,a){fe.has(e)||fe.set(e,new Map);const c=fe.get(e);c.has(s)||0===c.size?c.set(s,a):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(c.keys())[0]}.`)},get:(e,s)=>fe.has(e)&&fe.get(e).get(s)||null,remove(e,s){if(!fe.has(e))return;const a=fe.get(e);a.delete(s),0===a.size&&fe.delete(e)}};const ve="transitionend",Ft=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(e,s)=>`#${CSS.escape(s)}`)),e),$t=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),Ht=e=>$t(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(Ft(e)):null,Wt=e=>{if(!$t(e)||0===e.getClientRects().length)return!1;const s="visible"===getComputedStyle(e).getPropertyValue("visibility"),a=e.closest("details:not([open])");if(!a)return s;if(a!==e){const s=e.closest("summary");if(s&&s.parentNode!==a)return!1;if(null===s)return!1}return s},Bt=e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),zt=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const s=e.getRootNode();return s instanceof ShadowRoot?s:null}return e instanceof ShadowRoot?e:e.parentNode?zt(e.parentNode):null},Rt=()=>{},It=e=>{e.offsetHeight},qt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Ee=[],Yt=()=>"rtl"===document.documentElement.dir,Kt=e=>{var s;s=()=>{const s=qt();if(s){const a=e.NAME,c=s.fn[a];s.fn[a]=e.jQueryInterface,s.fn[a].Constructor=e,s.fn[a].noConflict=()=>(s.fn[a]=c,e.jQueryInterface)}},"loading"===document.readyState?(Ee.length||document.addEventListener("DOMContentLoaded",()=>{for(const e of Ee)e()}),Ee.push(s)):s()},Ut=(e,s=[],a=e)=>"function"==typeof e?e(...s):a,Qt=(e,s,a=!0)=>{if(!a)return void Ut(e);const c=(e=>{if(!e)return 0;let{transitionDuration:s,transitionDelay:a}=window.getComputedStyle(e);const c=Number.parseFloat(s),l=Number.parseFloat(a);return c||l?(s=s.split(",")[0],a=a.split(",")[0],1e3*(Number.parseFloat(s)+Number.parseFloat(a))):0})(s)+5;let l=!1;const r=({target:a})=>{a===s&&(l=!0,s.removeEventListener(ve,r),Ut(e))};s.addEventListener(ve,r),setTimeout(()=>{l||s.dispatchEvent(new Event(ve))},c)},Ce=/[^.]*(?=\..*)\.|.*/,we=/\..*/,Ne=/::\d+$/,Se={};let Te=1;const Ae={mouseenter:"mouseover",mouseleave:"mouseout"},Pe=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ie(e,s){return s&&`${s}::${Te++}`||e.uidEvent||Te++}function oe(e){const s=ie(e);return e.uidEvent=s,Se[s]=Se[s]||{},Se[s]}function re(e,s,a=null){return Object.values(e).find(e=>e.callable===s&&e.delegationSelector===a)}function se(e,s,a){const c="string"==typeof s,l=c?a:s||a;let d=ue(e);return Pe.has(d)||(d=e),[c,l,d]}function ae(e,s,a,c,l){if("string"!=typeof s||!e)return;let[d,u,p]=se(s,a,c);if(s in Ae){const t=e=>function(s){if(!s.relatedTarget||s.relatedTarget!==s.delegateTarget&&!s.delegateTarget.contains(s.relatedTarget))return e.call(this,s)};u=t(u)}const h=oe(e),m=h[p]||(h[p]={}),_=re(m,u,d?a:null);if(_)return void(_.oneOff=_.oneOff&&l);const g=ie(u,s.replace(Ce,"")),y=d?function(e,s,a){return function i(c){const l=e.querySelectorAll(s);for(let{target:d}=c;d&&d!==this;d=d.parentNode)for(const u of l)if(u===d)return de(c,{delegateTarget:d}),i.oneOff&&De.off(e,c.type,s,a),a.apply(d,[c])}}(e,a,u):function(e,s){return function n(a){return de(a,{delegateTarget:e}),n.oneOff&&De.off(e,a.type,s),s.apply(e,[a])}}(e,u);y.delegationSelector=d?a:null,y.callable=u,y.oneOff=l,y.uidEvent=g,m[g]=y,e.addEventListener(p,y,d)}function le(e,s,a,c,l){const d=re(s[a],c,l);d&&(e.removeEventListener(a,d,Boolean(l)),delete s[a][d.uidEvent])}function ce(e,s,a,c){const l=s[a]||{};for(const[d,u]of Object.entries(l))d.includes(c)&&le(e,s,a,u.callable,u.delegationSelector)}function ue(e){return e=e.replace(we,""),Ae[e]||e}const De={on(e,s,a,c){ae(e,s,a,c,!1)},one(e,s,a,c){ae(e,s,a,c,!0)},off(e,s,a,c){if("string"!=typeof s||!e)return;const[l,d,u]=se(s,a,c),p=u!==s,h=oe(e),m=h[u]||{},_=s.startsWith(".");if(void 0===d){if(_)for(const a of Object.keys(h))ce(e,h,a,s.slice(1));for(const[a,c]of Object.entries(m)){const l=a.replace(Ne,"");p&&!s.includes(l)||le(e,h,u,c.callable,c.delegationSelector)}}else{if(!Object.keys(m).length)return;le(e,h,u,d,l?a:null)}},trigger(e,s,a){if("string"!=typeof s||!e)return null;const c=qt();let l=null,d=!0,u=!0,p=!1;s!==ue(s)&&c&&(l=c.Event(s,a),c(e).trigger(l),d=!l.isPropagationStopped(),u=!l.isImmediatePropagationStopped(),p=l.isDefaultPrevented());const h=de(new Event(s,{bubbles:d,cancelable:!0}),a);return p&&h.preventDefault(),u&&e.dispatchEvent(h),h.defaultPrevented&&l&&l.preventDefault(),h}};function de(e,s={}){for(const[a,c]of Object.entries(s))try{e[a]=c}catch{Object.defineProperty(e,a,{configurable:!0,get:()=>c})}return e}function he(e){if("true"===e)return!0;if("false"===e)return!1;if(e===Number(e).toString())return Number(e);if(""===e||"null"===e)return null;if("string"!=typeof e)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function pe(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}const Me={setDataAttribute(e,s,a){e.setAttribute(`data-bs-${pe(s)}`,a)},removeDataAttribute(e,s){e.removeAttribute(`data-bs-${pe(s)}`)},getDataAttributes(e){if(!e)return{};const s={},a=Object.keys(e.dataset).filter(e=>e.startsWith("bs")&&!e.startsWith("bsConfig"));for(const c of a){let a=c.replace(/^bs/,"");a=a.charAt(0).toLowerCase()+a.slice(1,a.length),s[a]=he(e.dataset[c])}return s},getDataAttribute:(e,s)=>he(e.getAttribute(`data-bs-${pe(s)}`))};class ge{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,s){const a=$t(s)?Me.getDataAttribute(s,"config"):{};return{...this.constructor.Default,..."object"==typeof a?a:{},...$t(s)?Me.getDataAttributes(s):{},..."object"==typeof e?e:{}}}_typeCheckConfig(e,s=this.constructor.DefaultType){for(const[c,l]of Object.entries(s)){const s=e[c],d=$t(s)?"element":null==(a=s)?`${a}`:Object.prototype.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(l).test(d))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${c}" provided type "${d}" but expected type "${l}".`)}var a}}class _e extends ge{constructor(e,s){super(),(e=Ht(e))&&(this._element=e,this._config=this._getConfig(s),ye.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ye.remove(this._element,this.constructor.DATA_KEY),De.off(this._element,this.constructor.EVENT_KEY);for(const e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,s,a=!0){Qt(e,s,a)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return ye.get(Ht(e),this.DATA_KEY)}static getOrCreateInstance(e,s={}){return this.getInstance(e)||new this(e,"object"==typeof s?s:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}}const be=e=>{let s=e.getAttribute("data-bs-target");if(!s||"#"===s){let a=e.getAttribute("href");if(!a||!a.includes("#")&&!a.startsWith("."))return null;a.includes("#")&&!a.startsWith("#")&&(a=`#${a.split("#")[1]}`),s=a&&"#"!==a?a.trim():null}return s?s.split(",").map(e=>Ft(e)).join(","):null},Oe={find:(e,s=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(s,e)),findOne:(e,s=document.documentElement)=>Element.prototype.querySelector.call(s,e),children:(e,s)=>[].concat(...e.children).filter(e=>e.matches(s)),parents(e,s){const a=[];let c=e.parentNode.closest(s);for(;c;)a.push(c),c=c.parentNode.closest(s);return a},prev(e,s){let a=e.previousElementSibling;for(;a;){if(a.matches(s))return[a];a=a.previousElementSibling}return[]},next(e,s){let a=e.nextElementSibling;for(;a;){if(a.matches(s))return[a];a=a.nextElementSibling}return[]},focusableChildren(e){const s=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(e=>`${e}:not([tabindex^="-"])`).join(",");return this.find(s,e).filter(e=>!Bt(e)&&Wt(e))},getSelectorFromElement(e){const s=be(e);return s&&Oe.findOne(s)?s:null},getElementFromSelector(e){const s=be(e);return s?Oe.findOne(s):null},getMultipleElementsFromSelector(e){const s=be(e);return s?Oe.find(s):[]}},Ie="backdrop",Re="show",ke=`mousedown.bs.${Ie}`,Ye={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},Ue={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class xe extends ge{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Ye}static get DefaultType(){return Ue}static get NAME(){return Ie}show(e){if(!this._config.isVisible)return void Ut(e);this._append();const s=this._getElement();this._config.isAnimated&&It(s),s.classList.add(Re),this._emulateAnimation(()=>{Ut(e)})}hide(e){this._config.isVisible?(this._getElement().classList.remove(Re),this._emulateAnimation(()=>{this.dispose(),Ut(e)})):Ut(e)}dispose(){this._isAppended&&(De.off(this._element,ke),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=this._config.className,this._config.isAnimated&&e.classList.add("fade"),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ht(e.rootElement),e}_append(){if(this._isAppended)return;const e=this._getElement();this._config.rootElement.append(e),De.on(e,ke,()=>{Ut(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Qt(e,this._getElement(),this._config.isAnimated)}}const He=".bs.focustrap",Be=`focusin${He}`,Fe=`keydown.tab${He}`,Ge="backward",je={autofocus:!0,trapElement:null},Ve={autofocus:"boolean",trapElement:"element"};class Le extends ge{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return je}static get DefaultType(){return Ve}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),De.off(document,He),De.on(document,Be,e=>this._handleFocusin(e)),De.on(document,Fe,e=>this._handleKeydown(e)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,De.off(document,He))}_handleFocusin(e){const{trapElement:s}=this._config;if(e.target===document||e.target===s||s.contains(e.target))return;const a=Oe.focusableChildren(s);0===a.length?s.focus():this._lastTabNavDirection===Ge?a[a.length-1].focus():a[0].focus()}_handleKeydown(e){"Tab"===e.key&&(this._lastTabNavDirection=e.shiftKey?Ge:"forward")}}const We=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",ze=".sticky-top",qe="padding-right",Ke="margin-right";class $e{constructor(){this._element=document.body}getWidth(){const e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){const e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,qe,s=>s+e),this._setElementAttributes(We,qe,s=>s+e),this._setElementAttributes(ze,Ke,s=>s-e)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,qe),this._resetElementAttributes(We,qe),this._resetElementAttributes(ze,Ke)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,s,a){const c=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+c)return;this._saveInitialAttribute(e,s);const l=window.getComputedStyle(e).getPropertyValue(s);e.style.setProperty(s,`${a(Number.parseFloat(l))}px`)})}_saveInitialAttribute(e,s){const a=e.style.getPropertyValue(s);a&&Me.setDataAttribute(e,s,a)}_resetElementAttributes(e,s){this._applyManipulationCallback(e,e=>{const a=Me.getDataAttribute(e,s);null!==a?(Me.removeDataAttribute(e,s),e.style.setProperty(s,a)):e.style.removeProperty(s)})}_applyManipulationCallback(e,s){if($t(e))s(e);else for(const a of Oe.find(e,this._element))s(a)}}const Ze=".bs.modal",Je=`hide${Ze}`,Qe=`hidePrevented${Ze}`,Xe=`hidden${Ze}`,en=`show${Ze}`,nn=`shown${Ze}`,sn=`resize${Ze}`,on=`click.dismiss${Ze}`,an=`mousedown.dismiss${Ze}`,ln=`keydown.dismiss${Ze}`,dn=`click${Ze}.data-api`,un="modal-open",pn="show",hn="modal-static",mn={backdrop:!0,focus:!0,keyboard:!0},fn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class tn extends _e{constructor(e,s){super(e,s),this._dialog=Oe.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new $e,this._addEventListeners()}static get Default(){return mn}static get DefaultType(){return fn}static get NAME(){return"modal"}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||De.trigger(this._element,en,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(un),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){this._isShown&&!this._isTransitioning&&(De.trigger(this._element,Je).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(pn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){De.off(window,Ze),De.off(this._dialog,Ze),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new xe({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Le({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const s=Oe.findOne(".modal-body",this._dialog);s&&(s.scrollTop=0),It(this._element),this._element.classList.add(pn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,De.trigger(this._element,nn,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){De.on(this._element,ln,e=>{"Escape"===e.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),De.on(window,sn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),De.on(this._element,an,e=>{De.one(this._element,on,s=>{this._element===e.target&&this._element===s.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(un),this._resetAdjustments(),this._scrollBar.reset(),De.trigger(this._element,Xe)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(De.trigger(this._element,Qe).defaultPrevented)return;const e=this._element.scrollHeight>document.documentElement.clientHeight,s=this._element.style.overflowY;"hidden"===s||this._element.classList.contains(hn)||(e||(this._element.style.overflowY="hidden"),this._element.classList.add(hn),this._queueCallback(()=>{this._element.classList.remove(hn),this._queueCallback(()=>{this._element.style.overflowY=s},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const e=this._element.scrollHeight>document.documentElement.clientHeight,s=this._scrollBar.getWidth(),a=s>0;if(a&&!e){const e=Yt()?"paddingLeft":"paddingRight";this._element.style[e]=`${s}px`}if(!a&&e){const e=Yt()?"paddingRight":"paddingLeft";this._element.style[e]=`${s}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,s){return this.each(function(){const a=tn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===a[e])throw new TypeError(`No method named "${e}"`);a[e](s)}})}}De.on(document,dn,'[data-bs-toggle="modal"]',function(e){const s=Oe.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),De.one(s,en,e=>{e.defaultPrevented||De.one(s,Xe,()=>{Wt(this)&&this.focus()})});const a=Oe.findOne(".modal.show");a&&tn.getInstance(a).hide(),tn.getOrCreateInstance(s).toggle(this)}),((e,s="hide")=>{const a=`click.dismiss${e.EVENT_KEY}`,c=e.NAME;De.on(document,a,`[data-bs-dismiss="${c}"]`,function(a){if(["A","AREA"].includes(this.tagName)&&a.preventDefault(),Bt(this))return;const l=Oe.getElementFromSelector(this)||this.closest(`.${c}`);e.getOrCreateInstance(l)[s]()})})(tn),Kt(tn);const _n={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},gn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),yn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,rn=(e,s)=>{const a=e.nodeName.toLowerCase();return s.includes(a)?!gn.has(a)||Boolean(yn.test(e.nodeValue)):s.filter(e=>e instanceof RegExp).some(e=>e.test(a))},bn={allowList:_n,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},vn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},En={entry:"(string|element|function|null)",selector:"(string|element)"};class cn extends ge{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return bn}static get DefaultType(){return vn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){const e=document.createElement("div");e.innerHTML=this._maybeSanitize(this._config.template);for(const[s,a]of Object.entries(this._config.content))this._setContent(e,a,s);const s=e.children[0],a=this._resolvePossibleFunction(this._config.extraClass);return a&&s.classList.add(...a.split(" ")),s}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(const[s,a]of Object.entries(e))super._typeCheckConfig({selector:s,entry:a},En)}_setContent(e,s,a){const c=Oe.findOne(a,e);c&&((s=this._resolvePossibleFunction(s))?$t(s)?this._putElementInTemplate(Ht(s),c):this._config.html?c.innerHTML=this._maybeSanitize(s):c.textContent=s:c.remove())}_maybeSanitize(e){return this._config.sanitize?function(e,s,a){if(!e.length)return e;if(a&&"function"==typeof a)return a(e);const c=(new window.DOMParser).parseFromString(e,"text/html"),l=[].concat(...c.body.querySelectorAll("*"));for(const e of l){const a=e.nodeName.toLowerCase();if(!Object.keys(s).includes(a)){e.remove();continue}const c=[].concat(...e.attributes),l=[].concat(s["*"]||[],s[a]||[]);for(const s of c)rn(s,l)||e.removeAttribute(s.nodeName)}return c.body.innerHTML}(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return Ut(e,[this])}_putElementInTemplate(e,s){if(this._config.html)return s.innerHTML="",void s.append(e);s.textContent=e.textContent}}const Cn=new Set(["sanitize","allowList","sanitizeFn"]),Nn="fade",Sn="show",Tn=".tooltip-inner",An=".modal",Pn="hide.bs.modal",Ln="hover",Dn="focus",Mn={AUTO:"auto",TOP:"top",RIGHT:Yt()?"left":"right",BOTTOM:"bottom",LEFT:Yt()?"right":"left"},On={allowList:_n,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},In={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class wn extends _e{constructor(e,s){if(void 0===me)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e,s),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return On}static get DefaultType(){return In}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),De.off(this._element.closest(An),Pn,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const e=De.trigger(this._element,this.constructor.eventName("show")),s=(zt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!s)return;this._disposePopper();const a=this._getTipElement();this._element.setAttribute("aria-describedby",a.getAttribute("id"));const{container:c}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(c.append(a),De.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(a),a.classList.add(Sn),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))De.on(e,"mouseover",Rt);this._queueCallback(()=>{De.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!De.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(Sn),"ontouchstart"in document.documentElement)for(const e of[].concat(...document.body.children))De.off(e,"mouseover",Rt);this._activeTrigger.click=!1,this._activeTrigger[Dn]=!1,this._activeTrigger[Ln]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),De.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(e){const s=this._getTemplateFactory(e).toHtml();if(!s)return null;s.classList.remove(Nn,Sn),s.classList.add(`bs-${this.constructor.NAME}-auto`);const a=(e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e})(this.constructor.NAME).toString();return s.setAttribute("id",a),this._isAnimated()&&s.classList.add(Nn),s}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new cn({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Tn]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Nn)}_isShown(){return this.tip&&this.tip.classList.contains(Sn)}_createPopper(e){const s=Ut(this._config.placement,[this,e,this._element]),a=Mn[s.toUpperCase()];return ne(this._element,e,this._getPopperConfig(a))}_getOffset(){const{offset:e}=this._config;return"string"==typeof e?e.split(",").map(e=>Number.parseInt(e,10)):"function"==typeof e?s=>e(s,this._element):e}_resolvePossibleFunction(e){return Ut(e,[this._element])}_getPopperConfig(e){const s={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:e=>{this._getTipElement().setAttribute("data-popper-placement",e.state.placement)}}]};return{...s,...Ut(this._config.popperConfig,[s])}}_setListeners(){const e=this._config.trigger.split(" ");for(const s of e)if("click"===s)De.on(this._element,this.constructor.eventName("click"),this._config.selector,e=>{this._initializeOnDelegatedTarget(e).toggle()});else if("manual"!==s){const e=s===Ln?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),a=s===Ln?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");De.on(this._element,e,this._config.selector,e=>{const s=this._initializeOnDelegatedTarget(e);s._activeTrigger["focusin"===e.type?Dn:Ln]=!0,s._enter()}),De.on(this._element,a,this._config.selector,e=>{const s=this._initializeOnDelegatedTarget(e);s._activeTrigger["focusout"===e.type?Dn:Ln]=s._element.contains(e.relatedTarget),s._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},De.on(this._element.closest(An),Pn,this._hideModalHandler)}_fixTitle(){const e=this._element.getAttribute("title");e&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",e),this._element.setAttribute("data-bs-original-title",e),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,s){clearTimeout(this._timeout),this._timeout=setTimeout(e,s)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){const s=Me.getDataAttributes(this._element);for(const e of Object.keys(s))Cn.has(e)&&delete s[e];return e={...s,..."object"==typeof e&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=!1===e.container?document.body:Ht(e.container),"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),"number"==typeof e.title&&(e.title=e.title.toString()),"number"==typeof e.content&&(e.content=e.content.toString()),e}_getDelegateConfig(){const e={};for(const[s,a]of Object.entries(this._config))this.constructor.Default[s]!==a&&(e[s]=a);return e.selector=!1,e.trigger="manual",e}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(e){return this.each(function(){const s=wn.getOrCreateInstance(this,e);if("string"==typeof e){if(void 0===s[e])throw new TypeError(`No method named "${e}"`);s[e]()}})}}Kt(wn);class Modals{static modals={};static initializeModal(e,s,a,c=null,l=null){const d=document.getElementById(s),u=new tn(d,{backdrop:"static",focus:!0,keyboard:!0});if(this.modals[s]=u,l&&setTimeout(()=>{l()},0),null===e)return;const p=document.getElementById(e);p?p.addEventListener("click",()=>{if("function"==typeof a&&null===c)a(u);else if("function"==typeof a&&null!==c){a.bind(c)(u)}else console.warn(`Callback ${a} function not found.`)}):console.warn(`Button with ID '${e}' not found.`)}static initializeModalEvents(e,s){document.getElementById(e)?s&&s.forEach(s=>{const a=document.getElementById(s.elementId);a?"function"==typeof s.callback?a.addEventListener(s.eventType,s.callback.bind(s.context?s.context:null)):console.warn(`'${e}' Callback function not found.`):console.warn(`Element with ID '${s.elementId}' not found.`)}):console.warn(`Modal with ID '${e}' not found.`)}static initializeModals(e){let s=0;this.modals={},"requestIdleCallback"in window?requestIdleCallback(function processNextModal(a){for(;s<e.length&&(a.timeRemaining()>0||a.didTimeout);){const a=e[s++];if(a.initModal){const{buttonId:e,modalElementId:s,callback:c,context:l,initCallback:d}=a.initModal;Modals.initializeModal(e,s,c,l,d)}Modals.initializeModalEvents(a.modalId,a.eventHandlers)}s<e.length&&requestIdleCallback(processNextModal,{timeout:2e3})},{timeout:2e3}):function processNextModalFallback(){if(s<e.length){const a=e[s++];if(a.initModal){const{buttonId:e,modalElementId:s,callback:c}=a.initModal;Modals.initializeModal(e,s,c)}Modals.initializeModalEvents(a.modalId,a.eventHandlers),setTimeout(processNextModalFallback,0)}}()}}const Rn=/^(((http[s]?)|file):)?(\/\/)+([0-9a-zA-Z-_.=?&].+)$/,xn=/^((\.|\.\.)?\/)([0-9a-zA-Z-_.=?&]+\/)*([0-9a-zA-Z-_.=?&]+)$/,isValidURL=e=>Rn.test(e)||xn.test(e);const kn={parent:window.document.body,headElements:[],bodyElements:[]};class Printd{#e;constructor(e){this.isLoading=!1,this.hasEvents=!1,this.opts=Object.assign({},kn,e),this.#e=function createIFrame(e){const s=window.document.createElement("iframe");return s.setAttribute("src","about:blank"),s.setAttribute("style","visibility:hidden;width:0;height:0;position:absolute;z-index:-9999;bottom:0;"),s.setAttribute("width","0"),s.setAttribute("height","0"),s.setAttribute("wmode","opaque"),e.appendChild(s),s}(this.opts.parent)}getIFrame(){return this.#e}resetIframe(){this.#e.src="about:blank"}print(e,s,a,c){if(this.isLoading)return;const{contentDocument:l,contentWindow:d}=this.#e;if(l&&d&&(this.resetIframe(),this.elCopy=e.cloneNode(!0),this.elCopy))try{this.#e.srcdoc='<!DOCTYPE html><html><head><meta charset="utf-8"></head><body></body></html>',this.addEvents(),this.isLoading=!0,this.callback=c,this.styles=s,this.scripts=a}catch(e){console.error("An error occurred while setting up the print job:",e)}}setupContent(e){const{headElements:s,bodyElements:a}=this.opts;Array.isArray(s)&&s.forEach(s=>e.head.appendChild(s)),Array.isArray(a)&&a.forEach(s=>e.body.appendChild(s)),Array.isArray(this.styles)&&this.styles.forEach(s=>{s&&e.head.appendChild(isValidURL(s)?function createLinkStyle(e,s){const a=e.createElement("link");return a.type="text/css",a.rel="stylesheet",a.href=s,a}(e,s):function createStyle(e,s){const a=e.createElement("style");return a.appendChild(e.createTextNode(s)),a}(e,s))}),e.body.appendChild(this.elCopy),Array.isArray(this.scripts)&&this.scripts.forEach(s=>{if(s){const a=e.createElement("script");isValidURL(s)?a.src=s:a.innerText=s,e.body.appendChild(a)}})}printURL(e,s){this.isLoading||(this.addEvents(),this.isLoading=!0,this.callback=s,this.#e.src=e)}onBeforePrint(e){this.onbeforeprint=e}onAfterPrint(e){this.onafterprint=e}launchPrint(e){this.isLoading||e.print()}addEvents(){if(!this.hasEvents){this.hasEvents=!0,this.#e.addEventListener("load",()=>this.onLoad(),!1);const e=this.#e.contentWindow;e&&(this.onbeforeprint&&e.addEventListener("beforeprint",this.onbeforeprint),this.onafterprint&&e.addEventListener("afterprint",this.onafterprint))}}onLoad(){if(this.#e){this.isLoading=!1;const{contentDocument:e,contentWindow:s}=this.#e;if(!e||!s)return;this.setupContent(e),"function"==typeof this.callback?this.callback({iframe:this.#e,element:this.elCopy,launchPrint:()=>this.launchPrint(s)}):this.launchPrint(s)}}}class Utils{static#n=1;static roundNumber(e,s=2){if("number"!=typeof e||"number"!=typeof s)throw new TypeError("Both val and precision must be numbers.");if(isNaN(e)||isNaN(s))return NaN;if(!Number.isFinite(e)||!Number.isFinite(s)||s>20||s<0)throw new RangeError("Ranger error: Precision must be a greater than or equal to 0 and less than or equal to 20. Value must be finite.");const a=Math.pow(10,s),c=e*a,l=Math.round(c+1e-13);return parseFloat((l/a).toFixed(s))}static parseNumStr(e,s=Locales.moneyConventions.precision,a=Locales.moneyConventions.dPnt){let c=e.replace(new RegExp(`[^\\d\\-${a}]`,"g"),"");if("."!==a&&(c=c.replace(new RegExp(`\\${a}`,"g"),".")),""===c)return null;let l=Number(c);return isNaN(l)?null:null!==s?this.roundNumber(l,s):l}static formatNumericValue(e,s=Locales.numConventions.sep,a=Locales.numConventions.dPnt,c=Locales.numConventions.precision,l=!1){if(!(e="number"==typeof e&&"."!==a?(e=String(e)).replace(".",a):String(e))||"-"===e)return e;const d=e.startsWith("-");e=d?e.substring(1):e;let[u,p=""]=e.split(a);u=u.replace(/\D/g,""),p=p.replace(/\D/g,""),u=u.replace(/^0+(?=\d)/,"")||"0";let h=l?u.replace(/(\d+?)(?=(\d\d)+(\d)(?!\d))/g,`$1${s}`):u.replace(/\B(?=(\d{3})+(?!\d))/g,s);p=p.padEnd(c,"0").substring(0,c);let m=h+(p?a+p:"");return d&&(m="-"+m),m}static formatNumericValueWithSym(e,s=Locales.moneyConventions,a=Locales.moneyConventions.precision,c=Locales.moneyConventions.ccy===Globals.INDIAN_RUPEE){return e!==Globals.UNKNOWN_STR&&e!==Globals.SEE_SCHEDULE_STR?s.ccy+this.formatNumericValue(e,s.sep,s.dPnt,a,c)+s.ccy_r:e}static switchNumConventions(e,s,a){if("string"!=typeof e)return null;let c=Locales.CCY_CONVENTIONS[s],l=Locales.CCY_CONVENTIONS[a],d=this.parseNumStr(e,c.precision,c.dPnt);return e=this.formatNumericValueWithSym(d,l,l.precision,l.ccy===Globals.INDIAN_RUPEE)}static printCalculator(e){(new Printd).print(document.getElementById(e),['body {  background-color: transparent;}.accuratecalculators.ac-calculator {  font-family: Arial, sans-serif;  border: none;  padding: 15pt;  border-radius: 6pt;  max-width: 350pt;  width: 100%;  margin: 0 auto;  display: grid;  grid-template-columns: repeat(5, 1fr);  gap: 7.5pt;  color: #000;  background-color: transparent;  align-items: center;}.ac-calculator .calc-name {  text-align: center;  font-size: 16pt;  margin-bottom: 15pt;  grid-column: span 5;}.ac-calculator .cr a,.ac-calculator .calc-name a {  color: #000;  text-decoration: none;}.ac-calculator .label {  grid-column: span 3;  display: block;}.ac-calculator .calc-control {  grid-column: span 2;  width: 100%;  padding: 6pt;  border: none;  font-family: "Courier New", Courier, monospace;  background-color: transparent;  color: #000;  font-weight: bold;}.ac-calculator .label,.ac-calculator .calc-control {  margin-bottom: 5pt;  font-size: 12pt;}.ac-calculator .calc-control.num {  text-align: right;}.ac-calculator select.calc-control {  -webkit-appearance: none;  -moz-appearance: none;  appearance: none;  text-align: right;  padding-right: 0;  box-sizing: content-box;  min-width: 0;  max-width: 100%;  justify-self: stretch;}.ac-calculator .btn-group {  display: none;}.ac-calculator .calc-footer {  text-align: center;  margin-top: 20px;  font-size: 0.9em;  grid-column: span 5;}.ac-calculator .calc-footer .cr {  display: block;  margin-bottom: 5px;}.ac-calculator .calc-footer a {  text-decoration: none;}.ac-calculator .localization {  display: none;}.ac-calculator .msg,.ac-calculator .btn {  display: none;}.ac-calculator .bar {  grid-column: span 5;}'])}static addEventListenerToElement(e,s,a,c=null){const l=document.getElementById(s);if(!l)throw new Error(`Element with ID '${s}' not found.`);{const s=c?a.bind(c):a;l.addEventListener(e,s)}}static initTooltips(){let e=[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));const s=new Set(["btnCalc-al","btnClear-al","btnPrint-al","btnHelp-al","btnSchedule-al","btnCharts-al","btnCalc-ln","btnClear-ln","btnPrint-ln","btnHelp-ln","btnSchedule-ln","btnCharts-ln","btnCalc-mtg","btnClear-mtg","btnPrint-mtg","btnHelp-mtg","btnSchedule-mtg","btnCharts-mtg","btnCalc-ra","btnClear-ra","btnPrint-ra","btnHelp-ra","btnSchedule-ra","btnCharts-ra","btnCalc-ne","btnClear-ne","btnPrint-ne","btnHelp-ne","btnSchedule-ne","btnCharts-ne","btnCalc-rs","btnClear-rs","btnPrint-rs","btnHelp-rs","btnSchedule-rs","btnCharts-rs","btnCalc-sv","btnClear-sv","btnPrint-sv","btnHelp-sv","btnSchedule-sv","btnCharts-sv"]);e.forEach(function(e){const a=new wn(e,{trigger:"hover"});e.id&&s.has(e.id)&&e.addEventListener("click",function(){a.hide()})})}static updateSelectedAttribute(e){let s=document.getElementById(e.target.id);requestAnimationFrame(()=>{setTimeout(()=>{for(let e=0;e<s.length;e+=1)s[e].removeAttribute("selected");s[s.selectedIndex].setAttribute("selected","selected")},0)})}static showMessageModal(e){const s=Modals.modals.MSG;if(s){document.getElementById("msg-content").innerHTML=e,s.show()}}static updateZoom(e){this.#n=null==e?1:this.#n+e>.5&&this.#n+e<1.5?this.#n+e:this.#n;document.querySelectorAll(".ac-calc-wrap").forEach(e=>{e.style.transform=`scale(${this.#n})`,e.style.webkitTransform=`scale(${this.#n})`,e.style.mozTransform=`scale(${this.#n})`,e.style.msTransform=`scale(${this.#n})`,e.style.oTransform=`scale(${this.#n})`})}static setupZoomButtons(e,s,a){const c=document.getElementById(e),l=document.getElementById(s),d=document.getElementById(a);c&&c.addEventListener("click",this.updateZoom.bind(this,-.1)),l&&l.addEventListener("click",this.updateZoom.bind(this,.1)),d&&d.addEventListener("click",this.updateZoom.bind(this,void 0))}}
/**
 * @preserve Copyright 2024 Pine Grove Software, LLC
 * AccurateCalculators.com
 * pine-grove.com
 * eq.LOAN.gpl.js
 */const Yn=12;class LoanCalculation{static loan_params={nominalRate:null,n:null,cf:null,pv:null,fv:null,pmtMthd:null,amortMthd:null,pmtFreq:null,cmpFreq:null,oDate:null,fDate:null,lDate:null};static summary={cf:[],firstDebitDateStr:"",firstCreditDateStr:"",lastDebitDateStr:[],lastCreditDateStr:[],totalNDebits:[],totalNCredits:[],totalInterest:[],totalPmts:[],nominalRate:[],NYears:0,pointsPct:0,pointsMoney:0,amortMthd:0,DIY:0,unadjustedBalance:0,cashFlowType:0,xPmtTotal:0};static sourceScheduleData=[];static initDates(e){e.oDate=DateMath.getFirstNextMonth(new Date),e.pmtMthd===Globals.PMT_METHOD.ARREARS?e.fDate=DateMath.getFirstNextMonth(e.oDate):e.fDate=new Date(e.oDate)}static calcPeriodicRate(e){return e.nominalRate/Globals.PPY[e.pmtFreq]}static calcInterest(e,s,a){var c;return c=s,0!==e&&(c*=Math.pow(1+e,a)),c-s}static insertSubTotals(e){var s,a=0,c=0,l=0,d=0,u=0,p=0,h=0,m=0,_=0,g=0,y=0,b=0,v=0,E=0,w=[];s=0;do{s+=1,a=Utils.roundNumber(e[s-1][5]+a),c=Utils.roundNumber(e[s-1][6]+c),l=Utils.roundNumber(e[s-1][7]+l),d=Utils.roundNumber(e[s-1][8]+d),u=Utils.roundNumber(e[s-1][9]+u),p=Utils.roundNumber(e[s-1][10]+p),m=Utils.roundNumber(e[s-1][5]+m),_=Utils.roundNumber(e[s-1][6]+_),g=Utils.roundNumber(e[s-1][7]+g),y=Utils.roundNumber(e[s-1][8]+y),b=Utils.roundNumber(e[s-1][9]+b),v=Utils.roundNumber(e[s-1][10]+v),"XPMT"===e[s-1][3].toUpperCase()&&(h=Utils.roundNumber(e[s-1][9]+h),E=Utils.roundNumber(e[s-1][9]+E)),(e[s-1][13]!==e[s][13]&&(e[s-1][12]<=Yn||e[s][12]>Yn)||e[s-1][13]===e[s][13]&&e[s-1][12]<=Yn&&Yn<e[s][12])&&((w=[])[0]=e[s-1][0],w[0]=w[0].substr(0,w[0].length-3)+"-99",w[1]=0,w[2]=Globals.ROW_TYPES.ANNUAL_TOTALS,w[3]=e[s-1][13]+" "+LoanCalculatorStrings.strs.s101+":",w[4]=null,w[5]=a,w[6]=c,w[7]=l,w[8]=d,w[10]=p,w[9]=u,w[11]=null,w[12]=Yn,w[13]=e[s-1][13],a=0,c=0,l=0,d=0,u=0,p=0,h=0,e.splice(s,0,w),(w=[])[0]=e[(s+=1)-1][0],w[0]=w[0].substr(0,w[0].length-3)+"-99",w[1]=0,w[2]=Globals.ROW_TYPES.RUNNING_TOTALS,w[3]=LoanCalculatorStrings.strs.s102+":",w[4]=null,w[5]=m,w[6]=_,w[7]=g,w[8]=y,w[10]=v,w[9]=b,w[11]=null,w[12]=Yn,w[13]=e[s-1][13],e.splice(s,0,w),s+=1)}while(s<e.length-1);return e[e.length-1][2]!==Globals.ROW_TYPES.RUNNING_TOTALS&&(a=Utils.roundNumber(e[e.length-1][5]+a),c=Utils.roundNumber(e[e.length-1][6]+c),l=Utils.roundNumber(e[e.length-1][7]+l),d=Utils.roundNumber(e[e.length-1][8]+d),u=Utils.roundNumber(e[e.length-1][9]+u),p=Utils.roundNumber(e[e.length-1][10]+p),m=Utils.roundNumber(e[e.length-1][5]+m),_=Utils.roundNumber(e[e.length-1][6]+_),g=Utils.roundNumber(e[e.length-1][7]+g),y=Utils.roundNumber(e[e.length-1][8]+y),b=Utils.roundNumber(e[e.length-1][9]+b),v=Utils.roundNumber(e[e.length-1][10]+v),"XPMT"===e[e.length-1][3].toUpperCase()&&(h=Utils.roundNumber(e[e.length-1][9]+h),E=Utils.roundNumber(e[e.length-1][9]+E)),(w=[])[0]=e[s][0],w[0]=w[0].substr(0,w[0].length-3)+"-99",w[1]=0,w[2]=Globals.ROW_TYPES.ANNUAL_TOTALS,w[3]=e[e.length-1][13]+" "+LoanCalculatorStrings.strs.s101+":",w[4]=null,w[5]=a,w[6]=c,w[7]=l,w[8]=d,w[9]=u,w[10]=p,w[11]=null,w[12]=Yn,w[13]=e[e.length-1][13],e.push(w),(w=[])[0]=e[s][0],w[0]=w[0].substr(0,w[0].length-3)+"-99",w[1]=0,w[2]=Globals.ROW_TYPES.RUNNING_TOTALS,w[3]=LoanCalculatorStrings.strs.s102+":",w[4]=null,w[5]=m,w[6]=_,w[7]=g,w[8]=y,w[9]=b,w[10]=v,w[11]=null,w[12]=Yn,w[13]=e[e.length-1][13],e.push(w)),this.summary.totalInterest[0]=y,this.summary.totalPmts[0]=m,null}static initLoanScheduleData(e,s){let a,c,l,d,u,p,h,m,_,g=1,y=0,b=0,v=[],E=new Date(0),w=new Date(0),N=[];this.initDates(e),this.summary.nominalRate[0]=e.nominalRate,this.summary.pmtFreq=e.pmtFreq,this.summary.cmpFreq=e.cmpFreq,this.summary.amortMthd=e.amortMthd,_=DateMath.countMonths(e.oDate,e.fDate),l=0,c=e.pv,d=c,u=null,E.setTime(e.oDate.getTime()),p=DateMath.dateToDateStr(E,Globals.dateConventions),this.summary.firstDebitDateStr=p,h=DateMath.dateToDateStr(E,Globals.sortConventions),a=0,m=a+":"+g,N.push([h,0,Globals.ROW_TYPES.DETAIL,m,p,l,d,u,y,b,null,c,E.getMonth()+1,E.getFullYear(),E,E.valueOf()]),a=1,m=a+":"+g,l=-e.cf,w.setTime(e.fDate.getTime()),p=DateMath.dateToDateStr(w,Globals.dateConventions),this.summary.firstCreditDateStr=p,h=DateMath.dateToDateStr(w,Globals.sortConventions),u=e.cf,d=null,y=Utils.roundNumber(this.calcInterest(s,c,_)),b=Utils.roundNumber(l-y),c=Utils.roundNumber(c+y+e.cf),N.push([h,0,Globals.ROW_TYPES.DETAIL,m,p,l,d,u,y,b,null,c,w.getMonth()+1,w.getFullYear(),w,w.valueOf()]),a=2,_=1;do{if(E.setTime(w.getTime()),w.setTime(DateMath.incPeriods(w,1)),p=DateMath.dateToDateStr(w,Globals.dateConventions),h=DateMath.dateToDateStr(w,Globals.sortConventions),a%Globals.PPY[e.pmtFreq]===1&&(g+=1),m=a+":"+g,y=Utils.roundNumber(this.calcInterest(s,c,_)),y=Utils.roundNumber(y),b=Utils.roundNumber(l-y),c=Utils.roundNumber(c+y+e.cf),N.push([h,0,Globals.ROW_TYPES.DETAIL,m,p,l,d,u,y,b,null,c,w.getMonth()+1,w.getFullYear(),w,w.valueOf()]),Math.abs(c)>99999999999995.5)return Utils.showMessageModal("<p>"+LoanCalculatorStrings.strs.s100+"</p>"),N=[],N;a+=1}while(a<=e.n&&c>0);return v=N[N.length-1],this.summary.unadjustedBalance=v[11],this.summary.cf[0]=v[5],v[5]=v[5]+this.summary.unadjustedBalance,v[11]=v[11]-this.summary.unadjustedBalance,v[9]=v[9]+this.summary.unadjustedBalance,this.summary.totalNDebits[0]=a-1,this.summary.totalNCredits[0]=1,this.summary.lastDebitDateStr[0]=N[0][4],this.summary.lastCreditDateStr[0]=v[4],N.length>0&&this.insertSubTotals(N),N}static calc(e){var s,a,c;return s=this.calcPeriodicRate(e),e.pmtMthd===Globals.PMT_METHOD.ARREARS?c=-(c=s*e.pv)/(1-Math.pow(1+s,-e.n)):(a=1+s,c=(1-Math.pow(a,1-e.n))/s,c=-e.pv/(c+1)),e.cf=Utils.roundNumber(c),this.sourceScheduleData=this.initLoanScheduleData(e,s),c}}class NE{conventions;constructor(e,s,a,c=!1){let l;this.isValid=!1,this.element=document.getElementById(e),null!==this.element&&(this.id=e,l=s&&null!==s?s:Locales.moneyConventions,this.ccy_format=l.ccy_format,this.precision=void 0!==a?a:l.precision,this.sep=l.sep,this.dPnt=l.dPnt,this.ccy=l.ccy,this.ccy_r=l.ccy_r,this.PCT="%",this.handlers||(this.handlers={}),this.isTableEditor=c,this.isValid=!0,this.isNumEditor=!1,this.isRateEditor=!1,this.init())}initRateEditor(e=4){this.ccy="",this.ccy_r=this.PCT,this.precision=e,this.isRateEditor=!0}initNumEditor(e=2){this.ccy="",this.ccy_r="",this.precision=e,this.isNumEditor=!0}addEvent(e,s,a){const handler=e=>s.call(a,e);this.element.addEventListener(e,handler,!1),this.handlers||(this.handlers={}),this.handlers[e]=handler}init(){this.addEvent("focus",this.onCustomFocus,this),this.addEvent("blur",this.onCustomBlur,this),this.addEvent("keydown",this.onCustomKeyDown,this),this.addEvent("input",this.onCustomInput,this),this.addEvent("mouseup",this.onCustomMouseUp,this)}removeEvent(e){this.handlers&&this.handlers[e]&&(this.element.removeEventListener(e,this.handlers[e],!1),delete this.handlers[e])}destroy(){["focus","mouseup","keydown","input","blur"].forEach(e=>{this.removeEvent(e)}),this.element=null,delete this.handlers}parseNumStr(){return Utils.parseNumStr(this.element.value,this.precision,this.dPnt)}getNumber(){return this.parseNumStr(this.element.value,this.precision,this.dPnt)}resetConventions(e){let s,a=this.getNumber();if(e){if(this.ccy_format===e||void 0===Locales.CCY_CONVENTIONS[e])return;this.ccy_format=e}else this.ccy_format=Locales.moneyConventions.ccy_format;return s=Locales.CCY_CONVENTIONS[this.ccy_format],this.isRateEditor?(s.ccy="",s.ccy_r="%"):this.isNumEditor?(s.ccy="",s.ccy_r=""):this.precision=s.precision,this.sep=s.sep,this.dPnt=s.dPnt,this.element.value=Utils.formatNumericValueWithSym(a,s,this.precision,this.ccy===Globals.INDIAN_RUPEE),this.element.value}formatNumericValueOnInput(e,s,a,c){if("-"===e||""===e)return e;const l=e.startsWith("-");e=l?e.substring(1):e;let[d,u]=e.split(a);d=d.replace(/\D/g,""),d.length>1&&(d=d.replace(/^0+/,"")),""===d&&(d="0");let p=d;return(e.includes(a)||u)&&(p+=a,u&&(u=u.substring(0,c),p+=u)),p=l?"-"+p:p,p}onCustomInputHelper(e){return""===e?"":this.formatNumericValueOnInput(e,this.sep,this.dPnt,this.precision,this.ccy===Globals.INDIAN_RUPEE)}onCustomInput(e){e.target.value=this.onCustomInputHelper(e.target.value)}onCustomKeyDown(e){const s=this.dPnt,a=["PageUp","PageDown","End","Home","ArrowLeft","ArrowUp","ArrowDown","Enter"];if(0!==this.precision||e.key!==s){if("-"!==e.key)if("Backspace"!==e.key){if("Delete"===e.key)return e.preventDefault(),void requestAnimationFrame(()=>{setTimeout(()=>{Utils.showMessageModal("<p>"+Globals.ERR_MSGS.noDelKey+"</p>")},0)});if(e.key===this.sep)return e.preventDefault(),void requestAnimationFrame(()=>{setTimeout(()=>{Utils.showMessageModal("<p>"+Globals.ERR_MSGS.noSeparators+"</p>")},0)});if(!(["Backspace","ArrowRight","Tab"].includes(e.key)||e.key===s||this.isTableEditor&&a.includes(e.key)))return a.includes(e.key)&&!this.isTableEditor?(e.preventDefault(),void requestAnimationFrame(()=>{setTimeout(()=>{Utils.showMessageModal("<p>"+Globals.ERR_MSGS.noCurKeys+"</p>")},0)})):void(!isNaN(parseFloat(e.key))&&isFinite(e.key)||e.preventDefault())}else this.element.value=""}else e.preventDefault()}onCustomFocus(){requestAnimationFrame(()=>{setTimeout(()=>{this.element.setAttribute("data-original-value",this.element.value)},0)})}onCustomBlurHelper(e){return 0===e.length&&(e=this.precision>0?"0"+this.dPnt+"0".repeat(this.precision):"0"),e=Utils.formatNumericValue(e,this.sep,this.dPnt,this.precision,this.ccy===Globals.INDIAN_RUPEE),(this.ccy+e+this.ccy_r).trim()}onCustomBlur(){const e=this.element.getAttribute("data-original-value");return this.element.value!==e&&(this.element.value=this.onCustomBlurHelper(this.element.value)),!0}onCustomMouseUp(e){this.element.selectionStart=0,this.element.selectionEnd=this.element.value.length,e.preventDefault()}setValue(e){return e=Utils.formatNumericValue(e,this.sep,this.dPnt,this.precision,this.ccy===Globals.INDIAN_RUPEE),this.element.value=(this.ccy+e+this.ccy_r).trim(),this.element.value}}
/**
 * @preserve Copyright 2024 Pine Grove Software, LLC
 * AccurateCalculators.com
 * pine-grove.com
 * stringBuffer.gpl.js
 */class StringBuffer{constructor(){this.buffer=[]}append(e){return this.buffer.push(e),this}toString(){return this.buffer.join("")}}
/**
 * @preserve Copyright 2016-2025 Pine Grove Software, LLC
 * AccurateCalculators.com
 * pine-grove.com
 * sch.LOAN.gpl.js
 */class HtmlLoanSchedule{static formatLoanSchedule(e,s){let a,c,l,d,u,p,h,m,_,g,y,b,v,E,w,N,S,A,L,D,Z;if(D=Globals.COPYRIGHT_HOLDER_DOMAIN,this.strOpenTag="<!DOCTYPE html>",this.strHTMLHead='<html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1">',this.strHTMLTitle="<title>"+LoanCalculatorStrings.strs.s2012+"</title>",this.strStyleScreen='<style type="text/css" media="screen">',this.strStyleScreen+='html,body{margin:0;padding:0;color:#333;height:100%;width:100%;min-width:320px;font-family:monospace; font-size:8px; font-weight:400; overflow: hidden; -webkit-user-select: none; user-select: none; } body{overflow-y: scroll} tr {line-height: 1.2} @media (min-width: 569px) {html,body{font-size:12px}} @media (min-width: 768px) {html,body{font-size:14px}} .label {font-family: "Roboto", sans-serif;} .medium {font-weight: 600; font-style: italic} .bold {font-weight: 700} .center {text-align: center} .left {text-align: left} .right {text-align: right} .wrapper {padding:0; width:100%} table {width: 90%; margin: 0 auto 20px auto; border-collapse:collapse;} #rpt tbody tr.totals, #rpt tbody tr:nth-child(even).totals {background-color: transparent;} #rpt tbody tr:nth-child(even) {background: #FCFFFF;} #rpt tbody tr:hover, #rpt tbody tr:hover.totals {background: #303E64; color: #fff; font-weight:400} #rpt tbody::after {content: ""; display: block; height: 29px;} .cHead {background: #303E64; color: #fff} td {padding: 5px 5px;} .spcr {width: 2%} .hCell {width: 24%} .rpt_title {width: 100%; font-size: 120%} .rpt_footer {width: 100%; font-style: italic; font-size: 90%;}  .btn {display: inline-block; margin-bottom: 0; font-weight: normal; vertical-align: middle; touch-action: manipulation; cursor: pointer; background-image: none; border: 1px solid transparent; white-space: nowrap; padding: 6px 12px; font-size: 100%; line-height: 1.42857143; border-radius: 4px; } .btn-primary {color: #fff; background-color: #303e64; border-color: #283353;} .btn-primary:focus, .btn-primary.focus {color: #ffffff; background-color: #1f2942; border-color: #000000; } .btn-primary:hover {color: #ffffff; background-color: #1f2942; border-color: #141a29; } .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary { color: #ffffff; background-color: #1f2942; border-color: #141a29;} .btn-row {padding: 15px 0 5px; width:100%; margin-bottom:20px} td.brder {border-top: 1px solid #303E64} #btnPrint {margin-right:15px} #btnCopy {margin-left:15px} tr.empty {background-color: transparent !important; color:#333 !important;} .i {font-style: italic} .altColor{color:#00c} .rpt6col {width: 19%;} .rpt6colvnarrow {width: 7%;} .rpt6colnarrow {width: 15%;} .rpt6colwide {width: 21%;} .rpt7col {width: 16%;} .rpt7colvnarrow {width: 7%;} .rpt7colnarrow {width: 9%;} .rpt7colwide {width: 20%;} .rpt9col {width: 11%;} .rpt9colvnarrow {width: 6%;} .rpt9colnarrow {width: 11%;} .rpt9colwide {width: 13%;}  #rpt_page {width:82%; margin: 2rem auto; clear:both} #rpt_page .title {width: 100%; font-size: 120%; margin-top:2rem; margin-bottom:6rem; text-align:center} #rpt_page .row {margin-bottom:1rem} #rpt_page .left_col {width: 40%; float:left; text-align:left} #rpt_page .right_col {width: 60%; float:right; text-align:right} #rpt_page .top_group {margin-bottom:40rem;} .page_end {position:relative; margin-top:10in} .pg-brk {clear: both; page-break-after: always} .footer-msg {width: 90%; margin: 0 auto 20px auto} .fr {float:right} ',this.strStyleScreen+="</style>",this.strBodyOpen='<body><div class="wrapper">',this.strCloseTags="</div></body></html>",l=new StringBuffer,d=new StringBuffer,a=e.length-1,e.length>0){A=e[0],b=A[4],_=Utils.formatNumericValueWithSym(A[11],Locales.moneyConventions),u=Utils.formatNumericValueWithSym(100*s.nominalRate[0],Locales.rateConventions,Locales.rateConventions.precision),c=1;do{A=e[c],v=A[4],c+=1}while(null===v&&c<e.length);for(p=Utils.formatNumericValueWithSym(A[5],Locales.moneyConventions),y=LoanCalculatorStrings.strs.s416b,A=e[e.length-1],N=Utils.formatNumericValueWithSym(A[8],Locales.moneyConventions),S=Utils.formatNumericValueWithSym(A[5],Locales.moneyConventions),E=s.lastCreditDateStr[0],g=Utils.formatNumericValueWithSym(s.totalNDebits[0],Locales.numConventions,0),Z=Utils.formatNumericValueWithSym(s.unadjustedBalance,Locales.moneyConventions),L=s.unadjustedBalance<0?LoanCalculatorStrings.strs.s202+" "+Z+" "+LoanCalculatorStrings.strs.s203:s.unadjustedBalance>0?LoanCalculatorStrings.strs.s204+" "+Z+" "+LoanCalculatorStrings.strs.s203:"",d.append("<table>"),d.append("<thead>"),d.append('<tr class="label rpt_title center bold i"><td colspan="6">'+LoanCalculatorStrings.strs.s2052+"</td></tr>"),d.append('<tr class="empty"><td colspan="6"></td></tr>'),d.append("</thead>"),d.append("<tbody>"),d.append('<tr><td class="label hCell">'+LoanCalculatorStrings.strs.s208+':</td><td class="right">'+_+'</td><td class="spcr">&nbsp;</td><td class="spcr">&nbsp;</td><td class="label hCell">'+LoanCalculatorStrings.strs.s209+':</td><td class="right">'+g+"</td></tr>"),d.append('<tr><td class="label hCell">'+LoanCalculatorStrings.strs.s210+':</td><td class="right">'+u+'</td><td class="spcr">&nbsp;</td><td class="spcr">&nbsp;</td><td class="label hCell">'+LoanCalculatorStrings.strs.s211+':</td><td class="right">'+p+"</td></tr>"),d.append('<tr><td class="label hCell">'+LoanCalculatorStrings.strs.s212+':</td><td class="right">'+b+'</td><td class="spcr">&nbsp;</td><td class="spcr">&nbsp;</td><td class="label hCell">'+LoanCalculatorStrings.strs.s213+':</td><td class="right">'+v+"</td></tr>"),d.append('<tr><td class="label hCell">'+LoanCalculatorStrings.strs.s214+':</td><td class="right">'+y+'</td><td class="spcr">&nbsp;</td><td class="spcr">&nbsp;</td><td class="label hCell">'+LoanCalculatorStrings.strs.s215+':</td><td class="right">'+E+"</td></tr>"),d.append('<tr><td class="label hCell">'+LoanCalculatorStrings.strs.s216+':</td><td class="right">'+N+'</td><td class="spcr">&nbsp;</td><td class="spcr">&nbsp;</td><td class="label hCell">'+LoanCalculatorStrings.strs.s217+':</td><td class="right">'+S+"</td></tr>"),d.append("</tbody>"),d.append("</table>"),d.append('<table id="rpt">'),d.append("<thead>"),d.append('<tr class="label rpt_title center bold i"><td colspan="6">'+LoanCalculatorStrings.strs.s218+"</td></tr>"),d.append('<tr class="empty"><td colspan="6"></td></tr>'),d.append('<tr class="label cHead"><td class="rpt6colvnarrow">#/'+LoanCalculatorStrings.strs.s219+'</td><td class="rpt6colnarrow center">'+LoanCalculatorStrings.strs.s220+'</td><td class="rpt6col right">'+LoanCalculatorStrings.strs.s221+'</td><td class="rpt6col right">'+LoanCalculatorStrings.strs.s222+'</td><td class="rpt6col right">'+LoanCalculatorStrings.strs.s223+'</td><td class="rpt6colwide right">'+LoanCalculatorStrings.strs.s224+"</td></tr>"),d.append("</thead>"),d.append("<tbody>"),c=0;c<=a;c+=1)A=e[c],w=c>0?A[3]:LoanCalculatorStrings.strs.s232+":",b=A[4],p=Utils.formatNumericValueWithSym(A[5],Locales.numConventions),h=Utils.formatNumericValueWithSym(A[8],Locales.numConventions),m=Utils.formatNumericValueWithSym(A[9],Locales.numConventions),_=Utils.formatNumericValueWithSym(A[11],Locales.numConventions),A[2]===Globals.ROW_TYPES.DETAIL?d.append("<tr><td>"+w+'</td><td class="center">'+b+'</td><td class="right">'+p+'</td><td class="right">'+h+'</td><td class="right">'+m+'</td><td class="right">'+_+"</td></tr>"):A[2]===Globals.ROW_TYPES.ANNUAL_TOTALS?d.append('<tr class="totals medium"><td class="right" colspan="2">'+w+'</td><td class="right brder">'+p+'</td><td class="right brder">'+h+'</td><td class="right brder">'+m+"</td><td></td></tr>"):(d.append('<tr class="totals medium"><td class="right" colspan="2">'+w+'</td><td class="right">'+p+'</td><td class="right">'+h+'</td><td class="right">'+m+"</td><td></td></tr>"),d.append('<tr class="empty"><td colspan="6"></td></tr>'));d.append("</tbody>"),d.append("</table>"),d.append('<div class="footer-msg"><span>'+L+'</span><span class="fr">'+D+"</span></div>")}return l.append(this.strOpenTag),l.append(this.strHTMLHead),l.append(this.strHTMLTitle),l.append(this.strStyleScreen),l.append(this.strBodyOpen),l.append(d.toString()),l.append(this.strCloseTags),l.toString()}}
/**
 * @preserve Copyright 2024 Pine Grove Software, LLC
 * AccurateCalculators.com
 * pine-grove.com
 * ch.LOAN.gpl.js
 */const Un=1e3,Hn="rgba(40, 167, 69, 1)",Bn="rgba(102, 201, 122, 1)";class LoanCharts{static annual_int=[];static annual_prin=[];static annual_pmt=[];static running_int=[];static running_prin=[];static running_pmt=[];static bal=[];static interest=0;static prin=0;static payments=0;static category=[];static kStr=""===Locales.moneyConventions.ccy_r?"k":" k";static async importChartJSLibrary(){if(this.chartModule)return!0;try{return this.chartModule=await import("./chart.esm-BtPCRWEo.js"),this.Chart=this.chartModule.default,!0}catch(e){return console.error("Failed to import Chart.js:",e),!1}}static clear(){this.L=0,this.annual_int=[],this.annual_prin=[],this.annual_pmt=[],this.running_int=[],this.running_prin=[],this.running_pmt=[],this.bal=[],this.category=[]}static initAnnualTotalChart(){let e={labels:this.category,datasets:[{type:"line",label:LoanCalculatorStrings.strs.s221,borderWidth:1,borderColor:"rgba(51,51,51,0.5)",pointBackgroundColor:"rgba(0,0,0,0.75)",data:this.annual_pmt},{type:"bar",label:LoanCalculatorStrings.strs.s223,backgroundColor:Hn,data:this.annual_prin},{type:"bar",label:LoanCalculatorStrings.strs.s222,backgroundColor:Bn,data:this.annual_int}]};var s=document.getElementById("canvas1").getContext("2d");this.annualTotals=new this.Chart(s,{data:e,options:{plugins:{title:{display:!0,text:this.chart0Title}},tooltips:{mode:"label",callbacks:{label:function(e){return Utils.formatNumericValueWithSym(e.yLabel,Locales.moneyConventions,0)}}},responsive:!0,scales:{x:{stacked:!0},y:{stacked:!0,beginAtZero:!0,ticks:{callback:function(e){return Utils.formatNumericValueWithSym(e/Un,Locales.moneyConventions,0)+LoanCharts.kStr}}}}}})}static initAccumulatedTotalChart(){let e={labels:this.category,datasets:[{type:"line",label:LoanCalculatorStrings.strs.s221,yAxisID:"y-axis-0",borderWidth:1,borderColor:"rgba(51,51,51,0.5)",pointBackgroundColor:"rgba(0,0,0,0.75)",data:this.running_pmt},{type:"line",yAxisID:"y-axis-1",label:LoanCalculatorStrings.strs.s224,borderWidth:1,borderColor:"rgba(151,187,205,0.5)",pointBackgroundColor:"rgba(0,0,0,0.75)",data:this.bal},{yAxisID:"y-axis-0",label:LoanCalculatorStrings.strs.s223,backgroundColor:Hn,data:this.running_prin},{yAxisID:"y-axis-0",label:LoanCalculatorStrings.strs.s222,backgroundColor:Bn,data:this.running_int}]};var s=document.getElementById("canvas2").getContext("2d");this.runningTotals=new this.Chart(s,{type:"bar",data:e,options:{plugins:{title:{display:!0,text:this.chart1Title}},tooltips:{mode:"label",callbacks:{label:function(e){return Utils.formatNumericValueWithSym(e.yLabel,Locales.moneyConventions,0)}}},responsive:!0,scales:{x:{stacked:!0},"y-axis-0":{stacked:!0,beginAtZero:!0,position:"left",ticks:{beginAtZero:!0,suggestedMax:this.running_pmt[this.running_pmt.length-1],callback:function(e){return Utils.formatNumericValueWithSym(e/Un,Locales.moneyConventions,0)+LoanCharts.kStr}}},"y-axis-1":{position:"right",ticks:{callback:function(e){return Utils.formatNumericValueWithSym(e/Un,Locales.moneyConventions,0)+LoanCharts.kStr}}}}}})}static initPIPieChart(){let e=[this.prin,this.interest],s=[LoanCalculatorStrings.strs.s226,LoanCalculatorStrings.strs.s227],a=0;var c={type:"pie",data:{datasets:[{data:e,backgroundColor:[Hn,Bn]}],labels:s},options:{responsive:!0,plugins:{title:{display:!0,text:this.chart2Title},tooltip:{callbacks:{label:function(e){let s=e.dataset.label||"",c="";if(null!==e.parsed.y&&(s+=" "+Utils.formatNumericValueWithSym(e.parsed,Locales.moneyConventions,0),LoanCharts.payments>0)){let s=e.parsed/LoanCharts.payments*100,l=Math.round(10*s)/10;if(a+=l,e.datasetIndex===e.chart.data.datasets[0].data.length-1){l+=100-a}c=" "+Utils.formatNumericValueWithSym(l,Locales.rateConventions,1)}return[s,c]}}}}}},l=document.getElementById("canvas3").getContext("2d");this.totalsPie=new this.Chart(l,c)}static createLoanCharts(e){var s,a,c,l,d;if(c=0,s=e.length-1,e.length>0){for(this.years=e[s][13]-e[0][13]+1,a=0;a<=s;a+=1)(l=e[a])[2]===Globals.ROW_TYPES.ANNUAL_TOTALS?(this.annual_pmt.push(Math.round(l[5])),this.annual_int.push(Math.round(l[8])),this.annual_prin.push(Math.round(l[9])),this.years<=11||c%3==0||0===c?this.category.push(l[13]):this.category.push(""),c+=1):l[2]===Globals.ROW_TYPES.RUNNING_TOTALS?(this.running_pmt.push(Math.round(l[5])),this.running_int.push(Math.round(l[8])),this.running_prin.push(Math.round(l[9])),this.bal.push(d)):d=Math.round(l[11]);l=e[s],this.interest=l[8],this.prin=l[9],this.payments=l[5],l=e[0],this.strDate=l[4],l=e[s-2],this.strDate2=l[4],this.chart0Title=LoanCalculatorStrings.strs.s229,this.chart1Title=LoanCalculatorStrings.strs.s230,this.chart2Title=LoanCalculatorStrings.strs.s231}this.initAnnualTotalChart(),this.initAccumulatedTotalChart(),this.initPIPieChart()}static async showCharts(e){await this.importChartJSLibrary()?this.createLoanCharts(e):console.error("Cannot create charts without Chart.js library.")}static destroy(){this.annualTotals.destroy(),this.annualTotals=null,this.runningTotals.destroy(),this.runningTotals=null,this.totalsPie.destroy(),this.totalsPie=null,this.clear()}}class LoanCalculatorHtmlInterface{static pvInput=null;static numPmtsInput=null;static rateInput=null;static schedule=[];static displayScheduleData=[];static current_ccy_format=null;static current_date_format=null;static modalConfigs=[{modalId:"CURRENCYDATE",initModal:{buttonId:"CCY-ln",modalElementId:"CURRENCYDATE",callback:this.showCURRENCYDATEModal,context:this,initCallback:null},eventHandlers:[{elementId:"CURRENCYDATE_save",eventType:"click",callback:this.onCURRENCYDATESaveClick,context:this}]},{modalId:"RPT",initModal:{buttonId:"btnSchedule-ln",modalElementId:"RPT",callback:this.showSchedule.bind(this),context:this}},{modalId:"CHART",initModal:{buttonId:"btnCharts-ln",modalElementId:"CHART",callback:this.showCharts.bind(this),context:this}},{modalId:"HLP",initModal:{buttonId:"btnHelp-ln",modalElementId:"HLP",callback:this.showHLPModal,context:this,initCallback:null}},{modalId:"MSG",initModal:{buttonId:null,modalElementId:"MSG",callback:null},eventHandlers:[{elementId:"MSG_close",eventType:"click",callback:this.onMSGCloseClick}]}];static initializeModalEvents(){const e=document.getElementById("RPT");e&&e.addEventListener("hide.bs.modal",this.onRPTModalClosing.bind(this));const s=document.getElementById("CHART");s&&s.addEventListener("hide.bs.modal",this.onCHARTModalClosing.bind(this));const a=document.getElementById("HLP");a&&a.addEventListener("hide.bs.modal",this.onHLPModalClosing.bind(this));const c=document.getElementById("CURRENCYDATE");c&&(c.addEventListener("show.bs.modal",this.onCURRENCYDATEModalOpening.bind(this)),c.addEventListener("hide.bs.modal",this.onCURRENCYDATEModalClosing.bind(this)),c.addEventListener("hidden.bs.modal",this.onCURRENCYDATEModalClosed.bind(this)))}static onRPTModalClosing(){const e=document.getElementById("RPT");document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e.activeContext===this&&delete e.activeContext}static onCHARTModalClosing(){const e=document.getElementById("CHART");document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e.activeContext===this&&(LoanCharts.destroy(),delete e.activeContext)}static clearResults(){document.getElementById("edPmt-ln").value=Utils.formatNumericValueWithSym(0),document.getElementById("edInterest-ln").value=Utils.formatNumericValueWithSym(0),document.getElementById("edTotalPI-ln").value=Utils.formatNumericValueWithSym(0)}static clearGUI(){this.pvInput.setValue(0),this.numPmtsInput.setValue(0),this.rateInput.setValue(0),document.getElementById("selPmtMthd-ln").value=Globals.PMT_METHOD.ARREARS,this.clearResults()}static print(){Utils.printCalculator("loan-plugin")}static showCURRENCYDATEModal(e){document.getElementById("CURRENCYDATE").activeContext=this,document.getElementById("ccy-select").value=Locales.moneyConventions.ccy_format,document.getElementById("date-select").value=Locales.dateConventions.date_format,e.show()}static showHLPModal(e){let s="";document.getElementById("HLP").activeContext=this,document.getElementById("hlp-title").innerHTML=LoanCalculatorStrings.strs.s4082,s+=LoanCalculatorStrings.strs.s4092,s+=LoanCalculatorStrings.strs.s410b,s+=LoanCalculatorStrings.strs.s411b,s+=LoanCalculatorStrings.strs.s412b,s+="<br>",s+=LoanCalculatorStrings.strs.s413b,document.getElementById("hlp-content").innerHTML=s,e.show()}static onHLPModalClosing(){const e=document.getElementById("HLP");document.activeElement instanceof HTMLElement&&document.activeElement.blur(),e.activeContext===this&&(document.getElementById("hlp-content").innerHTML="",delete e.activeContext)}static onCURRENCYDATESaveClick(){let e=document.getElementById("ccy-select").value,s=document.getElementById("date-select").value,a=this.current_ccy_format!==e,c=this.current_date_format!==s;a&&Locales.resetCcyConventions(e),c&&Locales.resetDateConventions(s),a&&(this.clearGUI(),this.pvInput.resetConventions(e),this.numPmtsInput.resetConventions(e),this.rateInput.resetConventions(e))}static onCURRENCYDATEModalOpening(){this.current_ccy_format=document.getElementById("ccy-select").value,this.current_date_format=document.getElementById("date-select").value}static onCURRENCYDATEModalClosing(){document.activeElement instanceof HTMLElement&&document.activeElement.blur()}static onCURRENCYDATEModalClosed(){const e=document.getElementById("CURRENCYDATE");e.activeContext===this&&delete e.activeContext}static onRPTPrintClick(){Utils.printSchedule("rptFrame")}static onMSGCloseClick(){document.getElementById("msg-content").innerHTML=""}static getInputs(){var e;let s=JSON.parse(JSON.stringify(LoanCalculation.loan_params));return s.pv=this.pvInput.getNumber(),s.n=this.numPmtsInput.getNumber(),s.nominalRate=this.rateInput.getNumber()/100,s.cf=0,s.pmtFreq=Globals.PMT_FREQUENCY.MONTHLY,s.cmpFreq=Globals.CMP_FREQUENCY.MONTHLY,e=document.getElementById("selPmtMthd-ln"),s.pmtMthd=parseInt(e.value,10),s.amortMthd=Globals.AMORT_MTHD.AM_NORMAL,s}static calc(){let e,s;this.clearResults();let a=this.getInputs();return 0===a.pv||0===a.n||0===a.nominalRate?(Utils.showMessageModal("<p>"+LoanCalculatorStrings.strs.s4052+"</p><p>"+LoanCalculatorStrings.strs.s4072+"</p>"),[]):(0===a.cf&&(a.cf=Utils.roundNumber(LoanCalculation.calc(a)),a.cf!==1/0?document.getElementById("edPmt-ln").value=Utils.formatNumericValueWithSym(-a.cf):a.cf=0),this.schedule=LoanCalculation.sourceScheduleData,this.schedule.length>0&&(e=this.schedule[this.schedule.length-1][5],s=this.schedule[this.schedule.length-1][8],0!==a.cf&&(document.getElementById("edInterest-ln").value=Utils.formatNumericValueWithSym(s),document.getElementById("edTotalPI-ln").value=Utils.formatNumericValueWithSym(e))),this.schedule)}static showSchedule(){if(document.getElementById("RPT").activeContext=this,this.displayScheduleData=[],this.schedule=this.calc(),this.schedule.length>0){this.displayScheduleData=HtmlLoanSchedule.formatLoanSchedule(this.schedule,LoanCalculation.summary);const e=Modals.modals.RPT;if(e){document.getElementById("rptFrame").srcdoc=this.displayScheduleData,e.show()}}}static showCharts(){if(this.schedule=this.calc(),this.schedule.length>0){LoanCharts.showCharts(this.schedule);const e=Modals.modals.CHART;if(e){document.getElementById("CHART").activeContext=this,e.show()}}}static initInputs(){this.pvInput.setValue(parseFloat(document.getElementById("edPV-ln").value)||0),this.numPmtsInput.setValue(parseFloat(document.getElementById("edNumPmts-ln").value)||0),this.rateInput.setValue(parseFloat(document.getElementById("edRate-ln").value)||0),document.getElementById("selPmtMthd-ln").value=Globals.PMT_METHOD.ARREARS,this.clearResults()}static initGUI(){this.pvInput=new NE("edPV-ln",Locales.moneyConventions,Locales.moneyConventions.precision),this.numPmtsInput=new NE("edNumPmts-ln",Locales.numConventions,0),this.numPmtsInput.isNumEditor=!0,this.rateInput=new NE("edRate-ln",Locales.rateConventions,Locales.rateConventions.precision),this.rateInput.isRateEditor=!0,Utils.addEventListenerToElement("click","btnCalc-ln",this.calc,this),Utils.addEventListenerToElement("click","btnClear-ln",this.clearGUI,this),Utils.addEventListenerToElement("click","btnPrint-ln",this.print,this),Utils.addEventListenerToElement("change","selPmtMthd-ln",Utils.updateSelectedAttribute,this),Modals.initializeModals(this.modalConfigs),this.initializeModalEvents(),Utils.initTooltips(),this.initInputs(),Utils.setupZoomButtons("shrink-ln","grow-ln","original-ln")}}document.addEventListener("DOMContentLoaded",function(){document.getElementById("loan-plugin")&&(document.querySelectorAll(".modal").forEach(function(e){e.parentElement!==document.body&&document.body.appendChild(e)}),document.addEventListener("shown.bs.modal",function(){const e=document.querySelector(".modal-backdrop:last-of-type");e&&e.classList.add("ac-modal-backdrop")}),LoanCalculatorHtmlInterface.initGUI())});export{LoanCalculatorHtmlInterface};