(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?(module.exports=t()):"function"==typeof define&&define.amd?define(t):(e.Popper=t())})(this,function(){"use strict"
function e(e){return e&&"[object Function]"==={}.toString.call(e)}
function t(e,t){if(1!==e.nodeType)return[];var o=e.ownerDocument.defaultView,n=o.getComputedStyle(e,null);return t?n[t]:n}
function o(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}
function n(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body};var i=t(e),r=i.overflow,p=i.overflowX,s=i.overflowY;return/(auto|scroll|overlay)/.test(r+s+p)?e:n(o(e))}
function i(e){return e&&e.referenceNode?e.referenceNode:e}
function r(e){return 11===e?re:10===e?pe:re||pe}
function p(e){if(!e)return document.documentElement;for(var o=r(10)?document.body:null,n=e.offsetParent||null;n===o&&e.nextElementSibling;)n=(e=e.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i?(-1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===t(n,"position")?p(n):n):e?e.ownerDocument.documentElement:document.documentElement}
function s(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||p(e.firstElementChild)===e)}
function d(e){return null===e.parentNode?e:d(e.parentNode)}
function a(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var o=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=o?e:t,i=o?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(i,0);var l=r.commonAncestorContainer;if((e!==l&&t!==l)||n.contains(i))return s(l)?l:p(l);var f=d(e);return f.host?a(f.host,t):a(e,d(t).host)}
function l(e){var t=1<arguments.length&&void(0)!==arguments[1]?arguments[1]:"top",o="top"===t?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var i=e.ownerDocument.documentElement,r=e.ownerDocument.scrollingElement||i;return r[o]};return e[o]}
function f(e,t){var o=2<arguments.length&&void(0)!==arguments[2]&&arguments[2],n=l(t,"top"),i=l(t,"left"),r=o?-1:1;return(e.top+=n*r),(e.bottom+=n*r),(e.left+=i*r),(e.right+=i*r),e}
function m(e,t){var o="x"===t?"Left":"Top",n="Left"==o?"Right":"Bottom";return parseFloat(e["border"+o+"Width"])+parseFloat(e["border"+n+"Width"])}
function h(e,t,o,n){return ee(t["offset"+e],t["scroll"+e],o["client"+e],o["offset"+e],o["scroll"+e],r(10)?parseInt(o["offset"+e])+parseInt(n["margin"+("Height"===e?"Top":"Left")])+parseInt(n["margin"+("Height"===e?"Bottom":"Right")]):0)}
function c(e){var t=e.body,o=e.documentElement,n=r(10)&&getComputedStyle(o);return{height:h("Height",t,o,n),width:h("Width",t,o,n)}}
function g(e){return le({},e,{right:e.left+e.width,bottom:e.top+e.height})}
function u(e){var o={};try{if(r(10)){o=e.getBoundingClientRect();var n=l(e,"top"),i=l(e,"left");(o.top+=n),(o.left+=i),(o.bottom+=n),(o.right+=i)}else o=e.getBoundingClientRect()}catch(t){};var p={left:o.left,top:o.top,width:o.right-o.left,height:o.bottom-o.top},s="HTML"===e.nodeName?c(e.ownerDocument):{},d=s.width||e.clientWidth||p.width,a=s.height||e.clientHeight||p.height,f=e.offsetWidth-d,h=e.offsetHeight-a;if(f||h){var u=t(e);(f-=m(u,"x")),(h-=m(u,"y")),(p.width-=f),(p.height-=h)};return g(p)}
function b(e,o){var i=2<arguments.length&&void(0)!==arguments[2]&&arguments[2],p=r(10),s="HTML"===o.nodeName,d=u(e),a=u(o),l=n(e),m=t(o),h=parseFloat(m.borderTopWidth),c=parseFloat(m.borderLeftWidth);i&&s&&((a.top=ee(a.top,0)),(a.left=ee(a.left,0)));var b=g({top:d.top-a.top-h,left:d.left-a.left-c,width:d.width,height:d.height});if(((b.marginTop=0),(b.marginLeft=0),!p&&s)){var w=parseFloat(m.marginTop),y=parseFloat(m.marginLeft);(b.top-=h-w),(b.bottom-=h-w),(b.left-=c-y),(b.right-=c-y),(b.marginTop=w),(b.marginLeft=y)};return(p&&!i?o.contains(l):o===l&&"BODY"!==l.nodeName)&&(b=f(b,o)),b}
function w(e){var t=1<arguments.length&&void(0)!==arguments[1]&&arguments[1],o=e.ownerDocument.documentElement,n=b(e,o),i=ee(o.clientWidth,window.innerWidth||0),r=ee(o.clientHeight,window.innerHeight||0),p=t?0:l(o),s=t?0:l(o,"left"),d={top:p-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:i,height:r};return g(d)}
function y(e){var n=e.nodeName;if("BODY"===n||"HTML"===n)return!1;if("fixed"===t(e,"position"))return!0;var i=o(e);return!!i&&y(i)}
function E(e){if(!e||!e.parentElement||r())return document.documentElement;for(var o=e.parentElement;o&&"none"===t(o,"transform");)o=o.parentElement;return o||document.documentElement}
function v(e,t,r,p){var s=4<arguments.length&&void(0)!==arguments[4]&&arguments[4],d={top:0,left:0},l=s?E(e):a(e,i(t));if("viewport"===p){d=w(l,s)}else{var f;"scrollParent"===p?((f=n(o(t))),"BODY"===f.nodeName&&(f=e.ownerDocument.documentElement)):"window"===p?(f=e.ownerDocument.documentElement):(f=p);var m=b(f,l,s);if("HTML"===f.nodeName&&!y(l)){var h=c(e.ownerDocument),g=h.height,u=h.width;(d.top+=m.top-m.marginTop),(d.bottom=g+m.top),(d.left+=m.left-m.marginLeft),(d.right=u+m.left)}else d=m};r=r||0;var v="number"==typeof r;return(d.left+=v?r:r.left||0),(d.top+=v?r:r.top||0),(d.right-=v?r:r.right||0),(d.bottom-=v?r:r.bottom||0),d}
function x(e){var t=e.width,o=e.height;return t*o}
function O(e,t,o,n,i){var r=5<arguments.length&&void(0)!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var p=v(o,n,r,i),s={top:{width:p.width,height:t.top-p.top},right:{width:p.right-t.right,height:p.height},bottom:{width:p.width,height:p.bottom-t.bottom},left:{width:t.left-p.left,height:p.height}},d=Object.keys(s).map(function(e){return le({key:e},s[e],{area:x(s[e])})}).sort(function(e,t){return t.area-e.area}),a=d.filter(function(e){var t=e.width,n=e.height;return t>=o.clientWidth&&n>=o.clientHeight}),l=0<a.length?a[0].key:d[0].key,f=e.split("-")[1];return l+(f?"-"+f:"")}
function L(e,t,o){var n=3<arguments.length&&void(0)!==arguments[3]?arguments[3]:null,r=n?E(t):a(t,i(o));return b(o,r,n)}
function S(e){var t=e.ownerDocument.defaultView,o=t.getComputedStyle(e),n=parseFloat(o.marginTop||0)+parseFloat(o.marginBottom||0),i=parseFloat(o.marginLeft||0)+parseFloat(o.marginRight||0),r={width:e.offsetWidth+i,height:e.offsetHeight+n};return r}
function T(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}
function C(e,t,o){o=o.split("-")[0];var n=S(e),i={width:n.width,height:n.height},r=-1!==["right","left"].indexOf(o),p=r?"top":"left",s=r?"left":"top",d=r?"height":"width",a=r?"width":"height";return(i[p]=t[p]+t[d]/2-n[d]/2),(i[s]=o===s?t[s]-n[a]:t[T(s)]),i}
function D(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}
function N(e,t,o){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===o});var n=D(e,function(e){return e[t]===o});return e.indexOf(n)}
function P(t,o,n){var i=void(0)===n?t:t.slice(0,N(t,"name",n));return(i.forEach(function(t){t["function"]&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t["function"]||t.fn;t.enabled&&e(n)&&((o.offsets.popper=g(o.offsets.popper)),(o.offsets.reference=g(o.offsets.reference)),(o=n(o,t)))}),o)}
function k(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};(e.offsets.reference=L(this.state,this.popper,this.reference,this.options.positionFixed)),(e.placement=O(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding)),(e.originalPlacement=e.placement),(e.positionFixed=this.options.positionFixed),(e.offsets.popper=C(this.popper,e.offsets.reference,e.placement)),(e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute"),(e=P(this.modifiers,e)),this.state.isCreated?this.options.onUpdate(e):((this.state.isCreated=!0),this.options.onCreate(e))}}
function W(e,t){return e.some(function(e){var o=e.name,n=e.enabled;return n&&o===t})}
function B(e){for(var t=[!1,"ms","Webkit","Moz","O"],o=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var i=t[n],r=i?""+i+o:e;if("undefined"!=typeof document.body.style[r])return r};return null}
function H(){return((this.state.isDestroyed=!0),W(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),(this.popper.style.position=""),(this.popper.style.top=""),(this.popper.style.left=""),(this.popper.style.right=""),(this.popper.style.bottom=""),(this.popper.style.willChange=""),(this.popper.style[B("transform")]="")),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this)}
function A(e){var t=e.ownerDocument;return t?t.defaultView:window}
function M(e,t,o,i){var r="BODY"===e.nodeName,p=r?e.ownerDocument.defaultView:e;p.addEventListener(t,o,{passive:!0}),r||M(n(p.parentNode),t,o,i),i.push(p)}
function F(e,t,o,i){(o.updateBound=i),A(e).addEventListener("resize",o.updateBound,{passive:!0});var r=n(e);return M(r,"scroll",o.updateBound,o.scrollParents),(o.scrollElement=r),(o.eventsEnabled=!0),o}
function I(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}
function R(e,t){return(A(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),(t.updateBound=null),(t.scrollParents=[]),(t.scrollElement=null),(t.eventsEnabled=!1),t)}
function U(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),(this.state=R(this.reference,this.state)))}
function Y(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}
function V(e,t){Object.keys(t).forEach(function(o){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(o)&&Y(t[o])&&(n="px"),(e.style[o]=t[o]+n)})}
function j(e,t){Object.keys(t).forEach(function(o){var n=t[o];!1===n?e.removeAttribute(o):e.setAttribute(o,t[o])})}
function q(e,t){var o=e.offsets,n=o.popper,i=o.reference,r=$,p=function(e){return e},s=r(i.width),d=r(n.width),a=-1!==["left","right"].indexOf(e.placement),l=-1!==e.placement.indexOf("-"),f=t?(a||l||s%2==d%2?r:Z):p,m=t?r:p;return{left:f(1==s%2&&1==d%2&&!l&&t?n.left-1:n.left),top:m(n.top),bottom:m(n.bottom),right:f(n.right)}}
function K(e,t,o){var n=D(e,function(e){var o=e.name;return o===t}),i=!!n&&e.some(function(e){return e.name===o&&e.enabled&&e.order<n.order});if(!i){var r="`"+t+"`";console.warn("`"+o+"` modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")};return i}
function z(e){return"end"===e?"start":"start"===e?"end":e}
function G(e){var t=1<arguments.length&&void(0)!==arguments[1]&&arguments[1],o=he.indexOf(e),n=he.slice(o+1).concat(he.slice(0,o));return t?n.reverse():n}
function _(e,t,o,n){var i=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+i[1],p=i[2];if(!r)return e;if(0===p.indexOf("%")){var s;switch(p){case"%p":s=o;break;case"%":case"%r":default:s=n};var d=g(s);return(d[t]/100)*r};if("vh"===p||"vw"===p){var a;return(a="vh"===p?ee(document.documentElement.clientHeight,window.innerHeight||0):ee(document.documentElement.clientWidth,window.innerWidth||0)),(a/100)*r};return r}
function X(e,t,o,n){var i=[0,0],r=-1!==["right","left"].indexOf(n),p=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=p.indexOf(D(p,function(e){return-1!==e.search(/,|\s/)}));p[s]&&-1===p[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var d=/\s*,\s*|\s+/,a=-1===s?[p]:[p.slice(0,s).concat([p[s].split(d)[0]]),[p[s].split(d)[1]].concat(p.slice(s+1))];return((a=a.map(function(e,n){var i=(1===n?!r:r)?"height":"width",p=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?((e[e.length-1]=t),(p=!0),e):p?((e[e.length-1]+=t),(p=!1),e):e.concat(t)},[]).map(function(e){return _(e,i,t,o)})})),a.forEach(function(e,t){e.forEach(function(o,n){Y(o)&&(i[t]+=o*("-"===e[n-1]?-1:1))})}),i)}
function J(e,t){var o,n=t.offset,i=e.placement,r=e.offsets,p=r.popper,s=r.reference,d=i.split("-")[0];return((o=Y(+n)?[+n,0]:X(n,p,s,d)),"left"===d?((p.top+=o[0]),(p.left-=o[1])):"right"===d?((p.top+=o[0]),(p.left+=o[1])):"top"===d?((p.left+=o[0]),(p.top-=o[1])):"bottom"===d&&((p.left+=o[0]),(p.top+=o[1])),(e.popper=p),e)};var Q=Math.min,Z=Math.floor,$=Math.round,ee=Math.max,te="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,oe=(function(){for(var e=["Edge","Trident","Firefox"],t=0;t<e.length;t+=1)if(te&&0<=navigator.userAgent.indexOf(e[t]))return 1;return 0})(),ne=te&&window.Promise,ie=ne?function(e){var t=!1;return function(){t||((t=!0),window.Promise.resolve().then(function(){(t=!1),e()}))}}:function(e){var t=!1;return function(){t||((t=!0),setTimeout(function(){(t=!1),e()},oe))}},re=te&&!!(window.MSInputMethodContext&&document.documentMode),pe=te&&/MSIE 10/.test(navigator.userAgent),se=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},de=(function(){function e(e,t){for(var o,n=0;n<t.length;n++)(o=t[n]),(o.enumerable=o.enumerable||!1),(o.configurable=!0),"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)};return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}})(),ae=function(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):(e[t]=o),e},le=Object.assign||function(e){for(var t,o=1;o<arguments.length;o++)for(var n in ((t=arguments[o]),t))Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},fe=te&&/Firefox/i.test(navigator.userAgent),me=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],he=me.slice(3),ce={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},ge=(function(){function t(o,n){var i=this,r=2<arguments.length&&void(0)!==arguments[2]?arguments[2]:{};se(this,t),(this.scheduleUpdate=function(){return requestAnimationFrame(i.update)}),(this.update=ie(this.update.bind(this))),(this.options=le({},t.Defaults,r)),(this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]}),(this.reference=o&&o.jquery?o[0]:o),(this.popper=n&&n.jquery?n[0]:n),(this.options.modifiers={}),Object.keys(le({},t.Defaults.modifiers,r.modifiers)).forEach(function(e){i.options.modifiers[e]=le({},t.Defaults.modifiers[e]||{},r.modifiers?r.modifiers[e]:{})}),(this.modifiers=Object.keys(this.options.modifiers).map(function(e){return le({name:e},i.options.modifiers[e])}).sort(function(e,t){return e.order-t.order})),this.modifiers.forEach(function(t){t.enabled&&e(t.onLoad)&&t.onLoad(i.reference,i.popper,i.options,t,i.state)}),this.update();var p=this.options.eventsEnabled;p&&this.enableEventListeners(),(this.state.eventsEnabled=p)};return(de(t,[{key:"update",value:function(){return k.call(this)}},{key:"destroy",value:function(){return H.call(this)}},{key:"enableEventListeners",value:function(){return I.call(this)}},{key:"disableEventListeners",value:function(){return U.call(this)}}]),t)})();return((ge.Utils=("undefined"==typeof window?global:window).PopperUtils),(ge.placements=me),(ge.Defaults={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(e){var t=e.placement,o=t.split("-")[0],n=t.split("-")[1];if(n){var i=e.offsets,r=i.reference,p=i.popper,s=-1!==["bottom","top"].indexOf(o),d=s?"left":"top",a=s?"width":"height",l={start:ae({},d,r[d]),end:ae({},d,r[d]+r[a]-p[a])};e.offsets.popper=le({},p,l[n])};return e}},offset:{order:200,enabled:!0,fn:J,offset:0},preventOverflow:{order:300,enabled:!0,fn:function(e,t){var o=t.boundariesElement||p(e.instance.popper);e.instance.reference===o&&(o=p(o));var n=B("transform"),i=e.instance.popper.style,r=i.top,s=i.left,d=i[n];(i.top=""),(i.left=""),(i[n]="");var a=v(e.instance.popper,e.instance.reference,t.padding,o,e.positionFixed);(i.top=r),(i.left=s),(i[n]=d),(t.boundaries=a);var l=t.priority,f=e.offsets.popper,m={primary:function(e){var o=f[e];return f[e]<a[e]&&!t.escapeWithReference&&(o=ee(f[e],a[e])),ae({},e,o)},secondary:function(e){var o="right"===e?"left":"top",n=f[o];return f[e]>a[e]&&!t.escapeWithReference&&(n=Q(f[o],a[e]-("right"===e?f.width:f.height))),ae({},o,n)}};return(l.forEach(function(e){var t=-1===["left","top"].indexOf(e)?"secondary":"primary";f=le({},f,m[t](e))}),(e.offsets.popper=f),e)},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(e){var t=e.offsets,o=t.popper,n=t.reference,i=e.placement.split("-")[0],r=Z,p=-1!==["top","bottom"].indexOf(i),s=p?"right":"bottom",d=p?"left":"top",a=p?"width":"height";return o[s]<r(n[d])&&(e.offsets.popper[d]=r(n[d])-o[a]),o[d]>r(n[s])&&(e.offsets.popper[d]=r(n[s])),e}},arrow:{order:500,enabled:!0,fn:function(e,o){var n;if(!K(e.instance.modifiers,"arrow","keepTogether"))return e;var i=o.element;if("string"==typeof i){if(((i=e.instance.popper.querySelector(i)),!i))return e}else if(!e.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var r=e.placement.split("-")[0],p=e.offsets,s=p.popper,d=p.reference,a=-1!==["left","right"].indexOf(r),l=a?"height":"width",f=a?"Top":"Left",m=f.toLowerCase(),h=a?"left":"top",c=a?"bottom":"right",u=S(i)[l];d[c]-u<s[m]&&(e.offsets.popper[m]-=s[m]-(d[c]-u)),d[m]+u>s[c]&&(e.offsets.popper[m]+=d[m]+u-s[c]),(e.offsets.popper=g(e.offsets.popper));var b=d[m]+d[l]/2-u/2,w=t(e.instance.popper),y=parseFloat(w["margin"+f]),E=parseFloat(w["border"+f+"Width"]),v=b-e.offsets.popper[m]-y-E;return(v=ee(Q(s[l]-u,v),0)),(e.arrowElement=i),(e.offsets.arrow=((n={}),ae(n,m,$(v)),ae(n,h,""),n)),e},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(e,t){if(W(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var o=v(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],i=T(n),r=e.placement.split("-")[1]||"",p=[];switch(t.behavior){case ce.FLIP:p=[n,i];break;case ce.CLOCKWISE:p=G(n);break;case ce.COUNTERCLOCKWISE:p=G(n,!0);break;default:p=t.behavior};return(p.forEach(function(s,d){if(n!==s||p.length===d+1)return e;(n=e.placement.split("-")[0]),(i=T(n));var a=e.offsets.popper,l=e.offsets.reference,f=Z,m=("left"===n&&f(a.right)>f(l.left))||("right"===n&&f(a.left)<f(l.right))||("top"===n&&f(a.bottom)>f(l.top))||("bottom"===n&&f(a.top)<f(l.bottom)),h=f(a.left)<f(o.left),c=f(a.right)>f(o.right),g=f(a.top)<f(o.top),u=f(a.bottom)>f(o.bottom),b=("left"===n&&h)||("right"===n&&c)||("top"===n&&g)||("bottom"===n&&u),w=-1!==["top","bottom"].indexOf(n),y=!!t.flipVariations&&((w&&"start"===r&&h)||(w&&"end"===r&&c)||(!w&&"start"===r&&g)||(!w&&"end"===r&&u)),E=!!t.flipVariationsByContent&&((w&&"start"===r&&c)||(w&&"end"===r&&h)||(!w&&"start"===r&&u)||(!w&&"end"===r&&g)),v=y||E;(m||b||v)&&((e.flipped=!0),(m||b)&&(n=p[d+1]),v&&(r=z(r)),(e.placement=n+(r?"-"+r:"")),(e.offsets.popper=le({},e.offsets.popper,C(e.instance.popper,e.offsets.reference,e.placement))),(e=P(e.instance.modifiers,e,"flip")))}),e)},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(e){var t=e.placement,o=t.split("-")[0],n=e.offsets,i=n.popper,r=n.reference,p=-1!==["left","right"].indexOf(o),s=-1===["top","left"].indexOf(o);return(i[p?"left":"top"]=r[o]-(s?i[p?"width":"height"]:0)),(e.placement=T(t)),(e.offsets.popper=g(i)),e}},hide:{order:800,enabled:!0,fn:function(e){if(!K(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,o=D(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<o.top||t.left>o.right||t.top>o.bottom||t.right<o.left){if(!0===e.hide)return e;(e.hide=!0),(e.attributes["x-out-of-boundaries"]="")}else{if(!1===e.hide)return e;(e.hide=!1),(e.attributes["x-out-of-boundaries"]=!1)};return e}},computeStyle:{order:850,enabled:!0,fn:function(e,t){var o=t.x,n=t.y,i=e.offsets.popper,r=D(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void(0)!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var s,d,a=void(0)===r?t.gpuAcceleration:r,l=p(e.instance.popper),f=u(l),m={position:i.position},h=q(e,2>window.devicePixelRatio||!fe),c="bottom"===o?"top":"bottom",g="right"===n?"left":"right",b=B("transform");if(((d="bottom"==c?("HTML"===l.nodeName?-l.clientHeight+h.bottom:-f.height+h.bottom):h.top),(s="right"==g?("HTML"===l.nodeName?-l.clientWidth+h.right:-f.width+h.right):h.left),a&&b)){(m[b]="translate3d("+s+"px, "+d+"px, 0)"),(m[c]=0),(m[g]=0),(m.willChange="transform")}else{var w="bottom"==c?-1:1,y="right"==g?-1:1;(m[c]=d*w),(m[g]=s*y),(m.willChange=c+", "+g)};var E={"x-placement":e.placement};return(e.attributes=le({},E,e.attributes)),(e.styles=le({},m,e.styles)),(e.arrowStyles=le({},e.offsets.arrow,e.arrowStyles)),e},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(e){return V(e.instance.popper,e.styles),j(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&V(e.arrowElement,e.arrowStyles),e},onLoad:function(e,t,o,n,i){var r=L(i,t,e,o.positionFixed),p=O(o.placement,r,t,e,o.modifiers.flip.boundariesElement,o.modifiers.flip.padding);return t.setAttribute("x-placement",p),V(t,{position:o.positionFixed?"fixed":"absolute"}),o},gpuAcceleration:void(0)}}}),ge)});
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.ScrollSpy=factory(global.jQuery,global.Util))}(this,(function($,Util){'use strict'
function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}};var $__default=_interopDefaultLegacy($),Util__default=_interopDefaultLegacy(Util)
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)if(Object.prototype.hasOwnProperty.call(source,key))target[key]=source[key]};return target};return _extends.apply(this,arguments)}
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor};var NAME='scrollspy',VERSION='4.5.3',DATA_KEY='bs.scrollspy',EVENT_KEY="."+DATA_KEY,DATA_API_KEY='.data-api',JQUERY_NO_CONFLICT=$__default['default'].fn[NAME],Default={offset:10,method:'auto',target:''},DefaultType={offset:'number',method:'string',target:'(string|element)'},EVENT_ACTIVATE="activate"+EVENT_KEY,EVENT_SCROLL="scroll"+EVENT_KEY,EVENT_LOAD_DATA_API="load"+EVENT_KEY+DATA_API_KEY,CLASS_NAME_DROPDOWN_ITEM='dropdown-item',CLASS_NAME_ACTIVE='active',SELECTOR_DATA_SPY='[data-spy="scroll"]',SELECTOR_NAV_LIST_GROUP='.nav, .list-group',SELECTOR_NAV_LINKS='.nav-link',SELECTOR_NAV_ITEMS='.nav-item',SELECTOR_LIST_ITEMS='.list-group-item',SELECTOR_DROPDOWN='.dropdown',SELECTOR_DROPDOWN_ITEMS='.dropdown-item',SELECTOR_DROPDOWN_TOGGLE='.dropdown-toggle',METHOD_OFFSET='offset',METHOD_POSITION='position',ScrollSpy=function(){function ScrollSpy(element,config){var _this=this;this._element=element;this._scrollElement=element.tagName==='BODY'?window:element;this._config=this._getConfig(config);this._selector=this._config.target+" "+SELECTOR_NAV_LINKS+","+(this._config.target+" "+SELECTOR_LIST_ITEMS+",")+(this._config.target+" "+SELECTOR_DROPDOWN_ITEMS);this._offsets=[];this._targets=[];this._activeTarget=null;this._scrollHeight=0;$__default['default'](this._scrollElement).on(EVENT_SCROLL,function(event){return _this._process(event)});this.refresh();this._process()};var _proto=ScrollSpy.prototype;_proto.refresh=function refresh(){var _this2=this,autoMethod=this._scrollElement===this._scrollElement.window?METHOD_OFFSET:METHOD_POSITION,offsetMethod=this._config.method==='auto'?autoMethod:this._config.method,offsetBase=offsetMethod===METHOD_POSITION?this._getScrollTop():0;this._offsets=[];this._targets=[];this._scrollHeight=this._getScrollHeight();var targets=[].slice.call(document.querySelectorAll(this._selector));targets.map(function(element){var target,targetSelector=Util__default['default'].getSelectorFromElement(element);if(targetSelector)target=document.querySelector(targetSelector);if(target){var targetBCR=target.getBoundingClientRect();if(targetBCR.width||targetBCR.height)return[$__default['default'](target)[offsetMethod]().top+offsetBase,targetSelector]};return null}).filter(function(item){return item}).sort(function(a,b){return a[0]-b[0]}).forEach(function(item){_this2._offsets.push(item[0]);_this2._targets.push(item[1])})};_proto.dispose=function dispose(){$__default['default'].removeData(this._element,DATA_KEY);$__default['default'](this._scrollElement).off(EVENT_KEY);this._element=null;this._scrollElement=null;this._config=null;this._selector=null;this._offsets=null;this._targets=null;this._activeTarget=null;this._scrollHeight=null};_proto._getConfig=function _getConfig(config){config=_extends({},Default,typeof config==='object'&&config?config:{});if(typeof config.target!=='string'&&Util__default['default'].isElement(config.target)){var id=$__default['default'](config.target).attr('id');if(!id){id=Util__default['default'].getUID(NAME);$__default['default'](config.target).attr('id',id)};config.target="#"+id};Util__default['default'].typeCheckConfig(NAME,config,DefaultType);return config};_proto._getScrollTop=function _getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop};_proto._getScrollHeight=function _getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)};_proto._getOffsetHeight=function _getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height};_proto._process=function _process(){var scrollTop=this._getScrollTop()+this._config.offset,scrollHeight=this._getScrollHeight(),maxScroll=this._config.offset+scrollHeight-this._getOffsetHeight();if(this._scrollHeight!==scrollHeight)this.refresh();if(scrollTop>=maxScroll){var target=this._targets[this._targets.length-1];if(this._activeTarget!==target)this._activate(target);return};if(this._activeTarget&&scrollTop<this._offsets[0]&&this._offsets[0]>0){this._activeTarget=null;this._clear();return};for(var i=this._offsets.length;i--;){var isActiveTarget=this._activeTarget!==this._targets[i]&&scrollTop>=this._offsets[i]&&(typeof this._offsets[i+1]==='undefined'||scrollTop<this._offsets[i+1]);if(isActiveTarget)this._activate(this._targets[i])}};_proto._activate=function _activate(target){this._activeTarget=target;this._clear();var queries=this._selector.split(',').map(function(selector){return selector+"[data-target=\""+target+"\"],"+selector+"[href=\""+target+"\"]"}),$link=$__default['default']([].slice.call(document.querySelectorAll(queries.join(','))));if($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)){$link.closest(SELECTOR_DROPDOWN).find(SELECTOR_DROPDOWN_TOGGLE).addClass(CLASS_NAME_ACTIVE);$link.addClass(CLASS_NAME_ACTIVE)}else{$link.addClass(CLASS_NAME_ACTIVE);$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_LINKS+", "+SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE);$link.parents(SELECTOR_NAV_LIST_GROUP).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE)};$__default['default'](this._scrollElement).trigger(EVENT_ACTIVATE,{relatedTarget:target})};_proto._clear=function _clear(){[].slice.call(document.querySelectorAll(this._selector)).filter(function(node){return node.classList.contains(CLASS_NAME_ACTIVE)}).forEach(function(node){return node.classList.remove(CLASS_NAME_ACTIVE)})};ScrollSpy._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$__default['default'](this).data(DATA_KEY),_config=typeof config==='object'&&config;if(!data){data=new ScrollSpy(this,_config);$__default['default'](this).data(DATA_KEY,data)};if(typeof config==='string'){if(typeof data[config]==='undefined')throw new TypeError("No method named \""+config+"\"");data[config]()}})};_createClass(ScrollSpy,null,[{key:"VERSION",get:function get(){return VERSION}},{key:"Default",get:function get(){return Default}}]);return ScrollSpy}();$__default['default'](window).on(EVENT_LOAD_DATA_API,function(){var scrollSpys=[].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY)),scrollSpysLength=scrollSpys.length;for(var i=scrollSpysLength;i--;){var $spy=$__default['default'](scrollSpys[i]);ScrollSpy._jQueryInterface.call($spy,$spy.data())}});$__default['default'].fn[NAME]=ScrollSpy._jQueryInterface;$__default['default'].fn[NAME].Constructor=ScrollSpy;$__default['default'].fn[NAME].noConflict=function(){$__default['default'].fn[NAME]=JQUERY_NO_CONFLICT;return ScrollSpy._jQueryInterface};return ScrollSpy})));
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.Tab=factory(global.jQuery,global.Util))}(this,(function($,Util){'use strict'
function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}};var $__default=_interopDefaultLegacy($),Util__default=_interopDefaultLegacy(Util)
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor};var NAME='tab',VERSION='4.5.3',DATA_KEY='bs.tab',EVENT_KEY="."+DATA_KEY,DATA_API_KEY='.data-api',JQUERY_NO_CONFLICT=$__default['default'].fn[NAME],EVENT_HIDE="hide"+EVENT_KEY,EVENT_HIDDEN="hidden"+EVENT_KEY,EVENT_SHOW="show"+EVENT_KEY,EVENT_SHOWN="shown"+EVENT_KEY,EVENT_CLICK_DATA_API="click"+EVENT_KEY+DATA_API_KEY,CLASS_NAME_DROPDOWN_MENU='dropdown-menu',CLASS_NAME_ACTIVE='active',CLASS_NAME_DISABLED='disabled',CLASS_NAME_FADE='fade',CLASS_NAME_SHOW='show',SELECTOR_DROPDOWN='.dropdown',SELECTOR_NAV_LIST_GROUP='.nav, .list-group',SELECTOR_ACTIVE='.active',SELECTOR_ACTIVE_UL='> li > .active',SELECTOR_DATA_TOGGLE='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',SELECTOR_DROPDOWN_TOGGLE='.dropdown-toggle',SELECTOR_DROPDOWN_ACTIVE_CHILD='> .dropdown-menu .active',Tab=function(){function Tab(element){this._element=element};var _proto=Tab.prototype;_proto.show=function show(){var _this=this;if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&$__default['default'](this._element).hasClass(CLASS_NAME_ACTIVE)||$__default['default'](this._element).hasClass(CLASS_NAME_DISABLED))return;var target,previous,listElement=$__default['default'](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0],selector=Util__default['default'].getSelectorFromElement(this._element);if(listElement){var itemSelector=listElement.nodeName==='UL'||listElement.nodeName==='OL'?SELECTOR_ACTIVE_UL:SELECTOR_ACTIVE;previous=$__default['default'].makeArray($__default['default'](listElement).find(itemSelector));previous=previous[previous.length-1]};var hideEvent=$__default['default'].Event(EVENT_HIDE,{relatedTarget:this._element}),showEvent=$__default['default'].Event(EVENT_SHOW,{relatedTarget:previous});if(previous)$__default['default'](previous).trigger(hideEvent);$__default['default'](this._element).trigger(showEvent);if(showEvent.isDefaultPrevented()||hideEvent.isDefaultPrevented())return;if(selector)target=document.querySelector(selector);this._activate(this._element,listElement);var complete=function complete(){var hiddenEvent=$__default['default'].Event(EVENT_HIDDEN,{relatedTarget:_this._element}),shownEvent=$__default['default'].Event(EVENT_SHOWN,{relatedTarget:previous});$__default['default'](previous).trigger(hiddenEvent);$__default['default'](_this._element).trigger(shownEvent)};if(target){this._activate(target,target.parentNode,complete)}else complete()};_proto.dispose=function dispose(){$__default['default'].removeData(this._element,DATA_KEY);this._element=null};_proto._activate=function _activate(element,container,callback){var _this2=this,activeElements=container&&(container.nodeName==='UL'||container.nodeName==='OL')?$__default['default'](container).find(SELECTOR_ACTIVE_UL):$__default['default'](container).children(SELECTOR_ACTIVE),active=activeElements[0],isTransitioning=callback&&active&&$__default['default'](active).hasClass(CLASS_NAME_FADE),complete=function complete(){return _this2._transitionComplete(element,active,callback)};if(active&&isTransitioning){var transitionDuration=Util__default['default'].getTransitionDurationFromElement(active);$__default['default'](active).removeClass(CLASS_NAME_SHOW).one(Util__default['default'].TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()};_proto._transitionComplete=function _transitionComplete(element,active,callback){if(active){$__default['default'](active).removeClass(CLASS_NAME_ACTIVE);var dropdownChild=$__default['default'](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0];if(dropdownChild)$__default['default'](dropdownChild).removeClass(CLASS_NAME_ACTIVE);if(active.getAttribute('role')==='tab')active.setAttribute('aria-selected',false)};$__default['default'](element).addClass(CLASS_NAME_ACTIVE);if(element.getAttribute('role')==='tab')element.setAttribute('aria-selected',true);Util__default['default'].reflow(element);if(element.classList.contains(CLASS_NAME_FADE))element.classList.add(CLASS_NAME_SHOW);if(element.parentNode&&$__default['default'](element.parentNode).hasClass(CLASS_NAME_DROPDOWN_MENU)){var dropdownElement=$__default['default'](element).closest(SELECTOR_DROPDOWN)[0];if(dropdownElement){var dropdownToggleList=[].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE));$__default['default'](dropdownToggleList).addClass(CLASS_NAME_ACTIVE)};element.setAttribute('aria-expanded',true)};if(callback)callback()};Tab._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $this=$__default['default'](this),data=$this.data(DATA_KEY);if(!data){data=new Tab(this);$this.data(DATA_KEY,data)};if(typeof config==='string'){if(typeof data[config]==='undefined')throw new TypeError("No method named \""+config+"\"");data[config]()}})};_createClass(Tab,null,[{key:"VERSION",get:function get(){return VERSION}}]);return Tab}();$__default['default'](document).on(EVENT_CLICK_DATA_API,SELECTOR_DATA_TOGGLE,function(event){event.preventDefault();Tab._jQueryInterface.call($__default['default'](this),'show')});$__default['default'].fn[NAME]=Tab._jQueryInterface;$__default['default'].fn[NAME].Constructor=Tab;$__default['default'].fn[NAME].noConflict=function(){$__default['default'].fn[NAME]=JQUERY_NO_CONFLICT;return Tab._jQueryInterface};return Tab})));
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','./util.js'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.Toast=factory(global.jQuery,global.Util))}(this,(function($,Util){'use strict'
function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}};var $__default=_interopDefaultLegacy($),Util__default=_interopDefaultLegacy(Util)
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)if(Object.prototype.hasOwnProperty.call(source,key))target[key]=source[key]};return target};return _extends.apply(this,arguments)}
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor};var NAME='toast',VERSION='4.5.3',DATA_KEY='bs.toast',EVENT_KEY="."+DATA_KEY,JQUERY_NO_CONFLICT=$__default['default'].fn[NAME],EVENT_CLICK_DISMISS="click.dismiss"+EVENT_KEY,EVENT_HIDE="hide"+EVENT_KEY,EVENT_HIDDEN="hidden"+EVENT_KEY,EVENT_SHOW="show"+EVENT_KEY,EVENT_SHOWN="shown"+EVENT_KEY,CLASS_NAME_FADE='fade',CLASS_NAME_HIDE='hide',CLASS_NAME_SHOW='show',CLASS_NAME_SHOWING='showing',DefaultType={animation:'boolean',autohide:'boolean',delay:'number'},Default={animation:true,autohide:true,delay:500},SELECTOR_DATA_DISMISS='[data-dismiss="toast"]',Toast=function(){function Toast(element,config){this._element=element;this._config=this._getConfig(config);this._timeout=null;this._setListeners()};var _proto=Toast.prototype;_proto.show=function show(){var _this=this,showEvent=$__default['default'].Event(EVENT_SHOW);$__default['default'](this._element).trigger(showEvent);if(showEvent.isDefaultPrevented())return;this._clearTimeout();if(this._config.animation)this._element.classList.add(CLASS_NAME_FADE);var complete=function complete(){_this._element.classList.remove(CLASS_NAME_SHOWING);_this._element.classList.add(CLASS_NAME_SHOW);$__default['default'](_this._element).trigger(EVENT_SHOWN);if(_this._config.autohide)_this._timeout=setTimeout(function(){_this.hide()},_this._config.delay)};this._element.classList.remove(CLASS_NAME_HIDE);Util__default['default'].reflow(this._element);this._element.classList.add(CLASS_NAME_SHOWING);if(this._config.animation){var transitionDuration=Util__default['default'].getTransitionDurationFromElement(this._element);$__default['default'](this._element).one(Util__default['default'].TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()};_proto.hide=function hide(){if(!this._element.classList.contains(CLASS_NAME_SHOW))return;var hideEvent=$__default['default'].Event(EVENT_HIDE);$__default['default'](this._element).trigger(hideEvent);if(hideEvent.isDefaultPrevented())return;this._close()};_proto.dispose=function dispose(){this._clearTimeout();if(this._element.classList.contains(CLASS_NAME_SHOW))this._element.classList.remove(CLASS_NAME_SHOW);$__default['default'](this._element).off(EVENT_CLICK_DISMISS);$__default['default'].removeData(this._element,DATA_KEY);this._element=null;this._config=null};_proto._getConfig=function _getConfig(config){config=_extends({},Default,$__default['default'](this._element).data(),typeof config==='object'&&config?config:{});Util__default['default'].typeCheckConfig(NAME,config,this.constructor.DefaultType);return config};_proto._setListeners=function _setListeners(){var _this2=this;$__default['default'](this._element).on(EVENT_CLICK_DISMISS,SELECTOR_DATA_DISMISS,function(){return _this2.hide()})};_proto._close=function _close(){var _this3=this,complete=function complete(){_this3._element.classList.add(CLASS_NAME_HIDE);$__default['default'](_this3._element).trigger(EVENT_HIDDEN)};this._element.classList.remove(CLASS_NAME_SHOW);if(this._config.animation){var transitionDuration=Util__default['default'].getTransitionDurationFromElement(this._element);$__default['default'](this._element).one(Util__default['default'].TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()};_proto._clearTimeout=function _clearTimeout(){clearTimeout(this._timeout);this._timeout=null};Toast._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $element=$__default['default'](this),data=$element.data(DATA_KEY),_config=typeof config==='object'&&config;if(!data){data=new Toast(this,_config);$element.data(DATA_KEY,data)};if(typeof config==='string'){if(typeof data[config]==='undefined')throw new TypeError("No method named \""+config+"\"");data[config](this)}})};_createClass(Toast,null,[{key:"VERSION",get:function get(){return VERSION}},{key:"DefaultType",get:function get(){return DefaultType}},{key:"Default",get:function get(){return Default}}]);return Toast}();$__default['default'].fn[NAME]=Toast._jQueryInterface;$__default['default'].fn[NAME].Constructor=Toast;$__default['default'].fn[NAME].noConflict=function(){$__default['default'].fn[NAME]=JQUERY_NO_CONFLICT;return Toast._jQueryInterface};return Toast})));
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('popper.js'),require('./util.js')):typeof define==='function'&&define.amd?define(['jquery','popper.js','./util.js'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.Tooltip=factory(global.jQuery,global.Popper,global.Util))}(this,(function($,Popper,Util){'use strict'
function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}};var $__default=_interopDefaultLegacy($),Popper__default=_interopDefaultLegacy(Popper),Util__default=_interopDefaultLegacy(Util),uriAttrs=['background','cite','href','itemtype','longdesc','poster','src','xlink:href'],ARIA_ATTRIBUTE_PATTERN=/^aria-[\w-]*$/i,DefaultWhitelist={'*':['class','dir','id','lang','role',ARIA_ATTRIBUTE_PATTERN],a:['target','href','title','rel'],area:[],b:[],br:[],col:[],code:[],div:[],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:[]},SAFE_URL_PATTERN=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi,DATA_URL_PATTERN=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i
function allowedAttribute(attr,allowedAttributeList){var attrName=attr.nodeName.toLowerCase();if(allowedAttributeList.indexOf(attrName)!==-1){if(uriAttrs.indexOf(attrName)!==-1)return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN)||attr.nodeValue.match(DATA_URL_PATTERN));return true};var regExp=allowedAttributeList.filter(function(attrRegex){return attrRegex instanceof RegExp});for(var i=0,len=regExp.length;i<len;i++)if(attrName.match(regExp[i]))return true;return false}
function sanitizeHtml(unsafeHtml,whiteList,sanitizeFn){if(unsafeHtml.length===0)return unsafeHtml;if(sanitizeFn&&typeof sanitizeFn==='function')return sanitizeFn(unsafeHtml);var domParser=new window.DOMParser(),createdDocument=domParser.parseFromString(unsafeHtml,'text/html'),whitelistKeys=Object.keys(whiteList),elements=[].slice.call(createdDocument.body.querySelectorAll('*')),_loop=function _loop(i,len){var el=elements[i],elName=el.nodeName.toLowerCase();if(whitelistKeys.indexOf(el.nodeName.toLowerCase())===-1){el.parentNode.removeChild(el);return"continue"};var attributeList=[].slice.call(el.attributes),whitelistedAttributes=[].concat(whiteList['*']||[],whiteList[elName]||[]);attributeList.forEach(function(attr){if(!allowedAttribute(attr,whitelistedAttributes))el.removeAttribute(attr.nodeName)})};for(var i=0,len=elements.length;i<len;i++){var _ret=_loop(i);if(_ret==="continue")continue};return createdDocument.body.innerHTML}
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)if(Object.prototype.hasOwnProperty.call(source,key))target[key]=source[key]};return target};return _extends.apply(this,arguments)}
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor};var NAME='tooltip',VERSION='4.5.3',DATA_KEY='bs.tooltip',EVENT_KEY="."+DATA_KEY,JQUERY_NO_CONFLICT=$__default['default'].fn[NAME],CLASS_PREFIX='bs-tooltip',BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)"+CLASS_PREFIX+"\\S+",'g'),DISALLOWED_ATTRIBUTES=['sanitize','whiteList','sanitizeFn'],DefaultType={animation:'boolean',template:'string',title:'(string|element|function)',trigger:'string',delay:'(number|object)',html:'boolean',selector:'(string|boolean)',placement:'(string|function)',offset:'(number|string|function)',container:'(string|element|boolean)',fallbackPlacement:'(string|array)',boundary:'(string|element)',sanitize:'boolean',sanitizeFn:'(null|function)',whiteList:'object',popperConfig:'(null|object)'},AttachmentMap={AUTO:'auto',TOP:'top',RIGHT:'right',BOTTOM:'bottom',LEFT:'left'},Default={animation:true,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:'hover focus',title:'',delay:0,html:false,selector:false,placement:'top',offset:0,container:false,fallbackPlacement:'flip',boundary:'scrollParent',sanitize:true,sanitizeFn:null,whiteList:DefaultWhitelist,popperConfig:null},HOVER_STATE_SHOW='show',HOVER_STATE_OUT='out',Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,INSERTED:"inserted"+EVENT_KEY,CLICK:"click"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,FOCUSOUT:"focusout"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY},CLASS_NAME_FADE='fade',CLASS_NAME_SHOW='show',SELECTOR_TOOLTIP_INNER='.tooltip-inner',SELECTOR_ARROW='.arrow',TRIGGER_HOVER='hover',TRIGGER_FOCUS='focus',TRIGGER_CLICK='click',TRIGGER_MANUAL='manual',Tooltip=function(){function Tooltip(element,config){if(typeof Popper__default['default']==='undefined')throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');this._isEnabled=true;this._timeout=0;this._hoverState='';this._activeTrigger={};this._popper=null;this.element=element;this.config=this._getConfig(config);this.tip=null;this._setListeners()};var _proto=Tooltip.prototype;_proto.enable=function enable(){this._isEnabled=true};_proto.disable=function disable(){this._isEnabled=false};_proto.toggleEnabled=function toggleEnabled(){this._isEnabled=!this._isEnabled};_proto.toggle=function toggle(event){if(!this._isEnabled)return;if(event){var dataKey=this.constructor.DATA_KEY,context=$__default['default'](event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$__default['default'](event.currentTarget).data(dataKey,context)};context._activeTrigger.click=!context._activeTrigger.click;if(context._isWithActiveTrigger()){context._enter(null,context)}else context._leave(null,context)}else{if($__default['default'](this.getTipElement()).hasClass(CLASS_NAME_SHOW)){this._leave(null,this);return};this._enter(null,this)}};_proto.dispose=function dispose(){clearTimeout(this._timeout);$__default['default'].removeData(this.element,this.constructor.DATA_KEY);$__default['default'](this.element).off(this.constructor.EVENT_KEY);$__default['default'](this.element).closest('.modal').off('hide.bs.modal',this._hideModalHandler);if(this.tip)$__default['default'](this.tip).remove();this._isEnabled=null;this._timeout=null;this._hoverState=null;this._activeTrigger=null;if(this._popper)this._popper.destroy();this._popper=null;this.element=null;this.config=null;this.tip=null};_proto.show=function show(){var _this=this;if($__default['default'](this.element).css('display')==='none')throw new Error('Please use show on visible elements');var showEvent=$__default['default'].Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){$__default['default'](this.element).trigger(showEvent);var shadowRoot=Util__default['default'].findShadowRoot(this.element),isInTheDom=$__default['default'].contains(shadowRoot!==null?shadowRoot:this.element.ownerDocument.documentElement,this.element);if(showEvent.isDefaultPrevented()||!isInTheDom)return;var tip=this.getTipElement(),tipId=Util__default['default'].getUID(this.constructor.NAME);tip.setAttribute('id',tipId);this.element.setAttribute('aria-describedby',tipId);this.setContent();if(this.config.animation)$__default['default'](tip).addClass(CLASS_NAME_FADE);var placement=typeof this.config.placement==='function'?this.config.placement.call(this,tip,this.element):this.config.placement,attachment=this._getAttachment(placement);this.addAttachmentClass(attachment);var container=this._getContainer();$__default['default'](tip).data(this.constructor.DATA_KEY,this);if(!$__default['default'].contains(this.element.ownerDocument.documentElement,this.tip))$__default['default'](tip).appendTo(container);$__default['default'](this.element).trigger(this.constructor.Event.INSERTED);this._popper=new Popper__default['default'](this.element,tip,this._getPopperConfig(attachment));$__default['default'](tip).addClass(CLASS_NAME_SHOW);if('ontouchstart'in document.documentElement)$__default['default'](document.body).children().on('mouseover',null,$__default['default'].noop);var complete=function complete(){if(_this.config.animation)_this._fixTransition();var prevHoverState=_this._hoverState;_this._hoverState=null;$__default['default'](_this.element).trigger(_this.constructor.Event.SHOWN);if(prevHoverState===HOVER_STATE_OUT)_this._leave(null,_this)};if($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)){var transitionDuration=Util__default['default'].getTransitionDurationFromElement(this.tip);$__default['default'](this.tip).one(Util__default['default'].TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete()}};_proto.hide=function hide(callback){var _this2=this,tip=this.getTipElement(),hideEvent=$__default['default'].Event(this.constructor.Event.HIDE),complete=function complete(){if(_this2._hoverState!==HOVER_STATE_SHOW&&tip.parentNode)tip.parentNode.removeChild(tip);_this2._cleanTipClass();_this2.element.removeAttribute('aria-describedby');$__default['default'](_this2.element).trigger(_this2.constructor.Event.HIDDEN);if(_this2._popper!==null)_this2._popper.destroy();if(callback)callback()};$__default['default'](this.element).trigger(hideEvent);if(hideEvent.isDefaultPrevented())return;$__default['default'](tip).removeClass(CLASS_NAME_SHOW);if('ontouchstart'in document.documentElement)$__default['default'](document.body).children().off('mouseover',null,$__default['default'].noop);this._activeTrigger[TRIGGER_CLICK]=false;this._activeTrigger[TRIGGER_FOCUS]=false;this._activeTrigger[TRIGGER_HOVER]=false;if($__default['default'](this.tip).hasClass(CLASS_NAME_FADE)){var transitionDuration=Util__default['default'].getTransitionDurationFromElement(tip);$__default['default'](tip).one(Util__default['default'].TRANSITION_END,complete).emulateTransitionEnd(transitionDuration)}else complete();this._hoverState=''};_proto.update=function update(){if(this._popper!==null)this._popper.scheduleUpdate()};_proto.isWithContent=function isWithContent(){return Boolean(this.getTitle())};_proto.addAttachmentClass=function addAttachmentClass(attachment){$__default['default'](this.getTipElement()).addClass(CLASS_PREFIX+"-"+attachment)};_proto.getTipElement=function getTipElement(){this.tip=this.tip||$__default['default'](this.config.template)[0];return this.tip};_proto.setContent=function setContent(){var tip=this.getTipElement();this.setElementContent($__default['default'](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)),this.getTitle());$__default['default'](tip).removeClass(CLASS_NAME_FADE+" "+CLASS_NAME_SHOW)};_proto.setElementContent=function setElementContent($element,content){if(typeof content==='object'&&(content.nodeType||content.jquery)){if(this.config.html){if(!$__default['default'](content).parent().is($element))$element.empty().append(content)}else $element.text($__default['default'](content).text());return};if(this.config.html){if(this.config.sanitize)content=sanitizeHtml(content,this.config.whiteList,this.config.sanitizeFn);$element.html(content)}else $element.text(content)};_proto.getTitle=function getTitle(){var title=this.element.getAttribute('data-original-title');if(!title)title=typeof this.config.title==='function'?this.config.title.call(this.element):this.config.title;return title};_proto._getPopperConfig=function _getPopperConfig(attachment){var _this3=this,defaultBsConfig={placement:attachment,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:SELECTOR_ARROW},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function onCreate(data){if(data.originalPlacement!==data.placement)_this3._handlePopperPlacementChange(data)},onUpdate:function onUpdate(data){return _this3._handlePopperPlacementChange(data)}};return _extends({},defaultBsConfig,this.config.popperConfig)};_proto._getOffset=function _getOffset(){var _this4=this,offset={};if(typeof this.config.offset==='function'){offset.fn=function(data){data.offsets=_extends({},data.offsets,_this4.config.offset(data.offsets,_this4.element)||{});return data}}else offset.offset=this.config.offset;return offset};_proto._getContainer=function _getContainer(){if(this.config.container===false)return document.body;if(Util__default['default'].isElement(this.config.container))return $__default['default'](this.config.container);return $__default['default'](document).find(this.config.container)};_proto._getAttachment=function _getAttachment(placement){return AttachmentMap[placement.toUpperCase()]};_proto._setListeners=function _setListeners(){var _this5=this,triggers=this.config.trigger.split(' ');triggers.forEach(function(trigger){if(trigger==='click'){$__default['default'](_this5.element).on(_this5.constructor.Event.CLICK,_this5.config.selector,function(event){return _this5.toggle(event)})}else if(trigger!==TRIGGER_MANUAL){var eventIn=trigger===TRIGGER_HOVER?_this5.constructor.Event.MOUSEENTER:_this5.constructor.Event.FOCUSIN,eventOut=trigger===TRIGGER_HOVER?_this5.constructor.Event.MOUSELEAVE:_this5.constructor.Event.FOCUSOUT;$__default['default'](_this5.element).on(eventIn,_this5.config.selector,function(event){return _this5._enter(event)}).on(eventOut,_this5.config.selector,function(event){return _this5._leave(event)})}});this._hideModalHandler=function(){if(_this5.element)_this5.hide()};$__default['default'](this.element).closest('.modal').on('hide.bs.modal',this._hideModalHandler);if(this.config.selector){this.config=_extends({},this.config,{trigger:'manual',selector:''})}else this._fixTitle()};_proto._fixTitle=function _fixTitle(){var titleType=typeof this.element.getAttribute('data-original-title');if(this.element.getAttribute('title')||titleType!=='string'){this.element.setAttribute('data-original-title',this.element.getAttribute('title')||'');this.element.setAttribute('title','')}};_proto._enter=function _enter(event,context){var dataKey=this.constructor.DATA_KEY;context=context||$__default['default'](event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$__default['default'](event.currentTarget).data(dataKey,context)};if(event)context._activeTrigger[event.type==='focusin'?TRIGGER_FOCUS:TRIGGER_HOVER]=true;if($__default['default'](context.getTipElement()).hasClass(CLASS_NAME_SHOW)||context._hoverState===HOVER_STATE_SHOW){context._hoverState=HOVER_STATE_SHOW;return};clearTimeout(context._timeout);context._hoverState=HOVER_STATE_SHOW;if(!context.config.delay||!context.config.delay.show){context.show();return};context._timeout=setTimeout(function(){if(context._hoverState===HOVER_STATE_SHOW)context.show()},context.config.delay.show)};_proto._leave=function _leave(event,context){var dataKey=this.constructor.DATA_KEY;context=context||$__default['default'](event.currentTarget).data(dataKey);if(!context){context=new this.constructor(event.currentTarget,this._getDelegateConfig());$__default['default'](event.currentTarget).data(dataKey,context)};if(event)context._activeTrigger[event.type==='focusout'?TRIGGER_FOCUS:TRIGGER_HOVER]=false;if(context._isWithActiveTrigger())return;clearTimeout(context._timeout);context._hoverState=HOVER_STATE_OUT;if(!context.config.delay||!context.config.delay.hide){context.hide();return};context._timeout=setTimeout(function(){if(context._hoverState===HOVER_STATE_OUT)context.hide()},context.config.delay.hide)};_proto._isWithActiveTrigger=function _isWithActiveTrigger(){for(var trigger in this._activeTrigger)if(this._activeTrigger[trigger])return true;return false};_proto._getConfig=function _getConfig(config){var dataAttributes=$__default['default'](this.element).data();Object.keys(dataAttributes).forEach(function(dataAttr){if(DISALLOWED_ATTRIBUTES.indexOf(dataAttr)!==-1)delete dataAttributes[dataAttr]});config=_extends({},this.constructor.Default,dataAttributes,typeof config==='object'&&config?config:{});if(typeof config.delay==='number')config.delay={show:config.delay,hide:config.delay};if(typeof config.title==='number')config.title=config.title.toString();if(typeof config.content==='number')config.content=config.content.toString();Util__default['default'].typeCheckConfig(NAME,config,this.constructor.DefaultType);if(config.sanitize)config.template=sanitizeHtml(config.template,config.whiteList,config.sanitizeFn);return config};_proto._getDelegateConfig=function _getDelegateConfig(){var config={};if(this.config)for(var key in this.config)if(this.constructor.Default[key]!==this.config[key])config[key]=this.config[key];return config};_proto._cleanTipClass=function _cleanTipClass(){var $tip=$__default['default'](this.getTipElement()),tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX);if(tabClass!==null&&tabClass.length)$tip.removeClass(tabClass.join(''))};_proto._handlePopperPlacementChange=function _handlePopperPlacementChange(popperData){this.tip=popperData.instance.popper;this._cleanTipClass();this.addAttachmentClass(this._getAttachment(popperData.placement))};_proto._fixTransition=function _fixTransition(){var tip=this.getTipElement(),initConfigAnimation=this.config.animation;if(tip.getAttribute('x-placement')!==null)return;$__default['default'](tip).removeClass(CLASS_NAME_FADE);this.config.animation=false;this.hide();this.show();this.config.animation=initConfigAnimation};Tooltip._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var $element=$__default['default'](this),data=$element.data(DATA_KEY),_config=typeof config==='object'&&config;if(!data&&/dispose|hide/.test(config))return;if(!data){data=new Tooltip(this,_config);$element.data(DATA_KEY,data)};if(typeof config==='string'){if(typeof data[config]==='undefined')throw new TypeError("No method named \""+config+"\"");data[config]()}})};_createClass(Tooltip,null,[{key:"VERSION",get:function get(){return VERSION}},{key:"Default",get:function get(){return Default}},{key:"NAME",get:function get(){return NAME}},{key:"DATA_KEY",get:function get(){return DATA_KEY}},{key:"Event",get:function get(){return Event}},{key:"EVENT_KEY",get:function get(){return EVENT_KEY}},{key:"DefaultType",get:function get(){return DefaultType}}]);return Tooltip}();$__default['default'].fn[NAME]=Tooltip._jQueryInterface;$__default['default'].fn[NAME].Constructor=Tooltip;$__default['default'].fn[NAME].noConflict=function(){$__default['default'].fn[NAME]=JQUERY_NO_CONFLICT;return Tooltip._jQueryInterface};return Tooltip})));
(function(global,factory){typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(require('jquery'),require('./tooltip.js')):typeof define==='function'&&define.amd?define(['jquery','./tooltip.js'],factory):(global=typeof globalThis!=='undefined'?globalThis:global||self,global.Popover=factory(global.jQuery,global.Tooltip))}(this,(function($,Tooltip){'use strict'
function _interopDefaultLegacy(e){return e&&typeof e==='object'&&'default'in e?e:{'default':e}};var $__default=_interopDefaultLegacy($),Tooltip__default=_interopDefaultLegacy(Tooltip)
function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor)}}
function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);return Constructor}
function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass}
function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source)if(Object.prototype.hasOwnProperty.call(source,key))target[key]=source[key]};return target};return _extends.apply(this,arguments)};var NAME='popover',VERSION='4.5.3',DATA_KEY='bs.popover',EVENT_KEY="."+DATA_KEY,JQUERY_NO_CONFLICT=$__default['default'].fn[NAME],CLASS_PREFIX='bs-popover',BSCLS_PREFIX_REGEX=new RegExp("(^|\\s)"+CLASS_PREFIX+"\\S+",'g'),Default=_extends({},Tooltip__default['default'].Default,{placement:'right',trigger:'click',content:'',template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),DefaultType=_extends({},Tooltip__default['default'].DefaultType,{content:'(string|element|function)'}),CLASS_NAME_FADE='fade',CLASS_NAME_SHOW='show',SELECTOR_TITLE='.popover-header',SELECTOR_CONTENT='.popover-body',Event={HIDE:"hide"+EVENT_KEY,HIDDEN:"hidden"+EVENT_KEY,SHOW:"show"+EVENT_KEY,SHOWN:"shown"+EVENT_KEY,INSERTED:"inserted"+EVENT_KEY,CLICK:"click"+EVENT_KEY,FOCUSIN:"focusin"+EVENT_KEY,FOCUSOUT:"focusout"+EVENT_KEY,MOUSEENTER:"mouseenter"+EVENT_KEY,MOUSELEAVE:"mouseleave"+EVENT_KEY},Popover=function(_Tooltip){_inheritsLoose(Popover,_Tooltip)
function Popover(){return _Tooltip.apply(this,arguments)||this};var _proto=Popover.prototype;_proto.isWithContent=function isWithContent(){return this.getTitle()||this._getContent()};_proto.addAttachmentClass=function addAttachmentClass(attachment){$__default['default'](this.getTipElement()).addClass(CLASS_PREFIX+"-"+attachment)};_proto.getTipElement=function getTipElement(){this.tip=this.tip||$__default['default'](this.config.template)[0];return this.tip};_proto.setContent=function setContent(){var $tip=$__default['default'](this.getTipElement());this.setElementContent($tip.find(SELECTOR_TITLE),this.getTitle());var content=this._getContent();if(typeof content==='function')content=content.call(this.element);this.setElementContent($tip.find(SELECTOR_CONTENT),content);$tip.removeClass(CLASS_NAME_FADE+" "+CLASS_NAME_SHOW)};_proto._getContent=function _getContent(){return this.element.getAttribute('data-content')||this.config.content};_proto._cleanTipClass=function _cleanTipClass(){var $tip=$__default['default'](this.getTipElement()),tabClass=$tip.attr('class').match(BSCLS_PREFIX_REGEX);if(tabClass!==null&&tabClass.length>0)$tip.removeClass(tabClass.join(''))};Popover._jQueryInterface=function _jQueryInterface(config){return this.each(function(){var data=$__default['default'](this).data(DATA_KEY),_config=typeof config==='object'?config:null;if(!data&&/dispose|hide/.test(config))return;if(!data){data=new Popover(this,_config);$__default['default'](this).data(DATA_KEY,data)};if(typeof config==='string'){if(typeof data[config]==='undefined')throw new TypeError("No method named \""+config+"\"");data[config]()}})};_createClass(Popover,null,[{key:"VERSION",get:function get(){return VERSION}},{key:"Default",get:function get(){return Default}},{key:"NAME",get:function get(){return NAME}},{key:"DATA_KEY",get:function get(){return DATA_KEY}},{key:"Event",get:function get(){return Event}},{key:"EVENT_KEY",get:function get(){return EVENT_KEY}},{key:"DefaultType",get:function get(){return DefaultType}}]);return Popover}(Tooltip__default['default']);$__default['default'].fn[NAME]=Popover._jQueryInterface;$__default['default'].fn[NAME].Constructor=Popover;$__default['default'].fn[NAME].noConflict=function(){$__default['default'].fn[NAME]=JQUERY_NO_CONFLICT;return Popover._jQueryInterface};return Popover})));
/**
 * Copyright (c) 2007-2015 Ariel Flesler - aflesler ○ gmail • com | http://flesler.blogspot.com
 * Licensed under MIT
 * @author Ariel Flesler
 * @version 2.1.3
 */
