{"version":3,"file":"bootstrap-modbox.min.js","sources":["bootstrap-modbox.js"],"names":["modbox","version","#options","#modal","#modalEl","#footer","#bootstrapModal","#defaultOptions","icon","style","titleStyle","title","body","message","size","center","fade","show","relatedTarget","undefined","scrollable","destroyOnClose","defaultButton","swapButtonOrder","justifyButtons","showHeaderClose","events","buttons","okButton","label","closeButton","input","type","class","value","placeholder","autocomplete","minlength","maxlength","pattern","required","sanitizer","#sanitizeString","#defaultButtonOptions","outline","disabled","close","callback","#modalDefaults","alert","info","success","warning","danger","confirm","prompt","id","#getUID","prefix","Date","now","Math","floor","random","#typeof","obj","Object","prototype","toString","call","slice","toLowerCase","#deepMerge","target","source","result","keys","forEach","key","tProp","sProp","#checkUserOptions","userOptions","#mergeModalOptions","modalType","str","#buildPromiseModal","options","Promise","resolve","reject","box","btns","includes","okCallback","validateInput","length","inputEl","modalEl","querySelector","reportValidity","hide","unshift","ev","modal","this","defaultPrevented","returnValue","okBtn","map","btnOptions","addButton","addEventListener","click","addEvent","document","activeElement","#buildModal","isDarkStyle","closeButtonStyle","container","insertAdjacentHTML","trim","#addButtons","Array","isArray","classList","add","userBtnOptions","#addEvents","entries","fn","destroy","constructor","bootstrap","Error","Modal","Default","backdrop","keyboard","focus","querySelectorAll","bootstrapModal","bootstrapModalRef","defaultOptions","userDefaultOptions","defaultButtonOptions","userDefaultButtonOptions","setDefaults","modalOptions","swapOrder","remove","appendLocation","btn","dispose","containerEl","el","createElement","appendChild","error","toggle","handleUpdate","getInstance","getOrCreateInstance"],"mappings":";;;;;;;;;;;MAUMA,OAELC,eAAiB,QAIjBC,SACAC,OACAC,SACAC,QAEAC,sBAEAC,sBAAyB,CACxBC,KAAM,KACNC,MAAO,QACPC,WAAY,KACZC,MAAO,cACPC,KAAM,GACNC,QAAS,GACTC,KAAM,KACNC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,mBAAeC,EACfC,YAAY,EACZC,gBAAgB,EAChBC,eAAe,EACfC,iBAAiB,EACjBC,eA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