From 3228b3cb4987a28e90b843edb620fd876b7f7a99 Mon Sep 17 00:00:00 2001 From: bellord13 Date: Wed, 26 Jun 2024 00:48:19 +0300 Subject: [PATCH] v2.0.1 --- assets/bsCore/bsCore.min.js | 1 + assets/collapse/collapse.min.js | 1 + assets/cookie/cookie.min.js | 1 + assets/core/core.js | 36 +++++++++++++------- assets/core/core.min.js | 2 +- assets/core/core.plugins.config.js | 21 ++++++------ assets/core/core.plugins.config.min.js | 2 +- assets/dataStructures/dataStructures.min.js | 1 + assets/intl-tel-input/js/intlTelInput.min.js | 3 -- assets/jBox/jBox.js | 5 +-- assets/jBox/jBox.min.js | 3 -- assets/modal/modal.min.js | 1 + assets/selectric/jquery.selectric.min.js | 3 -- assets/support/support.min.js | 1 + 14 files changed, 42 insertions(+), 39 deletions(-) create mode 100644 assets/bsCore/bsCore.min.js create mode 100644 assets/collapse/collapse.min.js create mode 100644 assets/cookie/cookie.min.js create mode 100644 assets/dataStructures/dataStructures.min.js create mode 100644 assets/modal/modal.min.js create mode 100644 assets/support/support.min.js diff --git a/assets/bsCore/bsCore.min.js b/assets/bsCore/bsCore.min.js new file mode 100644 index 0000000..d4fa9f1 --- /dev/null +++ b/assets/bsCore/bsCore.min.js @@ -0,0 +1 @@ +__PluginManager__.register("bsCore",function(e,t,n,i){var o,r,s,l={},a={},c={};return a.Data=function(){const e=new Map;return{set(t,n,i){e.has(t)||e.set(t,new Map);const o=e.get(t);o.has(n)||0===o.size?o.set(n,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`)},get:(t,n)=>e.has(t)&&e.get(t).get(n)||null,remove(t,n){if(!e.has(t))return;const i=e.get(t);i.delete(n),0===i.size&&e.delete(t)}}}(),a.SelectorEngine={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter(e=>e.matches(t)),parents(e,t){const n=[];let i=e.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&3!==i.nodeType;)i.matches(t)&&n.push(i),i=i.parentNode;return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]}},a.Manipulator=function(){function e(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function t(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}return{setDataAttribute(e,n,i){e.setAttribute(`data-bs-${t(n)}`,i)},removeDataAttribute(e,n){e.removeAttribute(`data-bs-${t(n)}`)},getDataAttributes(t){if(!t)return{};const n={};return Object.keys(t.dataset).filter(e=>e.startsWith("bs")).forEach(i=>{let o=i.replace(/^bs/,"");o=o.charAt(0).toLowerCase()+o.slice(1,o.length),n[o]=e(t.dataset[i])}),n},getDataAttribute:(n,i)=>e(n.getAttribute(`data-bs-${t(i)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},position:e=>({top:e.offsetTop,left:e.offsetLeft})}}(),c.index=function(e){const t=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t},n=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const i=Number.parseFloat(t),o=Number.parseFloat(n);return i||o?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0},o=e=>{e.dispatchEvent(new Event("transitionend"))},r=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),s=e=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof e.getRootNode){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?s(e.parentNode):null},l=()=>{const{jquery:e}=i;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},a=[],c=e=>{"loading"===document.readyState?(a.length||document.addEventListener("DOMContentLoaded",()=>{a.forEach(e=>e())}),a.push(e)):e()},u=e=>{"function"==typeof e&&e()};return{getElement:t=>r(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?e.findOne(t):null,getUID:e=>{do{e+=Math.floor(1e6*Math.random())}while(document.getElementById(e));return e},getSelector:t,getSelectorFromElement:e=>{const n=t(e);return n&&document.querySelector(n)?n:null},getElementFromSelector:e=>{const n=t(e);return n?document.querySelector(n):null},getTransitionDurationFromElement:n,triggerTransitionEnd:o,isElement:r,typeCheckConfig:(e,t,n)=>{Object.keys(n).forEach(i=>{const o=n[i],s=t[i],l=s&&r(s)?"element":(e=>null==e?`${e}`:{}.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase())(s);if(!new RegExp(o).test(l))throw new TypeError(`${e.toUpperCase()}: Option "${i}" provided type "${l}" but expected type "${o}".`)})},isVisible:e=>!(!r(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),isDisabled:e=>!e||e.nodeType!==Node.ELEMENT_NODE||!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled")),findShadowRoot:s,noop:()=>{},getNextActiveElement:(e,t,n,i)=>{let o=e.indexOf(t);if(-1===o)return e[!n&&i?e.length-1:0];const r=e.length;return o+=n?1:-1,i&&(o=(o+r)%r),e[Math.max(0,Math.min(o,r-1))]},reflow:e=>e.offsetHeight,getjQuery:l,onDOMContentLoaded:c,isRTL:()=>"rtl"===document.documentElement.dir,defineJQueryPlugin:e=>{c(()=>{const t=l();if(t){const n=e.NAME,i=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=(()=>(t.fn[n]=i,e.jQueryInterface))}})},execute:u,executeAfterTransition:(e,t,i=!0)=>{if(!i)return void u(e);const r=n(t)+5;let s=!1;const l=({target:n})=>{n===t&&(s=!0,t.removeEventListener("transitionend",l),u(e))};t.addEventListener("transitionend",l),setTimeout(()=>{s||o(t)},r)}}}(a.SelectorEngine),a.EventHandler=function(e){const t=/[^.]*(?=\..*)\.|.*/,n=/\..*/,i=/::\d+$/,o={};let r=1;const s={mouseenter:"mouseover",mouseleave:"mouseout"},l=/^(mouseenter|mouseleave)/i,a=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 c(e,t){return t&&`${t}::${r++}`||e.uidEvent||r++}function u(e){const t=c(e);return e.uidEvent=t,o[t]=o[t]||{},o[t]}function d(e,t,n=null){const i=Object.keys(e);for(let o=0,r=i.length;o(function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)});o?o=e(o):i=e(i)}const[s,a,m]=f(n,i,o),h=u(e),g=h[m]||(h[m]={}),b=d(g,a,s?i:null);if(b)return void(b.oneOff=b.oneOff&&r);const E=c(a,n.replace(t,"")),y=s?function(e,t,n){return function i(o){const r=e.querySelectorAll(t);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(let l=r.length;l--;)if(r[l]===s)return o.delegateTarget=s,i.oneOff&&p.off(e,o.type,t,n),n.apply(s,[o]);return null}}(e,i,o):function(e,t){return function n(i){return i.delegateTarget=e,n.oneOff&&p.off(e,i.type,t),t.apply(e,[i])}}(e,i);y.delegationSelector=s?i:null,y.originalHandler=a,y.oneOff=r,y.uidEvent=E,g[E]=y,e.addEventListener(m,y,s)}function h(e,t,n,i,o){const r=d(t[n],i,o);r&&(e.removeEventListener(n,r,Boolean(o)),delete t[n][r.uidEvent])}function g(e){return e=e.replace(n,""),s[e]||e}const p={on(e,t,n,i){m(e,t,n,i,!1)},one(e,t,n,i){m(e,t,n,i,!0)},off(e,t,n,o){if("string"!=typeof t||!e)return;const[r,s,l]=f(t,n,o),a=l!==t,c=u(e),d=t.startsWith(".");if(void 0!==s){if(!c||!c[l])return;return void h(e,c,l,s,r?n:null)}d&&Object.keys(c).forEach(n=>{!function(e,t,n,i){const o=t[n]||{};Object.keys(o).forEach(r=>{if(r.includes(i)){const i=o[r];h(e,t,n,i.originalHandler,i.delegationSelector)}})}(e,c,n,t.slice(1))});const m=c[l]||{};Object.keys(m).forEach(n=>{const o=n.replace(i,"");if(!a||t.includes(o)){const t=m[n];h(e,c,l,t.originalHandler,t.delegationSelector)}})},trigger(t,n,i){if("string"!=typeof n||!t)return null;const o=e(),r=g(n),s=n!==r,l=a.has(r);let c,u=!0,d=!0,f=!1,m=null;return s&&o&&(c=o.Event(n,i),o(t).trigger(c),u=!c.isPropagationStopped(),d=!c.isImmediatePropagationStopped(),f=c.isDefaultPrevented()),l?(m=document.createEvent("HTMLEvents")).initEvent(r,u,!0):m=new CustomEvent(n,{bubbles:u,cancelable:!0}),void 0!==i&&Object.keys(i).forEach(e=>{Object.defineProperty(m,e,{get:()=>i[e]})}),f&&m.preventDefault(),d&&t.dispatchEvent(m),m.defaultPrevented&&void 0!==c&&c.preventDefault(),m}};return p}(c.index.getjQuery),c.Backdrop=function(e,t,n,i,o,r){const s={isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},l={isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},a="backdrop",c="modal-backdrop",u="fade",d="show",f=`mousedown.bs.${a}`;return class{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){this._config.isVisible?(this._append(),this._config.isAnimated&&o(this._getElement()),this._getElement().classList.add(d),this._emulateAnimation(()=>{t(e)})):t(e)}hide(e){this._config.isVisible?(this._getElement().classList.remove(d),this._emulateAnimation(()=>{this.dispose(),t(e)})):t(e)}_getElement(){if(!this._element){const e=document.createElement("div");e.className=c,this._config.isAnimated&&e.classList.add(u),this._element=e}return this._element}_getConfig(e){return(e={...s,..."object"==typeof e?e:{}}).rootElement=i(e.rootElement),r(a,e,l),e}_append(){this._isAppended||(this._config.rootElement.appendChild(this._getElement()),e.on(this._getElement(),f,()=>{t(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(e.off(this._element,f),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){n(e,this._getElement(),this._config.isAnimated)}}}(a.EventHandler,c.index.execute,c.index.executeAfterTransition,c.index.getElement,c.index.reflow,c.index.typeCheckConfig),c.sanitizer=function(){const e=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),t=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,n=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,i=(i,o)=>{const r=i.nodeName.toLowerCase();if(o.includes(r))return!e.has(r)||Boolean(t.test(i.nodeValue)||n.test(i.nodeValue));const s=o.filter(e=>e instanceof RegExp);for(let e=0,t=s.length;e{i(e,a)||n.removeAttribute(e.nodeName)})}return o.body.innerHTML}}}(),c.ScrollBarHelper=function(e,t,n){const i=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",o=".sticky-top";return class{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,"paddingRight",t=>t+e),this._element.style.setProperty("--scroll-bar-size",`${e}px`),this._setElementAttributes(i,"paddingRight",t=>t+e),this._setElementAttributes(o,"marginRight",t=>t-e)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,t,n){const i=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+i)return;this._saveInitialAttribute(e,t);const o=window.getComputedStyle(e)[t];e.style[t]=`${n(Number.parseFloat(o))}px`})}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(i,"paddingRight"),this._resetElementAttributes(o,"marginRight"),this._element.style.setProperty("--scroll-bar-size","0")}_saveInitialAttribute(e,n){const i=e.style[n];i&&t.setDataAttribute(e,n,i)}_resetElementAttributes(e,n){this._applyManipulationCallback(e,e=>{const i=t.getDataAttribute(e,n);void 0===i?e.style.removeProperty(n):(t.removeDataAttribute(e,n),e.style[n]=i)})}_applyManipulationCallback(t,i){n(t)?i(t):e.find(t,this._element).forEach(i)}isOverflowing(){return this.getWidth()>0}}}(a.SelectorEngine,a.Manipulator,c.index.isElement),c.componentFunctions=(o=a.EventHandler,r=c.index.getElementFromSelector,s=c.index.isDisabled,{enableDismissTrigger:(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,i=e.NAME;o.on(document,n,`[data-bs-dismiss="${i}"]`,function(n){if(["A","AREA"].includes(this.tagName)&&n.preventDefault(),s(this))return;const o=r(this)||this.closest(`.${i}`);e.getOrCreateInstance(o)[t]()})}}),l.BaseComponent=function(e,t,n,i){const o="5.0.2";return class{constructor(t){(t=n(t))&&(this._element=t,e.set(this._element,this.constructor.DATA_KEY,this))}dispose(){e.remove(this._element,this.constructor.DATA_KEY),i.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(e=>{this[e]=null})}_queueCallback(e,n,i=!0){t(e,n,i)}static getInstance(t){return e.get(t,this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return o}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}}(a.Data,c.index.executeAfterTransition,c.index.getElement,a.EventHandler),l.util=c,l.dom=a,n.exports=l,n.exports}); \ No newline at end of file diff --git a/assets/collapse/collapse.min.js b/assets/collapse/collapse.min.js new file mode 100644 index 0000000..1b74b9b --- /dev/null +++ b/assets/collapse/collapse.min.js @@ -0,0 +1 @@ +__PluginManager__.register("collapse",(function(t,e,s){var i=t("bsCore"),{defineJQueryPlugin:n,getElement:a,getSelectorFromElement:r,getElementFromSelector:l,reflow:o,typeCheckConfig:g}=i.util.index,{Data:h,EventHandler:c,Manipulator:_,SelectorEngine:d}=i.dom,f=i.BaseComponent;const m="collapse",p="bs.collapse",u=`.${p}`,A={toggle:!0,parent:""},y={toggle:"boolean",parent:"(string|element)"},b=`show${u}`,L=`shown${u}`,C=`hide${u}`,$=`hidden${u}`,T=`click${u}.data-api`,v="show",w="collapse",E="collapsing",x="collapsed",D="width",I='[data-bs-toggle="collapse"]';class P extends f{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=d.find(`${I}[href="#${this._element.id}"],${I}[data-bs-target="#${this._element.id}"]`);const s=d.find(I);for(let t=0,e=s.length;tt===this._element));null!==i&&n.length&&(this._selector=i,this._triggerArray.push(e))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get Default(){return A}static get NAME(){return m}toggle(){this._element.classList.contains(v)?this.hide():this.show()}show(){if(this._isTransitioning||this._element.classList.contains(v))return;let t,e;this._parent&&(t=d.find(".show, .collapsing",this._parent).filter((t=>"string"==typeof this._config.parent?t.getAttribute("data-bs-parent")===this._config.parent:t.classList.contains(w))),0===t.length&&(t=null));const s=d.findOne(this._selector);if(t){const i=t.find((t=>s!==t));if(e=i?P.getInstance(i):null,e&&e._isTransitioning)return}if(c.trigger(this._element,b).defaultPrevented)return;t&&t.forEach((t=>{s!==t&&P.collapseInterface(t,"hide"),e||h.set(t,p,null)}));const i=this._getDimension();this._element.classList.remove(w),this._element.classList.add(E),this._element.style[i]=0,this._triggerArray.length&&this._triggerArray.forEach((t=>{t.classList.remove(x),t.setAttribute("aria-expanded",!0)})),this.setTransitioning(!0);const n=`scroll${i[0].toUpperCase()+i.slice(1)}`;this._element.style[i]=`${this._element[n]}px`,this._queueCallback((()=>{this._element.classList.remove(E),this._element.classList.add(w,v),this._element.style[i]="",this.setTransitioning(!1),c.trigger(this._element,L)}),this._element,"true"===this._element.getAttribute("data-bs-animated"))}hide(){if(this._isTransitioning||!this._element.classList.contains(v))return;if(c.trigger(this._element,C).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,o(this._element),this._element.classList.add(E),this._element.classList.remove(w,v);const e=this._triggerArray.length;if(e>0)for(let t=0;t{this.setTransitioning(!1),this._element.classList.remove(E),this._element.classList.add(w),c.trigger(this._element,$)}),this._element,"true"===this._element.getAttribute("data-bs-animated"))}setTransitioning(t){this._isTransitioning=t}_getConfig(t){return(t={...A,...t}).toggle=Boolean(t.toggle),g(m,t,y),t}_getDimension(){return this._element.classList.contains(D)?D:"height"}_getParent(){let{parent:t}=this._config;t=a(t);const e=`${I}[data-bs-parent="${t}"]`;return d.find(e,t).forEach((t=>{const e=l(t);this._addAriaAndCollapsedClass(e,[t])})),t}_addAriaAndCollapsedClass(t,e){if(!t||!e.length)return;const s=t.classList.contains(v);e.forEach((t=>{s?t.classList.remove(x):t.classList.add(x),t.setAttribute("aria-expanded",s)}))}static collapseInterface(t,e){let s=P.getInstance(t);const i={...A,..._.getDataAttributes(t),..."object"==typeof e&&e?e:{}};if(!s&&i.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(i.toggle=!1),s||(s=new P(t,i)),"string"==typeof e){if(void 0===s[e])throw new TypeError(`No method named "${e}"`);s[e]()}}static jQueryInterface(t){return this.each((function(){P.collapseInterface(this,t)}))}}return c.on(document,T,I,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=_.getDataAttributes(this),s=r(this);d.find(s).forEach((t=>{const s=P.getInstance(t);let i;s?(null===s._parent&&"string"==typeof e.parent&&(s._config.parent=e.parent,s._parent=s._getParent()),i="toggle"):i=e,P.collapseInterface(t,i)}))})),n(P),s.exports=P,s.exports})); \ No newline at end of file diff --git a/assets/cookie/cookie.min.js b/assets/cookie/cookie.min.js new file mode 100644 index 0000000..a651770 --- /dev/null +++ b/assets/cookie/cookie.min.js @@ -0,0 +1 @@ +__PluginManager__.register("cookie",(function(e,t,r){var n={read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},o=function(e){for(var t=1;t=e:this.state>=e&&this.state<=t},Plugin.prototype.__check2State=function(e,t=void 0){return void 0===t?this.state2>=e:this.state2>=e&&this.state2<=t},Plugin.prototype.__getValidConfig=function(e={}){var t=Object.assign({},e);return"function"!=typeof t.onLoad&&(t.onLoad=function(e){}),"function"!=typeof t.onInstall&&(t.onInstall=function(e){}),"function"!=typeof t.onRegister&&(t.onRegister=function(e){}),"string"!=typeof t.path&&(t.path=""),"string"==typeof t.js?t.js=[t.js]:Array.isArray(t.js)||(t.js=[]),"string"==typeof t.css?t.css=[t.css]:Array.isArray(t.css)||(t.css=[]),"string"==typeof t.alias?t.alias=[t.alias]:Array.isArray(t.alias)||(t.alias=[]),t.autoRequire=!!t.hasOwnProperty("autoRequire")&&!!t.autoRequire,t.loadJsAfterModule=!!t.hasOwnProperty("loadJsAfterModule")&&!!t.loadJsAfterModule,t.isSetTimestamp=!t.hasOwnProperty("isSetTimestamp")||!!t.isSetTimestamp,t.type=t.type||"ES","string"==typeof t.deps?t.deps=[t.deps]:Array.isArray(t.deps)||(t.deps=[]),t},Plugin.prototype.__setState=function(e,t=!1){var n=this;(t||n.__checkState(e))&&(n.state=e)},Plugin.prototype.register=function(e={}){var t,n=this,i=n.id;if(this.__checkState(stateList.installed))throw new Error("Plugin "+i+" уже невозможно конфигурировать ("+n.state+"/"+n.state2+")");if("function"==typeof e)t=e,(e=this.config).handler=t,e.type=MD_TYPE.HMD;else{if(this.__checkState(stateList.loaded)||this.__check2State(stateList.loading))throw new Error("Plugin "+i+" уже невозможно конфигурировать ("+n.state+")");if("object"!=typeof e)throw new Error("Plugin.register: plugin "+i+" is not a valid format");e=this.__getValidConfig(e),Object.assign(this.config,e)}if(!this.__checkState(stateList.registered)){n.config.debug&&console.log(`Plugin ${n.id}: onRegister + event.`),this.state=stateList.registered,this.config.onRegister(this);var o=new CustomEvent("onRegister"+this.id+"Plugin",{detail:{plugin:this}});document.dispatchEvent(o)}e.autoRequire},Plugin.prototype.load=function(e){var t=this;"function"!=typeof e&&(e=function(){});var n=t.id;if(!t.__checkState(stateList.registered))return console.warn(`Plugin.load(${n}): is not register!.`),t;if(t.__checkState(stateList.loaded))return e(),t;if(t.__check2State(stateList.loading))return t.__exec(stateList.loaded,e),t;t.state2=stateList.loading;var i,o=t.config;o.css.forEach((function(e,n,i){t.getStylePromise(o.path+e)})),t.pluginManager&&(i=t.pluginManager.__getDepsPromiseCallback(t.config.deps),t.queuePush(i));var r,s=(r=o.path+o.module,"string"==typeof o.module&&""!==o.module&&"ES"===o.type?function(){return t.getESModulePromise(r).then(function(e){e.__esModule=!0,t.module.exports=e}.bind(t))}:"string"==typeof o.module&&""!==o.module&&"UMD"===o.type?isAssetLoaded(r)?void(t.config.debug&&console.warn(`Plugin ${t.id}: Скрипт ${r} уже загружен!`)):function(){return t.httpGet(r).then(function(e){t.module.code=e}.bind(t))}:"HMD"!==o.type||o.hasOwnProperty("handler")&&"function"==typeof o.handler?void 0:function(){return t.getScriptPromise(r)}),a=t.getJsAssetsPromiseCallback(o.js);return o.loadJsAfterModule?(t.queuePush(s),t.queuePush(a)):(t.queuePush(a),t.queuePush(s)),i||s||a||(t.state=stateList.loaded),t.__queue(stateList.loaded,(function(){t.config.debug&&console.log(`Plugin ${t.id}: onLoad + event.`),t.isLoaded()||(t.state=stateList.loaded),o.onLoad.call(t,t);var e=new CustomEvent("onLoad"+t.id+"Plugin",{detail:{plugin:t}});document.dispatchEvent(e)})),t.__exec(stateList.loaded,function(){e()}.bind(t)),t},Plugin.prototype.install=function(callback){var self=this,global=self.pluginManager.global,require=self.pluginManager.require.bind(self.pluginManager);"function"!=typeof callback&&(callback=function(){});var pluginId=self.id;if(!self.__checkState(stateList.registered))return console.warn(`Plugin ${pluginId}: is not register!`),self;if(self.__checkState(stateList.installed))return callback(),self;if(self.__check2State(stateList.installing))return self.__exec(stateList.installed,callback),self;self.__checkState(stateList.loaded)||this.load(),self.state2=stateList.installing;var setGlobals=function(e,t){if(void 0!==t){var n=self.id,i=self.config.alias;e.hasOwnProperty(n)||(e[n]=t),Array.isArray(i)&&i.length&&i.forEach((function(n){e.hasOwnProperty(n)||(e[n]=t)}))}},module=self.module,exports=self.module.exports,installer=function(){var __exports=void 0;"ES"===self.config.type&&"string"==typeof self.config.module&&""!==self.config.module?__exports="object"==typeof exports&&void 0!==exports.default?exports.default:exports:"UMD"===self.config.type&&"string"==typeof self.config.module&&""!==self.config.module?(function(require,exports,module,global){var self=global;eval(module.code)}.bind(global).call(global,require,exports,module,global),__exports="object"==typeof exports&&void 0!==exports.default?exports.default:exports):"HMD"===self.config.type&&"function"==typeof self.config.handler&&(__exports=self.config.handler.bind(global).call(global,require,exports,module,global),void 0===__exports&&exports&&(__exports=exports)),"object"==typeof global&&setGlobals(global,__exports),self.state=stateList.installed,console.log(`%cPlugin ${pluginId}: installed.`,"color: green;"),self.config.onInstall.call(self,self);var event=new CustomEvent("onInstall"+self.id+"Plugin",{detail:{plugin:self}});return document.dispatchEvent(event),!0}.bind(this);return this.__queue(stateList.loaded,installer),this.__exec(stateList.loaded,(function(){callback()})),self},Plugin.prototype.exec=function(e,t=[],n=void 0){var i=this;void 0===n&&(n=i),i.__checkState(stateList.installed)||(i.load(),i.install()),i.__exec(stateList.installed,e,t,n)},Plugin.prototype.getESModulePromise=function(e){var t=this;return new Promise((function(n,i){import(e).then((function(e){n(e)}),(function(e){t.errors.push(e),console.log(`%cPlugin ${t.id}: error import module!`,"color: red;"),i(e)}))}))},Plugin.prototype.httpGet=function(e){var t=this;return new Promise((function(n,i){t.config.debug&&console.log(`Plugin ${t.id}: httpGet ${e}`);var o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=function(){if(200==this.status)n(this.response);else{console.log(`%cPlugin.load(${t.id}): error load file!`,"color: red;");var e=new Error(this.statusText);e.code=this.status,i(e)}},o.onerror=function(){console.log(`%cPlugin.load(${t.id}): error load file!`,"color: red;"),i(new Error("Network Error"))},o.send()}))},Plugin.prototype.getScriptPromise=function(e){var t=this;if(!isAssetLoaded(e))return new Promise((function(n,i){t.config.debug&&console.log(`Plugin ${t.id}: load script ${e}`);var o=document.createElement("script");o.src=e,t.config.isSetTimestamp&&(o.src=getUrlWithTimestamp(e)),o.onload=function(){n(o)},o.onerror=function(){var n=new Error(`Ошибка загрузки скрипта ${e}`);t.errors.push(n),console.log(`%cPlugin.load(${t.id}): error load script!`,"color: red;"),i(n)},document.head.append(o)}));t.config.debug&&console.warn(`Plugin ${t.id}: Скрипт ${e} уже загружен!`)},Plugin.prototype.getStylePromise=function(e){var t=this;return new Promise((function(n,i){if(isAssetLoaded(e))t.config.debug&&console.warn(`Plugin ${t.id}: Стиль ${e} уже загружен`),n();else{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.media="all",o.href=e,t.config.isSetTimestamp&&(o.href=getUrlWithTimestamp(e)),document.head.append(o),n(o)}}))},Plugin.prototype.getAsyncScriptListPromise=function(e){var t=e.map(this.getScriptPromise.bind(this)).filter((e=>void 0!==e));if(t.length)return Promise.all(t)},Plugin.prototype.getJsAssetsPromiseCallback=function(e=[]){var t=this;if(e.length)return function(){var n=new Promise((function(e,t){e()}));return e.forEach((function(e,i,o){n=Array.isArray(e)?n.then((function(){return t.getAsyncScriptListPromise(e)})):n.then((function(){return t.getScriptPromise(t.config.path+e)}))})),n}},Plugin.prototype.__getRealId=function(e){var t,n=this,i=e.toLowerCase();if(n.id.toLowerCase()===i)return n.id;for(t of n.config.alias)if(i===t.toLowerCase())return n.id},Plugin.prototype.__is=function(e){return this.id===this.__getRealId(e)},Plugin.prototype.isLoaded=function(){return this.__checkState(stateList.loaded)},Plugin.prototype.isInstalled=function(){return this.__checkState(stateList.installed)},Plugin.prototype.require=function(){var e=this;return e.isInstalled()||e.config.debug&&console.warn(`Plugin ${e.id}: not instaled!`),e.module.exports};var PluginManager=function(e){this.plugins={},this.global=e};function init(e){var t=new PluginManager(e);e.ready=t.ready.bind(t),e.exec=t.exec.bind(t),e.require=t.require.bind(t),t.register("pluginManager",{alias:"pm",type:MD_TYPE.HMD,handler:function(e,n,i,o){return o.PluginManagerClass=PluginManager,"object"==typeof window&&(window.__PluginManager__=t,window.__pmGlobal__=o),i.exports=t},onInstall:function(e){}}),t.install("pluginManager"),t.register("config",{type:MD_TYPE.HMD,handler:function(e,t,n,i){var o=document.currentScript;if(o)try{var r=new URL(o.src);defaultConfig.assetsPath=r.pathname.split("/").slice(0,-2).join("/")}catch(e){var s=o.src.split("?")[0];defaultConfig.assetsPath=s.split("/").slice(0,-2).join("/")}var a=i.config||{};a=Object.assign({},defaultConfig,a),"object"==typeof window&&(window.__pmConfig__=i.config=a),document.addEventListener("DOMContentLoaded",(function(){console.log("%cDOMContentLoaded","color:#2053ff")}))},onInstall:function(e){"object"==typeof window&&window.hasOwnProperty("__PluginManagerConfigHandler__")&&"function"==typeof __PluginManagerConfigHandler__&&t.registerPlugins(__PluginManagerConfigHandler__())}}),t.install("config")}PluginManager.prototype.registerPlugins=function(e){for(var t in e)e.hasOwnProperty(t)&&this.register(t,e[t]);return this},PluginManager.prototype.register=function(e,t={}){if("string"==typeof e&&""!==e){var n=this.__getPlugin(e);n?n.register(t):((n=new Plugin(e,t)).setPluginManager(this),this.plugins[e]=n)}else console.warn("Invalid pluginId!",e)},PluginManager.prototype.__getPlugin=function(e){var t,n,i=this;for(t in i.plugins)if(i.plugins.hasOwnProperty(t)&&(n=i.plugins[t]).__is(e))return n},PluginManager.prototype.__getDepsPromiseCallback=function(e=[]){var t=this,n=e.map((function(e){var n=t.__getPlugin(e);if(n){if(n.install(),n.isInstalled())return;return n.promise}console.log(`%cPluginManager: plugin ${e} not found!`,"color: red;")})).filter((e=>void 0!==e));if(n.length)return function(){return Promise.all(n)}},PluginManager.prototype.__getRealIdList=function(e=[]){var t=this;return e.map((function(e){var n=t.__getPlugin(e);if(n)return n.id}))},PluginManager.prototype.exec=function(e,t,n=[],i=void 0){if("function"==typeof e&&(i=n,n=t,t=e,e=[]),"string"==typeof e&&(e=[e]),void 0===i&&(i=this),void 0===n&&(n=[]),"function"==typeof t){global.config&&global.config.requiredDependencies&&(e=Array.from(new Set(e.concat(global.config.requiredDependencies))));var o=this.__getDepsPromiseCallback(e);o?o().then((function(){t.apply(i,n)})):t.apply(i,n)}},PluginManager.prototype.exec2=function(e,t){var n=this,i=this,o=n.__getDepsPromiseCallback(e),r=function(){var t=[];return e.forEach(function(e){n.__getPlugin(e)?t.push(n.require(e)):t.push(void 0)}.bind(n)),t}.bind(n);o?o().then((function(){t.apply(i,r())})):t.apply(i,r())},PluginManager.prototype.ready=function(e,t=void 0){var n=this;"function"==typeof e&&(t=e,e=[]),n.__ready(n.exec,[e,t],n)},PluginManager.prototype.__ready=function(e,t=[],n=window){n=n||this,/complete|interactive|loaded/.test(document.readyState)?e.apply(n,t):document.addEventListener("DOMContentLoaded",function(){e.apply(n,t)}.bind(this))},PluginManager.prototype.require=function(e,t){var n=this.__getPlugin(e);if(n){e=n.id;var i=n.module;return"function"!=typeof t&&(t=function(){}),n.install(t),i.exports}console.warn("PluginManager.require: plugin "+e+" not found!")},PluginManager.prototype.install=function(e,t){var n=this.__getPlugin(e);if(n){e=n.id;n.module;n.install(t)}else console.warn("PluginManager.install: plugin "+e+" not found!")},init(global)}(kit); \ No newline at end of file +window.kit=window.kit||{},kit.service=kit.service||{},kit.config=kit.config||{},function(global){var defaultConfig={version:"2.0",assetsPath:"",requiredDependencies:[],autoloadPluginList:[],debug:!0},stateList={undefined:0,registered:1,loading:3,loaded:4,installing:5,installed:6},MD_TYPE={ES:"ES",UMD:"UMD",HMD:"HMD",default:"default"};function Plugin(e,t={}){this.id=e,this.state=stateList.undefined,this.state2=stateList.undefined,this.module={code:"",exports:{}},this.config={autoRequire:!1,loadJsAfterModule:!1,isSetTimestamp:!0,path:"",module:"",type:"default",handler:void 0,onRegister:function(e){},onLoad:function(e){},onInstall:function(e){},js:[],css:[],alias:[],deps:[],debug:!1},this.pluginManager=void 0,this.promise=new Promise((function(e,t){e()})),this.errors=[],this.register(t)}function isAssetLoaded(e){return e=e.match(/^[^#?]*/)[0],document.querySelector('script[src^="'+e+'"]')||document.querySelector('link[href^="'+e+'"]')||document.querySelector('meta[property="kit:file-load"][content="'+e+'"]')}function getUrlWithTimestamp(e){try{var t=new URL(e);t.searchParams.append("__pm",(new Date).getTime()),e=t.toString()}catch(t){e=(e=String(e).split("?")[0])+"?__pm"+(new Date).getTime()}return e}Plugin.prototype.setPluginManager=function(e){this.pluginManager=e},Plugin.prototype.queuePush=function(e,t=[]){"function"==typeof e&&(this.promise=this.promise.then((function(n){var i=e.apply(this,t);if(i)return i})))},Plugin.prototype.__queue=function(e,t,n=[],i=void 0){var o=this;void 0===i&&(i=o),o.__checkState(e)?t.apply(i,n):o.promise=o.promise.then(function(){return new Promise((function(e,o){t.apply(i,n),e()}))}.bind(o))},Plugin.prototype.__exec=function(e,t,n=[],i=void 0){var o=this;void 0===i&&(i=o),o.__checkState(e)?t.apply(i,n):o.promise=o.promise.then(function(){t.apply(i,n)}.bind(o))},Plugin.prototype.__checkState=function(e,t=void 0){return void 0===t?this.state>=e:this.state>=e&&this.state<=t},Plugin.prototype.__check2State=function(e,t=void 0){return void 0===t?this.state2>=e:this.state2>=e&&this.state2<=t},Plugin.prototype.__getValidConfig=function(e={}){var t=Object.assign({},e);return"function"!=typeof t.onLoad&&(t.onLoad=function(e){}),"function"!=typeof t.onInstall&&(t.onInstall=function(e){}),"function"!=typeof t.onRegister&&(t.onRegister=function(e){}),"string"!=typeof t.path&&(t.path=""),"string"==typeof t.js?t.js=[t.js]:Array.isArray(t.js)||(t.js=[]),"string"==typeof t.css?t.css=[t.css]:Array.isArray(t.css)||(t.css=[]),"string"==typeof t.alias?t.alias=[t.alias]:Array.isArray(t.alias)||(t.alias=[]),t.autoRequire=!!t.hasOwnProperty("autoRequire")&&!!t.autoRequire,t.loadJsAfterModule=!!t.hasOwnProperty("loadJsAfterModule")&&!!t.loadJsAfterModule,t.isSetTimestamp=!t.hasOwnProperty("isSetTimestamp")||!!t.isSetTimestamp,t.type=t.type||"default","string"==typeof t.deps?t.deps=[t.deps]:Array.isArray(t.deps)||(t.deps=[]),t},Plugin.prototype.__setState=function(e,t=!1){var n=this;(t||n.__checkState(e))&&(n.state=e)},Plugin.prototype.register=function(e={}){var t,n=this,i=n.id;if(this.__checkState(stateList.installed))throw new Error("Plugin "+i+" уже невозможно конфигурировать ("+n.state+"/"+n.state2+")");if("function"==typeof e)t=e,(e=this.config).handler=t,e.type=MD_TYPE.HMD;else{if(this.__checkState(stateList.loaded)||this.__check2State(stateList.loading))throw new Error("Plugin "+i+" уже невозможно конфигурировать ("+n.state+")");if("object"!=typeof e)throw new Error("Plugin.register: plugin "+i+" is not a valid format");e=this.__getValidConfig(e),Object.assign(this.config,e)}if(!this.__checkState(stateList.registered)){n.config.debug&&console.log(`Plugin ${n.id}: onRegister + event.`),this.state=stateList.registered,this.config.onRegister(this);var o=new CustomEvent("onRegister"+this.id+"Plugin",{detail:{plugin:this}});document.dispatchEvent(o)}e.autoRequire},Plugin.prototype.load=function(e){var t=this;"function"!=typeof e&&(e=function(){});var n=t.id;if(!t.__checkState(stateList.registered))return console.warn(`Plugin.load(${n}): is not register!.`),t;if(t.__checkState(stateList.loaded))return e(),t;if(t.__check2State(stateList.loading))return t.__exec(stateList.loaded,e),t;t.state2=stateList.loading;var i,o=t.config;o.css.forEach((function(e,n,i){t.getStylePromise(o.path+e)})),t.pluginManager&&(i=t.pluginManager.__getDepsPromiseCallback(t.config.deps),t.queuePush(i));var r,s=(r=o.path+o.module,"string"==typeof o.module&&""!==o.module&&"ES"===o.type?function(){return t.getESModulePromise(r).then(function(e){e.__esModule=!0,t.module.exports=e}.bind(t))}:"string"==typeof o.module&&""!==o.module&&"UMD"===o.type?isAssetLoaded(r)?void(t.config.debug&&console.warn(`Plugin ${t.id}: Скрипт ${r} уже загружен!`)):function(){return t.httpGet(r).then(function(e){t.module.code=e}.bind(t))}:"HMD"!==o.type||o.hasOwnProperty("handler")&&"function"==typeof o.handler?"string"==typeof o.module&&""!==o.module&&"default"===o.type?isAssetLoaded(r)?void(t.config.debug&&console.warn(`Plugin ${t.id}: Скрипт ${r} уже загружен!`)):function(){return t.getScriptPromise(r)}:void 0:function(){return t.getScriptPromise(r)}),l=t.getJsAssetsPromiseCallback(o.js);return o.loadJsAfterModule?(t.queuePush(s),t.queuePush(l)):(t.queuePush(l),t.queuePush(s)),i||s||l||(t.state=stateList.loaded),t.__queue(stateList.loaded,(function(){t.config.debug&&console.log(`Plugin ${t.id}: onLoad + event.`),t.isLoaded()||(t.state=stateList.loaded),o.onLoad.call(t,t);var e=new CustomEvent("onLoad"+t.id+"Plugin",{detail:{plugin:t}});document.dispatchEvent(e)})),t.__exec(stateList.loaded,function(){e()}.bind(t)),t},Plugin.prototype.install=function(callback){var self=this,global=self.pluginManager.global,require=self.pluginManager.require.bind(self.pluginManager);"function"!=typeof callback&&(callback=function(){});var pluginId=self.id;if(!self.__checkState(stateList.registered))return console.warn(`Plugin ${pluginId}: is not register!`),self;if(self.__checkState(stateList.installed))return callback(),self;if(self.__check2State(stateList.installing))return self.__exec(stateList.installed,callback),self;self.__checkState(stateList.loaded)||this.load(),self.state2=stateList.installing;var setGlobals=function(e,t){if(void 0!==t){var n=self.id,i=self.config.alias;e.hasOwnProperty(n)||(e[n]=t),Array.isArray(i)&&i.length&&i.forEach((function(n){e.hasOwnProperty(n)||(e[n]=t)}))}},module=self.module,installer=function(){var __exports=void 0;"ES"===self.config.type&&"string"==typeof self.config.module&&""!==self.config.module?__exports="object"==typeof self.module.exports&&void 0!==self.module.exports.default?self.module.exports.default:self.module.exports:"UMD"===self.config.type&&"string"==typeof self.config.module&&""!==self.config.module?(function(require,exports,module,global){var self=global;eval(module.code)}.bind(global).call(global,require,self.module.exports,module,global),__exports="object"==typeof self.module.exports&&void 0!==self.module.exports.default?self.module.exports.default:self.module.exports):"HMD"===self.config.type&&"function"==typeof self.config.handler&&(__exports=self.config.handler.bind(global).call(global,require,self.module.exports,module,global),void 0===__exports&&self.module.exports&&(__exports=self.module.exports)),"object"==typeof global&&setGlobals(global,__exports),self.state=stateList.installed,console.log(`%cPlugin ${pluginId}: installed.`,"color: green;"),self.config.onInstall.call(self,self);var event=new CustomEvent("onInstall"+self.id+"Plugin",{detail:{plugin:self}});return document.dispatchEvent(event),!0}.bind(this);return this.__queue(stateList.loaded,installer),this.__exec(stateList.loaded,(function(){callback()})),self},Plugin.prototype.exec=function(e,t=[],n=void 0){var i=this;void 0===n&&(n=i),i.__checkState(stateList.installed)||(i.load(),i.install()),i.__exec(stateList.installed,e,t,n)},Plugin.prototype.getESModulePromise=function(e){var t=this;return new Promise((function(n,i){import(e).then((function(e){n(e)}),(function(e){t.errors.push(e),console.log(`%cPlugin ${t.id}: error import module!`,"color: red;"),i(e)}))}))},Plugin.prototype.httpGet=function(e){var t=this;return new Promise((function(n,i){t.config.debug&&console.log(`Plugin ${t.id}: httpGet ${e}`);var o=new XMLHttpRequest;o.open("GET",e,!0),o.onload=function(){if(200==this.status)n(this.response);else{console.log(`%cPlugin.load(${t.id}): error load file!`,"color: red;");var e=new Error(this.statusText);e.code=this.status,i(e)}},o.onerror=function(){console.log(`%cPlugin.load(${t.id}): error load file!`,"color: red;"),i(new Error("Network Error"))},o.send()}))},Plugin.prototype.getScriptPromise=function(e){var t=this;if(!isAssetLoaded(e))return new Promise((function(n,i){t.config.debug&&console.log(`Plugin ${t.id}: load script ${e}`);var o=document.createElement("script");o.src=e,t.config.isSetTimestamp&&(o.src=getUrlWithTimestamp(e)),o.onload=function(){n(o)},o.onerror=function(){var n=new Error(`Ошибка загрузки скрипта ${e}`);t.errors.push(n),console.log(`%cPlugin.load(${t.id}): error load script!`,"color: red;"),i(n)},document.head.append(o)}));t.config.debug&&console.warn(`Plugin ${t.id}: Скрипт ${e} уже загружен!`)},Plugin.prototype.getStylePromise=function(e){var t=this;return new Promise((function(n,i){if(isAssetLoaded(e))t.config.debug&&console.warn(`Plugin ${t.id}: Стиль ${e} уже загружен`),n();else{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",o.media="all",o.href=e,t.config.isSetTimestamp&&(o.href=getUrlWithTimestamp(e)),document.head.append(o),n(o)}}))},Plugin.prototype.getAsyncScriptListPromise=function(e){var t=e.map(this.getScriptPromise.bind(this)).filter((e=>void 0!==e));if(t.length)return Promise.all(t)},Plugin.prototype.getJsAssetsPromiseCallback=function(e=[]){var t=this;if(e.length)return function(){var n=new Promise((function(e,t){e()}));return e.forEach((function(e,i,o){n=Array.isArray(e)?n.then((function(){return t.getAsyncScriptListPromise(e)})):n.then((function(){return t.getScriptPromise(t.config.path+e)}))})),n}},Plugin.prototype.__getRealId=function(e){var t,n=this,i=e.toLowerCase();if(n.id.toLowerCase()===i)return n.id;for(t of n.config.alias)if(i===t.toLowerCase())return n.id},Plugin.prototype.__is=function(e){return this.id===this.__getRealId(e)},Plugin.prototype.isLoaded=function(){return this.__checkState(stateList.loaded)},Plugin.prototype.isInstalled=function(){return this.__checkState(stateList.installed)},Plugin.prototype.require=function(){var e=this;return e.isInstalled()||e.config.debug&&console.warn(`Plugin ${e.id}: not instaled!`),e.module.exports};var PluginManager=function(e){this.plugins={},this.global=e};function init(e){var t=new PluginManager(e);e.ready=t.ready.bind(t),e.exec=t.exec.bind(t),e.require=t.require.bind(t),t.register("pluginManager",{alias:"pm",type:MD_TYPE.HMD,handler:function(e,n,i,o){return o.PluginManagerClass=PluginManager,"object"==typeof window&&(window.__PluginManager__=t,window.__pmGlobal__=o),i.exports=t},onInstall:function(e){}}),t.install("pluginManager"),t.register("config",{type:MD_TYPE.HMD,handler:function(e,t,n,i){var o=document.currentScript;if(o)try{var r=new URL(o.src);defaultConfig.assetsPath=r.pathname.split("/").slice(0,-2).join("/")}catch(e){var s=o.src.split("?")[0];defaultConfig.assetsPath=s.split("/").slice(0,-2).join("/")}var l=i.config||{};l=Object.assign({},defaultConfig,l),"object"==typeof window&&(window.__pmConfig__=i.config=l),document.addEventListener("DOMContentLoaded",(function(){console.log("%cDOMContentLoaded","color:#2053ff")}))},onInstall:function(e){"object"==typeof window&&window.hasOwnProperty("__PluginManagerConfigHandler__")&&"function"==typeof __PluginManagerConfigHandler__&&t.registerPlugins(__PluginManagerConfigHandler__())}}),t.install("config")}PluginManager.prototype.registerPlugins=function(e){for(var t in e)e.hasOwnProperty(t)&&this.register(t,e[t]);return this},PluginManager.prototype.register=function(e,t={}){if("string"==typeof e&&""!==e){var n=this.__getPlugin(e);n?n.register(t):((n=new Plugin(e,t)).setPluginManager(this),this.plugins[e]=n)}else console.warn("Invalid pluginId!",e)},PluginManager.prototype.__getPlugin=function(e){var t,n,i=this;for(t in i.plugins)if(i.plugins.hasOwnProperty(t)&&(n=i.plugins[t]).__is(e))return n},PluginManager.prototype.__getDepsPromiseCallback=function(e=[]){var t=this,n=e.map((function(e){var n=t.__getPlugin(e);if(n){if(n.install(),n.isInstalled())return;return n.promise}console.log(`%cPluginManager: plugin ${e} not found!`,"color: red;")})).filter((e=>void 0!==e));if(n.length)return function(){return Promise.all(n)}},PluginManager.prototype.__getRealIdList=function(e=[]){var t=this;return e.map((function(e){var n=t.__getPlugin(e);if(n)return n.id}))},PluginManager.prototype.exec=function(e,t,n=[],i=void 0){if("function"==typeof e&&(i=n,n=t,t=e,e=[]),"string"==typeof e&&(e=[e]),void 0===i&&(i=this),void 0===n&&(n=[]),"function"==typeof t){global.config&&global.config.requiredDependencies&&(e=Array.from(new Set(e.concat(global.config.requiredDependencies))));var o=this.__getDepsPromiseCallback(e);o?o().then((function(){t.apply(i,n)})):t.apply(i,n)}},PluginManager.prototype.exec2=function(e,t){var n=this,i=this,o=n.__getDepsPromiseCallback(e),r=function(){var t=[];return e.forEach(function(e){n.__getPlugin(e)?t.push(n.require(e)):t.push(void 0)}.bind(n)),t}.bind(n);o?o().then((function(){t.apply(i,r())})):t.apply(i,r())},PluginManager.prototype.ready=function(e,t=void 0){var n=this;"function"==typeof e&&(t=e,e=[]),n.__ready(n.exec,[e,t],n)},PluginManager.prototype.__ready=function(e,t=[],n=window){n=n||this,/complete|interactive|loaded/.test(document.readyState)?e.apply(n,t):document.addEventListener("DOMContentLoaded",function(){e.apply(n,t)}.bind(this))},PluginManager.prototype.require=function(e,t){var n=this.__getPlugin(e);if(n){e=n.id;var i=n.module;return"function"!=typeof t&&(t=function(){}),n.install(t),i.exports}console.warn("PluginManager.require: plugin "+e+" not found!")},PluginManager.prototype.install=function(e,t){var n=this.__getPlugin(e);if(n){e=n.id;n.module;n.install(t)}else console.warn("PluginManager.install: plugin "+e+" not found!")},init(global)}(kit); \ No newline at end of file diff --git a/assets/core/core.plugins.config.js b/assets/core/core.plugins.config.js index ef36f34..d3b7152 100644 --- a/assets/core/core.plugins.config.js +++ b/assets/core/core.plugins.config.js @@ -27,7 +27,7 @@ var __PluginManagerConfigHandler__ = function() { }, support: { path: root + '/support', - module: '/support.js', + module: '/support.min.js', type: 'HMD', }, jqueryIniter: { @@ -87,7 +87,6 @@ var __PluginManagerConfigHandler__ = function() { type: 'UMD', alias: ['$', 'jQuery'], onRegister: function (plugin) { - console.log('reg jq'); var initer = kit.require('jqueryIniter'); initer.onRegister(plugin); }, @@ -105,7 +104,7 @@ var __PluginManagerConfigHandler__ = function() { }, bsCore: { path: root + '/bsCore', - module: '/bsCore.js', + module: '/bsCore.min.js', type: 'HMD', css: [ '/bsCore.css' @@ -198,7 +197,7 @@ var __PluginManagerConfigHandler__ = function() { }, Modal: { path: root + '/modal', - module: '/modal.js', + module: '/modal.min.js', type: 'HMD', css: [ '/modal.css', @@ -223,7 +222,7 @@ var __PluginManagerConfigHandler__ = function() { }, collapse: { path: root + '/collapse', - module: '/collapse.js', + module: '/collapse.min.js', type: 'HMD', css: [ '/collapse.css', @@ -241,7 +240,7 @@ var __PluginManagerConfigHandler__ = function() { }, cookie: { path: root + '/cookie', - module: '/cookie.js', + module: '/cookie.min.js', type: 'HMD', }, animations: { @@ -258,7 +257,7 @@ var __PluginManagerConfigHandler__ = function() { }, dataStructures: { path: root + '/dataStructures', - module: '/dataStructures.js', + module: '/dataStructures.min.js', type: 'HMD', }, userAction: { @@ -382,7 +381,7 @@ var __PluginManagerConfigHandler__ = function() { css: [ '/jquery.bxslider.min.css', ], - type: 'import', + type: 'default', deps: ['jQuery'], }, selectric: { @@ -391,7 +390,7 @@ var __PluginManagerConfigHandler__ = function() { css: [ '/selectric.css', ], - type: 'import', + type: 'UMD', alias: ['jquerySelectric'], deps: ['jQuery'], }, @@ -401,7 +400,7 @@ var __PluginManagerConfigHandler__ = function() { css: [ '/jBox.min.css', ], - type: 'import', + type: 'UMD', deps: ['jQuery'], }, intlTelInput: { @@ -410,7 +409,7 @@ var __PluginManagerConfigHandler__ = function() { css: [ '/css/intlTelInput.min.css', ], - type: 'import', + type: 'UMD', alias: ['intl-tel-input'], }, autoComplete: { diff --git a/assets/core/core.plugins.config.min.js b/assets/core/core.plugins.config.min.js index 2b98c84..eeda8fe 100644 --- a/assets/core/core.plugins.config.min.js +++ b/assets/core/core.plugins.config.min.js @@ -1 +1 @@ -var __PluginManagerConfigHandler__=function(){var e=__pmConfig__.assetsPath;return{menu:{path:e+"/menu",module:"/menu.js",css:["/menu.css"],type:"HMD",deps:["lib","align","dataStructures","animations","userAction","Collection","support","ActionCollection","Action","Viewer"]},lib:{path:e+"/lib",module:"/lib.js",type:"HMD"},align:{path:e+"/align",module:"/align.js",type:"HMD",deps:["support"]},flexKit:{path:e+"/flex-kit",css:"/flex-kit.css"},support:{path:e+"/support",module:"/support.js",type:"HMD"},jqueryIniter:{type:"HMD",handler:function(e,t,s,o){var l=function(){var e=[];l.queue.push(e),e.push(["$",arguments]);var t=function(){};return t.ready=function(){e.push(["ready",arguments])},t};function i(){}l.queue=[],i.prototype.J=l,i.prototype.hasJQuery=function(){return window.hasOwnProperty("jQuery")&&window.jQuery.hasOwnProperty("fn")},i.prototype.hasJQueryIniter=function(){return window.hasOwnProperty("jQuery")&&Object.is(window.jQuery,l)},i.prototype.onRegister=function(e){var t;this.hasJQuery()||((t=window).$=t.jQuery=l,e.module.initer=l)},i.prototype.onInstall=function(e){var t=this;!function(s){var o=e.module.initer.queue;if(t.hasJQueryIniter())for(var l of(s.$=s.jQuery=e.module.exports,o)){var i=s;for(var a of l)i=i[a[0]].apply(a[0],a[1])}}(window)},s.exports=new i}},jquery:{path:e+"/jquery",module:"/jquery.min.js",type:"UMD",alias:["$","jQuery"],onRegister:function(e){console.log("reg jq"),kit.require("jqueryIniter").onRegister(e)},onInstall:function(e){kit.require("jqueryIniter").onInstall(e)}},popper:{path:e+"/popper",alias:"popper.js",module:"/popper.js",type:"HMD",css:"/popper.css"},bsCore:{path:e+"/bsCore",module:"/bsCore.js",type:"HMD",css:["/bsCore.css"]},bsToast:{path:e+"/bsToast",module:"/bsToast.js",type:"HMD",deps:["bsCore"]},bsToastService:{path:e+"/bsToastService",module:"/bsToastService.js",type:"HMD",css:["/bsToastService.css"],deps:["bsToast","support","Collection"]},Tooltip:{path:e+"/tooltip",module:"/tooltip.js",type:"HMD",css:"/tooltip.css",onInstall:function(e){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return __pmGlobal__.Tooltip.getOrCreateInstance(e,{sanitize:!1})}))},deps:["popper","bsCore"]},Tooltip2:{path:e+"/tooltip2",module:"/tooltip2.js",type:"HMD",css:"/tooltip2.css",onInstall:function(e){console.log("tt2 install"),document.addEventListener("mouseover",(function(e){if(e.target&&"autoload"===e.target.dataset.kitTooltip2&&!kit.support.getNodeData(e.target,"tooltip2")){var t=new __pmGlobal__.Tooltip2(e.target);t.run(),t.show()}}))},deps:["Viewer","support","ActionCollection","Action","userAction","align","Collection","animations"]},Popover:{path:e+"/popover",module:"/popover.js",type:"HMD",css:"/popover.css",onInstall:function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map((function(e){return new __pmGlobal__.Popover(e)}))},deps:["popper","bsCore","Tooltip"]},mask:{path:e+"/mask",module:"/mask.js",type:"HMD",deps:["jQuery"]},toolkit:{path:e+"/toolkit",module:"/toolkit.js",type:"HMD",css:["/toolkit.css"],deps:["jQuery","mask","support"]},Modal:{path:e+"/modal",module:"/modal.js",type:"HMD",css:["/modal.css"],deps:["bsCore"],onRegister:function(e){e.onLoadConditionHandler=function(t){t.target&&t.target.dataset&&t.target.dataset.bsTarget&&"modal"===t.target.dataset.bsToggle&&kit.exec(e.id,(function(){var e=new Event("click");t.target.dispatchEvent(e)}))},window.addEventListener("click",e.onLoadConditionHandler,!1)},onInstall:function(e){e.onLoadConditionHandler&&window.removeEventListener("click",e.onLoadConditionHandler,!1)}},collapse:{path:e+"/collapse",module:"/collapse.js",type:"HMD",css:["/collapse.css"],deps:["bsCore"]},datepicker:{path:e+"/datepicker",module:"/js/datepicker.js",type:"HMD",css:["/css/datepicker.css"],deps:["jQuery"]},cookie:{path:e+"/cookie",module:"/cookie.js",type:"HMD"},animations:{path:e+"/animations",css:"/animations.css",module:"/animations.js",type:"HMD"},Collection:{path:e+"/collection",module:"/collection.js",type:"HMD",deps:["support"]},dataStructures:{path:e+"/dataStructures",module:"/dataStructures.js",type:"HMD"},userAction:{path:e+"/userAction",module:"/userAction.js",type:"HMD",deps:["support","ActionCollection","Action","Viewer"]},Viewer:{path:e+"/Viewer",module:"/Viewer.js",type:"HMD",deps:["Collection","support","ActionCollection","Action"]},ActionCollection:{path:e+"/ActionCollection",module:"/ActionCollection.js",type:"HMD",deps:["Collection","support","Action"]},Action:{path:e+"/Action",module:"/Action.js",type:"HMD",deps:["support"]},date:{path:e+"/date",module:"/date.js",type:"HMD",deps:[]},testing:{path:e+"/testing",module:"/testing.js",type:"module",deps:["log"]},log:{path:e+"/log",module:"/log.js",css:"/log.css",type:"HMD",deps:["support","Collection","lib"]},fancybox:{path:e+"/fancybox",css:"/fancybox.css",js:"/fancybox.umd.js"},lightGallery:{path:e+"/lightGallery",css:"/lightGallery.css",js:"/lightGallery.js",deps:["jQuery"]},owlCarousel:{path:e+"/owlCarousel",css:"/owlCarousel.css",js:"/owlCarousel.js",deps:["jQuery"]},Chosen:{path:e+"/chosen",css:"/chosen.css",js:"/chosen.jquery.js",deps:["jQuery"]},makeCSSAnimations:{path:e+"/makeCSSAnimations",js:"/makeCSSAnimations.js",deps:["jQuery","support"]},mCustomScrollbar:{path:e+"/mCustomScrollbar",alias:"malihu-custom-scrollbar-plugin",js:"/mCustomScrollbar.js",css:"/jquery.mCustomScrollbar.css",deps:["jQuery","jqueryMousewheel"],onInstall:function(e){e.module.exports(kit.require("jQuery"))}},jqueryMousewheel:{path:e+"/jqueryMousewheel",alias:"jquery-mousewheel",js:"/jquery.mousewheel.js",deps:["jQuery"],onInstall:function(e){e.module.exports(kit.require("jQuery"))}},jqueryLazy:{path:e+"/jquery-lazy",alias:"jquery-lazy",js:["/jquery.lazy.min.js","/jquery.lazy.plugins.min.js"],deps:["jQuery"]},slickCarousel:{path:e+"/slickCarousel",alias:["slick","slick-carousel"],js:"/slick.min.js",css:["/slick.css","/slick-theme.css"],deps:["jQuery"]},mustache:{path:e+"/mustache",alias:["mustache.js"],js:"/mustache.js",deps:[]},bxSlider:{path:e+"/bxSlider",module:"/jquery.bxslider.min.js",css:["/jquery.bxslider.min.css"],type:"import",deps:["jQuery"]},selectric:{path:e+"/selectric",module:"/jquery.selectric.min.js",css:["/selectric.css"],type:"import",alias:["jquerySelectric"],deps:["jQuery"]},jBox:{path:e+"/jBox",module:"/jBox.min.js",css:["/jBox.min.css"],type:"import",deps:["jQuery"]},intlTelInput:{path:e+"/intl-tel-input",module:"/js/intlTelInput.min.js",css:["/css/intlTelInput.min.css"],type:"import",alias:["intl-tel-input"]},autoComplete:{path:e+"/autoComplete",module:"/autoComplete.min.js",css:["/css/autoComplete.css"],type:"HMD"}}}; \ No newline at end of file +var __PluginManagerConfigHandler__=function(){var e=__pmConfig__.assetsPath;return{menu:{path:e+"/menu",module:"/menu.js",css:["/menu.css"],type:"HMD",deps:["lib","align","dataStructures","animations","userAction","Collection","support","ActionCollection","Action","Viewer"]},lib:{path:e+"/lib",module:"/lib.js",type:"HMD"},align:{path:e+"/align",module:"/align.js",type:"HMD",deps:["support"]},flexKit:{path:e+"/flex-kit",css:"/flex-kit.css"},support:{path:e+"/support",module:"/support.js",type:"HMD"},jqueryIniter:{type:"HMD",handler:function(e,t,s,o){var l=function(){var e=[];l.queue.push(e),e.push(["$",arguments]);var t=function(){};return t.ready=function(){e.push(["ready",arguments])},t};function a(){}l.queue=[],a.prototype.J=l,a.prototype.hasJQuery=function(){return window.hasOwnProperty("jQuery")&&window.jQuery.hasOwnProperty("fn")},a.prototype.hasJQueryIniter=function(){return window.hasOwnProperty("jQuery")&&Object.is(window.jQuery,l)},a.prototype.onRegister=function(e){var t;this.hasJQuery()||((t=window).$=t.jQuery=l,e.module.initer=l)},a.prototype.onInstall=function(e){var t=this;!function(s){var o=e.module.initer.queue;if(t.hasJQueryIniter())for(var l of(s.$=s.jQuery=e.module.exports,o)){var a=s;for(var i of l)a=a[i[0]].apply(i[0],i[1])}}(window)},s.exports=new a}},jquery:{path:e+"/jquery",module:"/jquery.min.js",type:"UMD",alias:["$","jQuery"],onRegister:function(e){kit.require("jqueryIniter").onRegister(e)},onInstall:function(e){kit.require("jqueryIniter").onInstall(e)}},popper:{path:e+"/popper",alias:"popper.js",module:"/popper.js",type:"HMD",css:"/popper.css"},bsCore:{path:e+"/bsCore",module:"/bsCore.js",type:"HMD",css:["/bsCore.css"]},bsToast:{path:e+"/bsToast",module:"/bsToast.js",type:"HMD",deps:["bsCore"]},bsToastService:{path:e+"/bsToastService",module:"/bsToastService.js",type:"HMD",css:["/bsToastService.css"],deps:["bsToast","support","Collection"]},Tooltip:{path:e+"/tooltip",module:"/tooltip.js",type:"HMD",css:"/tooltip.css",onInstall:function(e){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(e){return __pmGlobal__.Tooltip.getOrCreateInstance(e,{sanitize:!1})}))},deps:["popper","bsCore"]},Tooltip2:{path:e+"/tooltip2",module:"/tooltip2.js",type:"HMD",css:"/tooltip2.css",onInstall:function(e){console.log("tt2 install"),document.addEventListener("mouseover",(function(e){if(e.target&&"autoload"===e.target.dataset.kitTooltip2&&!kit.support.getNodeData(e.target,"tooltip2")){var t=new __pmGlobal__.Tooltip2(e.target);t.run(),t.show()}}))},deps:["Viewer","support","ActionCollection","Action","userAction","align","Collection","animations"]},Popover:{path:e+"/popover",module:"/popover.js",type:"HMD",css:"/popover.css",onInstall:function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="popover"]')).map((function(e){return new __pmGlobal__.Popover(e)}))},deps:["popper","bsCore","Tooltip"]},mask:{path:e+"/mask",module:"/mask.js",type:"HMD",deps:["jQuery"]},toolkit:{path:e+"/toolkit",module:"/toolkit.js",type:"HMD",css:["/toolkit.css"],deps:["jQuery","mask","support"]},Modal:{path:e+"/modal",module:"/modal.js",type:"HMD",css:["/modal.css"],deps:["bsCore"],onRegister:function(e){e.onLoadConditionHandler=function(t){t.target&&t.target.dataset&&t.target.dataset.bsTarget&&"modal"===t.target.dataset.bsToggle&&kit.exec(e.id,(function(){var e=new Event("click");t.target.dispatchEvent(e)}))},window.addEventListener("click",e.onLoadConditionHandler,!1)},onInstall:function(e){e.onLoadConditionHandler&&window.removeEventListener("click",e.onLoadConditionHandler,!1)}},collapse:{path:e+"/collapse",module:"/collapse.js",type:"HMD",css:["/collapse.css"],deps:["bsCore"]},datepicker:{path:e+"/datepicker",module:"/js/datepicker.js",type:"HMD",css:["/css/datepicker.css"],deps:["jQuery"]},cookie:{path:e+"/cookie",module:"/cookie.js",type:"HMD"},animations:{path:e+"/animations",css:"/animations.css",module:"/animations.js",type:"HMD"},Collection:{path:e+"/collection",module:"/collection.js",type:"HMD",deps:["support"]},dataStructures:{path:e+"/dataStructures",module:"/dataStructures.js",type:"HMD"},userAction:{path:e+"/userAction",module:"/userAction.js",type:"HMD",deps:["support","ActionCollection","Action","Viewer"]},Viewer:{path:e+"/Viewer",module:"/Viewer.js",type:"HMD",deps:["Collection","support","ActionCollection","Action"]},ActionCollection:{path:e+"/ActionCollection",module:"/ActionCollection.js",type:"HMD",deps:["Collection","support","Action"]},Action:{path:e+"/Action",module:"/Action.js",type:"HMD",deps:["support"]},date:{path:e+"/date",module:"/date.js",type:"HMD",deps:[]},testing:{path:e+"/testing",module:"/testing.js",type:"module",deps:["log"]},log:{path:e+"/log",module:"/log.js",css:"/log.css",type:"HMD",deps:["support","Collection","lib"]},fancybox:{path:e+"/fancybox",css:"/fancybox.css",js:"/fancybox.umd.js"},lightGallery:{path:e+"/lightGallery",css:"/lightGallery.css",js:"/lightGallery.js",deps:["jQuery"]},owlCarousel:{path:e+"/owlCarousel",css:"/owlCarousel.css",js:"/owlCarousel.js",deps:["jQuery"]},Chosen:{path:e+"/chosen",css:"/chosen.css",js:"/chosen.jquery.js",deps:["jQuery"]},makeCSSAnimations:{path:e+"/makeCSSAnimations",js:"/makeCSSAnimations.js",deps:["jQuery","support"]},mCustomScrollbar:{path:e+"/mCustomScrollbar",alias:"malihu-custom-scrollbar-plugin",js:"/mCustomScrollbar.js",css:"/jquery.mCustomScrollbar.css",deps:["jQuery","jqueryMousewheel"],onInstall:function(e){e.module.exports(kit.require("jQuery"))}},jqueryMousewheel:{path:e+"/jqueryMousewheel",alias:"jquery-mousewheel",js:"/jquery.mousewheel.js",deps:["jQuery"],onInstall:function(e){e.module.exports(kit.require("jQuery"))}},jqueryLazy:{path:e+"/jquery-lazy",alias:"jquery-lazy",js:["/jquery.lazy.min.js","/jquery.lazy.plugins.min.js"],deps:["jQuery"]},slickCarousel:{path:e+"/slickCarousel",alias:["slick","slick-carousel"],js:"/slick.min.js",css:["/slick.css","/slick-theme.css"],deps:["jQuery"]},mustache:{path:e+"/mustache",alias:["mustache.js"],js:"/mustache.js",deps:[]},bxSlider:{path:e+"/bxSlider",module:"/jquery.bxslider.min.js",css:["/jquery.bxslider.min.css"],type:"default",deps:["jQuery"]},selectric:{path:e+"/selectric",module:"/jquery.selectric.min.js",css:["/selectric.css"],type:"UMD",alias:["jquerySelectric"],deps:["jQuery"]},jBox:{path:e+"/jBox",module:"/jBox.min.js",css:["/jBox.min.css"],type:"UMD",deps:["jQuery"]},intlTelInput:{path:e+"/intl-tel-input",module:"/js/intlTelInput.min.js",css:["/css/intlTelInput.min.css"],type:"UMD",alias:["intl-tel-input"]},autoComplete:{path:e+"/autoComplete",module:"/autoComplete.min.js",css:["/css/autoComplete.css"],type:"HMD"}}}; \ No newline at end of file diff --git a/assets/dataStructures/dataStructures.min.js b/assets/dataStructures/dataStructures.min.js new file mode 100644 index 0000000..c80ee73 --- /dev/null +++ b/assets/dataStructures/dataStructures.min.js @@ -0,0 +1 @@ +__PluginManager__.register("dataStructures",function(t,e,i,o){function n(t,e,i=1e3){this.context=t||window,this.callback=e,this.interval=i}n.prototype.start=function(){this.intervalId=setInterval(function(){this.callback.apply(this.context,arguments)}.bind(this),this.interval)},n.prototype.stop=function(){this.intervalId&&clearInterval(this.intervalId)};const s={StackExecutionLimiter:(r=function(t,e,i=1e3){this.counter=0,this.timerId=0,this.timeout=0,this.arguments=null,this.context=null,this.executeBeforeTimeout=!1,this.setContext(t),this.setCallback(e),this.setTimeout(i)},r.prototype.setCallback=function(t){this.callback=t},r.prototype.setContext=function(t){this.context=t||window},r.prototype.setTimeout=function(t){this.timeout=t},r.prototype.exec=function(){this.arguments=arguments,this.counter++,0===this.timerId&&(this.executeBeforeTimeout?this.__execBeforeTimeout(this.counter):this.__execAfterDelay())},r.prototype.__execBeforeTimeout=function(t){this.timerId=setTimeout(function(){if(this.counter>t)return this.__execBeforeTimeout(this.counter),null;this.timerId=0}.bind(this),this.timeout),this.callback.apply(this.context,this.arguments)},r.prototype.__execAfterDelay=function(){this.timerId=setTimeout(function(){this.callback.apply(this.context,this.arguments),this.timerId=0}.bind(this),this.timeout)},r.prototype.reset=function(){clearTimeout(this.timerId),this.timerId=0,this.counter=0},r),Interval:n};var r;return i.exports=s}); \ No newline at end of file diff --git a/assets/intl-tel-input/js/intlTelInput.min.js b/assets/intl-tel-input/js/intlTelInput.min.js index aaa7777..721c898 100644 --- a/assets/intl-tel-input/js/intlTelInput.min.js +++ b/assets/intl-tel-input/js/intlTelInput.min.js @@ -1,5 +1,4 @@ /** @module intlTelInput */ -__PluginManager__.register('intlTelInput', function(require, exports, module, global){ /* * International Telephone Input v19.5.7 * https://github.com/jackocnr/intl-tel-input.git @@ -8,5 +7,3 @@ __PluginManager__.register('intlTelInput', function(require, exports, module, gl !function(a){"object"==typeof module&&module.exports?module.exports=a():window.intlTelInput=a()}(function(a){"use strict";return function(){function b(a){for(var b=1;ba.length)&&(b=a.length);for(var c=0,d=new Array(b);c1&&arguments[1]!==a?arguments[1]:{};j(this,c),this.id=s++,this.a=b,this.b=null,this.c=null,this.d=Object.assign({},t,d),this.e=Boolean(b.getAttribute("placeholder"))}return l(c,[{key:"_init",value:function(){var a=this;this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!1),this.d.countrySearch&&!this.d.useFullscreenPopup&&(this.d.fixDropdownWidth=!0),this.d.nationalMode&&(this.d.autoInsertDialCode=!1),this.d.showSelectedDialCode&&(this.d.autoInsertDialCode=!1);var b=this.d.allowDropdown&&!this.d.showSelectedDialCode;if(!this.d.showFlags&&b&&(this.d.showFlags=!0),this.d.useFullscreenPopup&&!this.d.dropdownContainer&&(this.d.dropdownContainer=document.body),this.isRTL=!!this.a.closest("[dir=rtl]"),"undefined"!=typeof Promise){var c=new Promise(function(b,c){a.h=b,a.i=c}),d=new Promise(function(b,c){a.i0=b,a.i1=c});this.promise=Promise.all([c,d])}else this.h=this.i=function(){},this.i0=this.i1=function(){};this.s={},this._b(),this._f(),this._h(),this._i(),this._i3()}},{key:"_b",value:function(){this._d(),this._d2(),this._e(),this._d0(),(this.d.onlyCountries.length||this.d.i18n)&&this.p.sort(this._d1)}},{key:"_c",value:function(b,c,d){c.length>this.dialCodeMaxLen&&(this.dialCodeMaxLen=c.length),this.q.hasOwnProperty(c)||(this.q[c]=[]);for(var e=0;e-1})}else if(this.d.excludeCountries.length){var b=this.d.excludeCountries.map(function(a){return a.toLowerCase()});this.p=o.filter(function(a){return-1===b.indexOf(a.iso2)})}else this.p=o}},{key:"_d0",value:function(){for(var a=0;ab.name?1:0}},{key:"_d2",value:function(){this.dialCodes={},this.dialCodeMaxLen=0,this.q={};for(var a=0;a")),h+="".concat(e.name,""),h+="+".concat(e.dialCode,""),g.insertAdjacentHTML("beforeend",h)}}},{key:"_h",value:function(){var b=arguments.length>0&&arguments[0]!==a&&arguments[0],c=this.a.getAttribute("value"),d=this.a.value,e=c&&"+"===c.charAt(0)&&(!d||"+"!==d.charAt(0)),f=e?c:d,g=this._5(f),h=this._w(f),i=this.d,j=i.initialCountry,k=i.autoInsertDialCode,l=i.defaultToFirstCountry;if(g&&!h)this._v(f);else if("auto"!==j||b){var m=j?j.toLowerCase():"",n=m&&this._y(m,!0);n?this._z(m):g&&h?this._z("us"):l&&!f?(this.j=this.preferredCountries.length?this.preferredCountries[0].iso2:this.p[0].iso2,this._z(this.j)):this._z(),!f&&k&&(this.a.value="+".concat(this.s.dialCode))}f&&this._u(f)}},{key:"_i",value:function(){this._j(),this.d.autoInsertDialCode&&this._l(),this.d.allowDropdown&&this._i2(),this.hiddenInput&&this._i0()}},{key:"_i0",value:function(){var a=this;this._a14=function(){a.hiddenInput.value=a.getNumber(),a.hiddenInputCountry.value=a.getSelectedCountryData().iso2},this.a.form&&this.a.form.addEventListener("submit",this._a14)}},{key:"_i2",value:function(){var a=this;this._a9=function(b){a.dropdownContent.classList.contains("iti__hide")?a.a.focus():b.preventDefault()};var b=this.a.closest("label");b&&b.addEventListener("click",this._a9),this._a10=function(){!a.dropdownContent.classList.contains("iti__hide")||a.a.disabled||a.a.readOnly||a._n()},this.selectedFlag.addEventListener("click",this._a10),this._a11=function(b){a.dropdownContent.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),a._n()),"Tab"===b.key&&a._2()},this.k.addEventListener("keydown",this._a11)}},{key:"_i3",value:function(){var a=this;this.d.utilsScript&&!window.intlTelInputUtils?window.intlTelInputGlobals.documentReady()?window.intlTelInputGlobals.loadUtils(this.d.utilsScript):window.addEventListener("load",function(){window.intlTelInputGlobals.loadUtils(a.d.utilsScript)}):this.i0(),"auto"!==this.d.initialCountry||this.s.iso2?this.h():this._i4()}},{key:"_i4",value:function(){var b=this;window.intlTelInputGlobals.autoCountry?this.handleAutoCountry():window.intlTelInputGlobals.startedLoadingAutoCountry||(window.intlTelInputGlobals.startedLoadingAutoCountry=!0,"function"==typeof this.d.geoIpLookup&&this.d.geoIpLookup(function(){var c=arguments.length>0&&arguments[0]!==a?arguments[0]:"",d=c.toLowerCase();d&&b._y(d,!0)?(window.intlTelInputGlobals.autoCountry=d,setTimeout(function(){return v("handleAutoCountry")})):(b._h(!0),v("rejectAutoCountryPromise"))},function(){return v("rejectAutoCountryPromise")}))}},{key:"_j",value:function(){var a=this,b=!1;this._a12=function(c){a._v(a.a.value)&&a._m2CountryChange();var d=c&&c.data&&/[^+0-9]/.test(c.data),e=c&&"insertFromPaste"===c.inputType&&a.a.value;if(d||e?b=!0:/[^+0-9]/.test(a.a.value)||(b=!1),a.d.formatAsYouType&&!b&&"insertFromPaste"!==c.inputType){var f=a.a.selectionStart,g=a.a.value.substring(0,f),h=g.replace(/[^+0-9]/g,"").length,i=c&&"deleteContentForward"===c.inputType,j=a._formatNumberAsYouType(),k=a._translateCursorPosition(h,j,f,i);a.a.value=j,a.a.setSelectionRange(k,k)}},this.a.addEventListener("input",this._a12),this._a13=function(){setTimeout(a._a12)},this.a.addEventListener("cut",this._a13),this.a.addEventListener("paste",this._a13)}},{key:"_translateCursorPosition",value:function(a,b,c,d){if(0===c&&!d)return 0;for(var e=0,f=0;fb?a.substr(0,b):a}},{key:"_l",value:function(){var a=this;this._a8=function(){a._l2()},this.a.form&&this.a.form.addEventListener("submit",this._a8),this.a.addEventListener("blur",this._a8)}},{key:"_l2",value:function(){if("+"===this.a.value.charAt(0)){var a=this._m(this.a.value);a&&this.s.dialCode!==a||(this.a.value="")}}},{key:"_m",value:function(a){return a.replace(/\D/g,"")}},{key:"_m2",value:function(a){var b=new Event(a,{bubbles:!0,cancelable:!0});this.a.dispatchEvent(b)}},{key:"_n",value:function(){if(this.d.fixDropdownWidth&&(this.dropdownContent.style.width="".concat(this.a.offsetWidth,"px")),this.dropdownContent.classList.remove("iti__hide"),this.selectedFlag.setAttribute("aria-expanded","true"),this._o(),this.d.countrySearch){var a=this.countryList.firstElementChild;a&&this._x(a,!1),this.searchInput.focus()}else this.b&&(this._x(this.b,!1),this._3(this.b,!0));this._p(),this.u.classList.add("iti__arrow--up"),this._m2("open:countrydropdown")}},{key:"_n2",value:function(a,b,c){c&&!a.classList.contains(b)?a.classList.add(b):!c&&a.classList.contains(b)&&a.classList.remove(b)}},{key:"_o",value:function(){var a=this;if(this.d.dropdownContainer&&this.d.dropdownContainer.appendChild(this.dropdown),!this.d.useFullscreenPopup){var b=this.a.getBoundingClientRect(),c=document.documentElement.scrollTop,d=b.top+c,e=this.dropdownContent.offsetHeight,f=d+this.a.offsetHeight+ec,h=!this.d.countrySearch&&!f&&g;if(this._n2(this.dropdownContent,"iti__dropdown-content--dropup",h),this.d.dropdownContainer){var i=h?0:this.a.offsetHeight;this.dropdown.style.top="".concat(d+i,"px"),this.dropdown.style.left="".concat(b.left+document.body.scrollLeft,"px"),this._a4=function(){return a._2()},window.addEventListener("scroll",this._a4)}}}},{key:"_p",value:function(){var a=this;this._a0=function(b){var c=b.target.closest(".iti__country");c&&a._x(c,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=function(b){var c=b.target.closest(".iti__country");c&&a._1(c)},this.countryList.addEventListener("click",this._a1);var b=!0;this._a2=function(){b||a._2(),b=!1},document.documentElement.addEventListener("click",this._a2);var c="",d=null;if(this._a3=function(b){["ArrowUp","ArrowDown","Enter","Escape"].includes(b.key)&&(b.preventDefault(),b.stopPropagation(),"ArrowUp"===b.key||"ArrowDown"===b.key?a._q(b.key):"Enter"===b.key?a._r():"Escape"===b.key&&a._2()),!a.d.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(b.key)&&(b.stopPropagation(),d&&clearTimeout(d),c+=b.key.toLowerCase(),a._s(c),d=setTimeout(function(){c=""},1e3))},document.addEventListener("keydown",this._a3),this.d.countrySearch){var e=function(){var b=a.searchInput.value.trim();b?a._filterCountries(b):a._filterCountries("",!0)},f=null;this._handleSearchChange=function(){f&&clearTimeout(f),f=setTimeout(function(){e(),f=null},100)},this.searchInput.addEventListener("input",this._handleSearchChange),this.searchInput.addEventListener("click",function(a){return a.stopPropagation()})}}},{key:"_normaliseString",value:function(){return(arguments.length>0&&arguments[0]!==a?arguments[0]:"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase()}},{key:"_filterCountries",value:function(b){var c=arguments.length>1&&arguments[1]!==a&&arguments[1],d=!0;this.countryList.innerHTML="";for(var e=this._normaliseString(b),f=0;f1&&(b="ArrowUp"===a?this.countryList.lastElementChild:this.countryList.firstElementChild),b){var c=!this.d.countrySearch;this._x(b,c),this.d.countrySearch&&this._3(b,!1)}}},{key:"_r",value:function(){this.c&&this._1(this.c)}},{key:"_s",value:function(a){for(var b=0;bg){b&&(k+=l);var m=e-h;c.scrollTop=k-m}}},{key:"_4",value:function(a){var b,c=this.a.value,d="+".concat(a);if("+"===c.charAt(0)){var e=this._5(c);b=e?c.replace(e,d):d,this.a.value=b}else this.d.autoInsertDialCode&&(b=c?d+c:d,this.a.value=b)}},{key:"_5",value:function(a,b){var c="";if("+"===a.charAt(0))for(var d="",e=0;e",{id:this.id,class:"jBox-wrapper"+(this.type?" jBox-"+this.type:"")+(this.options.theme?" jBox-"+this.options.theme:"")+(this.options.addClass?" "+this.options.addClass:"")}).css({position:this.options.fixed?"fixed":"absolute",display:"none",opacity:0,zIndex:this.options.zIndex}).data("jBox",this),this.options.closeOnMouseleave&&this.wrapper.on("mouseleave",function(t){!this.source||t.relatedTarget!=this.source[0]&&-1===v.inArray(this.source[0],v(t.relatedTarget).parents("*"))&&this.close()}.bind(this)),"box"==this.options.closeOnClick&&this.wrapper.on("click tap",function(){this.close({ignoreDelay:!0})}.bind(this)),this.container=v('
').appendTo(this.wrapper),this.content=v('
').appendTo(this.container),this.options.footer&&(this.footer=v('