;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1<b.axis.length;u&&(d/=2);b.offset=h(b.offset);b.over=h(b.over);return this.each(function(){function k(a){var k=$.extend({},b,{queue:!0,duration:d,complete:a&&function(){a.call(q,e,b)}});r.animate(f,k)}if(null!==a){var l=n(this),q=l?this.contentWindow||window:this,r=$(q),e=a,f={},t;switch(typeof e){case "number":case "string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(e)){e= h(e);break}e=l?$(e):$(e,q);case "object":if(e.length===0)return;if(e.is||e.style)t=(e=$(e)).offset()}var v=$.isFunction(b.offset)&&b.offset(q,e)||b.offset;$.each(b.axis.split(""),function(a,c){var d="x"===c?"Left":"Top",m=d.toLowerCase(),g="scroll"+d,h=r[g](),n=p.max(q,c);t?(f[g]=t[m]+(l?0:h-r.offset()[m]),b.margin&&(f[g]-=parseInt(e.css("margin"+d),10)||0,f[g]-=parseInt(e.css("border"+d+"Width"),10)||0),f[g]+=v[m]||0,b.over[m]&&(f[g]+=e["x"===c?"width":"height"]()*b.over[m])):(d=e[m],f[g]=d.slice&& "%"===d.slice(-1)?parseFloat(d)/100*n:d);b.limit&&/^\d+$/.test(f[g])&&(f[g]=0>=f[g]?0:Math.min(f[g],n));!a&&1<b.axis.length&&(h===f[g]?f={}:u&&(k(b.onAfterFirst),f={}))});k(b.onAfter)}})};p.max=function(a,d){var b="x"===d?"Width":"Height",h="scroll"+b;if(!n(a))return a[h]-$(a)[b.toLowerCase()]();var b="client"+b,k=a.ownerDocument||a.document,l=k.documentElement,k=k.body;return Math.max(l[h],k[h])-Math.min(l[b],k[b])};$.Tween.propHooks.scrollLeft=$.Tween.propHooks.scrollTop={get:function(a){return $(a.elem)[a.prop]()}, set:function(a){var d=this.get(a);if(a.options.interrupt&&a._last&&a._last!==d)return $(a.elem).stop();var b=Math.round(a.now);d!==b&&($(a.elem)[a.prop](b),a._last=this.get(a))}};return p});;
jQuery.fn.bindFirst=function(name,fn){this.on(name,fn);this.each(function(){var handlers=jQuery._data(this,'events')[name.split('.')[0]],handler=handlers.pop();handlers.splice(0,0,handler)})};
if(typeof jQuery==='undefined')throw new Error('jquery-confirm requires jQuery');var jconfirm,Jconfirm;(function($){"use strict";$.fn.confirm=function(options,option2){if(typeof options==='undefined')options={};if(typeof options==='string')options={content:options,title:option2?option2:false};$(this).each(function(){var $this=$(this);$this.on('click',function(e){e.preventDefault();var jcOption=$.extend({},options);if($this.attr('data-title'))jcOption.title=$this.attr('data-title');if($this.attr('data-content'))jcOption.content=$this.attr('data-content');jcOption['$target']=$this;if($this.attr('href')&&!options.confirm)jcOption.confirm=function(){location.href=$this.attr('href')};$.confirm(jcOption)})});return $(this)};$.confirm=function(options,option2){if(typeof options==='undefined')options={};if(typeof options==='string')options={content:options,title:option2?option2:false};return jconfirm(options)};$.alert=function(options,option2){if(typeof options==='undefined')options={};if(typeof options==='string')options={content:options,title:option2?option2:false};options.cancelButton=false;return jconfirm(options)};$.dialog=function(options,option2){if(typeof options==='undefined')options={};if(typeof options==='string')options={content:options,title:option2?option2:false};options.cancelButton=false;options.confirmButton=false;options.confirmKeys=[13];return jconfirm(options)};jconfirm=function(options){if(typeof options==='undefined')options={};if(jconfirm.defaults)$.extend(jconfirm.pluginDefaults,jconfirm.defaults);var options=$.extend({},jconfirm.pluginDefaults,options);return new Jconfirm(options)};Jconfirm=function(options){$.extend(this,options);this._init()};Jconfirm.prototype={_init:function(){var that=this;this._rand=Math.round(Math.random()*99999);this._buildHTML();this._bindEvents();setTimeout(function(){that.open();that._watchContent()},0)},_buildHTML:function(){var that=this;this.animation='anim-'+this.animation.toLowerCase();this.closeAnimation='anim-'+this.closeAnimation.toLowerCase();this.theme='jconfirm-'+this.theme.toLowerCase();if(this.animation=='anim-none')this.animationSpeed=0;this._lastFocused=$('body').find(':focus');this.$el=$(this.template).appendTo(this.container).addClass(this.theme);this.$el.find('.jconfirm-box-container').addClass(this.columnClass);this.$el.find('.jconfirm-bg').css(this._getCSS(this.animationSpeed,1));this.$el.find('.jconfirm-bg').css('opacity',this.opacity);this.$b=this.$el.find('.jconfirm-box').css(this._getCSS(this.animationSpeed,this.animationBounce)).addClass(this.animation);this.$body=this.$b;if(this.rtl)this.$el.addClass("rtl");this._contentReady=$.Deferred();this._modalReady=$.Deferred();this.$title=this.$el.find('.title');this.contentDiv=this.$el.find('div.content');this.$content=this.contentDiv;this.$contentPane=this.$el.find('.content-pane');this.$icon=this.$el.find('.icon-c');this.$closeIcon=this.$el.find('.closeIcon');this.$contentPane.css(this._getCSS(this.animationSpeed,1));this.setTitle();this.setIcon();this._setButtons();if(this.closeIconClass)this.$closeIcon.html('<i class="'+this.closeIconClass+'"></i>');that._contentHash=this._hash(that.$content.html());$.when(this._contentReady,this._modalReady).then(function(){that.setContent();that.setTitle();that.setIcon()});this._getContent();this._imagesLoaded();if(this.autoClose)this._startCountDown()},_unwatchContent:function(){clearInterval(this._timer)},_hash:function(){return btoa((encodeURIComponent(this.$content.html())))},_watchContent:function(){var that=this;this._timer=setInterval(function(){var now=that._hash(that.$content.html());if(that._contentHash!=now){that._contentHash=now;that.setDialogCenter();that._imagesLoaded()}},this.watchInterval)},_bindEvents:function(){var that=this,boxClicked=false;this.$el.find('.jconfirm-scrollpane').click(function(e){if(!boxClicked)if(that.backgroundDismiss){that.cancel();that.close()}else{that.$b.addClass('hilight');setTimeout(function(){that.$b.removeClass('hilight')},800)};boxClicked=false});this.$el.find('.jconfirm-box').click(function(e){boxClicked=true});if(this.$confirmButton)this.$confirmButton.click(function(e){e.preventDefault();var r=that.confirm(that.$b);that._stopCountDown();that.onAction('confirm');if(typeof r==='undefined'||r)that.close()});if(this.$cancelButton)this.$cancelButton.click(function(e){e.preventDefault();var r=that.cancel(that.$b);that._stopCountDown();that.onAction('cancel');if(typeof r==='undefined'||r)that.close()});if(this.$closeButton)this.$closeButton.click(function(e){e.preventDefault();that._stopCountDown();that.cancel();that.onAction('close');that.close()});if(this.keyboardEnabled)setTimeout(function(){$(window).on('keyup.'+this._rand,function(e){that.reactOnKey(e)})},500);$(window).on('resize.'+this._rand,function(){that.setDialogCenter(true)})},_getCSS:function(speed,bounce){return{'-webkit-transition-duration':speed/1e3+'s','transition-duration':speed/1e3+'s','-webkit-transition-timing-function':'cubic-bezier(.36,1.1,.2, '+bounce+')','transition-timing-function':'cubic-bezier(.36,1.1,.2, '+bounce+')'}},_imagesLoaded:function(){var that=this;$.each(this.$content.find('img:not(.loaded)'),function(i,a){var interval=setInterval(function(){var h=$(a).css('height');if(h!=='0px'){$(a).addClass('loaded');that.setDialogCenter();clearInterval(interval)}},40)})},_setButtons:function(){this.$btnc=this.$el.find('.buttons');if(this.confirmButton&&$.trim(this.confirmButton)!=='')this.$confirmButton=$('<button type="button" class="btn">'+this.confirmButton+'</button>').appendTo(this.$btnc).addClass(this.confirmButtonClass);if(this.cancelButton&&$.trim(this.cancelButton)!=='')this.$cancelButton=$('<button type="button" class="btn">'+this.cancelButton+'</button>').appendTo(this.$btnc).addClass(this.cancelButtonClass);if(!this.confirmButton&&!this.cancelButton)this.$btnc.hide();if(!this.confirmButton&&!this.cancelButton&&this.closeIcon===null)this.$closeButton=this.$b.find('.closeIcon').show();if(this.closeIcon===true)this.$closeButton=this.$b.find('.closeIcon').show()},setTitle:function(string){this.title=(typeof string!=='undefined')?string:this.title;this.$title.html(this.title||'')},setIcon:function(iconClass){this.title=(typeof string!=='undefined')?iconClass:this.title;this.$icon.html(this.icon?'<i class="'+this.icon+'"></i>':'')},setContent:function(string){var that=this;this.content=(typeof string=='undefined')?this.content:string;if(this.content==''){this.$content.html(this.content);this.$contentPane.hide()}else{this.$content.html(this.content);this.$contentPane.show()};if(this.$content.hasClass('loading')){this.$content.removeClass('loading');this.$btnc.find('button').prop('disabled',false)}},_getContent:function(string){var that=this;string=string?string:this.content;this._isAjax=false;if(!this.content){this.content='';this.setContent(this.content);this._contentReady.reject()}else if(typeof this.content==='string'){if(this.content.substr(0,4).toLowerCase()==='url:'){this._isAjax=true;this.$content.addClass('loading');this.$btnc.find('button').prop('disabled',true);var url=this.content.substring(4,this.content.length);$.get(url).done(function(html){that.content=html;that._contentReady.resolve()}).always(function(data,status,xhr){if(typeof that.contentLoaded==='function')that.contentLoaded(data,status,xhr)})}else{this.setContent(this.content);this._contentReady.reject()}}else if(typeof this.content==='function'){this.$content.addClass('loading');this.$btnc.find('button').attr('disabled','disabled');var promise=this.content(this);if(typeof promise!=='object'){console.error('The content function must return jquery promise.')}else if(typeof promise.always!=='function'){console.error('The object returned is not a jquery promise.')}else{this._isAjax=true;promise.always(function(data,status){that._contentReady.resolve()})}}else console.error('Invalid option for property content, passed: '+typeof this.content);this.setDialogCenter()},_stopCountDown:function(){clearInterval(this.timerInterval);if(this.$cd)this.$cd.remove()},_startCountDown:function(){var opt=this.autoClose.split('|');if(/cancel/.test(opt[0])&&this.type==='alert'){return false}else if(/confirm|cancel/.test(opt[0])){this.$cd=$('<span class="countdown">').appendTo(this['$'+opt[0]+'Button']);var that=this;that.$cd.parent().click();var time=opt[1]/1e3;this.timerInterval=setInterval(function(){that.$cd.html(' ('+(time-=1)+')');if(time===0){that.$cd.html('');that.$cd.parent().trigger('click');clearInterval(that.timerInterval)}},1e3)}else console.error('Invalid option '+opt[0]+', must be confirm/cancel')},reactOnKey:function key(e){var a=$('.jconfirm');if(a.eq(a.length-1)[0]!==this.$el[0])return false;var key=e.which;if(this.contentDiv.find(':input').is(':focus')&&/13|32/.test(key))return false;if($.inArray(key,this.cancelKeys)!==-1)if(this.$cancelButton){this.$cancelButton.click()}else this.close();if($.inArray(key,this.confirmKeys)!==-1)if(this.$confirmButton)this.$confirmButton.click()},setDialogCenter:function(){if(this.$contentPane.css('display')=='none'){var contentHeight=0,paneHeight=0}else{var contentHeight=this.$content.outerHeight(),paneHeight=this.$contentPane.height();if(paneHeight==0)paneHeight=contentHeight};var off=100,w=this.$content.outerWidth();this.$content.css({clip:'rect(0px '+(off+w)+'px '+contentHeight+'px -'+off+'px)'});this.$contentPane.css({height:contentHeight});var windowHeight=$(window).height(),boxHeight=this.$b.outerHeight()-paneHeight+contentHeight,topMargin=(windowHeight-boxHeight)/2,minMargin=100;if(boxHeight>(windowHeight-minMargin)){var style={'margin-top':minMargin/2,'margin-bottom':minMargin/2};$('body').addClass('jconfirm-noscroll')}else{var style={'margin-top':topMargin};$('body').removeClass('jconfirm-noscroll')};this.$b.css(style)},close:function(){var that=this;if(this.isClosed())return false;if(typeof this.onClose==='function')this.onClose();this._unwatchContent();that._lastFocused.focus();$(window).unbind('resize.'+this._rand);if(this.keyboardEnabled)$(window).unbind('keyup.'+this._rand);that.$el.find('.jconfirm-bg').removeClass('seen');$('body').removeClass('jconfirm-noscroll');this.$b.addClass(this.closeAnimation);var closeTimer=(this.closeAnimation=='anim-none')?0:this.animationSpeed;setTimeout(function(){that.$el.remove()},closeTimer*25/100);jconfirm.record.closed+=1;jconfirm.record.currentlyOpen-=1;return true},open:function(){var that=this;if(this.isClosed())return false;that.$el.find('.jconfirm-bg').addClass('seen');this.$b.removeClass(this.animation);this.$b.find('input[autofocus]:visible:first').focus();jconfirm.record.opened+=1;jconfirm.record.currentlyOpen+=1;if(typeof this.onOpen==='function')this.onOpen();var jcr='jconfirm-box'+this._rand;this.$b.attr('aria-labelledby',jcr).attr('tabindex',-1).focus();if(this.$title){this.$title.attr('id',jcr)}else if(this.$content)this.$content.attr('id',jcr);setTimeout(function(){that.$b.css({'transition-property':that.$b.css('transition-property')+', margin'});that._modalReady.resolve()},this.animationSpeed);return true},isClosed:function(){return this.$el.css('display')===''}};jconfirm.pluginDefaults={template:'<div class="jconfirm"><div class="jconfirm-bg"></div><div class="jconfirm-scrollpane"><div class="container"><div class="row"><div class="jconfirm-box-container"><div class="jconfirm-box" role="dialog" aria-labelledby="labelled" tabindex="-1"><div class="closeIcon">&times;</div><div class="title-c"><span class="icon-c"></span><span class="title"></span></div><div class="content-pane"><div class="content"></div></div><div class="buttons"></div><div class="jquery-clear"></div></div></div></div></div></div></div>',title:'Hello',content:'Are you sure to continue?',contentLoaded:function(){},icon:'',opacity:0.2,confirmButton:'Okay',cancelButton:'Close',confirmButtonClass:'btn-default',cancelButtonClass:'btn-default',theme:'white',animation:'zoom',closeAnimation:'scale',animationSpeed:500,animationBounce:1.2,keyboardEnabled:false,rtl:false,confirmKeys:[13],cancelKeys:[27],container:'body',confirm:function(){},cancel:function(){},backgroundDismiss:false,autoClose:false,closeIcon:null,closeIconClass:false,watchInterval:100,columnClass:'col-md-4 col-md-offset-4 col-sm-6 col-sm-offset-3 col-xs-10 col-xs-offset-1',onOpen:function(){},onClose:function(){},onAction:function(){}};jconfirm.record={opened:0,closed:0,currentlyOpen:0}})(jQuery);
jQuery(function(){jQuery('body').bind("alert",function(event,opt){if(opt.confirm){var s=opt.confirm;opt.confirm=function(){eval(s)}}else opt.confirm=function(){};if(opt.onClose){var s=opt.onClose;opt.onClose=function(){eval(s)}};if(opt.onAction){var s=opt.onAction;opt.onAction=function(action){eval(s)}};if(opt.onOpen){var s=opt.onOpen;opt.onOpen=function(){eval(s)}};jQuery.alert(opt)})});
(function($,Drupal,drupalSettings){Drupal.findZindex=function(elemsel){var elm=$(elemsel),zindex=parseInt(elm.css("z-index"))>0?elm.css("z-index"):0;while(true){zindex=(parseInt(elm.css("z-index"))>0&&parseInt(elm.css("z-index"))>zindex)?elm.css("z-index"):zindex;if(elm.length>0){elm=elm.parent()}else break};return zindex};Drupal.html5validation=function(form){var $th=$(this);if(!$th.hasClass("once-html5validation")){form.addEventListener("invalid",function(event){event.preventDefault()},true);$th.addClass("once-html5validation")};$(".typ-html5validation").once("html5validation-ajax").addClass("typ-custom-html5validation-ajax").bindFirst('mousedown',function(event){$(this).trigger('html5validate-main');if($(".has-error").length){event.stopImmediatePropagation();return false}else return true});$("button:not([type=button]):not([type=reset]), input[type=submit]",form).once("html5validation").addClass("typ-custom-html5validation").bind("html5validate-main",function(event){var v=0;$(this).trigger("html5validate");var invalidFields=form.querySelectorAll(":invalid"),errorMessages=form.querySelectorAll(".messages--error"),error=false,parent;$(".has-error").removeClass("has-error");for(var i=0;i<errorMessages.length;i++)errorMessages[i].parentNode.removeChild(errorMessages[i]);for(var i=0;i<invalidFields.length;i++){if(invalidFields[i].tagName=='FIELDSET'){if($(invalidFields[i]).hasClass('collapsed')){$(invalidFields[i]).find('a').click();$(invalidFields[i]).removeClass('collapsed')};continue};parent=$(invalidFields[i].parentNode);if(invalidFields[i].tagName!='FORM')parent.addClass('has-error');if(invalidFields[i].validationMessage){var msg=invalidFields[i].validationMessage;if(msg.indexOf('Please include an')!=-1)msg="Please include an '@' in the email address.";parent.closest('.form-item').after("<div class='messages--error'>"+Drupal.t(msg)+"</div>")}};for(var i=0;i<invalidFields.length;i++){if(invalidFields[i].tagName=='FIELDSET'){if($("a[href=#"+$(invalidFields[i]).data("drupal-selector")+"]").length)$("a[href=#"+$(invalidFields[i]).data("drupal-selector")+"]").addClass("has-error").click();if($("a[href=#"+$(invalidFields[i]).attr("id")+"]").length)$("a[href=#"+$(invalidFields[i]).attr("id")+"]").addClass("has-error").click()};$(invalidFields[i]).parents(".vertical-tabs-pane").each(function(){var drupalSelector=$(this).data('drupal-selector'),tabid=$(this).attr('id');$("ul.vertical-tabs-list li.vertical-tab-button a").each(function(){if($(this).attr("href")==="#"+drupalSelector||$(this).attr("href")==='#'+tabid)$(this).click()})});error=true;invalidFields[i].focus();$.scrollTo(invalidFields[i].parentNode,400,{offset:-80});invalidFields[i].scrollIntoView();break};if(error){event.preventDefault();return false};if(!error){var cfm=$(form).data("confirm-message"),cnt=$(form).data("confirm-content");$(form).data("triggering-element",this);var y=0;if(typeof cnt=='undefined')cnt="";if(typeof cfm!='undefined'){if(!cfm.length)cfm=Drupal.t("Are you sure to proceed?");$.confirm({title:cfm,content:cnt,confirmButton:Drupal.t("Yes"),cancelButton:Drupal.t("No"),confirmButtonClass:'btn-success',cancelButtonClass:'btn-danger',confirm:function(){try{var $trig=$($(form).data("triggering-element")),$trigHidden=$("<input type='hidden'>");$trigHidden.attr("name",$trig.attr("name"));$trigHidden.attr("value",$trig.attr("value"));$(form).append($trigHidden)}catch(err){};form.submit()},cancel:function(){}});event.preventDefault();return false}else if(!$(this).hasClass('typ-custom-html5validation-ajax')){var $trig=$($(form).data("triggering-element")),$trigHidden=$("<input type='hidden'>");$trigHidden.attr("name",$trig.attr("name"));$trigHidden.attr("value",$trig.attr("value"));$(form).append($trigHidden);form.submit();event.preventDefault();return false}};event.preventDefault();return false}).click(function(event){$(this).trigger('html5validate-main');event.preventDefault()});$(".confirm").once("html5validation").each(function(){var cfm=$(this).data("confirm-message"),cnt=$(this).data("confirm-content"),y=0;if(typeof cnt=='undefined')cnt="";if(typeof cfm=='undefined'||!cfm.length)cfm=Drupal.t("Are you sure to proceed?");$(this).confirm({title:cfm,content:cnt,confirmButton:Drupal.t("Yes"),cancelButton:Drupal.t("No")})})};Drupal.behaviors.html5validate={attach:function(context,settings){jQuery('.html5validation-form').each(function(){Drupal.html5validation(this)})}}})(jQuery,Drupal,drupalSettings);
(function($,Drupal,drupalSettings){var data={},n_data={},id="";$(".confirm-table-list-items").mouseover(function(){id=$(this).attr('id');data.customerid=$(this).data('customerid');data.rfqid=$(this).data('rfqid');$("#"+id+" tr").mouseover(function(){var row=$(this).closest("tr").index();data.index=row;data.id=id})});$(".input-qty").on('change keyup',function(event){var value=$(this).val();if(value.length>0){data.qty=value;data.token=drupalSettings.csrfToken;$.post(drupalSettings.path.baseUrl+"api/rfq/document/confirm",data,function(result){if(result._data['status']==true){var res_data=result._data,res_quotation=result._quotation;if(res_quotation){var items=res_quotation.items[res_data.index];$("#"+id+" tr .list-text-total").eq(data.index).html(items.total);$("#table-total-"+id+" .list-subtotal").html(res_quotation.subtotal);$("#table-total-"+id+" .list-vat").html(res_quotation.vat);$("#table-total-"+id+" .list-total").html(res_quotation.total)}}})}});Drupal.behaviors.catalogConfirm={attach:function(context,settings){$(".confirm-table").on("click",'.fa-delete-icon',function(){$.confirm({title:Drupal.t("Delete"),content:Drupal.t("Are you sure to delete this item?"),confirmButton:Drupal.t("Yes"),cancelButton:Drupal.t("No"),confirmButtonClass:'btn-success',cancelButtonClass:'btn-danger',animation:'left',closeAnimation:'right',confirm:function(){data.token=drupalSettings.csrfToken;$.post(drupalSettings.path.baseUrl+"api/rfq/document/delete-item?token="+drupalSettings.csrfToken,data,function(result){if(result._data['status']==true){var res_quotation=result._quotation;$("#"+data.id+" tr").eq(data.index+1).remove();var rows_count=($("#"+data.id+" tr").length)-2;if(rows_count>0){for(var i=0;i<rows_count;i++)$("#table-total-"+data.id+" tr .list-no").eq(i).html(i+1);$("#table-total-"+data.id+" .list-order").html(rows_count);$("#table-total-"+data.id+" .list-subtotal").html(res_quotation.subtotal);$("#table-total-"+data.id+" .list-vat").html(res_quotation.vat);$("#table-total-"+data.id+" .list-total").html(res_quotation.total)}else $("#confirm-"+data.id).remove()}})},cancel:function(){console.log("Cancel")}})})}};$(".edit-submit-rfq").click(function(event){var app_data={};app_data.rfqid=$(this).data('rfqid');app_data.customerid=$(this).data('customerid');$.confirm({title:Drupal.t("Confirm"),content:Drupal.t("Are you sure to confirm quotation?"),confirmButton:Drupal.t("Yes"),cancelButton:Drupal.t("No"),confirmButtonClass:'btn-success',cancelButtonClass:'btn-danger',animation:'left',closeAnimation:'right',confirm:function(){$(".real-submit-".$(this).data('index')).click()},cancel:function(){console.log("Cancel")}});return false});$("#edit-login-button").bind("html5validate",function(event){$(this).closest('form').attr('action','/user/login').submit();return true})})(jQuery,Drupal,drupalSettings);
(function ($, Drupal, drupalSettings) {
    let Captcha;
    const resourceUpper = ['A','B','C','E','F','G','H','J','K','L','M','N','P','Q','R','S','T','W','X','Y','Z'];
    const resourceLower = ['a','b','c','e','f','g','h','j','k','l','m','n','p','q','r','s','t','w','x','y','z'];
    const resourceNumber = ['0','1','2','3','4','5','6','7','8','9'];

    Captcha = function(element, options) {
        const self = this;
        const defaults = {
            length: 4,
            width: 100,
            height: 40,
            font: 'bold 23px Arial',
            resourceType: 'aA0',
            resourceExtra: [],
            clickRefresh: true,
            autoRefresh: true,
            caseSensitive: false,
        };

        self.element = element;

        self.options = $.extend(true, defaults, options);

        let resource = [];
        if (self.options.resourceType.length > 0) {
            if (self.options.resourceType.indexOf('A') !== -1) {
                resource = resource.concat(resourceUpper);
            }
            // if (self.options.resourceType.indexOf('a') !== -1) {
            //     resource = resource.concat(resourceLower);
            // }
            if (self.options.resourceType.indexOf('0') !== -1) {
                resource = resource.concat(resourceNumber);
            }
        }
        if (self.options.resourceExtra.length > 0) {
            resource = resource.concat(self.options.resourceExtra);
        }

        if (resource.length === 0) {
            resource = resourceUpper.concat(resourceLower).concat(resourceNumber)
        }
        self.resource = resource;

        if (self.options.clickRefresh) {
            self.element.on('click', function () {
                self.refresh();
            });
        }
        self.refresh();
    };

    Captcha.prototype.refresh = function() {
        const self = this;

        const canvas = self.element[0];
        canvas.width = self.options.width;
        canvas.height = self.options.height;
        const context = canvas.getContext("2d");
        context.font = self.options.font;

        const codes = self.randomCode();

        const spaceWidth = canvas.width - context.measureText(codes.join('')).width - 40;
        const wordSpace = Math.floor(spaceWidth / codes.length);

        let left = 10;
        for (let i = 0; i < codes.length; i++) {
            const deg = Math.random() * 30 * Math.PI / 180;
            const x = left;
            const y = canvas.height / 2 + Math.random()*10;

            context.translate(x, y);
            context.rotate(deg);

            context.fillStyle = self.randomColor();
            context.fillText(codes[i], 0, 0);

            context.rotate(-deg);
            context.translate(-x, -y);

            left += context.measureText(codes[i]).width + wordSpace + Math.floor(Math.random()*5);
        }
        self.code = codes;

        const strokeLength = codes.length * Math.round(Math.random()+1) + 3;
        for (let i = 0; i < strokeLength; i++) {
            context.strokeStyle = self.randomColor(true);
            context.beginPath();

            context.moveTo(Math.random() * self.options.width, Math.random() * self.options.height);
            context.lineTo(Math.random() * self.options.width, Math.random() * self.options.height);

            const x = Math.random() * self.options.width;
            const y = Math.random() * self.options.height;
            context.moveTo(x, y);
            context.lineTo(x + 1, y + 1);
            context.stroke();
        }
    };

    Captcha.prototype.getCode = function() {
        return this.code.join('');
    };

    Captcha.prototype.valid = function(code) {
        const self = this;
        let ans = false;
        if (!self.options.caseSensitive) {
            ans = code.toLowerCase() === self.getCode().toLowerCase();
        } else {
            ans = code === self.getCode();
        }
        if (!ans && self.options.autoRefresh) {
            self.refresh();
        }
        return ans;
    };

    Captcha.prototype.randomCode = function() {
        const self = this;
        const codes = [];
        const resourceLength = self.resource.length;
        for (let i = 0; i < self.options.length; i++) {
            const txt = self.resource[Math.floor(Math.random() * resourceLength)];
            codes.push(txt);
        }
        return codes;
    };

    Captcha.prototype.randomColor = function(alpha) {
        const r = Math.round(Math.random() * 255);
        const g = Math.round(Math.random() * 255);
        const b = Math.round(Math.random() * 255);
        if (!alpha) {
            return 'rgb(' + r + ',' + g + ',' + b + ')';
        }
        const a = Math.random();
        return 'rgb(' + r + ',' + g + ',' + b + ',' + a + ')';
    };

    Drupal.behaviors.customUserRegisterBehaviors = {
        attach: function (context, settings) {
            let captcha = null;
            if($('.canvas-captcha', context).length > 0){
                let options = {
                    length: 6,
                    autoRefresh: false,
                    caseSensitive: true,
                    width: 200,
                    height: 80
                };
                captcha = new Captcha($('.canvas-captcha', context), options);
                if(captcha !== null){
                    $('.captcha-hint-code', context).val(captcha.getCode());
                }
                $('.canvas-captcha', context).on('click', function(){
                    $('.captcha-hint-code', context).val(captcha.getCode());
                });
            }
        }
    };
})(jQuery, Drupal, drupalSettings);;
!function(t){t.fn.cardtable=function(a){var s,d=this,e={headIndex:0},l=t.extend({},e,a);return s=a&&a.headIndex?a.headIndex:0,d.each(function(){var a=t(this);if(!a.hasClass("stacktable")){var s=t(this).prop("class"),d=t("<div></div>");"undefined"!=typeof l.myClass&&d.addClass(l.myClass);var e,n,i,h,r,c="";a.addClass("stacktable large-only"),e=a.find("caption").clone(),n=a.find("tr").eq(0),a.siblings().filter(".small-only").remove(),a.find("tbody tr").each(function(){i="",h="",r=t(this).prop("class"),t(this).find("td,th").each(function(a){""!==t(this).html()&&(h+='<tr class="'+r+'">',h+=n.find("td,th").eq(a).html()?'<td class="st-key">'+n.find("td,th").eq(a).html()+"</td>":'<td class="st-key"></td>',h+='<td class="st-val '+t(this).prop("class")+'">'+t(this).html()+"</td>",h+="</tr>")}),c+='<table class=" '+s+' stacktable small-only"><tbody>'+i+h+"</tbody></table>"}),a.find("tfoot tr td").each(function(a,d){""!==t.trim(t(d).text())&&(c+='<table class="'+s+' stacktable small-only"><tbody><tr><td>'+t(d).html()+"</td></tr></tbody></table>")}),d.prepend(e),d.append(t(c)),a.before(d)}})},t.fn.stacktable=function(a){var s,d=this,e={headIndex:0},l=t.extend({},e,a);return s=a&&a.headIndex?a.headIndex:0,d.each(function(){var a=t(this).prop("class"),d=t('<table class="'+a+' stacktable small-only"><tbody></tbody></table>');"undefined"!=typeof l.myClass&&d.addClass(l.myClass);var e,n,i,h,r,c,o="";e=t(this),e.addClass("stacktable large-only"),n=e.find("caption").clone(),i=e.find("tr").eq(0),e.find("tr").each(function(a){h="",r="",c=t(this).prop("class"),0===a?o+='<tr class=" '+c+' "><th class="st-head-row st-head-row-main" colspan="2">'+t(this).find("th,td").eq(s).html()+"</th></tr>":(t(this).find("td,th").each(function(a){a===s?h='<tr class="'+c+'"><th class="st-head-row" colspan="2">'+t(this).html()+"</th></tr>":""!==t(this).html()&&(r+='<tr class="'+c+'">',r+=i.find("td,th").eq(a).html()?'<td class="st-key">'+i.find("td,th").eq(a).html()+"</td>":'<td class="st-key"></td>',r+='<td class="st-val '+t(this).prop("class")+'">'+t(this).html()+"</td>",r+="</tr>")}),o+=h+r)}),d.prepend(n),d.append(t(o)),e.before(d)})},t.fn.stackcolumns=function(a){var s=this,d={},e=t.extend({},d,a);return s.each(function(){var a=t(this),s=a.find("tr").eq(0).find("td,th").length;if(!(3>s)){var d=t('<table class="stacktable small-only"></table>');"undefined"!=typeof e.myClass&&d.addClass(e.myClass),a.addClass("stacktable large-only");for(var l=t("<tbody></tbody>"),n=1;s>n;)a.find("tr").each(function(a){var s=t("<tr></tr>");0===a&&s.addClass("st-head-row st-head-row-main");var d=t(this).find("td,th").eq(0).clone().addClass("st-key"),e=n;if(t(this).find("*[colspan]").length){var i=0;t(this).find("td,th").each(function(){var a=t(this).attr("colspan");return a?(a=parseInt(a,10),e-=a-1,i+a>n&&(e+=i+a-n-1),i+=a):i++,i>n?!1:void(0)})};var h=t(this).find("td,th").eq(e).clone().addClass("st-val").removeAttr("colspan");s.append(d,h),l.append(s)}),++n;d.append(t(l)),a.before(d)}})}}(jQuery);
(function($,Drupal,drupalSettings){Drupal.behaviors.stacktable={attach:function(context,settings){$(".typ-enable-stacktable").stacktable()}}})(jQuery,Drupal,drupalSettings);
(function($,Drupal,drupalSettings){if(window&&window.parent){Drupal.behaviors.windowPostMessageAutoResizeIframe={attach:function(context,settings){var h=$("#last-element-in-body").position().top,dh=0,w=$("#last-element-in-container");if(w.length!==0){w.position().left+1;var obj='{ "_resizeIframe": { "height": "'+h+'", "width": "'+w+'"}}';window.parent.postMessage(btoa(obj),"*")}}};$('body').append('<div id="last-element-in-body" style="width:1px;height:1px"></div>');$('.container:first').append('<div id="last-element-in-container" style="width:1px;height:1px;float:right;"></div>');var lasth,lastw;if(!$('.prevent-interval-height').length)setInterval(function(){var h=$("#last-element-in-body").position().top,dh=0,w=$("#last-element-in-container");if(w.length!==0){w.position().left+1;var obj='{ "_resizeIframe": { "height": "'+h+'", "width": "'+w+'"}}';window.parent.postMessage(btoa(obj),"*")};if(lasth!=h||lastw!=w){var obj='{ "_resizeIframe": { "height": "'+h+'", "width": "'+w+'"}}';window.parent.postMessage(btoa(obj),"*");lasth=h;lastw=w}},500)}})(jQuery,Drupal,drupalSettings);
/*!
	Colorbox 1.6.0
	license: MIT
	http://www.jacklmoore.com/colorbox
*/
(function(t,e,i){function n(i,n,o){var r=e.createElement(i);return n&&(r.id=Z+n),o&&(r.style.cssText=o),t(r)}function o(){return i.innerHeight?i.innerHeight:t(i).height()}function r(e,i){i!==Object(i)&&(i={}),this.cache={},this.el=e,this.value=function(e){var n;return void 0===this.cache[e]&&(n=t(this.el).attr("data-cbox-"+e),void 0!==n?this.cache[e]=n:void 0!==i[e]?this.cache[e]=i[e]:void 0!==X[e]&&(this.cache[e]=X[e])),this.cache[e]},this.get=function(e){var i=this.value(e);return t.isFunction(i)?i.call(this.el,this):i}}function h(t){var e=W.length,i=(A+t)%e;return 0>i?e+i:i}function a(t,e){return Math.round((/%/.test(t)?("x"===e?E.width():o())/100:1)*parseInt(t,10))}function s(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function l(t,e){return t.get("retinaUrl")&&i.devicePixelRatio>1?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function d(t){"contains"in y[0]&&!y[0].contains(t.target)&&t.target!==v[0]&&(t.stopPropagation(),y.focus())}function c(t){c.str!==t&&(y.add(v).removeClass(c.str).addClass(t),c.str=t)}function g(e){A=0,e&&e!==!1&&"nofollow"!==e?(W=t("."+te).filter(function(){var i=t.data(this,Y),n=new r(this,i);return n.get("rel")===e}),A=W.index(_.el),-1===A&&(W=W.add(_.el),A=W.length-1)):W=t(_.el)}function u(i){t(e).trigger(i),ae.triggerHandler(i)}function f(i){var o;if(!G){if(o=t(i).data(Y),_=new r(i,o),g(_.get("rel")),!$){$=q=!0,c(_.get("className")),y.css({visibility:"hidden",display:"block",opacity:""}),I=n(se,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),b.css({width:"",height:""}).append(I),j=T.height()+k.height()+b.outerHeight(!0)-b.height(),D=C.width()+H.width()+b.outerWidth(!0)-b.width(),N=I.outerHeight(!0),z=I.outerWidth(!0);var h=a(_.get("initialWidth"),"x"),s=a(_.get("initialHeight"),"y"),l=_.get("maxWidth"),f=_.get("maxHeight");_.w=(l!==!1?Math.min(h,a(l,"x")):h)-z-D,_.h=(f!==!1?Math.min(s,a(f,"y")):s)-N-j,I.css({width:"",height:_.h}),J.position(),u(ee),_.get("onOpen"),O.add(S).hide(),y.focus(),_.get("trapFocus")&&e.addEventListener&&(e.addEventListener("focus",d,!0),ae.one(re,function(){e.removeEventListener("focus",d,!0)})),_.get("returnFocus")&&ae.one(re,function(){t(_.el).focus()})}var p=parseFloat(_.get("opacity"));v.css({opacity:p===p?p:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(b):B.appendTo("<div/>"),w()}}function p(){y||(V=!1,E=t(i),y=n(se).attr({id:Y,"class":t.support.opacity===!1?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),v=n(se,"Overlay").hide(),M=t([n(se,"LoadingOverlay")[0],n(se,"LoadingGraphic")[0]]),x=n(se,"Wrapper"),b=n(se,"Content").append(S=n(se,"Title"),F=n(se,"Current"),P=t('<button type="button"/>').attr({id:Z+"Previous"}),K=t('<button type="button"/>').attr({id:Z+"Next"}),R=n("button","Slideshow"),M),B=t('<button type="button"/>').attr({id:Z+"Close"}),x.append(n(se).append(n(se,"TopLeft"),T=n(se,"TopCenter"),n(se,"TopRight")),n(se,!1,"clear:left").append(C=n(se,"MiddleLeft"),b,H=n(se,"MiddleRight")),n(se,!1,"clear:left").append(n(se,"BottomLeft"),k=n(se,"BottomCenter"),n(se,"BottomRight"))).find("div div").css({"float":"left"}),L=n(se,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=K.add(P).add(F).add(R)),e.body&&!y.parent().length&&t(e.body).append(v,y.append(x,L))}function m(){function i(t){t.which>1||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),f(this))}return y?(V||(V=!0,K.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),v.click(function(){_.get("overlayClose")&&J.close()}),t(e).bind("keydown."+Z,function(t){var e=t.keyCode;$&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),$&&_.get("arrowKey")&&W[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),K.click()))}),t.isFunction(t.fn.on)?t(e).on("click."+Z,"."+te,i):t("."+te).live("click."+Z,i)),!0):!1}function w(){var e,o,r,h=J.prep,d=++le;if(q=!0,U=!1,u(he),u(ie),_.get("onLoad"),_.h=_.get("height")?a(_.get("height"),"y")-N-j:_.get("innerHeight")&&a(_.get("innerHeight"),"y"),_.w=_.get("width")?a(_.get("width"),"x")-z-D:_.get("innerWidth")&&a(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=a(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=a(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),e=_.get("href"),Q=setTimeout(function(){M.show()},100),_.get("inline")){var c=t(e);r=t("<div>").hide().insertBefore(c),ae.one(he,function(){r.replaceWith(c)}),h(c)}else _.get("iframe")?h(" "):_.get("html")?h(_.get("html")):s(_,e)?(e=l(_,e),U=_.get("createImg"),t(U).addClass(Z+"Photo").bind("error",function(){h(n(se,"Error").html(_.get("imgError")))}).one("load",function(){d===le&&setTimeout(function(){var t;_.get("retinaImage")&&i.devicePixelRatio>1&&(U.height=U.height/i.devicePixelRatio,U.width=U.width/i.devicePixelRatio),_.get("scalePhotos")&&(o=function(){U.height-=U.height*t,U.width-=U.width*t},_.mw&&U.width>_.mw&&(t=(U.width-_.mw)/U.width,o()),_.mh&&U.height>_.mh&&(t=(U.height-_.mh)/U.height,o())),_.h&&(U.style.marginTop=Math.max(_.mh-U.height,0)/2+"px"),W[1]&&(_.get("loop")||W[A+1])&&(U.style.cursor="pointer",U.onclick=function(){J.next()}),U.style.width=U.width+"px",U.style.height=U.height+"px",h(U)},1)}),U.src=e):e&&L.load(e,_.get("data"),function(e,i){d===le&&h("error"===i?n(se,"Error").html(_.get("xhrError")):t(this).contents())})}var v,y,x,b,T,C,H,k,W,E,I,L,M,S,F,R,K,P,B,O,_,j,D,N,z,A,U,$,q,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return t(this).attr("href")},title:function(){return this.title},createImg:function(){var e=new Image,i=t(this).data("cbox-img-attrs");return"object"==typeof i&&t.each(i,function(t,i){e[t]=i}),e},createIframe:function(){var i=e.createElement("iframe"),n=t(this).data("cbox-iframe-attrs");return"object"==typeof n&&t.each(n,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullScreen=!0,i}},Y="colorbox",Z="cbox",te=Z+"Element",ee=Z+"_open",ie=Z+"_load",ne=Z+"_complete",oe=Z+"_cleanup",re=Z+"_closed",he=Z+"_purge",ae=t("<a/>"),se="div",le=0,de={},ce=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||W[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){R.html(_.get("slideshowStop")).unbind(s).one(s,n),ae.bind(ne,e).bind(ie,t),y.removeClass(a+"off").addClass(a+"on")}function n(){t(),ae.unbind(ne,e).unbind(ie,t),R.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),y.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,R.hide(),t(),ae.unbind(ne,e).unbind(ie,t),y.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(ae.unbind(oe,o),o()):_.get("slideshow")&&W[1]&&(r=!0,ae.one(oe,o),_.get("slideshowAuto")?i():n(),R.show())}}();t[Y]||(t(p),J=t.fn[Y]=t[Y]=function(e,i){var n,o=this;return e=e||{},t.isFunction(o)&&(o=t("<a/>"),e.open=!0),o[0]?(p(),m()&&(i&&(e.onComplete=i),o.each(function(){var i=t.data(this,Y)||{};t.data(this,Y,t.extend(i,e))}).addClass(te),n=new r(o[0],e),n.get("open")&&f(o[0])),o):o},J.position=function(e,i){function n(){T[0].style.width=k[0].style.width=b[0].style.width=parseInt(y[0].style.width,10)-D+"px",b[0].style.height=C[0].style.height=H[0].style.height=parseInt(y[0].style.height,10)-j+"px"}var r,h,s,l=0,d=0,c=y.offset();if(E.unbind("resize."+Z),y.css({top:-9e4,left:-9e4}),h=E.scrollTop(),s=E.scrollLeft(),_.get("fixed")?(c.top-=h,c.left-=s,y.css({position:"fixed"})):(l=h,d=s,y.css({position:"absolute"})),d+=_.get("right")!==!1?Math.max(E.width()-_.w-z-D-a(_.get("right"),"x"),0):_.get("left")!==!1?a(_.get("left"),"x"):Math.round(Math.max(E.width()-_.w-z-D,0)/2),l+=_.get("bottom")!==!1?Math.max(o()-_.h-N-j-a(_.get("bottom"),"y"),0):_.get("top")!==!1?a(_.get("top"),"y"):Math.round(Math.max(o()-_.h-N-j,0)/2),y.css({top:c.top,left:c.left,visibility:"visible"}),x[0].style.width=x[0].style.height="9999px",r={width:_.w+z+D,height:_.h+N+j,top:l,left:d},e){var g=0;t.each(r,function(t){return r[t]!==de[t]?(g=e,void 0):void 0}),e=g}de=r,e||y.css(r),y.dequeue().animate(r,{duration:e||0,complete:function(){n(),q=!1,x[0].style.width=_.w+z+D+"px",x[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){E.bind("resize."+Z,J.position)},1),t.isFunction(i)&&i()},step:n})},J.resize=function(t){var e;$&&(t=t||{},t.width&&(_.w=a(t.width,"x")-z-D),t.innerWidth&&(_.w=a(t.innerWidth,"x")),I.css({width:_.w}),t.height&&(_.h=a(t.height,"y")-N-j),t.innerHeight&&(_.h=a(t.innerHeight,"y")),t.innerHeight||t.height||(e=I.scrollTop(),I.css({height:"auto"}),_.h=I.height()),I.css({height:_.h}),e&&I.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(i){function o(){return _.w=_.w||I.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w}function a(){return _.h=_.h||I.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h}if($){var d,g="none"===_.get("transition")?0:_.get("speed");I.remove(),I=n(se,"LoadedContent").append(i),I.hide().appendTo(L.show()).css({width:o(),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:a()}).prependTo(b),L.hide(),t(U).css({"float":"none"}),c(_.get("className")),d=function(){function i(){t.support.opacity===!1&&y[0].style.removeAttribute("filter")}var n,o,a=W.length;$&&(o=function(){clearTimeout(Q),M.hide(),u(ne),_.get("onComplete")},S.html(_.get("title")).show(),I.show(),a>1?("string"==typeof _.get("current")&&F.html(_.get("current").replace("{current}",A+1).replace("{total}",a)).show(),K[_.get("loop")||a-1>A?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ce(),_.get("preloading")&&t.each([h(-1),h(1)],function(){var i,n=W[this],o=new r(n,t.data(n,Y)),h=o.get("href");h&&s(o,h)&&(h=l(o,h),i=e.createElement("img"),i.src=h)})):O.hide(),_.get("iframe")?(n=_.get("createIframe"),_.get("scrolling")||(n.scrolling="no"),t(n).attr({src:_.get("href"),"class":Z+"Iframe"}).one("load",o).appendTo(I),ae.one(he,function(){n.src="//about:blank"}),_.get("fastIframe")&&t(n).trigger("load")):o(),"fade"===_.get("transition")?y.fadeTo(g,1,i):i())},"fade"===_.get("transition")?y.fadeTo(g,0,function(){J.position(0,d)}):J.position(g,d)}},J.next=function(){!q&&W[1]&&(_.get("loop")||W[A+1])&&(A=h(1),f(W[A]))},J.prev=function(){!q&&W[1]&&(_.get("loop")||A)&&(A=h(-1),f(W[A]))},J.close=function(){$&&!G&&(G=!0,$=!1,u(oe),_.get("onCleanup"),E.unbind("."+Z),v.fadeTo(_.get("fadeOut")||0,0),y.stop().fadeTo(_.get("fadeOut")||0,0,function(){y.hide(),v.hide(),u(he),I.remove(),setTimeout(function(){G=!1,u(re),_.get("onClosed")},1)}))},J.remove=function(){y&&(y.stop(),t[Y].close(),y.stop(!1,!0).remove(),v.remove(),G=!1,y=null,t("."+te).removeData(Y).removeClass(te),t(e).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return t(_.el)},J.settings=X)})(jQuery,document,window);;
(function($,Drupal,drupalSettings){Drupal.behaviors.colorbox={attach:function(context,settings){$("a.colorbox").once("colorbox").colorbox({rel:'nofollow',maxWidth:"98%",maxHeight:"98%"});$("a.group1").once("colorbox").colorbox({rel:'group1'});$("a.iframe").once("colorbox").colorbox({iframe:true,width:"850px",height:"650px"})}};$(window).resize(function(){$("a.colorbox").colorbox.resize({maxWidth:"98%",maxHeight:"98%",rel:'nofollow'})})})(jQuery,Drupal,drupalSettings);
/**
 * Created by DEV04 on 11/14/2017.
 */
/*
 * Reset style copy data from word
 * */

(function ($, Drupal, drupalSettings) {
  if( typeof(CKEDITOR) !== "undefined" ) {

      /* Remove double and junk bullet symbol from Microsoft Word */
      CKEDITOR.on('instanceReady', function (ev) {
          ev.editor.on('paste', function (_ev) {
              let html = _ev.data.dataValue;
              _ev.data.type = 'text';
              _ev.editor.config.pasteFromWordRemoveFontStyles = true;
              _ev.editor.config.pastetext = true;
              if(!$('#'+_ev.editor.name).hasClass('typ-email-html')){
                  if(html !== undefined){
                      let regex = /(\sstyle=".*?"|•|&nbsp;|<u>|<\/u>|<sup>|<\/sup>|<sub>|<\/sub>|<img .* \/>|<font .*>|<a .*?>|<\/a>|<span .*?>|<span>|<\/span>)/gi;
                      let _result = '';
                      _ev.data.dataValue = html.replace(regex,_result);
                  }
              }
          });

          /**
           * Edit By Apiwat 21-10-2019
           * @TODO Disable Global Default checked Responsive Embed Youtube
           * default config read more : /web/libraries/youtube/plugin.js
           *
           * * */
            // CKEDITOR.config.youtube_responsive = true;

          ev.editor.on('selectionChange', function (_ev) {
              var selection = _ev.editor.getSelection().getStartElement();
              var command = _ev.editor.getCommand( 'imceimage' );
              if(selection.getName().indexOf('h') === 0){
                  if(command !== undefined){
                      command.setState( CKEDITOR.TRISTATE_DISABLED );
                  }

              }else{
                  /*
                  * check for customer type != OL
                  * */
                  if(command !== undefined){
                      command.setState( CKEDITOR.TRISTATE_OFF );
                  }
              }

          });

          let editor = ev.editor;
          let name = editor.name;
          $('#'+name).parent().prepend('<div class="btn-group btn-group-background" role="group" aria-label="Basic example">\n' +
              '  <button type="button" class="btn btn-ck-bg btn-secondary bg-light">'+Drupal.t('Light')+'</button>\n' +
              '  <button type="button" class="btn btn-ck-bg btn-secondary bg-dark">'+Drupal.t('Dark')+'</button>\n' +
              '</div>');
          $('#'+name).parent().on('click', '.btn-ck-bg', function(){
              let body = editor.document.getBody();
              if($(this).hasClass('bg-light')){
                  body.setAttribute( 'style', 'background-color: #FFFFFF');
              }else{
                  body.setAttribute( 'style', 'background-color: #808B96');
              }
          });
      });



      /*var globalDiv = $('.js-text-format-wrapper').eq(0);
      window.addEventListener('scroll', function(ev){

          ev.preventDefault();
          /!*
          * ES6 standard
          * let -> The scope of a variable defined with let is block scope.
          * var -> The scope of a variable defined with var is function scope or declared outside any function, global.
          * *!/

          let editorNumber = 1;

          for (let instances in CKEDITOR.instances){
              let content      =   document.getElementsByClassName('cke_contents').item(0);
              let toolbar       =   document.getElementById('cke_'+ editorNumber +'_top');
              let editor        =   document.getElementsByClassName('cke_'+ editorNumber).item(0);

              let scrollValue = document.documentElement.scrollTop > document.body.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;

              if(toolbar !== null && toolbar !== undefined)
              {
                  // toolbar.style.width = "auto";
                  toolbar.style.top = "0px";
                  toolbar.style.margin = "0 auto";
                  toolbar.style.boxSizing = "border-box";

                  let getWidthToolbar  = globalDiv[0].offsetWidth ? globalDiv[0].scrollWidth : '0';
                  let setWidthToolbar = 0;
                  let _mainFormInTab = $('.panel-body').eq(4);

                  if(getWidthToolbar === '0')
                  {
                      setWidthToolbar = _mainFormInTab[0].offsetWidth - 30;
                  }else{
                      setWidthToolbar = getWidthToolbar;
                  }

                  if (editor.offsetTop <= scrollValue && (editor.offsetTop + editor.offsetHeight) > (scrollValue + toolbar.offsetHeight + 100)) {
                      toolbar.style.width = setWidthToolbar + "px";
                      toolbar.style.position = "fixed";
                      toolbar.style.border = '1px solid #d1d1d1';
                      content.style.marginTop = toolbar.offsetHeight + "px";
                  } else {
                       // toolbar.style.width = setWidthToolbar + "px";
                      toolbar.style.position = "relative";
                      toolbar.style.borderBottom = '1px solid #d1d1d1';
                      content.style.marginTop = "0px";
                  }
              }

              editorNumber++;
          }
      }, false);*/
  }

    $(window).once('drupal-off-canvas').on({
      'dialog:beforecreate': function dialogBeforecreate(event, dialog, $element, settings) {
          jQuery('.form-item-attributes-hascaption').css('display','none')
      },
      'dialog:aftercreate': function dialogAftercreate(event, dialog, $element, settings) {
          jQuery('.form-item-attributes-hascaption').css('display','none')
      }
    });
})(jQuery, Drupal, drupalSettings);

;
