// // jscookie // !function(e){var n=!1;if("function"==typeof define&&define.amd&&(define(e),n=!0),"object"==typeof exports&&(module.exports=e(),n=!0),!n){var o=window.Cookies,t=window.Cookies=e();t.noConflict=function(){return window.Cookies=o,t}}}(function(){function e(){for(var e=0,n={};e1){if("number"==typeof(i=e({path:"/"},t.defaults,i)).expires){var a=new Date;a.setMilliseconds(a.getMilliseconds()+864e5*i.expires),i.expires=a}i.expires=i.expires?i.expires.toUTCString():"";try{c=JSON.stringify(r),/^[\{\[]/.test(c)&&(r=c)}catch(e){}r=o.write?o.write(r,n):encodeURIComponent(String(r)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),n=(n=(n=encodeURIComponent(String(n))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape);var s="";for(var f in i)i[f]&&(s+="; "+f,!0!==i[f]&&(s+="="+i[f]));return document.cookie=n+"="+r+s}n||(c={});for(var p=document.cookie?document.cookie.split("; "):[],d=/(%[0-9A-Z]{2})+/g,u=0;u*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0}};for(var d in c)!(d in b)&&(b[d]=c[d]);ga(b);for(var e in this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this));this.nativeDraggable=!b.forceFallback&&$,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),f(a,"pointerdown",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),ea.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a,b){"clone"!==a.lastPullMode&&(b=!0),z&&z.state!==b&&(i(z,"display",b?"none":""),b||z.state&&(a.options.group.revertClone?(A.insertBefore(z,B),a._animate(w,z)):A.insertBefore(z,w)),z.state=b)}function c(a,b,c){if(a){c=c||V;do if(">*"===b&&a.parentNode===c||r(a,b))return a;while(a=d(a))}return null}function d(a){var b=a.host;return b&&b.nodeType?b:a.parentNode}function e(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function f(a,b,c){a.addEventListener(b,c,Z)}function g(a,b,c){a.removeEventListener(b,c,Z)}function h(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(R," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(R," ")}}function i(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return V.defaultView&&V.defaultView.getComputedStyle?c=V.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function j(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;e5||b.clientX-(d.left+d.width)>5}function p(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function q(a,b){var c=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"===a.nodeName.toUpperCase()||">*"!==b&&!r(a,b)||c++;return c}function r(a,b){if(a){b=b.split(".");var c=b.shift().toUpperCase(),d=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");return!(""!==c&&a.nodeName.toUpperCase()!=c||b.length&&((" "+a.className+" ").match(d)||[]).length!=b.length)}return!1}function s(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function t(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function u(a){return X?X(a).clone(!0)[0]:Y&&Y.dom?Y.dom(a).cloneNode(!0):a.cloneNode(!0)}function v(a){for(var b=a.getElementsByTagName("input"),c=b.length;c--;){var d=b[c];d.checked&&da.push(d)}}if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q={},R=/\s+/g,S=/left|right|inline/,T="Sortable"+(new Date).getTime(),U=window,V=U.document,W=U.parseInt,X=U.jQuery||U.Zepto,Y=U.Polymer,Z=!1,$=!!("draggable"in V.createElement("div")),_=function(a){return!navigator.userAgent.match(/Trident.*rv[ :]?11\./)&&(a=V.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents)}(),aa=!1,ba=Math.abs,ca=Math.min,da=[],ea=[],fa=s(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h,i,j=c[T],k=b.scrollSensitivity,l=b.scrollSpeed,m=a.clientX,n=a.clientY,o=window.innerWidth,p=window.innerHeight;if(E!==c&&(D=b.scroll,E=c,F=b.scrollFn,D===!0)){D=c;do if(D.offsetWidth-1:e==a)}}var c={},d=a.group;d&&"object"==typeof d||(d={name:d}),c.name=d.name,c.checkPull=b(d.pull,!0),c.checkPut=b(d.put),c.revertClone=d.revertClone,a.group=c};a.prototype={constructor:a,_onTapStart:function(a){var b,d=this,e=this.el,f=this.options,g=f.preventOnFilter,h=a.type,i=a.touches&&a.touches[0],j=(i||a).target,l=a.target.shadowRoot&&a.path[0]||j,m=f.filter;if(v(e),!w&&!("mousedown"===h&&0!==a.button||f.disabled)&&(j=c(j,f.draggable,e),j&&C!==j)){if(b=q(j,f.draggable),"function"==typeof m){if(m.call(this,a,j,this))return k(d,l,"filter",j,e,b),void(g&&a.preventDefault())}else if(m&&(m=m.split(",").some(function(a){if(a=c(l,a.trim(),e))return k(d,a,"filter",j,e,b),!0})))return void(g&&a.preventDefault());f.handle&&!c(l,f.handle,e)||this._prepareDragStart(a,i,j,b)}},_prepareDragStart:function(a,b,c,d){var e,g=this,i=g.el,l=g.options,n=i.ownerDocument;c&&!w&&c.parentNode===i&&(N=a,A=i,w=c,x=w.parentNode,B=w.nextSibling,C=c,L=l.group,J=d,this._lastX=(b||a).clientX,this._lastY=(b||a).clientY,w.style["will-change"]="transform",e=function(){g._disableDelayedDrag(),w.draggable=g.nativeDraggable,h(w,l.chosenClass,!0),g._triggerDragStart(a,b),k(g,A,"choose",w,A,J)},l.ignore.split(",").forEach(function(a){j(w,a.trim(),m)}),f(n,"mouseup",g._onDrop),f(n,"touchend",g._onDrop),f(n,"touchcancel",g._onDrop),f(n,"pointercancel",g._onDrop),f(n,"selectstart",g),l.delay?(f(n,"mouseup",g._disableDelayedDrag),f(n,"touchend",g._disableDelayedDrag),f(n,"touchcancel",g._disableDelayedDrag),f(n,"mousemove",g._disableDelayedDrag),f(n,"touchmove",g._disableDelayedDrag),f(n,"pointermove",g._disableDelayedDrag),g._dragStartTimer=setTimeout(e,l.delay)):e())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),g(a,"mouseup",this._disableDelayedDrag),g(a,"touchend",this._disableDelayedDrag),g(a,"touchcancel",this._disableDelayedDrag),g(a,"mousemove",this._disableDelayedDrag),g(a,"touchmove",this._disableDelayedDrag),g(a,"pointermove",this._disableDelayedDrag)},_triggerDragStart:function(a,b){b=b||("touch"==a.pointerType?a:null),b?(N={target:w,clientX:b.clientX,clientY:b.clientY},this._onDragStart(N,"touch")):this.nativeDraggable?(f(w,"dragend",this),f(A,"dragstart",this._onDragStart)):this._onDragStart(N,!0);try{V.selection?setTimeout(function(){V.selection.empty()}):window.getSelection().removeAllRanges()}catch(a){}},_dragStarted:function(){if(A&&w){var b=this.options;h(w,b.ghostClass,!0),h(w,b.dragClass,!1),a.active=this,k(this,A,"start",w,A,J)}else this._nulling()},_emulateDragOver:function(){if(O){if(this._lastX===O.clientX&&this._lastY===O.clientY)return;this._lastX=O.clientX,this._lastY=O.clientY,_||i(y,"display","none");var a=V.elementFromPoint(O.clientX,O.clientY),b=a,c=ea.length;if(b)do{if(b[T]){for(;c--;)ea[c]({clientX:O.clientX,clientY:O.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);_||i(y,"display","")}},_onTouchMove:function(b){if(N){var c=this.options,d=c.fallbackTolerance,e=c.fallbackOffset,f=b.touches?b.touches[0]:b,g=f.clientX-N.clientX+e.x,h=f.clientY-N.clientY+e.y,j=b.touches?"translate3d("+g+"px,"+h+"px,0)":"translate("+g+"px,"+h+"px)";if(!a.active){if(d&&ca(ba(f.clientX-this._lastX),ba(f.clientY-this._lastY))w.offsetWidth,D=e.offsetHeight>w.offsetHeight,E=(v?(d.clientX-g.left)/t:(d.clientY-g.top)/u)>.5,F=e.nextElementSibling,J=!1;if(v){var K=w.offsetTop,N=e.offsetTop;J=K===N?e.previousElementSibling===w&&!C||E&&C:e.previousElementSibling===w||w.previousElementSibling===e?(d.clientY-g.top)/u>.5:N>K}else r||(J=F!==w&&!D||E&&D);var O=l(A,j,w,f,e,g,d,J);O!==!1&&(1!==O&&O!==-1||(J=1===O),aa=!0,setTimeout(n,30),b(p,q),w.contains(j)||(J&&!F?j.appendChild(w):e.parentNode.insertBefore(w,J?F:e)),x=w.parentNode,this._animate(f,w),this._animate(g,e))}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();1===a.nodeType&&(a=a.getBoundingClientRect()),i(b,"transition","none"),i(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,i(b,"transition","all "+c+"ms"),i(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){i(b,"transition",""),i(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;g(V,"touchmove",this._onTouchMove),g(V,"pointermove",this._onTouchMove),g(a,"mouseup",this._onDrop),g(a,"touchend",this._onDrop),g(a,"pointerup",this._onDrop),g(a,"touchcancel",this._onDrop),g(a,"pointercancel",this._onDrop),g(a,"selectstart",this)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(Q.pid),clearTimeout(this._dragStartTimer),g(V,"mousemove",this._onTouchMove),this.nativeDraggable&&(g(V,"drop",this),g(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(P&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),y&&y.parentNode&&y.parentNode.removeChild(y),A!==x&&"clone"===a.active.lastPullMode||z&&z.parentNode&&z.parentNode.removeChild(z),w&&(this.nativeDraggable&&g(w,"dragend",this),m(w),w.style["will-change"]="",h(w,this.options.ghostClass,!1),h(w,this.options.chosenClass,!1),k(this,A,"unchoose",w,A,J),A!==x?(K=q(w,d.draggable),K>=0&&(k(null,x,"add",w,A,J,K),k(this,A,"remove",w,A,J,K),k(null,x,"sort",w,A,J,K),k(this,A,"sort",w,A,J,K))):w.nextSibling!==B&&(K=q(w,d.draggable),K>=0&&(k(this,A,"update",w,A,J,K),k(this,A,"sort",w,A,J,K))),a.active&&(null!=K&&K!==-1||(K=J),k(this,A,"end",w,A,J,K),this.save()))),this._nulling()},_nulling:function(){A=w=x=y=B=z=C=D=E=N=O=P=K=G=H=M=L=a.active=null,da.forEach(function(a){a.checked=!0}),da.length=0},handleEvent:function(a){switch(a.type){case"drop":case"dragend":this._onDrop(a);break;case"dragover":case"dragenter":w&&(this._onDragOver(a),e(a));break;case"selectstart":a.preventDefault()}},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;e=0;i--){var currentTextArea=textAreaList[i];var wideAreaWrapper=document.createElement('div'),wideAreaIcons=document.createElement('div'),fullscreenIcon=document.createElement('a');wideAreaWrapper.className='widearea-wrapper';wideAreaIcons.className='widearea-icons';fullscreenIcon.className='widearea-icon fullscreen';fullscreenIcon.title=this._options.fullScreenIconLabel;fullscreenIcon.href='javascript:void(0);';fullscreenIcon.draggable=false;fullscreenIcon.onclick=fullscreenIconClickHandler;currentTextArea.className=(currentTextArea.className+" widearea").replace(/^\s+|\s+$/g,"");currentTextArea.setAttribute("data-widearea-id",this._wideAreaId);wideAreaIcons.setAttribute("id","widearea-"+this._wideAreaId);if(_getFromStorage.call(this,this._wideAreaId)){currentTextArea.value=_getFromStorage.call(this,this._wideAreaId);} var onTextChanged=function(){_saveToStorage.call(self,this.getAttribute('data-widearea-id'),this.value);};if(currentTextArea.addEventListener){currentTextArea.addEventListener('input',onTextChanged,false);}else if(currentTextArea.attachEvent){currentTextArea.attachEvent('onpropertychange',onTextChanged);} ++this._wideAreaId;currentTextArea.parentNode.insertBefore(wideAreaWrapper,currentTextArea);wideAreaWrapper.appendChild(currentTextArea);wideAreaIcons.appendChild(fullscreenIcon);wideAreaWrapper.appendChild(wideAreaIcons);this._textareas.push(currentTextArea);}} function _enableFullScreen(link){var self=this;var wideAreaId=parseInt(link.parentNode.id.replace(/widearea\-/,""));var targetTextarea=document.querySelector("textarea[data-widearea-id='"+wideAreaId+"']");var currentTextArea=targetTextarea.cloneNode();currentTextArea.className=('widearea-fullscreen '+targetTextarea.className).replace(/^\s+|\s+$/g,"");targetTextarea.className=('widearea-fullscreened '+targetTextarea.className).replace(/^\s+|\s+$/g,"");var controlPanel=document.createElement('div');controlPanel.className='widearea-controlPanel';var closeIcon=document.createElement('a');closeIcon.href='javascript:void(0);';closeIcon.className='widearea-icon close';closeIcon.title=this._options.closeIconLabel;closeIcon.onclick=function(){_disableFullScreen.call(self);};closeIcon.draggable=false;var changeThemeIcon=document.createElement('a');changeThemeIcon.href='javascript:void(0);';changeThemeIcon.className='widearea-icon changeTheme';changeThemeIcon.title=this._options.changeThemeIconLabel;changeThemeIcon.onclick=function(){_toggleColorScheme.call(self);};changeThemeIcon.draggable=false;controlPanel.appendChild(closeIcon);controlPanel.appendChild(changeThemeIcon);var overlayLayer=document.createElement('div');overlayLayer.className='widearea-overlayLayer '+this._options.defaultColorScheme;var markdown=document.createElement('div');markdown.className='markdown';overlayLayer.appendChild(currentTextArea);overlayLayer.appendChild(controlPanel);overlayLayer.appendChild(markdown);jQuery(currentTextArea).afterselect(function(){var totaltip=jQuery('.totaltip').hide();totaltip.first().css({top:stacks.totalMousePos.y+15,left:stacks.totalMousePos.x-15}).fadeIn('fast');jQuery("textarea,input").one("mousedown keydown scroll",function(){totaltip.removeAttr('style');});jQuery(document).one("scroll",function(event){totaltip.removeAttr('style');});});document.body.appendChild(overlayLayer);currentTextArea.focus();currentTextArea.value=targetTextarea.value;jQuery(currentTextArea).markdown({target_form:".markdown"});jQuery("body>.totalbar").hide().addClass("fullscreen").fadeIn();var onTextChanged=function(){_saveToStorage.call(self,this.getAttribute('data-widearea-id'),this.value);$(currentTextArea).markdown({target_form:".markdown"});};if(currentTextArea.addEventListener){currentTextArea.addEventListener('input',onTextChanged,false);}else if(currentTextArea.attachEvent){currentTextArea.attachEvent('onpropertychange',onTextChanged);} jQuery('.totalbar .button,#totaltip').click(function(){$(currentTextArea).delay(200).markdown({target_form:".markdown"});});this._onKeyDown=function(e){if(e.keyCode===27&&self._options.exitOnEsc){_disableFullScreen.call(self);} if(e.keyCode==9){e.preventDefault();var selectionStart=currentTextArea.selectionStart;currentTextArea.value=currentTextArea.value.substring(0,selectionStart)+"\t"+currentTextArea.value.substring(currentTextArea.selectionEnd);currentTextArea.selectionEnd=selectionStart+1;}};if(window.addEventListener){window.addEventListener('keydown',self._onKeyDown,true);}else if(document.attachEvent){document.attachEvent('onkeydown',self._onKeyDown);}} function _toggleColorScheme(){var overlayLayer=document.querySelector(".widearea-overlayLayer");if(/dark/gi.test(overlayLayer.className)){overlayLayer.className=overlayLayer.className.replace('dark','light');}else{overlayLayer.className=overlayLayer.className.replace('light','dark');} jQuery("body>.totalbar.fullscreen").toggleClass("dark");} function _disableFullScreen(){var smallTextArea=document.querySelector("textarea.widearea-fullscreened");var overlayLayer=document.querySelector(".widearea-overlayLayer");var fullscreenTextArea=overlayLayer.querySelector("textarea");jQuery("body>.totalbar").removeClass("fullscreen").hide();smallTextArea.focus();smallTextArea.value=fullscreenTextArea.value;smallTextArea.className=smallTextArea.className.replace(/widearea-fullscreened/gi,"").replace(/^\s+|\s+$/g,"");overlayLayer.parentNode.removeChild(overlayLayer);if(window.removeEventListener){window.removeEventListener('keydown',this._onKeyDown,true);}else if(document.detachEvent){document.detachEvent('onkeydown',this._onKeyDown);}} function _mergeOptions(obj1,obj2){var obj3={},attrname;for(attrname in obj1){obj3[attrname]=obj1[attrname];} for(attrname in obj2){obj3[attrname]=obj2[attrname];} return obj3;} var wideArea=function(selector){if(typeof(selector)==='string'){var targetElement=document.querySelector(selector);if(targetElement){return new WideArea(targetElement);}else{throw new Error('There is no element with given selector.');}}else{return new WideArea(document.body);}};wideArea.version=VERSION;wideArea.fn=WideArea.prototype={clone:function(){return new WideArea(this);},setOption:function(option,value){this._options[option]=value;return this;},setOptions:function(options){this._options=_mergeOptions(this._options,options);return this;},clearData:function(value){_clearStorage.call(this,value);return this;}};exports.wideArea=wideArea;return wideArea;})); // // imagesloaded // !function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{};return(i[e]=i[e]||{})[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o'),this.element.appendChild(e)),g=e.getElementsByTagName("span")[0],g&&(null!=g.textContent?g.textContent=this.options.dictFallbackMessage:null!=g.innerText&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a,b,c,d){var e,f,g;if(e={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},f=a.width/a.height,null==b&&null==c?(b=e.srcWidth,c=e.srcHeight):null==b?b=c*f:null==c&&(c=b/f),b=Math.min(b,e.srcWidth),c=Math.min(c,e.srcHeight),g=b/c,e.srcWidth>b||e.srcHeight>c)if("crop"===d)f>g?(e.srcHeight=a.height,e.srcWidth=e.srcHeight*g):(e.srcWidth=a.width,e.srcHeight=e.srcWidth/g);else{if("contain"!==d)throw new Error("Unknown resizeMethod '"+d+"'");f>g?c=b/f:b=c*f}return e.srcX=(a.width-e.srcWidth)/2,e.srcY=(a.height-e.srcHeight)/2,e.trgWidth=b,e.trgHeight=c,e},transformFile:function(a,b){return(this.options.resizeWidth||this.options.resizeHeight)&&a.type.match(/image.*/)?this.resizeImage(a,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,b):b(a)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(a){return this.element.classList.remove("dz-drag-hover")},dragstart:h,dragend:function(a){return this.element.classList.remove("dz-drag-hover")},dragenter:function(a){return this.element.classList.add("dz-drag-hover")},dragover:function(a){return this.element.classList.add("dz-drag-hover")},dragleave:function(a){return this.element.classList.remove("dz-drag-hover")},paste:h,reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var b,c,e,f,g,h,i,j,k,l,m,n,o;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){for(a.previewElement=d.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement),j=a.previewElement.querySelectorAll("[data-dz-name]"),b=0,f=j.length;b'+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink)),m=function(b){return function(c){return c.preventDefault(),c.stopPropagation(),a.status===d.UPLOADING?d.confirm(b.options.dictCancelUploadConfirmation,function(){return b.removeFile(a)}):b.options.dictRemoveFileConfirmation?d.confirm(b.options.dictRemoveFileConfirmation,function(){return b.removeFile(a)}):b.removeFile(a)}}(this),l=a.previewElement.querySelectorAll("[data-dz-remove]"),o=[],e=0,h=l.length;e'+this.options.dictDefaultMessage+"")),this.clickableElements.length&&(h=function(a){return function(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null==a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!=a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!=a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var b,c,d,e;if(c=a.hiddenFileInput.files,c.length)for(d=0,e=c.length;d',this.options.dictFallbackText&&(c+="

"+this.options.dictFallbackText+"

"),c+='',b=d.createElement(c),"FORM"!==this.element.tagName?(e=d.createElement('
'),e.appendChild(b)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=e?e:b)},d.prototype.getExistingFallback=function(){var a,b,c,d,e,f;for(b=function(a){var b,c,d;for(c=0,d=a.length;c0){for(i=["tb","gb","mb","kb","b"],c=d=0,e=i.length;d=b){f=a/Math.pow(this.options.filesizeBase,4-c),g=h;break}f=Math.round(10*f)/10}return""+f+" "+this.options.dictFileSizeUnits[g]},d.prototype._updateMaxFilesReachedClass=function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")},d.prototype.drop=function(a){var b,c;a.dataTransfer&&(this.emit("drop",a),b=a.dataTransfer.files,this.emit("addedfiles",b),b.length&&(c=a.dataTransfer.items,c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)))},d.prototype.paste=function(a){var b,c;if(null!=(null!=a&&null!=(c=a.clipboardData)?c.items:void 0))return this.emit("paste",a),b=a.clipboardData.items,b.length?this._addFilesFromItems(b):void 0},d.prototype.handleFiles=function(a){var b,c,d,e;for(e=[],c=0,d=a.length;c0){for(f=0,g=c.length;f1024*this.options.maxFilesize*1024?b(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):d.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(b(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,b):b(this.options.dictInvalidFileType)},d.prototype.addFile=function(a){return a.upload={progress:0,total:a.size,bytesSent:0,filename:this._renameFile(a)},this.files.push(a),a.status=d.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return function(c){return c?(a.accepted=!1,b._errorProcessing([a],c)):(a.accepted=!0,b.options.autoQueue&&b.enqueueFile(a)),b._updateMaxFilesReachedClass()}}(this))},d.prototype.enqueueFiles=function(a){var b,c,d;for(c=0,d=a.length;c4&&(j.width=p.trgHeight,j.height=p.trgWidth),e){case 2:k.translate(j.width,0),k.scale(-1,1);break;case 3:k.translate(j.width,j.height),k.rotate(Math.PI);break;case 4:k.translate(0,j.height),k.scale(1,-1);break;case 5:k.rotate(.5*Math.PI),k.scale(1,-1);break;case 6:k.rotate(.5*Math.PI),k.translate(0,-j.height);break;case 7:k.rotate(.5*Math.PI),k.translate(j.width,-j.height),k.scale(-1,1);break;case 8:k.rotate(-.5*Math.PI),k.translate(-j.width,0)}if(g(k,i,null!=(l=p.srcX)?l:0,null!=(m=p.srcY)?m:0,p.srcWidth,p.srcHeight,null!=(n=p.trgX)?n:0,null!=(o=p.trgY)?o:0,p.trgWidth,p.trgHeight),q=j.toDataURL("image/png"),null!=f)return f(q,j)})}}(this),null!=f&&(i.onerror=f),i.src=a.dataURL},d.prototype.processQueue=function(){var a,b,c,d;if(b=this.options.parallelUploads,c=this.getUploadingFiles().length,a=c,!(c>=b)&&(d=this.getQueuedFiles(),d.length>0)){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,b-c));for(;a=I;m=0<=I?++A:--A)c=function(c){return function(d,e,f){return function(d){if(h.append(e,d,f),++b===a.length)return c.submitRequest(O,h,a)}}}(this),K.push(this.options.transformFile.call(this,a[m],c(a[m],this._getParamName(m),a[m].upload.filename)));return K},d.prototype.submitRequest=function(a,b,c){return a.send(b)},d.prototype._finished=function(a,b,c){var e,f,g;for(f=0,g=a.length;f=h;d=0<=h?++f:--f)e[d]=c.charCodeAt(d);return new Blob([b],{type:g})},i=function(a,b){var c,d,e,f;for(f=[],d=0,e=a.length;dk;)b=e[4*(i-1)+3],0===b?f=i:k=i,i=f+k>>1;return j=i/g,0===j?1:j},g=function(a,b,c,d,e,g,h,i,j,k){var l;return l=f(b),a.drawImage(b,c,d,e,g,h,i,j,k/l)},c=function(){function a(){}return a.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a.encode64=function(a){var b,c,d,e,f,g,h,i,j;for(j="",b=void 0,c=void 0,d="",e=void 0,f=void 0,g=void 0,h="",i=0;;)if(b=a[i++],c=a[i++],d=a[i++],e=b>>2,f=(3&b)<<4|c>>4,g=(15&c)<<2|d>>6,h=63&d,isNaN(c)?g=h=64:isNaN(d)&&(h=64),j=j+this.KEY_STR.charAt(e)+this.KEY_STR.charAt(f)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(h),b=c=d="",e=f=g=h="",!(ia.length)break}return f},a.decode64=function(a){var b,c,d,e,f,g,h,i,j,k,l;for(l="",d=void 0,e=void 0,f="",g=void 0,h=void 0,i=void 0,j="",k=0,c=[],b=/[^A-Za-z0-9\+\/\=]/g,b.exec(a)&&console.warning("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(g=this.KEY_STR.indexOf(a.charAt(k++)),h=this.KEY_STR.indexOf(a.charAt(k++)),i=this.KEY_STR.indexOf(a.charAt(k++)),j=this.KEY_STR.indexOf(a.charAt(k++)),d=g<<2|h>>4,e=(15&h)<<4|i>>2,f=(3&i)<<6|j,c.push(d),64!==i&&c.push(e),64!==j&&c.push(f),d=e=f="",g=h=i=j="",!(k=u;){var C=a>>(i-=u);d+=t.charAt(C),a^=C<0&&(d+=t.charAt(a<>6,128|63&e)}).replace(/[\u0800-\uffff]/g,function(r){var e=r.charCodeAt(0);return String.fromCharCode(224|e>>12,128|e>>6&63,128|63&e)})},decode:function(r){return r.replace(/[\u00e0-\u00ef][\u0080-\u00bf][\u0080-\u00bf]/g,function(r){var e=(15&r.charCodeAt(0))<<12|(63&r.charCodeAt(1))<<6|63&r.charCodeAt(2);return String.fromCharCode(e)}).replace(/[\u00c0-\u00df][\u0080-\u00bf]/g,function(r){var e=(31&r.charCodeAt(0))<<6|63&r.charCodeAt(1);return String.fromCharCode(e)})}};a<256;){var f=String.fromCharCode(a);t+=f,u[a]=a,o[a]=n.indexOf(f),++a}var d=r.base64=function(r,e,n){return e?d[r](e,n):r?null:this};d.btoa=d.encode=function(r,t){return r=!1===d.raw||d.utf8encode||t?c.encode(r):r,(r=e(r,!1,u,n,8,6))+"====".slice(r.length%4||4)},d.atob=d.decode=function(r,n){var u=(r=String(r).split("=")).length;do{r[--u]=e(r[u],!0,o,t,6,8)}while(u>0);return r=r.join(""),!1===d.raw||d.utf8decode||n?c.decode(r):r}}(jQuery); // // moment-with-locales // !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,t;function n(){return e.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function r(e){return void 0===e}function a(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function o(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var n,s=[];for(n=0;n>>0,s=0;s0)for(n=0;n<_.length;n++)r(i=t[s=_[n]])||(e[s]=i);return e}var g=!1;function M(e){y(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===g&&(g=!0,n.updateOffset(this),g=!1)}function p(e){return e instanceof M||null!=e&&null!=e._isAMomentObject}function v(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=v(t)),n}function Y(e,t,n){var s,i=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),a=0;for(s=0;s=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+s}var U=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,E={},G={};function V(e,t,n,s){var i=s;"string"==typeof s&&(i=function(){return this[s]()}),e&&(G[e]=i),t&&(G[t[0]]=function(){return F(i.apply(this,arguments),t[1],t[2])}),n&&(G[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function A(e,t){return e.isValid()?(t=I(t,e.localeData()),E[t]=E[t]||function(e){var t,n,s,i=e.match(U);for(t=0,n=i.length;t=0&&N.test(e);)e=e.replace(N,s),N.lastIndex=0,n-=1;return e}var z=/\d/,Z=/\d\d/,q=/\d{3}/,J=/\d{4}/,$=/[+-]?\d{6}/,Q=/\d\d?/,B=/\d\d\d\d?/,X=/\d\d\d\d\d\d?/,K=/\d{1,3}/,ee=/\d{1,4}/,te=/[+-]?\d{1,6}/,ne=/\d+/,se=/[+-]?\d+/,ie=/Z|[+-]\d\d:?\d\d/gi,re=/Z|[+-]\d\d(?::?\d\d)?/gi,ae=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,oe={};function ue(e,t,n){oe[e]=L(t)?t:function(e,s){return e&&n?n:t}}function de(e,t){return d(oe,e)?oe[e](t._strict,t._locale):new RegExp(le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,s,i){return t||n||s||i})))}function le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var he={};function ce(e,t){var n,s=t;for("string"==typeof e&&(e=[e]),a(t)&&(s=function(e,n){n[t]=w(e)}),n=0;n68?1900:2e3)};var be,Te=Le("FullYear",!0);function Le(e,t){return function(s){return null!=s?(xe(this,e,s),n.updateOffset(this,t),this):Oe(this,e)}}function Oe(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function xe(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&Se(e.year())&&1===e.month()&&29===e.date()?e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),He(n,e.month())):e._d["set"+(e._isUTC?"UTC":"")+t](n))}function He(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,s=(t%(n=12)+n)%n;return e+=(t-s)/12,1===s?Se(e)?29:28:31-s%7%2}be=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t=0){var n=Array.prototype.slice.call(arguments);n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)}else t=new Date(Date.UTC.apply(null,arguments));return t}function Ge(e,t,n){var s=7+t-n;return-((7+Ee(e,0,s).getUTCDay()-t)%7)+s-1}function Ve(e,t,n,s,i){var r,a,o=1+7*(t-1)+(7+n-s)%7+Ge(e,s,i);return o<=0?a=De(r=e-1)+o:o>De(e)?(r=e+1,a=o-De(e)):(r=e,a=o),{year:r,dayOfYear:a}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+Ie(i=e.year()-1,t,n):a>Ie(e.year(),t,n)?(s=a-Ie(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ie(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(De(e)-s+i)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),C("week",5),C("isoWeek",5),ue("w",Q),ue("ww",Q,Z),ue("W",Q),ue("WW",Q,Z),fe(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=w(e)});function ze(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),V("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),V("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),C("day",11),C("weekday",11),C("isoWeekday",11),ue("d",Q),ue("e",Q),ue("E",Q),ue("dd",function(e,t){return t.weekdaysMinRegex(e)}),ue("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ue("dddd",function(e,t){return t.weekdaysRegex(e)}),fe(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:c(n).invalidWeekday=e}),fe(["d","e","E"],function(e,t,n,s){t[s]=w(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Je="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var $e=ae;var Qe=ae;var Be=ae;function Xe(){function e(e,t){return t.length-e.length}var t,n,s,i,r,a=[],o=[],u=[],d=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),s=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),r=this.weekdays(n,""),a.push(s),o.push(i),u.push(r),d.push(s),d.push(i),d.push(r);for(a.sort(e),o.sort(e),u.sort(e),d.sort(e),t=0;t<7;t++)o[t]=le(o[t]),u[t]=le(u[t]),d[t]=le(d[t]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ke(){return this.hours()%12||12}function et(e,t){V(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function tt(e,t){return t._meridiemParse}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Ke),V("k",["kk",2],0,function(){return this.hours()||24}),V("hmm",0,0,function(){return""+Ke.apply(this)+F(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Ke.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+F(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)}),et("a",!0),et("A",!1),P("hour","h"),C("hour",13),ue("a",tt),ue("A",tt),ue("H",Q),ue("h",Q),ue("k",Q),ue("HH",Q,Z),ue("hh",Q,Z),ue("kk",Q,Z),ue("hmm",B),ue("hmmss",X),ue("Hmm",B),ue("Hmmss",X),ce(["H","HH"],Me),ce(["k","kk"],function(e,t,n){var s=w(e);t[Me]=24===s?0:s}),ce(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ce(["h","hh"],function(e,t,n){t[Me]=w(e),c(n).bigHour=!0}),ce("hmm",function(e,t,n){var s=e.length-2;t[Me]=w(e.substr(0,s)),t[pe]=w(e.substr(s)),c(n).bigHour=!0}),ce("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=w(e.substr(0,s)),t[pe]=w(e.substr(s,2)),t[ve]=w(e.substr(i)),c(n).bigHour=!0}),ce("Hmm",function(e,t,n){var s=e.length-2;t[Me]=w(e.substr(0,s)),t[pe]=w(e.substr(s))}),ce("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=w(e.substr(0,s)),t[pe]=w(e.substr(s,2)),t[ve]=w(e.substr(i))});var nt,st=Le("Hours",!0),it={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:je,monthsShort:We,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:Je,weekdaysShort:qe,meridiemParse:/[ap]\.?m?\.?/i},rt={},at={};function ot(e){return e?e.toLowerCase().replace("_","-"):e}function ut(e){var t=null;if(!rt[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=nt._abbr,require("./locale/"+e),dt(t)}catch(e){}return rt[e]}function dt(e,t){var n;return e&&((n=r(t)?ht(e):lt(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function lt(e,t){if(null!==t){var n,s=it;if(t.abbr=e,null!=rt[e])T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=rt[e]._config;else if(null!=t.parentLocale)if(null!=rt[t.parentLocale])s=rt[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return at[t.parentLocale]||(at[t.parentLocale]=[]),at[t.parentLocale].push({name:e,config:t}),null;s=n._config}return rt[e]=new x(O(s,t)),at[e]&&at[e].forEach(function(e){lt(e.name,e.config)}),dt(e),rt[e]}return delete rt[e],null}function ht(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!s(e)){if(t=ut(e))return t;e=[e]}return function(e){for(var t,n,s,i,r=0;r0;){if(s=ut(i.slice(0,t).join("-")))return s;if(n&&n.length>=t&&Y(i,n,!0)>=t-1)break;t--}r++}return nt}(e)}function ct(e){var t,n=e._a;return n&&-2===c(e).overflow&&(t=n[ye]<0||n[ye]>11?ye:n[ge]<1||n[ge]>He(n[_e],n[ye])?ge:n[Me]<0||n[Me]>24||24===n[Me]&&(0!==n[pe]||0!==n[ve]||0!==n[we])?Me:n[pe]<0||n[pe]>59?pe:n[ve]<0||n[ve]>59?ve:n[we]<0||n[we]>999?we:-1,c(e)._overflowDayOfYear&&(t<_e||t>ge)&&(t=ge),c(e)._overflowWeeks&&-1===t&&(t=Ye),c(e)._overflowWeekday&&-1===t&&(t=ke),c(e).overflow=t),e}function ft(e,t,n){return null!=e?e:null!=t?t:n}function mt(e){var t,s,i,r,a,o=[];if(!e._d){for(i=function(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[ge]&&null==e._a[ye]&&function(e){var t,n,s,i,r,a,o,u;if(null!=(t=e._w).GG||null!=t.W||null!=t.E)r=1,a=4,n=ft(t.GG,e._a[_e],Ae(Ot(),1,4).year),s=ft(t.W,1),((i=ft(t.E,1))<1||i>7)&&(u=!0);else{r=e._locale._week.dow,a=e._locale._week.doy;var d=Ae(Ot(),r,a);n=ft(t.gg,e._a[_e],d.year),s=ft(t.w,d.week),null!=t.d?((i=t.d)<0||i>6)&&(u=!0):null!=t.e?(i=t.e+r,(t.e<0||t.e>6)&&(u=!0)):i=r}s<1||s>Ie(n,r,a)?c(e)._overflowWeeks=!0:null!=u?c(e)._overflowWeekday=!0:(o=Ve(n,s,i,r,a),e._a[_e]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(a=ft(e._a[_e],i[_e]),(e._dayOfYear>De(a)||0===e._dayOfYear)&&(c(e)._overflowDayOfYear=!0),s=Ee(a,0,e._dayOfYear),e._a[ye]=s.getUTCMonth(),e._a[ge]=s.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=i[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[pe]&&0===e._a[ve]&&0===e._a[we]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ee:function(e,t,n,s,i,r,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,o),r=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==r&&(c(e).weekdayMismatch=!0)}}var _t=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gt=/Z|[+-]\d\d(?::?\d\d)?/,Mt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],pt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vt=/^\/?Date\((\-?\d+)/i;function wt(e){var t,n,s,i,r,a,o=e._i,u=_t.exec(o)||yt.exec(o);if(u){for(c(e).iso=!0,t=0,n=Mt.length;t0&&c(e).unusedInput.push(a),o=o.slice(o.indexOf(s)+s.length),d+=s.length),G[r]?(s?c(e).empty=!1:c(e).unusedTokens.push(r),me(r,s,e)):e._strict&&!s&&c(e).unusedTokens.push(r);c(e).charsLeftOver=u-d,o.length>0&&c(e).unusedInput.push(o),e._a[Me]<=12&&!0===c(e).bigHour&&e._a[Me]>0&&(c(e).bigHour=void 0),c(e).parsedDateParts=e._a.slice(0),c(e).meridiem=e._meridiem,e._a[Me]=function(e,t,n){var s;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((s=e.isPM(n))&&t<12&&(t+=12),s||12!==t||(t=0),t):t}(e._locale,e._a[Me],e._meridiem),mt(e),ct(e)}else St(e);else wt(e)}function Tt(e){var t=e._i,d=e._f;return e._locale=e._locale||ht(e._l),null===t||void 0===d&&""===t?m({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),p(t)?new M(ct(t)):(o(t)?e._d=t:s(d)?function(e){var t,n,s,i,r;if(0===e._f.length)return c(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;ithis?this:e:m()});function Pt(e,t){var n,i;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return Ot();for(n=t[0],i=1;i=0?new Date(e+400,t,n)-an:new Date(e,t,n).valueOf()}function dn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-an:Date.UTC(e,t,n)}function ln(e,t){V(0,[e,e.length],0,t)}function hn(e,t,n,s,i){var r;return null==e?Ae(this,s,i).year:(t>(r=Ie(e,s,i))&&(t=r),function(e,t,n,s,i){var r=Ve(e,t,n,s,i),a=Ee(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,e,t,n,s,i))}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ln("gggg","weekYear"),ln("ggggg","weekYear"),ln("GGGG","isoWeekYear"),ln("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),C("weekYear",1),C("isoWeekYear",1),ue("G",se),ue("g",se),ue("GG",Q,Z),ue("gg",Q,Z),ue("GGGG",ee,J),ue("gggg",ee,J),ue("GGGGG",te,$),ue("ggggg",te,$),fe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,s){t[s.substr(0,2)]=w(e)}),fe(["gg","GG"],function(e,t,s,i){t[i]=n.parseTwoDigitYear(e)}),V("Q",0,"Qo","quarter"),P("quarter","Q"),C("quarter",7),ue("Q",z),ce("Q",function(e,t){t[ye]=3*(w(e)-1)}),V("D",["DD",2],"Do","date"),P("date","D"),C("date",9),ue("D",Q),ue("DD",Q,Z),ue("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),ce(["D","DD"],ge),ce("Do",function(e,t){t[ge]=w(e.match(Q)[0])});var cn=Le("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),C("dayOfYear",4),ue("DDD",K),ue("DDDD",q),ce(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),V("m",["mm",2],0,"minute"),P("minute","m"),C("minute",14),ue("m",Q),ue("mm",Q,Z),ce(["m","mm"],pe);var fn=Le("Minutes",!1);V("s",["ss",2],0,"second"),P("second","s"),C("second",15),ue("s",Q),ue("ss",Q,Z),ce(["s","ss"],ve);var mn,_n=Le("Seconds",!1);for(V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return 10*this.millisecond()}),V(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),V(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),V(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),V(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),V(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),C("millisecond",16),ue("S",K,z),ue("SS",K,Z),ue("SSS",K,q),mn="SSSS";mn.length<=9;mn+="S")ue(mn,ne);function yn(e,t){t[we]=w(1e3*("0."+e))}for(mn="S";mn.length<=9;mn+="S")ce(mn,yn);var gn=Le("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var Mn=M.prototype;function pn(e){return e}Mn.add=Qt,Mn.calendar=function(e,t){var s=e||Ot(),i=Et(s,this).startOf("day"),r=n.calendarFormat(this,i)||"sameElse",a=t&&(L(t[r])?t[r].call(this,s):t[r]);return this.format(a||this.localeData().calendar(r,this,Ot(s)))},Mn.clone=function(){return new M(this)},Mn.diff=function(e,t,n){var s,i,r;if(!this.isValid())return NaN;if(!(s=Et(e,this)).isValid())return NaN;switch(i=6e4*(s.utcOffset()-this.utcOffset()),t=j(t)){case"year":r=Xt(this,s)/12;break;case"month":r=Xt(this,s);break;case"quarter":r=Xt(this,s)/3;break;case"second":r=(this-s)/1e3;break;case"minute":r=(this-s)/6e4;break;case"hour":r=(this-s)/36e5;break;case"day":r=(this-s-i)/864e5;break;case"week":r=(this-s-i)/6048e5;break;default:r=this-s}return n?r:v(r)},Mn.endOf=function(e){var t;if(void 0===(e=j(e))||"millisecond"===e||!this.isValid())return this;var s=this._isUTC?dn:un;switch(e){case"year":t=s(this.year()+1,0,1)-1;break;case"quarter":t=s(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=s(this.year(),this.month()+1,1)-1;break;case"week":t=s(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=s(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=s(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=rn-on(t+(this._isUTC?0:this.utcOffset()*sn),rn)-1;break;case"minute":t=this._d.valueOf(),t+=sn-on(t,sn)-1;break;case"second":t=this._d.valueOf(),t+=nn-on(t,nn)-1}return this._d.setTime(t),n.updateOffset(this,!0),this},Mn.format=function(e){e||(e=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var t=A(this,e);return this.localeData().postformat(t)},Mn.from=function(e,t){return this.isValid()&&(p(e)&&e.isValid()||Ot(e).isValid())?zt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Mn.fromNow=function(e){return this.from(Ot(),e)},Mn.to=function(e,t){return this.isValid()&&(p(e)&&e.isValid()||Ot(e).isValid())?zt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Mn.toNow=function(e){return this.to(Ot(),e)},Mn.get=function(e){return L(this[e=j(e)])?this[e]():this},Mn.invalidAt=function(){return c(this).overflow},Mn.isAfter=function(e,t){var n=p(e)?e:Ot(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=j(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?A(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",A(n,"Z")):A(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Mn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="";this.isLocal()||(e=0===this.utcOffset()?"moment.utc":"moment.parseZone",t="Z");var n="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=t+'[")]';return this.format(n+s+"-MM-DD[T]HH:mm:ss.SSS"+i)},Mn.toJSON=function(){return this.isValid()?this.toISOString():null},Mn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Mn.unix=function(){return Math.floor(this.valueOf()/1e3)},Mn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Mn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Mn.year=Te,Mn.isLeapYear=function(){return Se(this.year())},Mn.weekYear=function(e){return hn.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Mn.isoWeekYear=function(e){return hn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Mn.quarter=Mn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Mn.month=Ce,Mn.daysInMonth=function(){return He(this.year(),this.month())},Mn.week=Mn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Mn.isoWeek=Mn.isoWeeks=function(e){var t=Ae(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Mn.weeksInYear=function(){var e=this.localeData()._week;return Ie(this.year(),e.dow,e.doy)},Mn.isoWeeksInYear=function(){return Ie(this.year(),1,4)},Mn.date=cn,Mn.day=Mn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Mn.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Mn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Mn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Mn.hour=Mn.hours=st,Mn.minute=Mn.minutes=fn,Mn.second=Mn.seconds=_n,Mn.millisecond=Mn.milliseconds=gn,Mn.utcOffset=function(e,t,s){var i,r=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=Nt(re,e)))return this}else Math.abs(e)<16&&!s&&(e*=60);return!this._isUTC&&t&&(i=Gt(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==e&&(!t||this._changeInProgress?$t(this,zt(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:Gt(this)},Mn.utc=function(e){return this.utcOffset(0,e)},Mn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Gt(this),"m")),this},Mn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=Nt(ie,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Mn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Ot(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Mn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Mn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Mn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Mn.isUtc=Vt,Mn.isUTC=Vt,Mn.zoneAbbr=function(){return this._isUTC?"UTC":""},Mn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Mn.dates=D("dates accessor is deprecated. Use date instead.",cn),Mn.months=D("months accessor is deprecated. Use month instead",Ce),Mn.years=D("years accessor is deprecated. Use year instead",Te),Mn.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),Mn.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e={};if(y(e,this),(e=Tt(e))._a){var t=e._isUTC?h(e._a):Ot(e._a);this._isDSTShifted=this.isValid()&&Y(e._a,t.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted});var vn=x.prototype;function wn(e,t,n,s){var i=ht(),r=h().set(s,t);return i[n](r,e)}function Yn(e,t,n){if(a(e)&&(t=e,e=void 0),e=e||"",null!=t)return wn(e,t,n,"month");var s,i=[];for(s=0;s<12;s++)i[s]=wn(e,s,n,"month");return i}function kn(e,t,n,s){"boolean"==typeof e?(a(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,a(t)&&(n=t,t=void 0),t=t||"");var i,r=ht(),o=e?r._week.dow:0;if(null!=n)return wn(t,(n+o)%7,s,"day");var u=[];for(i=0;i<7;i++)u[i]=wn(t,(i+o)%7,s,"day");return u}vn.calendar=function(e,t,n){var s=this._calendar[e]||this._calendar.sameElse;return L(s)?s.call(t,n):s},vn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},vn.invalidDate=function(){return this._invalidDate},vn.ordinal=function(e){return this._ordinal.replace("%d",e)},vn.preparse=pn,vn.postformat=pn,vn.relativeTime=function(e,t,n,s){var i=this._relativeTime[n];return L(i)?i(e,t,n,s):i.replace(/%d/i,e)},vn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return L(n)?n(t):n.replace(/%s/i,t)},vn.set=function(e){var t,n;for(n in e)L(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},vn.months=function(e,t){return e?s(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:s(this._months)?this._months:this._months.standalone},vn.monthsShort=function(e,t){return e?s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},vn.monthsParse=function(e,t,n){var s,i,r;if(this._monthsParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],s=0;s<12;++s)r=h([2e3,s]),this._shortMonthsParse[s]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[s]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=be.call(this._shortMonthsParse,a))?i:null:-1!==(i=be.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=be.call(this._shortMonthsParse,a))?i:-1!==(i=be.call(this._longMonthsParse,a))?i:null:-1!==(i=be.call(this._longMonthsParse,a))?i:-1!==(i=be.call(this._shortMonthsParse,a))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),s=0;s<12;s++){if(i=h([2e3,s]),n&&!this._longMonthsParse[s]&&(this._longMonthsParse[s]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[s]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[s]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[s]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[s].test(e))return s;if(n&&"MMM"===t&&this._shortMonthsParse[s].test(e))return s;if(!n&&this._monthsParse[s].test(e))return s}},vn.monthsRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ne.call(this),e?this._monthsStrictRegex:this._monthsRegex):(d(this,"_monthsRegex")||(this._monthsRegex=Ue),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},vn.monthsShortRegex=function(e){return this._monthsParseExact?(d(this,"_monthsRegex")||Ne.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(d(this,"_monthsShortRegex")||(this._monthsShortRegex=Fe),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},vn.week=function(e){return Ae(e,this._week.dow,this._week.doy).week},vn.firstDayOfYear=function(){return this._week.doy},vn.firstDayOfWeek=function(){return this._week.dow},vn.weekdays=function(e,t){var n=s(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?ze(n,this._week.dow):e?n[e.day()]:n},vn.weekdaysMin=function(e){return!0===e?ze(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},vn.weekdaysShort=function(e){return!0===e?ze(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},vn.weekdaysParse=function(e,t,n){var s,i,r;if(this._weekdaysParseExact)return function(e,t,n){var s,i,r,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)r=h([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=be.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=be.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=be.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=be.call(this._weekdaysParse,a))?i:-1!==(i=be.call(this._shortWeekdaysParse,a))?i:-1!==(i=be.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=be.call(this._shortWeekdaysParse,a))?i:-1!==(i=be.call(this._weekdaysParse,a))?i:-1!==(i=be.call(this._minWeekdaysParse,a))?i:null:-1!==(i=be.call(this._minWeekdaysParse,a))?i:-1!==(i=be.call(this._weekdaysParse,a))?i:-1!==(i=be.call(this._shortWeekdaysParse,a))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(i=h([2e3,1]).day(s),n&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[s]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[s].test(e))return s;if(n&&"ddd"===t&&this._shortWeekdaysParse[s].test(e))return s;if(n&&"dd"===t&&this._minWeekdaysParse[s].test(e))return s;if(!n&&this._weekdaysParse[s].test(e))return s}},vn.weekdaysRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(d(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},vn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(d(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Qe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},vn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(d(this,"_weekdaysRegex")||Xe.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(d(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Be),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},vn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},vn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},dt("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),n.lang=D("moment.lang is deprecated. Use moment.locale instead.",dt),n.langData=D("moment.langData is deprecated. Use moment.localeData instead.",ht);var Dn=Math.abs;function Sn(e,t,n,s){var i=zt(t,n);return e._milliseconds+=s*i._milliseconds,e._days+=s*i._days,e._months+=s*i._months,e._bubble()}function bn(e){return e<0?Math.floor(e):Math.ceil(e)}function Tn(e){return 4800*e/146097}function Ln(e){return 146097*e/4800}function On(e){return function(){return this.as(e)}}var xn=On("ms"),Hn=On("s"),Pn=On("m"),jn=On("h"),Wn=On("d"),Rn=On("w"),Cn=On("M"),Fn=On("Q"),Un=On("y");function Nn(e){return function(){return this.isValid()?this._data[e]:NaN}}var En=Nn("milliseconds"),Gn=Nn("seconds"),Vn=Nn("minutes"),An=Nn("hours"),In=Nn("days"),zn=Nn("months"),Zn=Nn("years");var qn=Math.round,Jn={ss:44,s:45,m:45,h:22,d:26,M:11};var $n=Math.abs;function Qn(e){return(e>0)-(e<0)||+e}function Bn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n=$n(this._milliseconds)/1e3,s=$n(this._days),i=$n(this._months);t=v((e=v(n/60))/60),n%=60,e%=60;var r=v(i/12),a=i%=12,o=s,u=t,d=e,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var c=h<0?"-":"",f=Qn(this._months)!==Qn(h)?"-":"",m=Qn(this._days)!==Qn(h)?"-":"",_=Qn(this._milliseconds)!==Qn(h)?"-":"";return c+"P"+(r?f+r+"Y":"")+(a?f+a+"M":"")+(o?m+o+"D":"")+(u||d||l?"T":"")+(u?_+u+"H":"")+(d?_+d+"M":"")+(l?_+l+"S":"")}var Xn=Wt.prototype;return Xn.isValid=function(){return this._isValid},Xn.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},Xn.add=function(e,t){return Sn(this,e,t,1)},Xn.subtract=function(e,t){return Sn(this,e,t,-1)},Xn.as=function(e){if(!this.isValid())return NaN;var t,n,s=this._milliseconds;if("month"===(e=j(e))||"quarter"===e||"year"===e)switch(t=this._days+s/864e5,n=this._months+Tn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ln(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return 24*t+s/36e5;case"minute":return 1440*t+s/6e4;case"second":return 86400*t+s/1e3;case"millisecond":return Math.floor(864e5*t)+s;default:throw new Error("Unknown unit "+e)}},Xn.asMilliseconds=xn,Xn.asSeconds=Hn,Xn.asMinutes=Pn,Xn.asHours=jn,Xn.asDays=Wn,Xn.asWeeks=Rn,Xn.asMonths=Cn,Xn.asQuarters=Fn,Xn.asYears=Un,Xn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Xn._bubble=function(){var e,t,n,s,i,r=this._milliseconds,a=this._days,o=this._months,u=this._data;return r>=0&&a>=0&&o>=0||r<=0&&a<=0&&o<=0||(r+=864e5*bn(Ln(o)+a),a=0,o=0),u.milliseconds=r%1e3,e=v(r/1e3),u.seconds=e%60,t=v(e/60),u.minutes=t%60,n=v(t/60),u.hours=n%24,o+=i=v(Tn(a+=v(n/24))),a-=bn(Ln(i)),s=v(o/12),o%=12,u.days=a,u.months=o,u.years=s,this},Xn.clone=function(){return zt(this)},Xn.get=function(e){return e=j(e),this.isValid()?this[e+"s"]():NaN},Xn.milliseconds=En,Xn.seconds=Gn,Xn.minutes=Vn,Xn.hours=An,Xn.days=In,Xn.weeks=function(){return v(this.days()/7)},Xn.months=zn,Xn.years=Zn,Xn.humanize=function(e){if(!this.isValid())return this.localeData().invalidDate();var t=this.localeData(),n=function(e,t,n){var s=zt(e).abs(),i=qn(s.as("s")),r=qn(s.as("m")),a=qn(s.as("h")),o=qn(s.as("d")),u=qn(s.as("M")),d=qn(s.as("y")),l=i<=Jn.ss&&["s",i]||i0,l[4]=n,function(e,t,n,s,i){return i.relativeTime(t||1,!!n,e,s)}.apply(null,l)}(this,!e,t);return e&&(n=t.pastFuture(+this,n)),t.postformat(n)},Xn.toISOString=Bn,Xn.toString=Bn,Xn.toJSON=Bn,Xn.locale=Kt,Xn.localeData=tn,Xn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Bn),Xn.lang=en,V("X",0,0,"unix"),V("x",0,0,"valueOf"),ue("x",se),ue("X",/[+-]?\d+(\.\d{1,3})?/),ce("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ce("x",function(e,t,n){n._d=new Date(w(e))}),n.version="2.24.0",e=Ot,n.fn=Mn,n.min=function(){return Pt("isBefore",[].slice.call(arguments,0))},n.max=function(){return Pt("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=h,n.unix=function(e){return Ot(1e3*e)},n.months=function(e,t){return Yn(e,t,"months")},n.isDate=o,n.locale=dt,n.invalid=m,n.duration=zt,n.isMoment=p,n.weekdays=function(e,t,n){return kn(e,t,n,"weekdays")},n.parseZone=function(){return Ot.apply(null,arguments).parseZone()},n.localeData=ht,n.isDuration=Rt,n.monthsShort=function(e,t){return Yn(e,t,"monthsShort")},n.weekdaysMin=function(e,t,n){return kn(e,t,n,"weekdaysMin")},n.defineLocale=lt,n.updateLocale=function(e,t){if(null!=t){var n,s,i=it;null!=(s=ut(e))&&(i=s._config),(n=new x(t=O(i,t))).parentLocale=rt[e],rt[e]=n,dt(e)}else null!=rt[e]&&(null!=rt[e].parentLocale?rt[e]=rt[e].parentLocale:null!=rt[e]&&delete rt[e]);return rt[e]},n.locales=function(){return S(rt)},n.weekdaysShort=function(e,t,n){return kn(e,t,n,"weekdaysShort")},n.normalizeUnits=j,n.relativeTimeRounding=function(e){return void 0===e?qn:"function"==typeof e&&(qn=e,!0)},n.relativeTimeThreshold=function(e,t){return void 0!==Jn[e]&&(void 0===t?Jn[e]:(Jn[e]=t,"s"===e&&(Jn.ss=t-1),!0))},n.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},n.prototype=Mn,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?t(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],t):t(e.moment)}(this,function(e){"use strict";return e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?t(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],t):t(e.moment)}(this,function(e){"use strict";function t(e,t,n,s){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}return e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?t(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],t):t(e.moment)}(this,function(e){"use strict";return e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?t(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],t):t(e.moment)}(this,function(e){"use strict";return e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?t(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],t):t(e.moment)}(this,function(e){"use strict";var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),s=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;return e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?t(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],t):t(e.moment)}(this,function(e){"use strict";var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),s=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;return e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,s){return e?/-MMM-/.test(s)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:s,longMonthsParse:s,shortMonthsParse:s,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}})}); // // wysiwyg-editor // !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function r(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}function u(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}function h(e){for(;Ba.length<=e;)Ba.push(g(Ba)+" ");return Ba[e]}function g(e){return e[e.length-1]}function m(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||Pa.test(e))}function w(e,t){return t?!!(t.source.indexOf("\\w")>-1&&E(e))||t.test(e):E(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&za.test(e)}function x(e,t,n){for(;(n<0?t>0:t=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?M(n,_(e,n).text.length):H(t,_(e,t.line).text.length)}function H(e,t){var n=e.ch;return null==n||n>t?M(e.line,t):n<0?M(e.line,0):e}function W(e,t){for(var n=[],r=0;r=t:o.to>t);(r||(r=[])).push(new q(a,o.from,s?null:o.to))}}return r}function Z(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var E=0;E0)){var c=[l,1],f=I(d.from,s.from),p=I(d.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&c.push({from:d.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&c.push({from:s.to,to:d.to}),i.splice.apply(i,c),l+=c.length-3}}return i}function ne(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?I(d.to,n)>=0:I(d.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?I(d.from,r)<=0:I(d.from,r)<0)))return!0}}}function fe(e){for(var t;t=le(e);)e=t.find(-1,!0).line;return e}function ue(e){for(var t;t=de(e);)e=t.find(1,!0).line;return e}function pe(e){for(var t,n;t=de(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function he(e,t){var n=_(e,t),r=fe(n);return n==r?t:L(r)}function ge(e,t){if(t>e.lastLine())return t;var n,r=_(e,t);if(!me(e,r))return t;for(;n=de(r);)r=n.find(1,!0).line;return L(r)+1}function me(e,t){var n=Ua&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function we(e,t,n,r){if(!e)return r(t,n,"ltr");for(var i=!1,o=0;ot||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||r(t,n,"ltr")}function Ce(e,t,n){var r;Ha=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Ha=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Ha=i)}return null!=r?r:Ha}function Se(e,t){var n=e.order;return null==n&&(n=e.order=Wa(e.text,t)),n}function xe(e,t,n){var r=x(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Te(e,t,n){var r=xe(e,t.ch,n);return null==r?null:new M(t.line,r,n<0?"after":"before")}function ke(e,t,n,r,i){if(e){var o=Se(n,t.doc.direction);if(o){var a,s=i<0?g(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0){var d=Xt(t,n);a=i<0?n.text.length-1:0;var c=Qt(t,d,a).top;a=T(function(e){return Qt(t,d,e).top==c},i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=xe(n,a,1))}else a=i<0?s.to:s.from;return new M(r,a,l)}}return new M(r,i<0?n.text.length:0,i<0?"before":"after")}function _e(e,t,n,r){var i=Se(t,e.doc.direction);if(!i)return Te(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ce(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&u>=c.begin)){var p=f?"before":"after";return new M(n.line,u,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new M(n.line,l(e,1),"before"):new M(n.line,e,"after")};e>=0&&e0==(1!=a.level),d=s?r.begin:l(r.end,-1);if(a.from<=d&&d0?c.end:l(c.begin,-1);return null==m||r>0&&m==t.text.length||!(g=h(r>0?0:i.length-1,r,d(m)))?null:g}function Ae(e,t){return e._handlers&&e._handlers[t]||Va}function Ne(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=u(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Oe(e,t){var n=Ae(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function De(e){e.prototype.on=function(e,t){ja(this,e,t)},e.prototype.off=function(e,t){Ne(this,e,t)}}function Me(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Ie(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function $e(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Be(e){Me(e),Ie(e)}function Pe(e){return e.target||e.srcElement}function ze(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),wa&&e.ctrlKey&&1==t&&(t=3),t}function Ke(e){if(null==La){var t=r("span","​");n(e,r("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(La=t.offsetWidth<=1&&t.offsetHeight>2&&!(da&&ca<8))}var i=La?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ue(e){if(null!=Ra)return Ra;var r=n(e,document.createTextNode("AخA")),i=Ta(r,0,1).getBoundingClientRect(),o=Ta(r,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(Ra=o.right-i.right<3)}function He(e){if(null!=Qa)return Qa;var t=n(e,r("span","x")),i=t.getBoundingClientRect(),o=Ta(t,0,1).getBoundingClientRect();return Qa=Math.abs(i.left-o.left)>1}function We(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Za[e]=t}function Ve(e){if("string"==typeof e&&Ja.hasOwnProperty(e))e=Ja[e];else if(e&&"string"==typeof e.name&&Ja.hasOwnProperty(e.name)){var t=Ja[e.name];"string"==typeof t&&(t={name:t}),(e=y(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function je(e,t){t=Ve(t);var n=Za[t.name];if(!n)return je(e,"text/plain");var r=n(e,t);if(es.hasOwnProperty(t.name)){var i=es[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}function qe(e,t){c(t,es.hasOwnProperty(e)?es[e]:es[e]={})}function Ge(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function Ye(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Xe(e,t,n){return!e.startState||e.startState(t,n)}function Qe(e,t,n,r){var i=[e.state.modeGen],o={};ot(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=0;se&&i.splice(s,1,e,i[s+1],r),s+=2,l=Math.min(e,r)}if(t)if(a.opaque)i.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;ne.options.maxHighlightLength&&Ge(e.doc.mode,r.state),o=Qe(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Je(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new rs(r,!0,t);var o=at(e,t,n),a=o>r.first&&_(r,o-1).stateAfter,s=a?rs.fromSaved(r,a,o):new rs(r,Xe(r.mode),o);return r.iter(o,t,function(n){et(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function rt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=_(a,(t=U(a,t)).line),d=Je(e,t.line,n),c=new ts(l.text,e.options.tabSize,d);for(r&&(o=[]);(r||c.pose.options.maxHighlightLength?(s=!1,a&&et(e,t,r,f.pos),f.pos=t.length,l=null):l=it(nt(n,f,r.state,u),o),u){var p=u[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||c!=l){for(;da;--s){if(s<=o.first)return o.first;var l=_(o,s-1),d=l.stateAfter;if(d&&(!n||s+(d instanceof ns?d.lookAhead:0)<=o.modeFrontier))return s;var c=f(l.text,null,e.options.tabSize);(null==i||r>c)&&(i=s-1,r=c)}return i}function st(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=_(e,r).stateAfter;if(i&&(!(i instanceof ns)||r+i.lookAhead1&&!/ /.test(e))return e;for(var n=t,r="",i=0;id&&f.from<=d);u++);if(f.to>=c)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-d),i,o,null,s,l),o=null,r=r.slice(f.to-d),d=f.to}}}function mt(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function vt(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,d,c,f,u,p=i.length,h=0,g=1,m="",v=0;;){if(v==h){l=d=c=f=s="",u=null,v=1/0;for(var b=[],y=void 0,E=0;Eh||C.collapsed&&w.to==h&&w.from==h)?(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,d=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==h&&(c+=" "+C.startStyle),C.endStyle&&w.to==v&&(y||(y=[])).push(C.endStyle,w.to),C.title&&!f&&(f=C.title),C.collapsed&&(!u||ae(u.marker,C)<0)&&(u=w)):w.from>h&&v>w.from&&(v=w.from)}if(y)for(var S=0;S=p)break;for(var T=Math.min(p,v);;){if(m){var k=h+m.length;if(!u){var _=k>T?m.slice(0,T-h):m;t.addToken(t,_,a?a+l:l,c,h+_.length==v?d:"",f,s)}if(k>=T){m=m.slice(T-h),h=T;break}h=k,c=""}m=i.slice(o,o=n[g++]),a=ct(n[g++],t.cm.options)}}else for(var A=1;A2&&o.push((l.bottom+d.top)/2-n.top)}}o.push(n.bottom-n.top)}}function jt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;rn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function qt(e,t){var r=L(t=fe(t)),i=e.display.externalMeasured=new bt(e.doc,t,r);i.lineN=r;var o=i.built=ft(e,i);return i.text=o.pre,n(e.display.lineMeasure,o.pre),i}function Gt(e,t,n,r){return Qt(e,Xt(e,t),n,r)}function Yt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[d+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;d&&e[d-2]==e[d-3]&&e[d-1].insertLeft;)r=e[2+(d-=3)],a="left";if("right"==n&&i==l-s)for(;d=0&&(n=e[i]).left==n.right;i--);return n}function en(e,t,n,r){var i,o=Zt(t.map,n,r),a=o.node,s=o.start,l=o.end,d=o.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+l0&&(d=r="right");var f;i=e.options.lineWrapping&&(f=a.getClientRects()).length>1?f["right"==r?f.length-1:0]:a.getBoundingClientRect()}if(da&&ca<9&&!s&&(!i||!i.left&&!i.right)){var u=a.parentNode.getClientRects()[0];i=u?{left:u.left,right:u.left+yn(e.display),top:u.top,bottom:u.bottom}:fs}for(var p=i.top-t.rect.top,h=i.bottom-t.rect.top,g=(p+h)/2,m=t.view.measure.heights,v=0;v=r.text.length?(d=r.text.length,c="before"):d<=0&&(d=0,c="after"),!l)return a("before"==c?d-1:d,"before"==c);var f=Ce(l,d,c),u=Ha,p=s(d,f,"before"==c);return null!=u&&(p.other=s(d,u,"before"!=c)),p}function un(e,t){var n=0;t=U(e.doc,t),e.options.lineWrapping||(n=yn(e.display)*t.ch);var r=_(e.doc,t.line),i=be(r)+Pt(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function pn(e,t,n,r,i){var o=M(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function hn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return pn(r.first,0,null,!0,-1);var i=R(r,n),o=r.first+r.size-1;if(i>o)return pn(r.first+r.size-1,_(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=_(r,i);;){var s=vn(e,a,i,t,n),l=de(a),d=l&&l.find(0,!0);if(!l||!(s.ch>d.from.ch||s.ch==d.from.ch&&s.xRel>0))return s;i=L(a=d.to.line)}}function gn(e,t,n,r){var i=function(r){return ln(e,t,Qt(e,n,r),"line")},o=t.text.length,a=T(function(e){return i(e-1).bottom<=r},o,0);return o=T(function(e){return i(e).top>r},a,o),{begin:a,end:o}}function mn(e,t,n,r){return gn(e,t,n,ln(e,t,Qt(e,n,r),"line").top)}function vn(e,t,n,r,i){i-=be(t);var o,a=0,s=t.text.length,l=Xt(e,t);if(Se(t,e.doc.direction)){if(e.options.lineWrapping){var d;a=(d=gn(e,t,l,i)).begin,s=d.end}o=new M(n,Math.floor(a+(s-a)/2));var c,f,u=fn(e,o,"line",t,l).left,p=u1){var b=Math.abs(h-c)/g;g=Math.min(g,Math.ceil(Math.abs(h)/b)),p=h<0?1:-1}}while(0!=h&&(g>1||p<0!=h<0&&Math.abs(h)<=Math.abs(c)));if(Math.abs(h)>Math.abs(c)){if(h<0==c<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=f}}else{var y=T(function(n){var o=ln(e,t,Qt(e,l,n),"line");return o.top>i?(s=Math.min(n,s),!0):!(o.bottom<=i)&&(o.left>r||!(o.rightE.right?1:0,o}function bn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==as){as=r("pre");for(var i=0;i<49;++i)as.appendChild(document.createTextNode("x")),as.appendChild(r("br"));as.appendChild(document.createTextNode("x"))}n(e.measure,as);var o=as.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function yn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=r("span","xxxxxxxxxx"),i=r("pre",[t]);n(e.measure,i);var o=t.getBoundingClientRect(),a=(o.right-o.left)/10;return a>2&&(e.cachedCharWidth=a),a||10}function En(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a)n[e.options.gutters[a]]=o.offsetLeft+o.clientLeft+i,r[e.options.gutters[a]]=o.clientWidth;return{fixedPos:wn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function wn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Cn(e){var t=bn(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/yn(e.display)-3);return function(i){if(me(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().line3&&(i(p,g.top,null,g.bottom),p=c,g.bottoml.bottom||d.bottom==l.bottom&&d.right>l.right)&&(l=d),p0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Ln(e){e.state.focused||(e.display.input.focus(),Fn(e))}function Rn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Dn(e))},100)}function Fn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(Oe(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),fa&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),On(e))}function Dn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,t),e.state.focused=!1,Aa(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Mn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||l<-.005)&&(O(i.line,o),In(i.line),i.rest))for(var d=0;d=a&&(o=R(t,be(_(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Bn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=wn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!va){var a=r("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Pt(e.display))+"px;\n height: "+(t.bottom-t.top+Ut(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(a),a.scrollIntoView(o),e.display.lineSpace.removeChild(a)}}}function Kn(e,t,n,r){null==r&&(r=0);var i;e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?M(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?M(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,s=fn(e,t),l=n&&n!=t?fn(e,n):s,d=Hn(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=d.scrollTop&&(Xn(e,d.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(a=!0)),null!=d.scrollLeft&&(Zn(e,d.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}function Un(e,t){var n=Hn(e,t);null!=n.scrollTop&&Xn(e,n.scrollTop),null!=n.scrollLeft&&Zn(e,n.scrollLeft)}function Hn(e,t){var n=e.display,r=bn(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Wt(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+zt(n),l=t.tops-r;if(t.topi+o){var c=Math.min(t.top,(d?s:t.bottom)-o);c!=i&&(a.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,u=Ht(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),p=t.right-t.left>u;return p&&(t.right=t.left+u),t.left<10?a.scrollLeft=0:t.leftu+f-3&&(a.scrollLeft=t.right+(p?0:10)-u),a}function Wn(e,t){null!=t&&(Gn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Vn(e){Gn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function jn(e,t,n){null==t&&null==n||Gn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function qn(e,t){Gn(e),e.curOp.scrollToPos=t}function Gn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Yn(e,un(e,t.from),un(e,t.to),t.margin))}function Yn(e,t,n,r){var i=Hn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});jn(e,i.scrollLeft,i.scrollTop)}function Xn(e,t){Math.abs(e.doc.scrollTop-t)<2||(oa||Ar(e,{top:t}),Qn(e,t,!0),oa&&Ar(e),wr(e,100))}function Qn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Zn(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,Bn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Jn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+zt(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Ut(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function er(e,t){t||(t=Jn(e));var n=e.display.barWidth,r=e.display.barHeight;tr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Mn(e),tr(e,Jn(e)),n=e.display.barWidth,r=e.display.barHeight}function tr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function nr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Aa(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new hs[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ja(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?Zn(e,t):Xn(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function rr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++gs},Et(e.curOp)}function ir(e){Ct(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ms(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function sr(e){e.updatedDisplay=e.mustUpdate&&kr(e.cm,e.update)}function lr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Mn(t),e.barMeasure=Jn(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Gt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Ut(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ht(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection(e.focus))}function dr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Ua&&he(e.doc,t)i.viewFrom?vr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)vr(e);else if(t<=i.viewFrom){var o=br(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):vr(e)}else if(n>=i.viewTo){var a=br(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):vr(e)}else{var s=br(e,t,t,-1),l=br(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(yt(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):vr(e)}var d=i.externalMeasured;d&&(n=i.lineN&&t=r.viewTo)){var o=r.view[Tn(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==u(a,n)&&a.push(n)}}}function vr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function br(e,t,n,r){var i,o=Tn(e,t),a=e.display.view;if(!Ua||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;he(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function yr(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=yt(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=yt(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Tn(e,n)))),r.viewTo=n}function Er(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Je(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Ge(t.mode,r.state):null,l=Qe(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var d=o.styleClasses,c=l.classes;c?o.styleClasses=c:d&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||d!=c&&(!d||!c||d.bgClass!=c.bgClass||d.textClass!=c.textClass),u=0;!f&&un)return wr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&fr(e,function(){for(var t=0;t=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Er(e))return!1;Pn(e)&&(vr(e),n.dims=En(e));var o=i.first+i.size,a=Math.max(n.visible.from-e.options.viewportMargin,i.first),s=Math.min(o,n.visible.to+e.options.viewportMargin);r.viewFroms&&r.viewTo-s<20&&(s=Math.min(o,r.viewTo)),Ua&&(a=he(e.doc,a),s=ge(e.doc,s));var l=a!=r.viewFrom||s!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;yr(e,a,s),r.viewOffset=be(_(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var d=Er(e);if(!l&&0==d&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=xr(e);return d>4&&(r.lineDiv.style.display="none"),Nr(e,r.updateLineNumbers,n.dims),d>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,Tr(c),t(r.cursorDiv),t(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,l&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,wr(e,400)),r.updateLineNumbers=null,!0}function _r(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Ht(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+zt(e.display)-Wt(e),n.top)}),t.visible=$n(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&kr(e,t);r=!1){Mn(e);var i=Jn(e);kn(e),er(e,i),Lr(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Ar(e,t){var n=new ms(e,t);if(kr(e,n)){Mn(e),_r(e,n);var r=Jn(e);kn(e),er(e,r),Lr(e,r),n.finish()}}function Nr(e,n,r){function i(t){var n=t.nextSibling;return fa&&wa&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,a=e.options.lineNumbers,s=o.lineDiv,l=s.firstChild,d=o.view,c=o.viewFrom,f=0;f-1&&(h=!1),Tt(e,p,c,r)),h&&(t(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(D(e.options,c)))),l=p.node.nextSibling}else{var g=Ft(e,p,c,r);s.insertBefore(g,l)}c+=p.size}for(;l;)l=i(l)}function Or(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Lr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Ut(e)+"px"}function Rr(e){var n=e.display.gutters,i=e.options.gutters;t(n);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Dr(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Mr(e){var t=Dr(e);return t.x*=bs,t.y*=bs,t}function Ir(e,t){var n=Dr(t),r=n.x,i=n.y,o=e.display,a=o.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(r&&s||i&&l){if(i&&wa&&fa)e:for(var d=t.target,c=o.view;d!=a;d=d.parentNode)for(var f=0;f=0){var a=z(o.from(),i.from()),s=P(o.to(),i.to()),l=o.empty()?i.from()==i.head:o.from()==o.head;r<=t&&--t,e.splice(--r,2,new Es(l?s:a,l?a:s))}}return new ys(e,t)}function Br(e,t){return new ys([new Es(e,t||e)],0)}function Pr(e){return e.text?M(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function zr(e,t){if(I(e,t.from)<0)return e;if(I(e,t.to)<=0)return Pr(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Pr(t).ch-t.to.ch),M(n,r)}function Kr(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,b)}St(e,"change",e,t)}function Gr(e,t,n){function r(e,i,o){if(e.linked)for(var a=0;a1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function ni(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ti(i,i.lastOp==r)))a=g(o.changes),0==I(t.from,t.to)&&0==I(t.from,a.to)?a.to=Pr(t):o.changes.push(Jr(e,t));else{var l=g(i.done);for(l&&l.ranges||oi(e.sel,i.done),o={changes:[Jr(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||Oe(e,"historyAdded")}function ri(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function ii(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||ri(e,o,g(i.done),t))?i.done[i.done.length-1]=t:oi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&ei(i.undone)}function oi(e,t){var n=g(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ai(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function si(e){if(!e)return null;for(var t,n=0;n-1&&(g(s)[f]=d[f],delete d[f])}}}return r}function fi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=I(t,i)<0;o!=I(n,i)<0?(i=t,t=n):o!=I(t,n)<0&&(t=n)}return new Es(i,t)}return new Es(n||t,t)}function ui(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),bi(e,new ys([fi(e.sel.primary(),t,n,i)],0),r)}function pi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(Oe(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var d=l.find(r<0?1:-1),c=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(d=Ti(e,d,-r,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(c=I(d,n))&&(r<0?c<0:c>0))return Si(e,d,t,r,i)}var f=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(f=Ti(e,f,r,f.line==t.line?o:null)),f?Si(e,f,t,r,i):null}}return t}function xi(e,t,n,r,i){var o=r||1,a=Si(e,t,n,o,i)||!i&&Si(e,t,n,o,!0)||Si(e,t,n,-o,i)||!i&&Si(e,t,n,-o,!0);return a||(e.cantEdit=!0,M(e.first,0))}function Ti(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?U(e,M(t.line-1)):null:n>0&&t.ch==(r||_(e,t.line)).text.length?t.line=0;--i)Ni(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else Ni(e,t)}}function Ni(e,t){if(1!=t.text.length||""!=t.text[0]||0!=I(t.from,t.to)){var n=Kr(e,t);ni(e,t,n,e.cm?e.cm.curOp.id:NaN),Ri(e,t,n,J(e,t));var r=[];Gr(e,function(e,n){n||-1!=u(r,e.history)||($i(e.history,t),r.push(e.history)),Ri(e,t,null,J(e,t))})}}function Oi(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var r,i=e.history,o=e.sel,a="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,l=0;l=0;--f){var p=function(n){var i=r.changes[n];if(i.origin=t,c&&!_i(e,i,!1))return a.length=0,{};d.push(Jr(e,i));var o=n?Kr(e,i):g(a);Ri(e,i,o,di(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Pr(i)});var s=[];Gr(e,function(e,t){t||-1!=u(s,e.history)||($i(e.history,i),s.push(e.history)),Ri(e,i,null,di(e,i))})}(f);if(p)return p.v}}}}function Li(e,t){if(0!=t&&(e.first+=t,e.sel=new ys(m(e.sel.ranges,function(e){return new Es(M(e.anchor.line+t,e.anchor.ch),M(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){gr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:M(o,_(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=A(e,t.from,t.to),n||(n=Kr(e,t)),e.cm?Fi(e.cm,t,r):qr(e,t,r),yi(e,n,Ma)}}function Fi(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=L(fe(_(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&Re(e),qr(r,t,n,Cn(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=ye(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),st(r,o.line),wr(e,400);var d=t.text.length-(a.line-o.line)-1;t.full?gr(e):o.line!=a.line||1!=t.text.length||jr(e.doc,t)?gr(e,o.line,a.line+1,d):mr(e,o.line,"text");var c=Fe(e,"changes"),f=Fe(e,"change");if(f||c){var u={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&St(e,"change",e,u),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(u)}e.display.selForContextMenu=null}function Di(e,t,n,r,i){if(r||(r=n),I(r,n)<0){var o=r;r=n,n=o}"string"==typeof t&&(t=e.splitLines(t)),Ai(e,{from:n,to:r,text:t,origin:i})}function Mi(e,t,n,r){n0||0==s&&!1!==a.clearWhenEmpty)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=i("span",[a.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(ce(e,t.line,t,n,a)||t.line!=n.line&&ce(e,n.line,t,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");j()}a.addToHistory&&ni(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,d=t.line,f=e.cm;if(e.iter(d,n.line+1,function(e){f&&a.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(l=!0),a.collapsed&&d!=t.line&&O(e,0),X(e,new q(a,d==t.line?t.ch:null,d==n.line?n.ch:null)),++d}),a.collapsed&&e.iter(t.line,n.line+1,function(t){me(e,t)&&O(t,0)}),a.clearOnEnter&&ja(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(V(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),a.collapsed&&(a.id=++Cs,a.atomic=!0),f){if(l&&(f.curOp.updateMaxLine=!0),a.collapsed)gr(f,t.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var u=t.line;u<=n.line;u++)mr(f,u,"text");a.atomic&&wi(f.doc),St(f,"markerAdded",f,a)}return a}function Wi(e,t,n,r,i){(r=c(r)).shared=!1;var o=[Hi(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Gr(e,function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Hi(e,U(e,t),U(e,n),r,i));for(var l=0;l-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var l=e.dataTransfer.getData("Text");if(l){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),yi(t.doc,Br(n,n)),d)for(var c=0;c=0;t--)Di(e.doc,"",r[t].from,r[t].to,"+delete");Vn(e)})}function fo(e,t){var n=_(e.doc,t),r=fe(n);return r!=n&&(t=L(r)),ke(!0,e,r,t,1)}function uo(e,t){var n=_(e.doc,t),r=ue(n);return r!=n&&(t=L(r)),ke(!0,e,n,t,-1)}function po(e,t){var n=fo(e,t.line),r=_(e.doc,n.line),i=Se(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return M(n.line,a?0:o,n.sticky)}return n}function ho(e,t,n){if("string"==typeof t&&!(t=Ds[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=Da}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function go(e,t,n){for(var r=0;r-1&&(I((i=s.ranges[i]).from(),t)<0||t.xRel>0)&&(I(i.to(),t)>0||t.xRel<0)?Ao(e,r,t,o):Oo(e,r,t,o)}function Ao(e,t,n,r){var i=e.display,o=!1,a=ur(e,function(t){fa&&(i.scroller.draggable=!1),e.state.draggingText=!1,Ne(document,"mouseup",a),Ne(document,"mousemove",s),Ne(i.scroller,"dragstart",l),Ne(i.scroller,"drop",a),o||(Me(t),r.addNew||ui(e.doc,n,null,null,r.extend),fa||da&&9==ca?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),s=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},l=function(){return o=!0};fa&&(i.scroller.draggable=!0),e.state.draggingText=a,a.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),ja(document,"mouseup",a),ja(document,"mousemove",s),ja(i.scroller,"dragstart",l),ja(i.scroller,"drop",a),Rn(e),setTimeout(function(){return i.input.focus()},20)}function No(e,t,n){if("char"==n)return new Es(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Es(M(t.line,0),U(e.doc,M(t.line+1,0)));var r=n(e,t);return new Es(r.from,r.to)}function Oo(e,t,n,r){function i(t){if(0!=I(v,t))if(v=t,"rectangle"==r.unit){for(var i=[],o=e.options.tabSize,a=f(_(d,n.line).text,n.ch,o),s=f(_(d,t.line).text,t.ch,o),l=Math.min(a,s),g=Math.max(a,s),m=Math.min(n.line,t.line),b=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=b;m++){var y=_(d,m).text,E=p(y,l,o);l==g?i.push(new Es(M(m,E),M(m,E))):y.length>E&&i.push(new Es(M(m,E),M(m,p(y,g,o))))}i.length||i.push(new Es(n,n)),bi(d,$r(h.ranges.slice(0,u).concat(i),u),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var w,C=c,S=No(e,t,r.unit),x=C.anchor;I(S.anchor,x)>0?(w=S.head,x=z(C.from(),S.anchor)):(w=S.anchor,x=P(C.to(),S.head));var T=h.ranges.slice(0);T[u]=new Es(U(d,x),w),bi(d,$r(T,u),Ia)}}function o(t){var n=++y,s=xn(e,t,!0,"rectangle"==r.unit);if(s)if(0!=I(s,v)){e.curOp.focus=a(),i(s);var c=$n(l,d);(s.line>=c.to||s.lineb.bottom?20:0;f&&setTimeout(ur(e,function(){y==n&&(l.scroller.scrollTop+=f,o(t))}),50)}}function s(t){e.state.selectingText=!1,y=1/0,Me(t),l.input.focus(),Ne(document,"mousemove",E),Ne(document,"mouseup",w),d.history.lastSelOrigin=null}var l=e.display,d=e.doc;Me(t);var c,u,h=d.sel,g=h.ranges;if(r.addNew&&!r.extend?(u=d.sel.contains(n),c=u>-1?g[u]:new Es(n,n)):(c=d.sel.primary(),u=d.sel.primIndex),"rectangle"==r.unit)r.addNew||(c=new Es(n,n)),n=xn(e,t,!0,!0),u=-1;else{var m=No(e,n,r.unit);c=r.extend?fi(c,m.anchor,m.head,r.extend):m}r.addNew?-1==u?(u=g.length,bi(d,$r(g.concat([c]),u),{scroll:!1,origin:"*mouse"})):g.length>1&&g[u].empty()&&"char"==r.unit&&!r.extend?(bi(d,$r(g.slice(0,u).concat(g.slice(u+1)),0),{scroll:!1,origin:"*mouse"}),h=d.sel):hi(d,u,c,Ia):(u=0,bi(d,new ys([c],0),Ia),h=d.sel);var v=n,b=l.wrapper.getBoundingClientRect(),y=0,E=ur(e,function(e){ze(e)?o(e):s(e)}),w=ur(e,s);e.state.selectingText=w,ja(document,"mousemove",E),ja(document,"mouseup",w)}function Lo(e,t,n,r){var i,o;try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&Me(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!Fe(e,n))return $e(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return Oe(e,n,e,R(e.doc,o),e.options.gutters[l],t),$e(t)}}function Ro(e,t){return Lo(e,t,"gutterClick",!0)}function Fo(e,t){Bt(e.display,t)||Do(e,t)||Le(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function Do(e,t){return!!Fe(e,"gutterContextMenu")&&Lo(e,t,"gutterContextMenu",!1)}function Mo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),on(e)}function Io(e){Rr(e),gr(e),Bn(e)}function $o(e,t,n){if(!t!=!(n&&n!=zs)){var r=e.display.dragFunctions,i=t?ja:Ne;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Bo(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Aa(e.display.wrapper,"CodeMirror-wrap"),Ee(e)),Sn(e),gr(e),on(e),setTimeout(function(){return er(e)},100)}function Po(e,t){var n=this;if(!(this instanceof Po))return new Po(e,t);this.options=t=t?c(t):{},c(Ks,t,!1),Fr(t);var r=t.value;"string"==typeof r&&(r=new ks(r,t.mode,null,t.lineSeparator,t.direction)),this.doc=r;var i=new Po.inputStyles[t.inputStyle](this),o=this.display=new k(e,r,i);o.wrapper.CodeMirror=this,Rr(this),Mo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Oa,keySeq:null,specialChars:null},t.autofocus&&!Ea&&o.input.focus(),da&&ca<11&&setTimeout(function(){return n.display.input.reset(!0)},20),zo(this),Ji(),rr(this),this.curOp.forceUpdate=!0,Yr(this,r),t.autofocus&&!Ea||this.hasFocus()?setTimeout(d(Fn,this),20):Dn(this);for(var a in Us)Us.hasOwnProperty(a)&&Us[a](n,t[a],zs);Pn(this),t.finishInit&&t.finishInit(this);for(var s=0;s400}var i=e.display;ja(i.scroller,"mousedown",ur(e,xo)),da&&ca<11?ja(i.scroller,"dblclick",ur(e,function(t){if(!Le(e,t)){var n=xn(e,t);if(n&&!Ro(e,t)&&!Bt(e.display,t)){Me(t);var r=e.findWordAt(n);ui(e.doc,r.anchor,r.head)}}})):ja(i.scroller,"dblclick",function(t){return Le(e,t)||Me(t)}),_a||ja(i.scroller,"contextmenu",function(t){return Fo(e,t)});var o,a={end:0};ja(i.scroller,"touchstart",function(t){if(!Le(e,t)&&!n(t)){i.input.ensurePolled(),clearTimeout(o);var r=+new Date;i.activeTouch={start:r,moved:!1,prev:r-a.end<=300?a:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),ja(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),ja(i.scroller,"touchend",function(n){var o=i.activeTouch;if(o&&!Bt(i,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=e.coordsChar(i.activeTouch,"page");a=!o.prev||r(o,o.prev)?new Es(s,s):!o.prev.prev||r(o,o.prev.prev)?e.findWordAt(s):new Es(M(s.line,0),U(e.doc,M(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),Me(n)}t()}),ja(i.scroller,"touchcancel",t),ja(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Xn(e,i.scroller.scrollTop),Zn(e,i.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),ja(i.scroller,"mousewheel",function(t){return Ir(e,t)}),ja(i.scroller,"DOMMouseScroll",function(t){return Ir(e,t)}),ja(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Le(e,t)||Be(t)},over:function(t){Le(e,t)||(Xi(e,t),Be(t))},start:function(t){return Yi(e,t)},drop:ur(e,Gi),leave:function(t){Le(e,t)||Qi(e)}};var s=i.input.getField();ja(s,"keyup",function(t){return wo.call(e,t)}),ja(s,"keydown",ur(e,yo)),ja(s,"keypress",ur(e,Co)),ja(s,"focus",function(t){return Fn(e,t)}),ja(s,"blur",function(t){return Dn(e,t)})}function Ko(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=Je(e,t).state:n="prev");var a=e.options.tabSize,s=_(o,t),l=f(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var d,c=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((d=o.mode.indent(i,s.text.slice(c.length),s.text))==Da||d>150)){if(!r)return;n="prev"}}else d=0,n="not";"prev"==n?d=t>o.first?f(_(o,t-1).text,null,a):0:"add"==n?d=l+e.options.indentUnit:"subtract"==n?d=l-e.options.indentUnit:"number"==typeof n&&(d=l+n),d=Math.max(0,d);var u="",p=0;if(e.options.indentWithTabs)for(var g=Math.floor(d/a);g;--g)p+=a,u+="\t";if(p1)if(Ws&&Ws.text.join("\n")==t){if(r.ranges.length%Ws.text.length==0){l=[];for(var d=0;d=0;f--){var u=r.ranges[f],p=u.from(),h=u.to();u.empty()&&(n&&n>0?p=M(p.line,p.ch-n):e.state.overwrite&&!a?h=M(h.line,Math.min(_(o,h.line).text.length,h.ch+g(s).length)):Ws&&Ws.lineWise&&Ws.text.join("\n")==t&&(p=h=M(p.line,0))),c=e.curOp.updateInput;var v={from:p,to:h,text:l?l[f%l.length]:s,origin:i||(a?"paste":e.state.cutIncoming?"cut":"+input")};Ai(e.doc,v),St(e,"inputRead",e,v)}t&&!a&&Vo(e,t),Vn(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Wo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||fr(t,function(){return Ho(t,n,0,null,"paste")}),!0}function Vo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ko(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(_(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ko(e,i.head.line,"smart"));a&&St(e,"electricInput",e,i.head.line)}}}function jo(e){for(var t=[],n=[],r=0;r=e.first+e.size)&&(t=new M(r,t.ch,t.sticky),d=_(e,r))}function a(r){var a;if(null==(a=i?_e(e.cm,d,t,n):Te(d,t,n))){if(r||!o())return!1;t=ke(i,e.cm,d,t.line,n)}else t=a;return!0}var s=t,l=n,d=_(e,t.line);if("char"==r)a();else if("column"==r)a(!0);else if("word"==r||"group"==r)for(var c=null,f="group"==r,u=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||a(!p);p=!1){var h=d.text.charAt(t.ch)||"\n",g=w(h,u)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||p||g||(g="s"),c&&c!=g){n<0&&(n=1,a(),t.sticky="after");break}if(g&&(c=g),n>0&&!a(!p))break}var m=xi(e,t,s,l,!0);return $(s,m)&&(m.hitSide=!0),m}function Xo(e,t,n,r){var i,o=e.doc,a=t.left;if("page"==r){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*bn(e.display),3);i=(n>0?t.bottom:t.top)+n*l}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(var d;(d=hn(e,a,i)).outside;){if(n<0?i<=0:i>=o.height){d.hitSide=!0;break}i+=5*n}return d}function Qo(e,t){var n=Yt(e,t.line);if(!n||n.hidden)return null;var r=_(e.doc,t.line),i=jt(n,r,t.line),o=Se(r,e.doc.direction),a="left";o&&(a=Ce(o,t.ch)%2?"right":"left");var s=Zt(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Zo(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Jo(e,t){return t&&(e.bad=!0),e}function ea(e,t,n,r,i){function o(e){return function(t){return t.id==e}}function a(){c&&(d+=f,c=!1)}function s(e){e&&(a(),d+=e)}function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void s(n||t.textContent.replace(/\u200b/g,""));var d,u=t.getAttribute("cm-marker");if(u){var p=e.findMarks(M(r,0),M(i+1,0),o(+u));return void(p.length&&(d=p[0].find(0))&&s(A(e.doc,d.from,d.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p)$/i.test(t.nodeName);h&&a();for(var g=0;g=15&&(ha=!1,fa=!0);var Ta,ka=wa&&(ua||ha&&(null==xa||xa<12.11)),_a=oa||da&&ca>=9,Aa=function(t,n){var r=t.className,i=e(n).exec(r);if(i){var o=r.slice(i.index+i[0].length);t.className=r.slice(0,i.index)+(o?i[1]+o:"")}};Ta=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var Na=function(e){e.select()};ba?Na=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:da&&(Na=function(e){try{e.select()}catch(e){}});var Oa=function(){this.id=null};Oa.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var La,Ra,Fa=30,Da={toString:function(){return"CodeMirror.Pass"}},Ma={scroll:!1},Ia={origin:"*mouse"},$a={origin:"+move"},Ba=[""],Pa=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,za=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ka=!1,Ua=!1,Ha=null,Wa=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?r.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/;return function(n,r){var d="ltr"==r?"L":"R";if(0==n.length||"ltr"==r&&!i.test(n))return!1;for(var c=n.length,f=[],u=0;u=this.string.length},ts.prototype.sol=function(){return this.pos==this.lineStart},ts.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ts.prototype.next=function(){if(this.post},ts.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},ts.prototype.skipToEnd=function(){this.pos=this.string.length},ts.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ts.prototype.backUp=function(e){this.pos-=e},ts.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},ts.prototype.current=function(){return this.string.slice(this.start,this.pos)},ts.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ts.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)};var ns=function(e,t){this.state=e,this.lookAhead=t},rs=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0};rs.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},rs.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},rs.fromSaved=function(e,t,n){return t instanceof ns?new rs(e,Ge(e.mode,t.state),n,t.lookAhead):new rs(e,Ge(e.mode,t),n)},rs.prototype.save=function(e){var t=!1!==e?Ge(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ns(t,this.maxLookAhead):t};var is=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},os=function(e,t,n){this.text=e,re(this,t),this.height=n?n(this):1};os.prototype.lineNo=function(){return L(this)},De(os);var as,ss={},ls={},ds=null,cs=null,fs={left:0,right:0,top:0,bottom:0},us=function(e,t,n){this.cm=n;var i=this.vert=r("div",[r("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=r("div",[r("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),ja(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),ja(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,da&&ca<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};us.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},us.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},us.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},us.prototype.zeroWidthHack=function(){var e=wa&&!ma?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Oa,this.disableVert=new Oa},us.prototype.enableZeroWidthBar=function(e,t,n){function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},us.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var ps=function(){};ps.prototype.update=function(){return{bottom:0,right:0}},ps.prototype.setScrollLeft=function(){},ps.prototype.setScrollTop=function(){},ps.prototype.clear=function(){};var hs={native:us,null:ps},gs=0,ms=function(e,t,n){var r=e.display;this.viewport=t,this.visible=$n(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Ht(e),this.force=n,this.dims=En(e),this.events=[]};ms.prototype.signal=function(e,t){Fe(e,t)&&this.events.push(arguments)},ms.prototype.finish=function(){for(var e=this,t=0;t=0&&I(e,i.to())<=0)return r}return-1};var Es=function(e,t){this.anchor=e,this.head=t};Es.prototype.from=function(){return z(this.anchor,this.head)},Es.prototype.to=function(){return P(this.anchor,this.head)},Es.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Pi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,r=e,i=e+t;r1||!(this.children[0]instanceof Pi))){var l=[];this.collapse(l),this.children=[new Pi(l)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n50){for(var s=o.lines.length%25+25,l=s;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=this,i=0;it.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&gr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&wi(t.doc)),t&&St(t,"markerCleared",t,this,i,o),n&&ir(t),this.parent&&this.parent.clear()}},Ss.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var r,i,o=0;o=0;d--)Ai(r,i[d]);l?vi(this,l):this.cm&&Vn(this.cm)}),undo:hr(function(){Oi(this,"undo")}),redo:hr(function(){Oi(this,"redo")}),undoSelection:hr(function(){Oi(this,"undo",!0)}),redoSelection:hr(function(){Oi(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=U(this,e),t=U(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),U(this,M(n,t))},indexFromPos:function(e){var t=(e=U(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)i=new M(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),M(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=_(e.doc,i.line-1).text;a&&(i=new M(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),M(i.line-1,a.length-1),i,"+transpose"))}n.push(new Es(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return fr(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;re&&0==I(t,this.pos)&&n==this.button};var Bs,Ps,zs={toString:function(){return"CodeMirror.Init"}},Ks={},Us={};Po.defaults=Ks,Po.optionHandlers=Us;var Hs=[];Po.defineInitHook=function(e){return Hs.push(e)};var Ws=null,Vs=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Oa,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vs.prototype.init=function(e){function t(e){if(!Le(i,e)){if(i.somethingSelected())Uo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=jo(i);Uo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Ma),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Ws.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var a=Go(),s=a.firstChild;i.display.lineSpace.insertBefore(a,i.display.lineSpace.firstChild),s.value=Ws.text.join("\n");var l=document.activeElement;Na(s),setTimeout(function(){i.display.lineSpace.removeChild(a),l.focus(),l==o&&r.showPrimarySelection()},50)}}var n=this,r=this,i=r.cm,o=r.div=e.lineDiv;qo(o,i.options.spellcheck),ja(o,"paste",function(e){Le(i,e)||Wo(e,i)||ca<=11&&setTimeout(ur(i,function(){return n.updateFromDOM()}),20)}),ja(o,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),ja(o,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),ja(o,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ja(o,"touchstart",function(){return r.forceCompositionEnd()}),ja(o,"input",function(){n.composing||n.readFromDOMSoon()}),ja(o,"copy",t),ja(o,"cut",t)},Vs.prototype.prepareSelection=function(){var e=_n(this.cm,!1);return e.focus=this.cm.state.focused,e},Vs.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Vs.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line=t.display.viewFrom&&Qo(t,r)||{node:s[0].measure.map[2],offset:0},d=i.linee.firstLine()&&(r=M(r.line-1,_(e.doc,r.line-1).length)),i.ch==_(e.doc,i.line).text.length&&i.linet.viewTo-1)return!1;var o,a,s;r.line==t.viewFrom||0==(o=Tn(e,r.line))?(a=L(t.view[0].line),s=t.view[0].node):(a=L(t.view[o].line),s=t.view[o-1].node.nextSibling);var l,d,c=Tn(e,i.line);if(c==t.view.length-1?(l=t.viewTo-1,d=t.lineDiv.lastChild):(l=L(t.view[c+1].line)-1,d=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(ea(e,s,d,a,l)),u=A(e.doc,M(a,0),M(l,_(e.doc,l).text.length));f.length>1&&u.length>1;)if(g(f)==g(u))f.pop(),u.pop(),l--;else{if(f[0]!=u[0])break;f.shift(),u.shift(),a++}for(var p=0,h=0,m=f[0],v=u[0],b=Math.min(m.length,v.length);pr.ch&&y.charCodeAt(y.length-h-1)==E.charCodeAt(E.length-h-1);)p--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(p).replace(/\u200b+$/,"");var C=M(a,p),S=M(l,u.length?g(u).length-h:0);return f.length>1||f[0]||I(C,S)?(Di(e.doc,f,C,S,"+input"),!0):void 0},Vs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vs.prototype.reset=function(){this.forceCompositionEnd()},Vs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Vs.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},Vs.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||fr(this.cm,function(){return gr(e.cm)})},Vs.prototype.setUneditable=function(e){e.contentEditable="false"},Vs.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||ur(this.cm,Ho)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Vs.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Vs.prototype.onContextMenu=function(){},Vs.prototype.resetPosition=function(){},Vs.prototype.needsContentAttribute=!0;var js=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Oa,this.hasSelection=!1,this.composing=null};js.prototype.init=function(e){function t(e){if(!Le(i,e)){if(i.somethingSelected())Uo({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=jo(i);Uo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Ma):(r.prevInput="",a.value=t.text.join("\n"),Na(a))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var n=this,r=this,i=this.cm,o=this.wrapper=Go(),a=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),ba&&(a.style.width="0px"),ja(a,"input",function(){da&&ca>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),ja(a,"paste",function(e){Le(i,e)||Wo(e,i)||(i.state.pasteIncoming=!0,r.fastPoll())}),ja(a,"cut",t),ja(a,"copy",t),ja(e.scroller,"paste",function(t){Bt(e,t)||Le(i,t)||(i.state.pasteIncoming=!0,r.focus())}),ja(e.lineSpace,"selectstart",function(t){Bt(e,t)||Me(t)}),ja(a,"compositionstart",function(){var e=i.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),ja(a,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},js.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=_n(e);if(e.options.moveInputWithCursor){var i=fn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},js.prototype.showSelection=function(e){var t=this.cm.display;n(t.cursorDiv,e.cursors),n(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},js.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Na(this.textarea),da&&ca>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",da&&ca>=9&&(this.hasSelection=null))}},js.prototype.getField=function(){return this.textarea},js.prototype.supportsTouch=function(){return!1},js.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ea||a()!=this.textarea))try{this.textarea.focus()}catch(e){}},js.prototype.blur=function(){this.textarea.blur()},js.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},js.prototype.receivedFocus=function(){this.slowPoll()},js.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},js.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},js.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ya(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(da&&ca>=9&&this.hasSelection===i||wa&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(r.length,i.length);a1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},js.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},js.prototype.onKeyPress=function(){da&&ca>=9&&(this.hasSelection=null),this.fastPoll()},js.prototype.onContextMenu=function(e){function t(){if(null!=a.selectionStart){var e=i.somethingSelected(),t="​"+(e?a.value:"");a.value="⇚",a.value=t,r.prevInput=e?"":"​",a.selectionStart=1,a.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=c,a.style.cssText=d,da&&ca<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=a.selectionStart){(!da||da&&ca<9)&&t();var e=0,n=function(){o.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==r.prevInput?ur(i,ki)(i):e++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var r=this,i=r.cm,o=i.display,a=r.textarea,s=xn(i,e),l=o.scroller.scrollTop;if(s&&!ha){i.options.resetSelectionOnContextMenu&&-1==i.doc.sel.contains(s)&&ur(i,bi)(i.doc,Br(s),Ma);var d=a.style.cssText,c=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var f=r.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(da?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var u;if(fa&&(u=window.scrollY),o.input.focus(),fa&&window.scrollTo(null,u),o.input.reset(),i.somethingSelected()||(a.value=r.prevInput=" "),r.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),da&&ca>=9&&t(),_a){Be(e);var p=function(){Ne(window,"mouseup",p),setTimeout(n,20)};ja(window,"mouseup",p)}else setTimeout(n,50)}},js.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},js.prototype.setUneditable=function(){},js.prototype.needsContentAttribute=!1,function(e){function t(t,r,i,o){e.defaults[t]=r,i&&(n[t]=o?function(e,t,n){n!=zs&&i(e,t,n)}:i)}var n=e.optionHandlers;e.defineOption=t,e.Init=zs,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Wr(e)},!0),t("indentUnit",2,Wr,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Vr(e),on(e),gr(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(M(r,o))}r++});for(var i=n.length-1;i>=0;i--)Di(e.doc,t,n[i],M(n[i].line,n[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=zs&&e.refresh()}),t("specialCharPlaceholder",ut,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Ea?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Sa),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Mo(e),Io(e)},!0),t("keyMap","default",function(e,t,n){var r=lo(t),i=n!=zs&&lo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Bo,!0),t("gutters",[],function(e){Fr(e.options),Io(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?wn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return er(e)},!0),t("scrollbarStyle","native",function(e){nr(e),er(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Fr(e.options),Io(e)},!0),t("firstLineNumber",1,Io,!0),t("lineNumberFormatter",function(e){return e},Io,!0),t("showCursorWhenSelecting",!1,kn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Dn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,$o),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,kn,!0),t("singleCursorHeightPerLine",!0,kn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Vr,!0),t("addModeClass",!1,Vr,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Vr,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Po),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ur(this,t[e])(this,n,i),Oe(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](lo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nr&&(Ko(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&Vn(t));else{var a=o.from(),s=o.to(),l=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var d=l;d0&&hi(t.doc,i,new Es(a,c[i].to()),Ma)}}}),getTokenAt:function(e,t){return rt(this,e,t)},getLineTokens:function(e,t){return rt(this,M(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,n=Ze(this,_(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=_(this.doc,e)}else r=e;return ln(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-be(r):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return yn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o=this.display,a=(e=fn(this,U(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==r)a=e.top;else if("above"==r||"near"==r){var l=Math.max(o.wrapper.clientHeight,this.doc.height),d=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>d&&(s=d-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&Un(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:pr(yo),triggerOnKeyPress:pr(Co),triggerOnKeyUp:wo,triggerOnMouseDown:pr(xo),execCommand:function(e){if(Ds.hasOwnProperty(e))return Ds[e].call(null,this)},triggerElectric:pr(function(e){Vo(this,e)}),findPosH:function(e,t,n,r){var i=this,o=1;t<0&&(o=-1,t=-t);for(var a=U(this.doc,e),s=0;s0&&a(t.charAt(n-1));)--n;for(;r.5)&&Sn(this),Oe(this,"refresh",this)}),swapDoc:pr(function(e){var t=this.doc;return t.cm=null,Yr(this,e),on(this),this.display.input.reset(),jn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,St(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},De(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Po);var qs="iter insert remove copy getEditor constructor".split(" ");for(var Gs in ks.prototype)ks.prototype.hasOwnProperty(Gs)&&u(qs,Gs)<0&&(Po.prototype[Gs]=function(e){return function(){return e.apply(this.doc,arguments)}}(ks.prototype[Gs]));return De(ks),Po.inputStyles={textarea:js,contenteditable:Vs},Po.defineMode=function(e){Po.defaults.mode||"null"==e||(Po.defaults.mode=e),We.apply(this,arguments)},Po.defineMIME=function(e,t){Ja[e]=t},Po.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Po.defineMIME("text/plain","null"),Po.defineExtension=function(e,t){Po.prototype[e]=t},Po.defineDocExtension=function(e,t){ks.prototype[e]=t},Po.fromTextArea=function(e,t){function n(){e.value=l.getValue()}if(t=t?c(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=a();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}var i;if(e.form&&(ja(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=s}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(Ne(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var l=Po(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return l},function(e){e.off=Ne,e.on=ja,e.wheelEventPixels=Mr,e.Doc=ks,e.splitLines=Ga,e.countColumn=f,e.findColumn=p,e.isWordChar=E,e.Pass=Da,e.signal=Oe,e.Line=os,e.changeEnd=Pr,e.scrollbarModel=hs,e.Pos=M,e.cmpPos=I,e.modes=Za,e.mimeModes=Ja,e.resolveMode=Ve,e.getMode=je,e.modeExtensions=es,e.extendMode=qe,e.copyState=Ge,e.startState=Xe,e.innerMode=Ye,e.commands=Ds,e.keyMap=Fs,e.keyName=so,e.isModifierKey=oo,e.lookupKey=io,e.normalizeKeyMap=ro,e.StringStream=ts,e.SharedTextMarker=xs,e.TextMarker=Ss,e.LineWidget=ws,e.e_preventDefault=Me,e.e_stopPropagation=Ie,e.e_stop=Be,e.addClass=s,e.contains=o,e.rmClass=Aa,e.keyNames=Ns}(Po),Po.version="5.29.0",Po}),function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(l("atom","]]>")):null:e.match("--")?n(l("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(d(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=l("meta","?>"),"meta"):(k=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){return(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,k=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return k="equals",null;if("<"==n){t.tokenize=o,t.state=p,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=s(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function s(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function l(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function d(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=d(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=d(e-1),n.tokenize(t,n)}}return"meta"}}function c(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(S.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function u(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!S.contextGrabbers.hasOwnProperty(n)||!S.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function p(e,t,n){return"openTag"==e?(n.tagStart=t.column(),h):"closeTag"==e?g:p}function h(e,t,n){return"word"==e?(n.tagName=t.current(),_="tag",b):(_="error",h)}function g(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&S.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||!1===S.matchClosing?(_="tag",m):(_="tag error",v)}return _="error",v}function m(e,t,n){return"endTag"!=e?(_="error",m):(f(n),p)}function v(e,t,n){return _="error",m(e,t,n)}function b(e,t,n){if("word"==e)return _="attribute",y;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||S.autoSelfClosers.hasOwnProperty(r)?u(n,r):(u(n,r),n.context=new c(n,r,i==n.indented)),p}return _="error",b}function y(e,t,n){return"equals"==e?E:(S.allowMissing||(_="error"),b(e,t,n))}function E(e,t,n){return"string"==e?w:"word"==e&&S.allowUnquoted?(_="string",b):(_="error",b(e,t,n))}function w(e,t,n){return"string"==e?w:b(e,t,n)}var C=r.indentUnit,S={},x=i.htmlMode?t:n;for(var T in x)S[T]=x[T];for(var T in i)S[T]=i[T];var k,_;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:p,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;k=null;var n=t.tokenize(e,t);return(n||k)&&"comment"!=n&&(_=null,t.state=t.state(k||n,e,t),_&&(n="error"==_?n+" error":_)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+C;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==S.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+C*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(e){e.state==E&&(e.state=b)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n)}:e(jQuery)}(function(e){var t=function(n,r){this.id=++e.FE.ID,this.opts=e.extend(!0,{},e.extend({},t.DEFAULTS,"object"==typeof r&&r));var i=JSON.stringify(this.opts);e.FE.OPTS_MAPPING[i]=e.FE.OPTS_MAPPING[i]||this.id,this.sid=e.FE.OPTS_MAPPING[i],e.FE.SHARED[this.sid]=e.FE.SHARED[this.sid]||{},this.shared=e.FE.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=e(n),this.$oel.data("froala.editor",this),this.o_doc=n.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow;var o=e(this.o_win).scrollTop();this.$oel.on("froala.doInit",e.proxy(function(){this.$oel.off("froala.doInit"),this.doc=this.$el.get(0).ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.$doc=e(this.doc),this.$win=e(this.win),this.opts.pluginsEnabled||(this.opts.pluginsEnabled=Object.keys(e.FE.PLUGINS)),this.opts.initOnClick?(this.load(e.FE.MODULES),this.$el.on("touchstart.init",function(){e(this).data("touched",!0)}),this.$el.on("touchmove.init",function(){e(this).removeData("touched")}),this.$el.on("mousedown.init touchend.init dragenter.init focus.init",e.proxy(function(t){if("touchend"==t.type&&!this.$el.data("touched"))return!0;if(1===t.which||!t.which){this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"),this.load(e.FE.MODULES),this.load(e.FE.PLUGINS);var n=t.originalEvent&&t.originalEvent.originalTarget;n&&"IMG"==n.tagName&&e(n).trigger("mousedown"),void 0===this.ul&&this.destroy(),"touchend"==t.type&&this.image&&t.originalEvent&&t.originalEvent.target&&e(t.originalEvent.target).is("img")&&setTimeout(e.proxy(function(){this.image.edit(e(t.originalEvent.target))},this),100),this.ready=!0,this.events.trigger("initialized")}},this)),this.events.trigger("initializationDelayed")):(this.load(e.FE.MODULES),this.load(e.FE.PLUGINS),e(this.o_win).scrollTop(o),void 0===this.ul&&this.destroy(),this.ready=!0,this.events.trigger("initialized"))},this)),this._init()};t.DEFAULTS={initOnClick:!1,pluginsEnabled:null},t.MODULES={},t.PLUGINS={},t.VERSION="2.7.4",t.INSTANCES=[],t.OPTS_MAPPING={},t.SHARED={},t.ID=0,t.prototype._init=function(){var t=this.$oel.prop("tagName");this.$oel.closest("label").length;var n=e.proxy(function(){"TEXTAREA"!=t&&(this._original_html=this._original_html||this.$oel.html()),this.$box=this.$box||this.$oel,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=e('',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&\/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&\/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'',provider:"vidyard"}],e.FE.VIDEO_EMBED_REGEX=/^\W*((<\/iframe>)|())\W*$/i,e.FE.PLUGINS.video=function(t){function n(){var e=t.popups.get("video.insert");e.find(".fr-video-by-url-layer input").val("").trigger("change");var n=e.find(".fr-video-embed-layer textarea");n.val("").trigger("change"),(n=e.find(".fr-video-upload-layer input")).val("").trigger("change")}function r(){var e=t.popups.get("video.edit");if(e||(e=B()),e){t.popups.setContainer("video.edit",t.$sc),t.popups.refresh("video.edit");var n=J.find("iframe, embed, video"),r=n.offset().left+n.outerWidth()/2,i=n.offset().top+n.outerHeight();t.popups.show("video.edit",r,i,n.outerHeight())}}function i(e){if(e)return t.popups.onRefresh("video.insert",n),t.popups.onHide("image.insert",W),!0;var r="";t.opts.videoUpload||t.opts.videoInsertButtons.splice(t.opts.videoInsertButtons.indexOf("videoUpload"),1),t.opts.videoInsertButtons.length>1&&(r='
'+t.button.buildList(t.opts.videoInsertButtons)+"
");var i,o="",a=t.opts.videoInsertButtons.indexOf("videoUpload"),s=t.opts.videoInsertButtons.indexOf("videoByURL"),l=t.opts.videoInsertButtons.indexOf("videoEmbed");s>=0&&(i=" fr-active",(s>a&&a>=0||s>l&&l>=0)&&(i=""),o='
");var d="";l>=0&&(i=" fr-active",(l>a&&a>=0||l>s&&s>=0)&&(i=""),d='
");var c="";a>=0&&(i=" fr-active",(a>l&&l>=0||a>s&&s>=0)&&(i=""),c='
'+t.language.translate("Drop video")+"
("+t.language.translate("or click")+')
');var f={buttons:r,by_url_layer:o,embed_layer:d,upload_layer:c,progress_bar:'

Uploading

'},u=t.popups.create("video.insert",f);return M(u),u}function o(e){t.events.focus(!0),t.selection.restore();var n=!1;J&&(H(),n=!0),t.html.insert(''+e+"",!1,t.opts.videoSplitHTML),t.popups.hide("video.insert");var r=t.$el.find(".fr-jiv");r.removeClass("fr-jiv"),V(r,t.opts.videoDefaultDisplay,t.opts.videoDefaultAlign),r.toggleClass("fr-draggable",t.opts.videoMove),t.events.trigger(n?"video.replaced":"video.inserted",[r])}function a(){var n=e(this);t.popups.hide("video.insert"),n.removeClass("fr-uploading"),n.parent().next().is("br")&&n.parent().next().remove(),u(n.parent()),t.events.trigger("video.loaded",[n.parent()])}function s(e,n,r,i,o){t.edit.off(),c("Loading video"),n&&(e=t.helpers.sanitizeURL(e));l("Loading video"),function(){var n,s;if(i){t.undo.canDo()||i.find("video").hasClass("fr-uploading")||t.undo.saveStep();var l=i.find("video").data("fr-old-src"),d=i.data("fr-replaced");i.data("fr-replaced",!1),t.$wp?((n=i.clone()).find("video").removeData("fr-old-src").removeClass("fr-uploading"),n.find("video").off("canplay"),l&&i.find("video").attr("src",l),i.replaceWith(n)):n=i;for(var c=n.find("video").get(0).attributes,f=0;f span").css("width",n+"%")):i.find("div").addClass("fr-indeterminate")}}function f(e){l();var n=t.popups.get("video.insert").find(".fr-video-progress-bar-layer");n.addClass("fr-error");var r=n.find("h3");r.text(e),t.events.disableBlur(),r.focus()}function u(e){A.call(e.get(0))}function p(e){try{if(!1===t.events.trigger("video.uploaded",[e],!0))return t.edit.on(),!1;var n=JSON.parse(e);return n.link?n:($(ee,e),!1)}catch(t){return $(ne,e),!1}}function h(n){try{var r=e(n).find("Location").text(),i=e(n).find("Key").text();return!1===t.events.trigger("video.uploadedToS3",[r,i,n],!0)?(t.edit.on(),!1):r}catch(e){return $(ne,n),!1}}function g(e){c("Loading video");var n=this.status,r=this.response,i=this.responseXML,o=this.responseText;try{if(t.opts.videoUploadToS3)if(201==n){var a=h(i);a&&s(a,!1,[],e,r||i)}else $(ne,r||i);else if(n>=200&&300>n){var l=p(o);l&&s(l.link,!1,l,e,r||o)}else $(te,r||o)}catch(e){$(ne,r||o)}}function m(){$(ne,this.response||this.responseText||this.responseXML)}function v(e){if(e.lengthComputable){var n=e.loaded/e.total*100|0;c(t.language.translate("Uploading"),n)}}function b(){t.edit.on(),d(!0)}function y(n,r,i){var o,a="";if(r&&void 0!==r)for(o in r)r.hasOwnProperty(o)&&"link"!=o&&(a+=" data-"+o+'="'+r[o]+'"');var s=t.opts.videoDefaultWidth;s&&"auto"!=s&&(s+="px");var l=e('");l.toggleClass("fr-draggable",t.opts.videoMove),t.edit.on(),t.events.focus(!0),t.selection.restore(),t.undo.saveStep(),t.opts.videoSplitHTML?t.markers.split():t.markers.insert(),t.html.wrap();var d=t.$el.find(".fr-marker");return t.node.isLastSibling(d)&&d.parent().hasClass("fr-deletable")&&d.insertAfter(d.parent()),d.replaceWith(l),t.selection.clear(),l.find("video").get(0).readyState>l.find("video").get(0).HAVE_FUTURE_DATA||t.helpers.isIOS()?i.call(l.find("video").get(0)):l.find("video").on("canplaythrough load",i),l}function E(n){if(!t.core.sameInstance(Z))return!0;n.preventDefault(),n.stopPropagation();var r=n.pageX||(n.originalEvent.touches?n.originalEvent.touches[0].pageX:null),i=n.pageY||(n.originalEvent.touches?n.originalEvent.touches[0].pageY:null);if(!r||!i)return!1;if("mousedown"==n.type){var o=t.$oel.get(0).ownerDocument,a=o.defaultView||o.parentWindow,s=!1;try{s=a.location!=a.parent.location&&!(a.$&&a.$.FE)}catch(e){}s&&a.frameElement&&(r+=t.helpers.getPX(e(a.frameElement).offset().left)+a.frameElement.clientLeft,i=n.clientY+t.helpers.getPX(e(a.frameElement).offset().top)+a.frameElement.clientTop)}t.undo.canDo()||t.undo.saveStep(),(Q=e(this)).data("start-x",r),Q.data("start-y",i),X.show(),t.popups.hideAll(),L()}function w(e){if(!t.core.sameInstance(Z))return!0;if(Q){e.preventDefault();var n=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null),r=e.pageY||(e.originalEvent.touches?e.originalEvent.touches[0].pageY:null);if(!n||!r)return!1;var i=Q.data("start-x"),o=Q.data("start-y");Q.data("start-x",n),Q.data("start-y",r);var a=n-i,s=r-o,l=J.find("iframe, embed, video"),d=l.width(),c=l.height();(Q.hasClass("fr-hnw")||Q.hasClass("fr-hsw"))&&(a=0-a),(Q.hasClass("fr-hnw")||Q.hasClass("fr-hne"))&&(s=0-s),l.css("width",d+a),l.css("height",c+s),l.removeAttr("width"),l.removeAttr("height"),_()}}function C(e){return!t.core.sameInstance(Z)||void(Q&&J&&(e&&e.stopPropagation(),Q=null,X.hide(),_(),r(),t.undo.saveStep()))}function S(e){return'
'}function x(e,t,n,r){return e.pageX=t,e.pageY=t,E.call(this,e),e.pageX=e.pageX+n*Math.floor(Math.pow(1.1,r)),e.pageY=e.pageY+n*Math.floor(Math.pow(1.1,r)),w.call(this,e),C.call(this,e),++r}function T(){var n;if(t.shared.$video_resizer?(Z=t.shared.$video_resizer,X=t.shared.$vid_overlay,t.events.on("destroy",function(){Z.removeClass("fr-active").appendTo(e("body:first"))},!0)):(t.shared.$video_resizer=e('
'),Z=t.shared.$video_resizer,t.events.$on(Z,"mousedown",function(e){e.stopPropagation()},!0),t.opts.videoResize&&(Z.append(S("nw")+S("ne")+S("sw")+S("se")),t.shared.$vid_overlay=e('
'),X=t.shared.$vid_overlay,n=Z.get(0).ownerDocument,e(n).find("body:first").append(X))),t.events.on("shared.destroy",function(){Z.html("").removeData().remove(),Z=null,t.opts.videoResize&&(X.remove(),X=null)},!0),t.helpers.isMobile()||t.events.$on(e(t.o_win),"resize.video",function(){N(!0)}),t.opts.videoResize){n=Z.get(0).ownerDocument,t.events.$on(Z,t._mousedown,".fr-handler",E),t.events.$on(e(n),t._mousemove,w),t.events.$on(e(n.defaultView||n.parentWindow),t._mouseup,C),t.events.$on(X,"mouseleave",C);var r=1,i=null,o=0;t.events.on("keydown",function(n){if(J){var a=-1!=navigator.userAgent.indexOf("Mac OS X")?n.metaKey:n.ctrlKey,s=n.which;(s!==i||n.timeStamp-o>200)&&(r=1),(s==e.FE.KEYCODE.EQUALS||t.browser.mozilla&&s==e.FE.KEYCODE.FF_EQUALS)&&a&&!n.altKey?r=x.call(this,n,1,1,r):(s==e.FE.KEYCODE.HYPHEN||t.browser.mozilla&&s==e.FE.KEYCODE.FF_HYPHEN)&&a&&!n.altKey&&(r=x.call(this,n,2,-1,r)),i=s,o=n.timeStamp}}),t.events.on("keyup",function(){r=1})}}function k(){var n,r=Array.prototype.slice.call(t.el.querySelectorAll("video")),i=[];for(n=0;n=0?D(r.files):$(ie),n.preventDefault(),n.stopPropagation(),!1}}}function D(e){if(void 0!==e&&e.length>0){if(!1===t.events.trigger("video.beforeUpload",[e]))return!1;var n=e[0];if(n.size>t.opts.videoMaxSize)return $(re),!1;if(t.opts.videoAllowedTypes.indexOf(n.type.replace(/video\//g,""))<0)return $(ie),!1;var r;if(t.drag_support.formdata&&(r=t.drag_support.formdata?new FormData:null),r){var i;if(!1!==t.opts.videoUploadToS3){r.append("key",t.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(n.name||"untitled")),r.append("success_action_status","201"),r.append("X-Requested-With","xhr"),r.append("Content-Type",n.type);for(i in t.opts.videoUploadToS3.params)t.opts.videoUploadToS3.params.hasOwnProperty(i)&&r.append(i,t.opts.videoUploadToS3.params[i])}for(i in t.opts.videoUploadParams)t.opts.videoUploadParams.hasOwnProperty(i)&&r.append(i,t.opts.videoUploadParams[i]);r.append(t.opts.videoUploadParam,n);var o=t.opts.videoUploadURL;t.opts.videoUploadToS3&&(o=t.opts.videoUploadToS3.uploadURL?t.opts.videoUploadToS3.uploadURL:"https://"+t.opts.videoUploadToS3.region+".amazonaws.com/"+t.opts.videoUploadToS3.bucket);var a=t.core.getXHR(o,t.opts.videoUploadMethod);a.onload=function(){g.call(a,J)},a.onerror=m,a.upload.onprogress=v,a.onabort=b,l(),t.events.disableBlur(),t.edit.off(),t.events.enableBlur();var s=t.popups.get("video.insert");s&&s.off("abortUpload").on("abortUpload",function(){4!=a.readyState&&a.abort()}),a.send(r)}}}function M(n){t.events.$on(n,"dragover dragenter",".fr-video-upload-layer",function(){return e(this).addClass("fr-drop"),!1},!0),t.events.$on(n,"dragleave dragend",".fr-video-upload-layer",function(){return e(this).removeClass("fr-drop"),!1},!0),t.events.$on(n,"drop",".fr-video-upload-layer",function(r){r.preventDefault(),r.stopPropagation(),e(this).removeClass("fr-drop");var i=r.originalEvent.dataTransfer;if(i&&i.files){var o=n.data("instance")||t;o.events.disableBlur(),o.video.upload(i.files),o.events.enableBlur()}},!0),t.helpers.isIOS()&&t.events.$on(n,"touchstart",'.fr-video-upload-layer input[type="file"]',function(){e(this).trigger("click")},!0),t.events.$on(n,"change",'.fr-video-upload-layer input[type="file"]',function(){if(this.files){var r=n.data("instance")||t;r.events.disableBlur(),n.find("input:focus").blur(),r.events.enableBlur(),r.video.upload(this.files)}e(this).val("")},!0)}function I(){t.events.on("drop",F,!0),t.events.on("mousedown window.mousedown",O),t.events.on("window.touchmove",L),t.events.on("mouseup window.mouseup",N),t.events.on("commands.mousedown",function(e){e.parents(".fr-toolbar").length>0&&N()}),t.events.on("video.hideResizer commands.undo commands.redo element.dropped",function(){N(!0)})}function $(e,n){t.edit.on(),J&&J.find("video").addClass("fr-error"),f(t.language.translate("Something went wrong. Please try again.")),t.events.trigger("video.error",[{code:e,message:oe[e]},n])}function B(){var e="";if(t.opts.videoEditButtons.length>0){e+='
',e+=t.button.buildList(t.opts.videoEditButtons);var n={buttons:e+="
"},r=t.popups.create("video.edit",n);return t.events.$on(t.$wp,"scroll.video-edit",function(){J&&t.popups.isVisible("video.edit")&&(t.events.disableBlur(),u(J))}),r}return!1}function P(){if(J){var e=t.popups.get("video.size"),n=J.find("iframe, embed, video");e.find('input[name="width"]').val(n.get(0).style.width||n.attr("width")).trigger("change"),e.find('input[name="height"]').val(n.get(0).style.height||n.attr("height")).trigger("change")}}function z(e){if(e)return t.popups.onRefresh("video.size",P),!0;var n="",r="",i={buttons:n='
'+t.button.buildList(t.opts.videoSizeButtons)+"
",size_layer:r='
"},o=t.popups.create("video.size",i);return t.events.$on(t.$wp,"scroll",function(){J&&t.popups.isVisible("video.size")&&(t.events.disableBlur(),u(J))}),o}function K(e){if(void 0===e&&(e=J),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function U(e){void 0===e&&(e=J);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function H(){if(J&&!1!==t.events.trigger("video.beforeRemove",[J])){var e=J;t.popups.hideAll(),N(!0),t.selection.setBefore(e.get(0))||t.selection.setAfter(e.get(0)),e.remove(),t.selection.restore(),t.html.fillEmptyBlocks(),t.events.trigger("video.removed",[e])}}function W(){d()}function V(e,n,r){!t.opts.htmlUntouched&&t.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv"+r[0]+" fr-dv"+n[0])):"inline"==n?(e.css({display:"inline-block"}),"center"==r?e.css({float:"none"}):"left"==r?e.css({float:"left"}):e.css({float:"right"})):(e.css({display:"block",clear:"both"}),"left"==r?e.css({textAlign:"left"}):"right"==r?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}function j(e){e.hasClass("fr-dvi")||e.hasClass("fr-dvb")||(e.addClass("fr-fv"+K(e)[0]),e.addClass("fr-dv"+U(e)[0]))}function q(e){V(e,e.hasClass("fr-dvb")?"block":e.hasClass("fr-dvi")?"inline":null,e.hasClass("fr-fvl")?"left":e.hasClass("fr-fvr")?"right":K(e)),e.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl")}function G(){t.$el.find("video").filter(function(){return 0===e(this).parents("span.fr-video").length}).wrap(''),t.$el.find("embed, iframe").filter(function(){if(t.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),e(this).parents("span.fr-video").length>0)return!1;for(var n=e(this).attr("src"),r=0;r');for(var n=t.$el.find("span.fr-video, video"),r=0;r *:first").replaceWith(t.icon.create("video-align-"+K()))},refreshAlignOnShow:function(e,t){J&&t.find('.fr-command[data-param1="'+K()+'"]').addClass("fr-active").attr("aria-selected",!0)},display:function(e){J.removeClass("fr-dvi fr-dvb"),!t.opts.htmlUntouched&&t.opts.useClasses?"inline"==e?J.addClass("fr-dvi"):"block"==e&&J.addClass("fr-dvb"):V(J,e,K()),Y(),_(),r(),t.selection.clear()},refreshDisplayOnShow:function(e,t){J&&t.find('.fr-command[data-param1="'+U()+'"]').addClass("fr-active").attr("aria-selected",!0)},remove:H,hideProgressBar:d,showSizePopup:function(){var e=t.popups.get("video.size");e||(e=z()),d(),t.popups.refresh("video.size"),t.popups.setContainer("video.size",t.$sc);var n=J.find("iframe, embed, video"),r=n.offset().left+n.width()/2,i=n.offset().top+n.height();t.popups.show("video.size",r,i,n.height())},replace:function(){var e=t.popups.get("video.insert");e||(e=i()),t.popups.isVisible("video.insert")||(d(),t.popups.refresh("video.insert"),t.popups.setContainer("video.insert",t.$sc));var n=J.offset().left+J.width()/2,r=J.offset().top+J.height();t.popups.show("video.insert",n,r,J.outerHeight())},back:function(){J?(t.events.disableBlur(),J.trigger("click")):(t.events.disableBlur(),t.selection.restore(),t.events.enableBlur(),t.popups.hide("video.insert"),t.toolbar.showInline())},setSize:function(e,n){if(J){var r=t.popups.get("video.size"),i=J.find("iframe, embed, video");i.css("width",e||r.find('input[name="width"]').val()),i.css("height",n||r.find('input[name="height"]').val()),i.get(0).style.width&&i.removeAttr("width"),i.get(0).style.height&&i.removeAttr("height"),r.find("input:focus").blur(),setTimeout(function(){J.trigger("click")},t.helpers.isAndroid()?50:0)}},get:function(){return J}}},e.FE.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),e.FE.DefineIcon("insertVideo",{NAME:"video-camera"}),e.FE.DefineIcon("videoByURL",{NAME:"link"}),e.FE.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),e.FE.DefineIcon("videoEmbed",{NAME:"code"}),e.FE.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),e.FE.DefineIcon("videoUpload",{NAME:"upload"}),e.FE.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),e.FE.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),e.FE.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),e.FE.DefineIcon("videoDisplay",{NAME:"star"}),e.FE.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),e.FE.DefineIcon("video-align",{NAME:"align-left"}),e.FE.DefineIcon("video-align-left",{NAME:"align-left"}),e.FE.DefineIcon("video-align-right",{NAME:"align-right"}),e.FE.DefineIcon("video-align-center",{NAME:"align-justify"}),e.FE.DefineIcon("videoAlign",{NAME:"align-center"}),e.FE.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var t='"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),e.FE.DefineIcon("videoReplace",{NAME:"exchange"}),e.FE.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),e.FE.DefineIcon("videoRemove",{NAME:"trash"}),e.FE.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),e.FE.DefineIcon("videoSize",{NAME:"arrows-alt"}),e.FE.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),e.FE.DefineIcon("videoBack",{NAME:"arrow-left"}),e.FE.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),e.FE.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),e.FE.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,n){return void 0===n&&(n="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(n)}:e(window.jQuery)}(function(e){e.extend(e.FE.POPUP_TEMPLATES,{"embedly.insert":"[_BUTTONS_][_URL_LAYER_]","embedly.edit":"[_BUTTONS_]"}),e.extend(e.FE.DEFAULTS,{embedlyKey:null,embedlyInsertButtons:["embedlyBack","|"],embedlyEditButtons:["embedlyRemove"],embedlyScriptPath:"https://cdn.embedly.com/widgets/platform.js"}),e.FE.PLUGINS.embedly=function(t){function n(){t.events.on("html.processGet",d),t.events.$on(t.$el,"click touchend","div.fr-embedly",r),t.events.on("mousedown window.mousedown",g),t.events.on("window.touchmove",m),t.events.on("mouseup window.mouseup",h),t.events.on("commands.mousedown",function(e){e.parents(".fr-toolbar").length>0&&h()}),t.events.on("blur video.hideResizer commands.undo commands.redo element.dropped",function(){h(!0)}),t.events.on("element.beforeDrop",function(e){return e.hasClass("fr-embedly")?(e.html(e.attr("data-original-embed")),e):void 0}),t.events.on("keydown",function(n){var r=n.which;return!b||r!=e.FE.KEYCODE.BACKSPACE&&r!=e.FE.KEYCODE.DELETE?b&&r==e.FE.KEYCODE.ESC?(h(!0),n.preventDefault(),!1):b&&r!=e.FE.KEYCODE.F10&&!t.keys.isBrowserAction(n)?(n.preventDefault(),!1):void 0:(n.preventDefault(),p(),!1)},!0),t.events.on("toolbar.esc",function(){return b?(t.events.disableBlur(),t.events.focus(),!1):void 0},!0),t.events.on("toolbar.focusEditor",function(){return!b&&void 0},!0),t.events.on("snapshot.after",function(e){var n=t.doc.createElement("div");n.innerHTML=e.html,d(n),e.html=n.innerHTML}),embedly("on","card.resize",function(t){var n=e(t);n.parents(".fr-embedly").attr("contenteditable",!1).attr("draggable",!0).css("height",n.height()).addClass("fr-draggable")}),c(!0)}function r(t){b=e(this),l(),a()}function i(){var e="";if(t.opts.embedlyEditButtons.length>0){e+='
',e+=t.button.buildList(t.opts.embedlyEditButtons);var n={buttons:e+="
"},r=t.popups.create("embedly.edit",n);return t.events.$on(t.$wp,"scroll.emebdly-edit",function(){b&&t.popups.isVisible("embedly.edit")&&(t.events.disableBlur(),o(b))}),r}return!1}function o(e){r.call(e.get(0))}function a(){var e=t.popups.get("embedly.edit");if(e||(e=i()),e){t.popups.setContainer("embedly.edit",t.$sc),t.popups.refresh("embedly.edit");var n=b.offset().left+b.outerWidth()/2,r=b.offset().top+b.outerHeight();t.popups.show("embedly.edit",n,r,b.outerHeight())}}function s(){t.shared.$embedly_resizer?(y=t.shared.$embedly_resizer,E=t.shared.$embedly_overlay,t.events.on("destroy",function(){y.appendTo(e("body:first"))},!0)):(t.shared.$embedly_resizer=e('
'),y=t.shared.$embedly_resizer,t.events.$on(y,"mousedown",function(e){e.stopPropagation()},!0)),t.events.on("shared.destroy",function(){y.html("").removeData().remove(),y=null},!0)}function l(){y||s(),(t.$wp||t.$sc).append(y),y.data("instance",t),y.css("top",(t.opts.iframe?b.offset().top-1+t.$iframe.position().top:b.offset().top-t.$wp.offset().top-1)+t.$wp.scrollTop()).css("left",(t.opts.iframe?b.offset().left-1:b.offset().left-t.$wp.offset().left-1)+t.$wp.scrollLeft()).css("width",b.outerWidth()).css("height",b.height()).addClass("fr-active")}function d(e){if(e&&t.node.hasClass(e,"fr-embedly"))e.innerHTML=e.getAttribute("data-original-embed"),e.removeAttribute("draggable"),e.removeAttribute("contenteditable"),e.setAttribute("class",(e.getAttribute("class")||"").replace("fr-draggable",""));else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var n=e.querySelectorAll(".fr-embedly"),r=0;r0&&(n+='
',n+=t.button.buildList(t.opts.embedlyInsertButtons),n+="
");var r="",i={buttons:n,url_layer:r='
"};return t.popups.create("embedly.insert",i)}function f(){t.popups.get("embedly.insert").find(".fr-embedly-layer input").val("").trigger("change")}function u(e){if(e.length){var n="";t.html.insert('
'+n+"
"),t.popups.hideAll()}}function p(){if(b&&!1!==t.events.trigger("embedly.beforeRemove",[b])){var e=b;t.popups.hideAll(),h(!0),t.selection.setBefore(e.get(0))||t.selection.setAfter(e.get(0)),e.remove(),t.selection.restore(),t.html.fillEmptyBlocks(),t.undo.saveStep(),t.events.trigger("video.removed",[e])}}function h(e){b&&(v()||!0===e)&&(y.removeClass("fr-active"),t.toolbar.enable(),b.removeClass("fr-active"),b=null,m())}function g(){t.shared.embedly_exit_flag=!0}function m(){t.shared.embedly_exit_flag=!1}function v(){return t.shared.embedly_exit_flag}var b,y,E;return t.shared.embedly_exit_flag=!1,{_init:function(){if(!t.$wp)return!1;if("undefined"!=typeof embedly)n();else if(t.shared.embedlyLoaded||(t.shared.embedlyCallbacks=[]),t.shared.embedlyCallbacks.push(n),!t.shared.embedlyLoaded){t.shared.embedlyLoaded=!0;var e=document.createElement("script");e.type="text/javascript",e.src=t.opts.embedlyScriptPath,e.innerText="",e.onload=function(){for(var e=0;e=scrollTop-settings.offset&&et<=scrollBottom+settings.offset);} return(eb>=wt-settings.offset&&et<=wb+settings.offset)||inScrollable;});if(settings.alwayscallback){loaded=inview.trigger("alwaysOnImpression");} else{loaded=inview.trigger("onImpression");onImpressionElements=onImpressionElements.not(loaded);}} if(typeof settings.callback==="function"){if($scrollable.length){$scrollable.on("scroll.onImpression resize.onImpression lookup.onImpression",onImpression);}else{$window.on("scroll.onImpression resize.onImpression lookup.onImpression",onImpression);} onImpression();} return this;};})(jQuery); // // mustache // (function defineMustache(global,factory){if(typeof exports==="object"&&exports&&typeof exports.nodeName!=="string"){factory(exports)}else if(typeof define==="function"&&define.amd){define(["exports"],factory)}else{global.Mustache={};factory(global.Mustache)}})(this,function mustacheFactory(mustache){var objectToString=Object.prototype.toString;var isArray=Array.isArray||function isArrayPolyfill(object){return objectToString.call(object)==="[object Array]"};function isFunction(object){return typeof object==="function"}function typeStr(obj){return isArray(obj)?"array":typeof obj}function escapeRegExp(string){return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function hasProperty(obj,propName){return obj!=null&&typeof obj==="object"&&propName in obj}function primitiveHasOwnProperty(primitive,propName){return primitive!=null&&typeof primitive!=="object"&&primitive.hasOwnProperty&&primitive.hasOwnProperty(propName)}var regExpTest=RegExp.prototype.test;function testRegExp(re,string){return regExpTest.call(re,string)}var nonSpaceRe=/\S/;function isWhitespace(string){return!testRegExp(nonSpaceRe,string)}var entityMap={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(string){return String(string).replace(/[&<>"'`=\/]/g,function fromEntityMap(s){return entityMap[s]})}var whiteRe=/\s*/;var spaceRe=/\s+/;var equalsRe=/\s*=/;var curlyRe=/\s*\}/;var tagRe=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(template,tags){if(!template)return[];var sections=[];var tokens=[];var spaces=[];var hasTag=false;var nonSpace=false;function stripSpace(){if(hasTag&&!nonSpace){while(spaces.length)delete tokens[spaces.pop()]}else{spaces=[]}hasTag=false;nonSpace=false}var openingTagRe,closingTagRe,closingCurlyRe;function compileTags(tagsToCompile){if(typeof tagsToCompile==="string")tagsToCompile=tagsToCompile.split(spaceRe,2);if(!isArray(tagsToCompile)||tagsToCompile.length!==2)throw new Error("Invalid tags: "+tagsToCompile);openingTagRe=new RegExp(escapeRegExp(tagsToCompile[0])+"\\s*");closingTagRe=new RegExp("\\s*"+escapeRegExp(tagsToCompile[1]));closingCurlyRe=new RegExp("\\s*"+escapeRegExp("}"+tagsToCompile[1]))}compileTags(tags||mustache.tags);var scanner=new Scanner(template);var start,type,value,chr,token,openSection;while(!scanner.eos()){start=scanner.pos;value=scanner.scanUntil(openingTagRe);if(value){for(var i=0,valueLength=value.length;i0?sections[sections.length-1][4]:nestedTokens;break;default:collector.push(token)}}return nestedTokens}function Scanner(string){this.string=string;this.tail=string;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(re){var match=this.tail.match(re);if(!match||match.index!==0)return"";var string=match[0];this.tail=this.tail.substring(string.length);this.pos+=string.length;return string};Scanner.prototype.scanUntil=function scanUntil(re){var index=this.tail.search(re),match;switch(index){case-1:match=this.tail;this.tail="";break;case 0:match="";break;default:match=this.tail.substring(0,index);this.tail=this.tail.substring(index)}this.pos+=match.length;return match};function Context(view,parentContext){this.view=view;this.cache={".":this.view};this.parent=parentContext}Context.prototype.push=function push(view){return new Context(view,this)};Context.prototype.lookup=function lookup(name){var cache=this.cache;var value;if(cache.hasOwnProperty(name)){value=cache[name]}else{var context=this,intermediateValue,names,index,lookupHit=false;while(context){if(name.indexOf(".")>0){intermediateValue=context.view;names=name.split(".");index=0;while(intermediateValue!=null&&index")value=this.renderPartial(token,context,partials,tags);else if(symbol==="&")value=this.unescapedValue(token,context);else if(symbol==="name")value=this.escapedValue(token,context);else if(symbol==="text")value=this.rawValue(token);if(value!==undefined)buffer+=value}return buffer};Writer.prototype.renderSection=function renderSection(token,context,partials,originalTemplate){var self=this;var buffer="";var value=context.lookup(token[1]);function subRender(template){return self.render(template,context,partials)}if(!value)return;if(isArray(value)){for(var j=0,valueLength=value.length;j";}},a:{default_:function(href,v){return''+v+'';},title:function(href,v,title){return''+v+'';},target_blank:function(href,v){return''+v+'';}},img:{default_:function(src,alt){return''+alt+'';},title:function(src,alt,title){return''+alt+'';}},pre:{default_:function(lang,v){return'
'+v+'
';}},empty:{default_:function(){return md.options.empty_mark;}},th:{default_:function(v){return''+v+'';},center:function(v){return''+v+'';},left:function(v){return''+v+'';},right:function(v){return''+v+'';}},td:{default_:function(v){return''+v+'';},center:function(v){return''+v+'';},left:function(v){return''+v+'';},right:function(v){return''+v+'';}},notag:{default_:function(tag,v){return'<'+tag+'>'+v+'';}}},replacer:{strong:["__([^_]+)__","\\\*\\\*([^*]+)\\\*\\\*"],em:["_([^_]+)_","\\\*([^*]+)\\\*"],del:["~~([^~]+)~~"],code:["`([^`]+)`"]},push:function(tag,text){if(!md.convert.inStack(tag)){md.variable.stack.tag.push(tag);} if(!md.variable.stack.text[tag]){md.variable.stack.text[tag]=[];} if(typeof text!=='undefined'){md.variable.stack.text[tag].push(text);} return this;},pushest:function(text){if(md.convert.inStack()){var maxi=md.variable.stack.tag.length-1;var tag=md.variable.stack.tag[maxi];return md.convert.push(tag,text);} return this;},pop:function(called,arguments_){if(md.convert.inStack()){var tag=md.variable.stack.tag.pop(),text="",innerHtml="",args=(arguments_||[]);while(typeof(text=md.variable.stack.text[tag].shift())!=='undefined'){if(tag==="pre"&&args.length===0){args.push(text);continue;} md.convert.text(md.convert.text()+text);if(tag==="pre"||tag==="blockquote"){md.convert.text(md.convert.text()+md.options.empty_mark);}} if(tag==="blockquote"){md.convert.text(markdownConvert(md.convert.text()));} if(typeof called==='undefined'){called='default_';} if(args.length===0&&!md.convert.tags[tag]){args.push(tag);tag="notag";} args.push(md.convert.text());innerHtml=md.convert.tags[tag][called].apply(this,args);$.each(md.convert.replacer,function(rep,regs){$(regs).each(function(i,exp){var regexp=new RegExp(exp,"g");innerHtml=innerHtml.replace(regexp,'<'+rep+'>$1');});});if(!md.convert.inStack()){md.convert.html(innerHtml);} md.convert.text("");return innerHtml;} return this;},_string:function(variable,string){if(typeof string==='undefined'){return md.variable[variable];}else{md.variable[variable]=string;return this;}},text:function(text){return md.convert._string("text",text);},html:function(html){return md.convert._string("html",html);},inStack:function(tag){if(typeof tag==='undefined'){return(md.variable.stack.tag.length!==0)?true:false;} if(tag==="h"&&md.convert.inStack()){var maxi=md.variable.stack.tag.length-1;if(md.variable.stack.tag[maxi].match(/^h[1-6]/)){return true;}} return($.inArray(tag,md.variable.stack.tag)!==-1)?true:false;}},check:{init:function(){md.vs={};},valid:function(callmethod){if(''!==md.convert.html()){return false;} if(md.convert.inStack()&&!md.convert.inStack(callmethod)){return false;} return true;},_pre:function(i,v){return{"nowv":v,"prev":md.variable.editbody[i-1],"nexv":md.variable.editbody[i+1],"tag":"","args":false};},isset:function(v){return(md.options.empty_mark!==v&&""!==v)?true:false;},wrapper:function(callmethod,args){md.check.init();if(md.check.valid(callmethod)){md.vs=md.check._pre.apply(this,args);}else{return false;} md.check.tags[callmethod].apply(this);if(typeof md.vs.nexv==='undefined'){while(md.convert.inStack()){md.convert.pushest(md.convert.pop());}}},tags:{h:function(args){if(null!==md.vs.nowv.match(/^#{1,6}\s*/)){var tag="h"+md.vs.nowv.match(/^#{1,6}/)[0].length;var text=md.vs.nowv.replace(/^#{1,6}\s*/,"");md.convert.push(tag,text).pop();}else if(md.check.isset(md.vs.nowv)&&md.vs.nexv){if(md.convert.inStack("h")){md.convert.pop();} if(md.vs.nexv.match(/^=+$/)){md.convert.push("h1",md.vs.nowv);} if(md.vs.nexv.match(/^\-+$/)){md.convert.push("h2",md.vs.nowv);}}else if(md.convert.inStack("h")){md.convert.pop();}},hr:function(){var checker=function(mark){if(md.vs.nowv.indexOf(mark)===0){var regexp=new RegExp(((mark==="*")?"\\"+mark:mark),"g");if(""===md.vs.nowv.replace(regexp,"")){md.convert.push("hr").pop();}}};checker("-");checker("*");checker("_");},empty:function(){if(""===md.vs.nowv||md.vs.nowv.match(/^!?\[.*\]:.*/)){md.convert.push("empty").pop();}},pre:function(){if(md.vs.nowv.indexOf("```")!==-1){if(!md.convert.inStack("pre")){md.convert.push("pre",md.vs.nowv.replace(/`/g,""));} else{md.convert.pop();}}else if(md.convert.inStack("pre")){md.convert.pushest(md.vs.nowv);}},blockquote:function(args){var regexp=/^\s*(>|>)\s?/;if(md.vs.nowv.match(regexp)){md.vs.nowv=md.vs.nowv.replace(regexp,"");md.convert.push("blockquote",md.vs.nowv);}else if(!md.check.isset(md.vs.nowv)){if(typeof md.vs.nexv!=='undefined'&&md.check.isset(md.vs.nexv)){if(!md.vs.nexv.match(regexp)){md.convert.pop();}}}else if(md.convert.inStack("blockquote")){md.convert.pushest(md.vs.nowv);}},ol:function(){var nv=md.vs.nowv;var nn=md.vs.nexv;if(nv.match(/^(\s{0,7})?[0-9]+[.]\s/)){if(!md.convert.inStack("ol")){md.convert.push("ol");nv=nv.replace(/^\s+/g,"");}} if(md.convert.inStack("ol")){if(nv.match(/^[0-9]+[.]\s/)||nv.match(/^[\*\+\-]\s/)){lipop();md.convert.push("li",nv.replace(/^\s{0,7}?[0-9]+[.]\s(.*)/,"$1").replace(/^[\*\+\-]\s(.*)/,"$1"));}else if(nv.match(/^\s+/)){nv=nv.replace(/^\s+/g,"");if(nv.match(/^[\*\+\-]\s/)){md.convert.pushest(nv);if(nn.match(/^[0-9]+[.]\s/)){lipop();}}else if(nv.match(/^.*/)){md.convert.pushest(nv);}else if(!md.check.isset(nv)){md.convert.pushest(nv);}}else if(!md.check.isset(nv)){if(!md.check.isset(nn)){md.convert.pushest(nv);return true;} if(nn&&nn.match(/^\s+/)){if(!nn.match(/^\s{1,7}?[\*\+\-]\s/)){md.convert.pushest(nv);return true;}}else if(nn){if(nn.match(/^[0-9]+[.]\s/)){md.convert.pushest(nv);return true;}} lipop();md.convert.pop();md.addP=false;}else{md.convert.pushest(nv);}}},ul:function(){var nv=md.vs.nowv;var nn=md.vs.nexv;if(nv.match(/^(\s{0,7})?[\*\+\-]\s/)){if(!md.convert.inStack("ul")){md.convert.push("ul");nv=nv.replace(/^\s+/g,"");}} if(md.convert.inStack("ul")){if(nv.match(/^[0-9]+[.]\s/)||nv.match(/^[\*\+\-]\s/)){lipop();md.convert.push("li",nv.replace(/^\s{0,7}?[0-9]+[.]\s(.*)/,"$1").replace(/^[\*\+\-]\s(.*)/,"$1"));}else if(nv.match(/^\s+/)){nv=nv.replace(/^\s+/g,"");if(nv.match(/^[0-9]+[.]\s/)){md.convert.pushest(nv);if(nn.match(/^[\*\+\-]\s/)){lipop();}}else if(nv.match(/^.*/)){md.convert.pushest(nv);}else if(!md.check.isset(nv)){md.convert.pushest(nv);}}else if(!md.check.isset(nv)){if(!md.check.isset(nn)){md.convert.pushest(nv);return true;} if(nn&&nn.match(/^\s+/)){if(!nn.match(/^\s{1,7}?[0-9]+[.]\s/)){md.convert.pushest(nv);return true;}}else if(nn){if(nn.match(/^[\*\+\-]\s/)){md.convert.pushest(nv);return true;}} lipop();md.convert.pop();md.addP=false;}else{md.convert.pushest(nv);}}},table:function(){var nv=md.vs.nowv;var nn=md.vs.nexv;if(nn&&nv.match(/\|/)&&nn.match(/:?-+:?[\s+]?\|/)){if(!md.convert.inStack("table")){md.convert.push("table").push("thead").push("tr");var trs=nn.replace(/^\|(.*)\|$/,"$1").split("|");md.aligns=[];$(trs).each(function(i,v){var repv=v.replace(/^\s+|\s+$/g,"");if(repv.match(/^:.*:$/)){md.aligns[i]="center";}else if(repv.match(/^:/)){md.aligns[i]="left";}else if(repv.match(/:$/)){md.aligns[i]="right";}else{md.aligns[i]="default_";}});var ths=nv.replace(/^\|(.*)\|$/,"$1").split("|");$(ths).each(function(i,v){md.convert.pushest(md.convert.push("th",v.replace(/^\s+|\s+$/g,"")).pop(md.aligns[i]));});md.convert.pushest((md.convert.pop()));md.convert.pushest((md.convert.pop()));}}else if(nn&&nv.match(/\|/)){if(!md.convert.inStack("tbody")){md.convert.push("tbody");}else{md.convert.push("tr");var tds=nv.replace(/^\|(.*)\|$/,"$1").split("|");$(tds).each(function(i,v){md.convert.pushest(md.convert.push("td",v.replace(/^\s+|\s+$/g,"")).pop(md.aligns[i]));});md.convert.pushest((md.convert.pop()));}}else if(md.convert.inStack("table")){md.convert.pushest((md.convert.pop()));md.convert.pop();}},p:function(){if((!md.vs.nowv.match(/^\s*?"!==convertedtext.substr(0,3)){md.convert.pushest(md.vs.nowv).pop();}} if(typeof md.vs.nexv==='undefined'){md.convert.pushest(md.vs.nowv).pop();}else{md.convert.pushest(md.vs.nowv+'
');}}}},etc:function(){var innerHtml=md.vs.nowv;md.convert.html(innerHtml);}}}};var lipop=function(){var tag="li";if(md.convert.inStack(tag)){var textlength=getTextLength();var textlengthAddSpace=getTextLength(true);var converttext=getConvertText();if(textlength!==1&&textlength!==textlengthAddSpace){md.addP=true;} md.convert.pop();var poped=markdownConvert(converttext);if(!md.addP){poped=poped.replace("

","").replace("

","");} md.convert.push(tag,poped);md.convert.pushest(md.convert.pop());}};var getConvertText=function(mode_length){var tag="li";var textlength=0;var converttext="";$(md.variable.stack.text[tag]).each(function(i,v){if(""!==v){textlength++;} converttext+=v+md.options.empty_mark;});return((mode_length)?textlength:converttext);};var getTextLength=function(isset_){tag="li";return((isset_)?getConvertText(true):md.variable.stack.text[tag].length);};md.variable.editbody=art_body.split(/\n/);var md_format="";$.each(md.variable.editbody,function(){var args=arguments;$.each(md.check.tags,function(tagname){md.check.wrapper(tagname,args);});md_format+=md.convert.html();md.convert.html("");});return md_format;} return this.each(function(i,textarea){var contents=($(textarea).val()||$(textarea).html()),markdown=markdownConvert.apply(this,[contents]);$(options.target_form).html(markdown);});}});})(jQuery); // // textrange // !function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t){var e,n={get:function(t){return i[e].get.apply(this,[t])},set:function(t,n){var s,r=parseInt(t),o=parseInt(n);return void 0===t?r=0:t<0&&(r=this[0].value.length+r),void 0!==n&&(s=n>=0?r+o:this[0].value.length+o),i[e].set.apply(this,[r,s]),this},setcursor:function(t){return this.textrange("set",t,0)},replace:function(t){return i[e].replace.apply(this,[String(t)]),this},insert:function(t){return this.textrange("replace",t)}},i={xul:{get:function(t){var e={position:this[0].selectionStart,start:this[0].selectionStart,end:this[0].selectionEnd,length:this[0].selectionEnd-this[0].selectionStart,text:this.val().substring(this[0].selectionStart,this[0].selectionEnd)};return void 0===t?e:e[t]},set:function(t,e){void 0===e&&(e=this[0].value.length),this[0].selectionStart=t,this[0].selectionEnd=e},replace:function(t){var e=this[0].selectionStart,n=this[0].selectionEnd,i=this.val();this.val(i.substring(0,e)+t+i.substring(n,i.length)),this[0].selectionStart=e,this[0].selectionEnd=e+t.length}},msie:{get:function(t){var e=document.selection.createRange();if(void 0===e){var n={position:0,start:0,end:this.val().length,length:this.val().length,text:this.val()};return void 0===t?n:n[t]}var i=0,s=0,r=this[0].value.length,o=this[0].value.replace(/\r\n/g,"\n"),a=this[0].createTextRange(),l=this[0].createTextRange();a.moveToBookmark(e.getBookmark()),l.collapse(!1),-1===a.compareEndPoints("StartToEnd",l)?(i=-a.moveStart("character",-r),i+=o.slice(0,i).split("\n").length-1,-1===a.compareEndPoints("EndToEnd",l)?(s=-a.moveEnd("character",-r),s+=o.slice(0,s).split("\n").length-1):s=r):(i=r,s=r);n={position:i,start:i,end:s,length:r,text:e.text};return void 0===t?n:n[t]},set:function(t,e){var n=this[0].createTextRange();if(void 0!==n){void 0===e&&(e=this[0].value.length);var i=t-(this[0].value.slice(0,t).split("\r\n").length-1),s=e-(this[0].value.slice(0,e).split("\r\n").length-1);n.collapse(!0),n.moveEnd("character",s),n.moveStart("character",i),n.select()}},replace:function(t){document.selection.createRange().text=t}}};t.fn.extend({textrange:function(i){var s="get",r={};return void 0===this[0]?this:("string"==typeof i?s=i:"object"==typeof i&&(s=i.method||s,r=i),void 0===e&&(e="selectionStart"in this[0]?"xul":document.selection?"msie":"unknown"),"unknown"===e?this:(r.nofocus||document.activeElement===this[0]||this[0].focus(),"function"==typeof n[s]?n[s].apply(this,Array.prototype.slice.call(arguments,1)):void t.error("Method "+s+" does not exist in jQuery.textrange")))}})}); // // foundation-datepicker // !function(t){function e(){return new Date(Date.UTC.apply(Date,arguments))}var i=function(e,i){var n=this;this.element=t(e),this.autoShow=void 0==i.autoShow||i.autoShow,this.appendTo=i.appendTo||"body",this.closeButton=i.closeButton,this.language=i.language||this.element.data("date-language")||"en",this.language=this.language in a?this.language:this.language.split("-")[0],this.language=this.language in a?this.language:"en",this.isRTL=a[this.language].rtl||!1,this.format=s.parseFormat(i.format||this.element.data("date-format")||a[this.language].format||"mm/dd/yyyy"),this.formatText=i.format||this.element.data("date-format")||a[this.language].format||"mm/dd/yyyy",this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".prefix, .postfix"),this.hasInput=this.component&&this.element.find("input").length,this.disableDblClickSelection=i.disableDblClickSelection,this.onRender=i.onRender||function(){},this.component&&0===this.component.length&&(this.component=!1),this.linkField=i.linkField||this.element.data("link-field")||!1,this.linkFormat=s.parseFormat(i.linkFormat||this.element.data("link-format")||"yyyy-mm-dd hh:ii:ss"),this.minuteStep=i.minuteStep||this.element.data("minute-step")||5,this.pickerPosition=i.pickerPosition||this.element.data("picker-position")||"bottom-right",this.initialDate=i.initialDate||null,this.faCSSprefix=i.faCSSprefix||"fa",this.leftArrow=i.leftArrow||'',this.rightArrow=i.rightArrow||'',this.closeIcon=i.closeIcon||'',this.minView=0,"minView"in i?this.minView=i.minView:"minView"in this.element.data()&&(this.minView=this.element.data("min-view")),this.minView=s.convertViewMode(this.minView),this.maxView=s.modes.length-1,"maxView"in i?this.maxView=i.maxView:"maxView"in this.element.data()&&(this.maxView=this.element.data("max-view")),this.maxView=s.convertViewMode(this.maxView),this.nonMilitaryTime=!1,"nonMilitaryTime"in i&&(this.nonMilitaryTime=i.nonMilitaryTime),this.startViewMode="month","startView"in i?this.startViewMode=i.startView:"startView"in this.element.data()&&(this.startViewMode=this.element.data("start-view")),this.startViewMode=s.convertViewMode(this.startViewMode),this.viewMode=this.startViewMode,"minView"in i||"maxView"in i||this.element.data("min-view")||this.element.data("max-view")||(this.pickTime=!1,"pickTime"in i&&(this.pickTime=i.pickTime),1==this.pickTime?(this.minView=0,this.maxView=4):(this.minView=2,this.maxView=4)),this.forceParse=!0,"forceParse"in i?this.forceParse=i.forceParse:"dateForceParse"in this.element.data()&&(this.forceParse=this.element.data("date-force-parse")),this.picker=t(s.template(this.leftArrow,this.rightArrow,this.closeIcon)).appendTo(this.isInline?this.element:this.appendTo).on({click:t.proxy(this.click,this),mousedown:t.proxy(this.mousedown,this)}),this.closeButton?this.picker.find("a.datepicker-close").show():this.picker.find("a.datepicker-close").hide(),this.isInline?this.picker.addClass("datepicker-inline"):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.isRTL&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".date-switch").each(function(){t(this).parent().prepend(t(this).siblings(".next")),t(this).parent().append(t(this).siblings(".prev"))}),this.picker.find(".prev, .next").toggleClass("prev next")),t(document).on("mousedown",function(e){n.isInput&&e.target===n.element[0]||0===t(e.target).closest(".datepicker.datepicker-inline, .datepicker.datepicker-dropdown").length&&n.hide()}),this.autoclose=!0,"autoclose"in i?this.autoclose=i.autoclose:"dateAutoclose"in this.element.data()&&(this.autoclose=this.element.data("date-autoclose")),this.keyboardNavigation=!0,"keyboardNavigation"in i?this.keyboardNavigation=i.keyboardNavigation:"dateKeyboardNavigation"in this.element.data()&&(this.keyboardNavigation=this.element.data("date-keyboard-navigation")),this.todayBtn=i.todayBtn||this.element.data("date-today-btn")||!1,this.todayHighlight=i.todayHighlight||this.element.data("date-today-highlight")||!1,this.calendarWeeks=!1,"calendarWeeks"in i?this.calendarWeeks=i.calendarWeeks:"dateCalendarWeeks"in this.element.data()&&(this.calendarWeeks=this.element.data("date-calendar-weeks")),this.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this.weekStart=(i.weekStart||this.element.data("date-weekstart")||a[this.language].weekStart||0)%7,this.weekEnd=(this.weekStart+6)%7,this.startDate=-1/0,this.endDate=1/0,this.daysOfWeekDisabled=[],this.datesDisabled=[],this.setStartDate(i.startDate||this.element.data("date-startdate")),this.setEndDate(i.endDate||this.element.data("date-enddate")),this.setDaysOfWeekDisabled(i.daysOfWeekDisabled||this.element.data("date-days-of-week-disabled")),this.setDatesDisabled(i.datesDisabled||this.element.data("dates-disabled")),null!=this.initialDate&&(this.date=this.viewDate=s.parseDate(this.initialDate,this.format,this.language),this.setValue()),this.fillDow(),this.fillMonths(),this.update(),this.showMode(),this.isInline&&this.show(),this._attachEvents()};i.prototype={constructor:i,_events:[],_attachEvents:function(){this._detachEvents(),this.isInput?this.keyboardNavigation?this._events=[[this.element,{focus:this.autoShow?t.proxy(this.show,this):function(){},keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this),click:this.element.attr("readonly")?t.proxy(this.show,this):function(){}}]]:this._events=[[this.element,{focus:this.autoShow?t.proxy(this.show,this):function(){}}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:this.autoShow?t.proxy(this.show,this):function(){},keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}],[this.component,{click:t.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:t.proxy(this.show,this)}]],this.disableDblClickSelection&&(this._events[this._events.length]=[this.element,{dblclick:function(e){e.preventDefault(),e.stopPropagation(),t(this).blur()}}]);for(var e,i,a=0;a=t(window).width()&&(o=s.left+h-this.picker.width()),this.picker.css({top:r,left:o,zIndex:i})}},update:function(){var t,e=!1,i=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val();arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),this.date=s.parseDate(t,this.format,this.language),e?this.setValue():""==i&&this.element.trigger({type:"changeDate",date:null}),this.datethis.endDate?this.viewDate=new Date(this.endDate.valueOf()):this.viewDate=new Date(this.date.valueOf()),this.fill()},fillDow:function(){var t=this.weekStart,e="";if(this.calendarWeeks){var i=' ';e+=i,this.picker.find(".datepicker-days thead tr:first-child").prepend(i)}for(;t'+a[this.language].daysMin[t++%7]+"";e+="",this.picker.find(".datepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+=''+a[this.language].monthsShort[e++]+"";this.picker.find(".datepicker-months td").html(t)},fill:function(){if(null!=this.date&&null!=this.viewDate){var i=new Date(this.viewDate.valueOf()),n=i.getUTCFullYear(),h=i.getUTCMonth(),r=i.getUTCDate(),o=i.getUTCHours(),d=i.getUTCMinutes(),l=this.startDate!==-1/0?this.startDate.getUTCFullYear():-1/0,c=this.startDate!==-1/0?this.startDate.getUTCMonth():-1/0,u=this.endDate!==1/0?this.endDate.getUTCFullYear():1/0,p=this.endDate!==1/0?this.endDate.getUTCMonth():1/0,m=this.date&&e(this.date.getUTCFullYear(),this.date.getUTCMonth(),this.date.getUTCDate()).valueOf(),f=new Date;a[this.language].titleFormat||a.en.titleFormat;this.picker.find(".datepicker-days thead th:eq(1)").text(a[this.language].months[h]+" "+n),this.picker.find(".datepicker-hours thead th:eq(1)").text(r+" "+a[this.language].months[h]+" "+n),this.picker.find(".datepicker-minutes thead th:eq(1)").text(r+" "+a[this.language].months[h]+" "+n),this.picker.find("tfoot th.today").text(a[this.language].today).toggle(!1!==this.todayBtn),this.updateNavArrows(),this.fillMonths();var g=e(n,h-1,28,0,0,0,0),v=s.getDaysInMonth(g.getUTCFullYear(),g.getUTCMonth());g.setUTCDate(v),g.setUTCDate(v-(g.getUTCDay()-this.weekStart+7)%7);var D=new Date(g.valueOf());D.setUTCDate(D.getUTCDate()+42),D=D.valueOf();for(var y,w=[];g.valueOf()"),this.calendarWeeks)){var k=new Date(g.getUTCFullYear(),g.getUTCMonth(),g.getUTCDate()-g.getDay()+10-(this.weekStart&&this.weekStart%7<5&&7)),T=~~((k-new Date(k.getFullYear(),0,4))/864e5/7+1.5);w.push(''+T+"")}y=" "+this.onRender(g)+" ",g.getUTCFullYear()n||g.getUTCFullYear()==n&&g.getUTCMonth()>h)&&(y+=" new"),this.todayHighlight&&g.getUTCFullYear()==f.getFullYear()&&g.getUTCMonth()==f.getMonth()&&g.getUTCDate()==f.getDate()&&(y+=" today"),m&&g.valueOf()==m&&(y+=" active"),(g.valueOf()this.endDate||-1!==t.inArray(g.getUTCDay(),this.daysOfWeekDisabled)||-1!==t.inArray(g.valueOf(),this.datesDisabled))&&(y+=" disabled"),w.push(''+g.getUTCDate()+""),g.getUTCDay()==this.weekEnd&&w.push(""),g.setUTCDate(g.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(w.join("")),w=[];for(var M=0;M<24;M++){if(y="",(C=e(n,h,r,M)).valueOf()+36e5this.endDate?y+=" disabled":o==M&&(y+=" active"),this.nonMilitaryTime){U=0==(U=M%12)?12:U;var b="AM";M>=12&&M<=23&&(b="PM"),w.push(''+U+":00 "+b+"")}else w.push(''+M+":00")}this.picker.find(".datepicker-hours td").html(w.join("")),w=[];for(M=0;M<60;M+=this.minuteStep){var C;if(y="",(C=e(n,h,r,o,M)).valueOf()this.endDate?y+=" disabled":Math.floor(d/this.minuteStep)==Math.floor(M/this.minuteStep)&&(y+=" active"),this.nonMilitaryTime){var U;U=0==(U=o%12)?12:U;b="AM";o>=12&&o<=23&&(b="PM"),w.push(''+U+":"+(M<10?"0"+M:M)+" "+b+"")}else w.push(''+o+":"+(M<10?"0"+M:M)+"")}this.picker.find(".datepicker-minutes td").html(w.join(""));var S=this.date&&this.date.getUTCFullYear(),x=this.picker.find(".datepicker-months").find("th:eq(1)").text(n).end().find("span").removeClass("active");S&&S==n&&x.eq(this.date.getUTCMonth()).addClass("active"),(nu)&&x.addClass("disabled"),n==l&&x.slice(0,c).addClass("disabled"),n==u&&x.slice(p+1).addClass("disabled"),w="",n=10*parseInt(n/10,10);var F=this.picker.find(".datepicker-years").find("th:eq(1)").text(n+"-"+(n+9)).end().find("td");n-=1;for(M=-1;M<11;M++)w+='u?" disabled":"")+'">'+n+"",n+=1;F.html(w)}},updateNavArrows:function(){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth(),a=t.getUTCDate(),s=t.getUTCHours();switch(this.viewMode){case 0:this.startDate!==-1/0&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&a<=this.startDate.getUTCDate()&&s<=this.startDate.getUTCHours()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&a>=this.endDate.getUTCDate()&&s>=this.endDate.getUTCHours()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:this.startDate!==-1/0&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()&&a<=this.startDate.getUTCDate()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()&&a>=this.endDate.getUTCDate()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 2:this.startDate!==-1/0&&e<=this.startDate.getUTCFullYear()&&i<=this.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()&&i>=this.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 3:case 4:this.startDate!==-1/0&&e<=this.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.endDate!==1/0&&e>=this.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}},click:function(i){i.stopPropagation(),i.preventDefault(),(t(i.target).hasClass("datepicker-close")||t(i.target).parent().hasClass("datepicker-close"))&&this.hide();var a=t(i.target).closest("span, td, th");if(1==a.length){if(a.is(".disabled"))return void this.element.trigger({type:"outOfRange",date:this.viewDate,startDate:this.startDate,endDate:this.endDate});switch(a[0].nodeName.toLowerCase()){case"th":switch(a[0].className){case"date-switch":this.showMode(1);break;case"prev":case"next":var n=s.modes[this.viewMode].navStep*("prev"==a[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveHour(this.viewDate,n);break;case 1:this.viewDate=this.moveDate(this.viewDate,n);break;case 2:this.viewDate=this.moveMonth(this.viewDate,n);break;case 3:case 4:this.viewDate=this.moveYear(this.viewDate,n)}this.fill();break;case"today":var h=new Date;h=e(h.getFullYear(),h.getMonth(),h.getDate(),h.getHours(),h.getMinutes(),h.getSeconds()),this.viewMode=this.startViewMode,this.showMode(0),this._setDate(h)}break;case"span":if(!a.is(".disabled")){if(a.is(".month"))if(3===this.minView){var r=a.parent().find("span").index(a)||0,o=this.viewDate.getUTCFullYear(),d=1,l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();this._setDate(e(o,r,d,l,c,u,0))}else{this.viewDate.setUTCDate(1);r=a.parent().find("span").index(a);this.viewDate.setUTCMonth(r),this.element.trigger({type:"changeMonth",date:this.viewDate})}else if(a.is(".year"))if(4===this.minView){o=parseInt(a.text(),10)||0,r=0,d=1,l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();this._setDate(e(o,r,d,l,c,u,0))}else{this.viewDate.setUTCDate(1);o=parseInt(a.text(),10)||0;this.viewDate.setUTCFullYear(o),this.element.trigger({type:"changeYear",date:this.viewDate})}else if(a.is(".hour")){l=this.nonMilitaryTime?a.text().indexOf("AM")>=0?parseInt(a.text(),10)||0:parseInt(a.text(),10)+12||0:parseInt(a.text(),10)||0;o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),d=this.viewDate.getUTCDate(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();this._setDate(e(o,r,d,l,c,u,0))}else if(a.is(".minute")){c=parseInt(a.text().substr(a.text().indexOf(":")+1),10)||0,o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),d=this.viewDate.getUTCDate(),l=this.viewDate.getUTCHours(),u=this.viewDate.getUTCSeconds();this._setDate(e(o,r,d,l,c,u,0))}if(0!=this.viewMode){var p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}else this.fill(),this.autoclose&&this.hide()}break;case"td":if(a.is(".day")&&!a.is(".disabled")){d=parseInt(a.text(),10)||1,o=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),l=this.viewDate.getUTCHours(),c=this.viewDate.getUTCMinutes(),u=this.viewDate.getUTCSeconds();a.is(".old")?0===r?(r=11,o-=1):r-=1:a.is(".new")&&(11==r?(r=0,o+=1):r+=1),this._setDate(e(o,r,d,l,c,u,0))}p=this.viewMode;this.showMode(-1),this.fill(),p==this.viewMode&&this.autoclose&&this.hide()}}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=t),e&&"view"!=e||(this.viewDate=t),this.fill(),this.setValue(),this.element.trigger({type:"changeDate",date:this.date}),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),this.autoclose)},moveHour:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return e=e>0?1:-1,i.setUTCHours(i.getUTCHours()+e),i},moveDate:function(t,e){if(!e)return t;var i=new Date(t.valueOf());return e=e>0?1:-1,i.setUTCDate(i.getUTCDate()+e),i},moveMonth:function(t,e){if(!e)return t;var i,a,s=new Date(t.valueOf()),n=s.getUTCDate(),h=s.getUTCMonth(),r=Math.abs(e);if(e=e>0?1:-1,1==r)a=-1==e?function(){return s.getUTCMonth()==h}:function(){return s.getUTCMonth()!=i},i=h+e,s.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var o=0;o=this.startDate&&t<=this.endDate},keydown:function(t){if(!this.keyboardNavigation)return!0;if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,a,s,n=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.keyboardNavigation)break;e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),a=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),a=this.moveMonth(this.viewDate,e)):((i=new Date(this.date.valueOf())).setUTCDate(this.date.getUTCDate()+e),(a=new Date(this.viewDate.valueOf())).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=a,this.setValue(),this.update(),t.preventDefault(),n=!0);break;case 38:case 40:if(!this.keyboardNavigation)break;e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),a=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),a=this.moveMonth(this.viewDate,e)):((i=new Date(this.date.valueOf())).setUTCDate(this.date.getUTCDate()+7*e),(a=new Date(this.viewDate.valueOf())).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=a,this.setValue(),this.update(),t.preventDefault(),n=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}if(n)this.element.trigger({type:"changeDate",date:this.date}),this.isInput?s=this.element:this.component&&(s=this.element.find("input")),s&&s.change()}},showMode:function(t){if(t){var e=Math.max(0,Math.min(s.modes.length-1,this.viewMode+t));e>=this.minView&&e<=this.maxView&&(this.viewMode=e)}this.picker.find(">div").hide().filter(".datepicker-"+s.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()},changeViewDate:function(t){this.date=t,this.viewDate=t,this.fill()},reset:function(t){this._setDate(null,"date")}},t.fn.fdatepicker=function(e){var a=Array.apply(null,arguments);return a.shift(),this.each(function(){var s=t(this),n=s.data("datepicker"),h="object"==typeof e&&e;n||s.data("datepicker",n=new i(this,t.extend({},t.fn.fdatepicker.defaults,h))),"string"==typeof e&&"function"==typeof n[e]&&n[e].apply(n,a)})},t.fn.fdatepicker.defaults={onRender:function(t){return""}},t.fn.fdatepicker.Constructor=i;var a=t.fn.fdatepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",titleFormat:"MM yyyy"}},s={modes:[{clsName:"minutes",navFnc:"Hours",navStep:1},{clsName:"hours",navFnc:"Date",navStep:1},{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,s.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/hh?|ii?|ss?|dd?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return this.formatText=t,{separators:e,parts:i}},parseDate:function(i,s,n){if(i instanceof Date)return new Date(i.valueOf()-6e4*i.getTimezoneOffset());if(/^\d{4}\-\d{1,2}\-\d{1,2}$/.test(i)&&(s=this.parseFormat("yyyy-mm-dd")),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}$/.test(i)&&(s=this.parseFormat("yyyy-mm-dd hh:ii")),/^\d{4}\-\d{1,2}\-\d{1,2}[T ]\d{1,2}\:\d{1,2}\:\d{1,2}[Z]{0,1}$/.test(i)&&(s=this.parseFormat("yyyy-mm-dd hh:ii:ss")),/^[-+]\d+[dmwy]([\s,]+[-+]\d+[dmwy])*$/.test(i)){var h,r=/([-+]\d+)([dmwy])/,o=i.match(/([-+]\d+)([dmwy])/g);i=new Date;for(var d=0;d'+t+''+e+""},contTemplate:'',footTemplate:'',template:function(t,e,i){return'
'+s.headTemplate(t,e)+s.contTemplate+s.footTemplate+'
'+s.headTemplate(t,e)+s.contTemplate+s.footTemplate+'
'+s.headTemplate(t,e)+""+s.footTemplate+'
'+s.headTemplate(t,e)+s.contTemplate+s.footTemplate+'
'+s.headTemplate(t,e)+s.contTemplate+s.footTemplate+'
'+i+"
"}};t.fn.fdatepicker.DPGlobal=s}(window.jQuery),jQuery.fn.fdatepicker.dates.da={days:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag","Søndag"],daysShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør","Søn"],daysMin:["Sø","Ma","Ti","On","To","Fr","Lø","Sø"],months:["Januar","Februar","Marts","April","Maj","Juni","Juli","August","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mar","Apr","Maj","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"I Dag"},jQuery.fn.fdatepicker.dates.de={days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"],daysShort:["Son","Mon","Die","Mit","Don","Fre","Sam","Son"],daysMin:["So","Mo","Di","Mi","Do","Fr","Sa","So"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],monthsShort:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],today:"Heute"},jQuery.fn.fdatepicker.dates.nl={days:["Zondag","Maandag","Dinsdag","Woensdag","Donderdag","Vrijdag","Zaterdag","Zondag"],daysShort:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],daysMin:["Zo","Ma","Di","Wo","Do","Vr","Za","Zo"],months:["Januari","Februari","Maart","April","Mei","Juni","Juli","Augustus","September","Oktober","November","December"],monthsShort:["Jan","Feb","Mrt","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"],today:"Vandaag"},jQuery.fn.fdatepicker.dates.fr={days:["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dimanche"],daysShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Dim"],daysMin:["D","L","Ma","Me","J","V","S","D"],months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],monthsShort:["Jan","Fev","Mar","Avr","Mai","Jui","Jul","Aou","Sep","Oct","Nov","Dec"],today:"Aujourd'hui",clear:"Effacer",weekStart:1,format:"dd/mm/yyyy"},jQuery.fn.fdatepicker.dates.it={days:["Domenica","Lunedi","Martedi","Mercoledi","Giovedi","Venerdi","Sabato","Domenica"],daysShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab","Dom"],daysMin:["Do","Lu","Ma","Me","Gi","Ve","Sa","Do"],months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],monthsShort:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],today:"Oggi"},jQuery.fn.fdatepicker.dates.es={days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado","domingo"],daysShort:["dom","lun","mar","mié","jue","vie","sáb","dom"],daysMin:["do","lu","ma","mi","ju","vi","sa","do"],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],monthsShort:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],today:"hoy",weekStart:1,format:"dd/mm/yyyy"}; // // awesomplete // !function(){var t=function(e,i){var s=this;t.count=(t.count||0)+1,this.count=t.count,this.isOpened=!1,this.input=n(e),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=i=i||{},function(t,e,i){for(var n in e){var s=e[n],r=t.input.getAttribute("data-"+n.toLowerCase());"number"==typeof s?t[n]=parseInt(r):!1===s?t[n]=null!==r:s instanceof Function?t[n]=null:t[n]=r,t[n]||0===t[n]||(t[n]=n in i?i[n]:s)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:t.DATA,filter:t.FILTER_CONTAINS,sort:!1!==i.sort&&t.SORT_BYLENGTH,container:t.CONTAINER,item:t.ITEM,replace:t.REPLACE,tabSelect:!1},i),this.index=-1,this.container=this.container(e),this.ul=n.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container}),this.status=n.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:0!=this.minChars?"Type "+this.minChars+" or more characters for results.":"Begin typing for results."}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;s.opened&&(13===e&&s.selected?(t.preventDefault(),s.select()):9===e&&s.selected&&s.tabSelect?s.select():27===e?s.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),s[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),s.select(e,t.target))}}}},n.bind(this.input,this._events.input),n.bind(this.input.form,this._events.form),n.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||i.list||[],t.all.push(this)};function e(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}t.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=n(t))&&t.children){var e=[];i.apply(t.children).forEach(function(t){if(!t.disabled){var i=t.textContent.trim(),n=t.value||i,s=t.label||i;""!==n&&e.push({label:s,value:n})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),n.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),n.fire(this.input,"awesomplete-open")},destroy:function(){if(n.unbind(this.input,this._events.input),n.unbind(this.input.form,this._events.form),!this.options.container){var e=this.container.parentNode;e.insertBefore(this.input,this.container),e.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete");var i=t.all.indexOf(this);-1!==i&&t.all.splice(i,1)},next:function(){var t=this.ul.children.length;this.goto(this.index-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.status.textContent=e[t].textContent+", list item "+(t+1)+" of "+e.length,this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,n.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e){if(t?this.index=n.siblingIndex(t):t=this.ul.children[this.index],t){var i=this.suggestions[this.index];n.fire(this.input,"awesomplete-select",{text:i,origin:e||t})&&(this.replace(i),this.close({reason:"select"}),n.fire(this.input,"awesomplete-selectcomplete",{text:i}))}},evaluate:function(){var t=this,i=this.input.value;i.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(n){return new e(t.data(n,i))}).filter(function(e){return t.filter(e,i)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(e,n){t.ul.appendChild(t.item(e,i,n))}),0===this.ul.children.length?(this.status.textContent="No results found",this.close({reason:"nomatches"})):(this.open(),this.status.textContent=this.ul.children.length+" results found")):(this.close({reason:"nomatches"}),this.status.textContent="No results found")}},t.all=[],t.FILTER_CONTAINS=function(t,e){return RegExp(n.regExpEscape(e.trim()),"i").test(t)},t.FILTER_STARTSWITH=function(t,e){return RegExp("^"+n.regExpEscape(e.trim()),"i").test(t)},t.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t$&");return n.create("li",{innerHTML:s,"aria-selected":"false",id:"awesomplete_list_"+this.count+"_item_"+i})},t.REPLACE=function(t){this.input.value=t.value},t.DATA=function(t){return t},Object.defineProperty(e.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),e.prototype.toString=e.prototype.valueOf=function(){return""+this.label};var i=Array.prototype.slice;function n(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function s(t,e){return i.call((e||document).querySelectorAll(t))}function r(){s("input.awesomplete").forEach(function(e){new t(e)})}n.create=function(t,e){var i=document.createElement(t);for(var s in e){var r=e[s];if("inside"===s)n(r).appendChild(i);else if("around"===s){var o=n(r);o.parentNode.insertBefore(i,o),i.appendChild(o),null!=o.getAttribute("autofocus")&&o.focus()}else s in i?i[s]=r:i.setAttribute(s,r)}return i},n.bind=function(t,e){if(t)for(var i in e){var n=e[i];i.split(/\s+/).forEach(function(e){t.addEventListener(e,n)})}},n.unbind=function(t,e){if(t)for(var i in e){var n=e[i];i.split(/\s+/).forEach(function(e){t.removeEventListener(e,n)})}},n.fire=function(t,e,i){var n=document.createEvent("HTMLEvents");for(var s in n.initEvent(e,!0,!0),i)n[s]=i[s];return t.dispatchEvent(n)},n.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},n.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=t),"undefined"!=typeof Document&&("loading"!==document.readyState?r():document.addEventListener("DOMContentLoaded",r)),t.$=n,t.$$=s,"object"==typeof module&&module.exports&&(module.exports=t)}(); // // jwlib-utils // (function($){"use strict";jQuery.fn.exists=function(){return jQuery(this).length>0;};jQuery.getParameterByName=function(name,url){if(!url)url=window.location.href;name=name.replace(/[[\]]/g,"\\$&");var regex=new RegExp("[?&]"+name+"(=([^&#]*)|&|#|$)"),results=regex.exec(url);if(!results)return null;if(!results[2])return"";return decodeURIComponent(results[2].replace(/\+/g," "));};jQuery.debug=function(){if(window.debug===true)window.debug=1;var maxlevel=parseInt($.getParameterByName("debug")||window.debug)||0;if(maxlevel===0)return;var args=Array.prototype.slice.call(arguments),group="debug",loglevel=1;if(args.length>1&&typeof(args[args.length-1])==="number"){loglevel=args.pop();} if(loglevel>maxlevel)return;if(args.length>1&&typeof(args[0])==="string"){group=args.shift();} var debugGroup=$.getParameterByName("debugGroup")||window.debugGroup;if(debugGroup&&!group.match(debugGroup))return;console.group(group);args.forEach(function(arg){if(Array.isArray(arg)&&typeof arg[0]!=="object"){console.table(arg);} else{console.log(arg);}});console.groupEnd();};jQuery.isMobile=jQuery.isTouch=function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch||false;};if(jQuery.isTouch())document.documentElement.classList.add("touch");jQuery.clearBrowserCache=function(){$(window).on("pageshow",function(event){if(event.originalEvent.persisted){window.location.reload();}});};jQuery.preloadImages=function(){for(var i=0;i").attr("src",arguments[i]);}};var triggerWindowResize=function(){$(window).trigger("resize");};if(typeof(orientationEvent)==undefined){var orientationEvent=0;} $(window).on(orientationEvent,triggerWindowResize).on("load",triggerWindowResize);})(jQuery); /*! jQuery Migrate v1.2.1 | (c) 2005, 2013 jQuery Foundation, Inc. and other contributors | jquery.org/license */ jQuery.migrateMute===void 0&&(jQuery.migrateMute=!0),function(e,t,n){function r(n){var r=t.console;i[n]||(i[n]=!0,e.migrateWarnings.push(n),r&&r.warn&&!e.migrateMute&&(r.warn("JQMIGRATE: "+n),e.migrateTrace&&r.trace&&r.trace()))}function a(t,a,i,o){if(Object.defineProperty)try{return Object.defineProperty(t,a,{configurable:!0,enumerable:!0,get:function(){return r(o),i},set:function(e){r(o),i=e}}),n}catch(s){}e._definePropertyBroken=!0,t[a]=i}var i={};e.migrateWarnings=[],!e.migrateMute&&t.console&&t.console.log&&t.console.log("JQMIGRATE: Logging is active"),e.migrateTrace===n&&(e.migrateTrace=!0),e.migrateReset=function(){i={},e.migrateWarnings.length=0},"BackCompat"===document.compatMode&&r("jQuery is not compatible with Quirks Mode");var o=e("",{size:1}).attr("size")&&e.attrFn,s=e.attr,u=e.attrHooks.value&&e.attrHooks.value.get||function(){return null},c=e.attrHooks.value&&e.attrHooks.value.set||function(){return n},l=/^(?:input|button)$/i,d=/^[238]$/,p=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,f=/^(?:checked|selected)$/i;a(e,"attrFn",o||{},"jQuery.attrFn is deprecated"),e.attr=function(t,a,i,u){var c=a.toLowerCase(),g=t&&t.nodeType;return u&&(4>s.length&&r("jQuery.fn.attr( props, pass ) is deprecated"),t&&!d.test(g)&&(o?a in o:e.isFunction(e.fn[a])))?e(t)[a](i):("type"===a&&i!==n&&l.test(t.nodeName)&&t.parentNode&&r("Can't change the 'type' of an input or button in IE 6/7/8"),!e.attrHooks[c]&&p.test(c)&&(e.attrHooks[c]={get:function(t,r){var a,i=e.prop(t,r);return i===!0||"boolean"!=typeof i&&(a=t.getAttributeNode(r))&&a.nodeValue!==!1?r.toLowerCase():n},set:function(t,n,r){var a;return n===!1?e.removeAttr(t,r):(a=e.propFix[r]||r,a in t&&(t[a]=!0),t.setAttribute(r,r.toLowerCase())),r}},f.test(c)&&r("jQuery.fn.attr('"+c+"') may use property instead of attribute")),s.call(e,t,a,i))},e.attrHooks.value={get:function(e,t){var n=(e.nodeName||"").toLowerCase();return"button"===n?u.apply(this,arguments):("input"!==n&&"option"!==n&&r("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var a=(e.nodeName||"").toLowerCase();return"button"===a?c.apply(this,arguments):("input"!==a&&"option"!==a&&r("jQuery.fn.attr('value', val) no longer sets properties"),e.value=t,n)}};var g,h,v=e.fn.init,m=e.parseJSON,y=/^([^<]*)(<[\w\W]+>)([^>]*)$/;e.fn.init=function(t,n,a){var i;return t&&"string"==typeof t&&!e.isPlainObject(n)&&(i=y.exec(e.trim(t)))&&i[0]&&("<"!==t.charAt(0)&&r("$(html) HTML strings must start with '<' character"),i[3]&&r("$(html) HTML text after last tag is ignored"),"#"===i[0].charAt(0)&&(r("HTML string cannot start with a '#' character"),e.error("JQMIGRATE: Invalid selector string (XSS)")),n&&n.context&&(n=n.context),e.parseHTML)?v.call(this,e.parseHTML(i[2],n,!0),n,a):v.apply(this,arguments)},e.fn.init.prototype=e.fn,e.parseJSON=function(e){return e||null===e?m.apply(this,arguments):(r("jQuery.parseJSON requires a valid JSON string"),null)},e.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e.browser||(g=e.uaMatch(navigator.userAgent),h={},g.browser&&(h[g.browser]=!0,h.version=g.version),h.chrome?h.webkit=!0:h.webkit&&(h.safari=!0),e.browser=h),a(e,"browser",e.browser,"jQuery.browser is deprecated"),e.sub=function(){function t(e,n){return new t.fn.init(e,n)}e.extend(!0,t,this),t.superclass=this,t.fn=t.prototype=this(),t.fn.constructor=t,t.sub=this.sub,t.fn.init=function(r,a){return a&&a instanceof e&&!(a instanceof t)&&(a=t(a)),e.fn.init.call(this,r,a,n)},t.fn.init.prototype=t.fn;var n=t(document);return r("jQuery.sub() is deprecated"),t},e.ajaxSetup({converters:{"text json":e.parseJSON}});var b=e.fn.data;e.fn.data=function(t){var a,i,o=this[0];return!o||"events"!==t||1!==arguments.length||(a=e.data(o,t),i=e._data(o,t),a!==n&&a!==i||i===n)?b.apply(this,arguments):(r("Use of jQuery.fn.data('events') is deprecated"),i)};var j=/\/(java|ecma)script/i,w=e.fn.andSelf||e.fn.addBack;e.fn.andSelf=function(){return r("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),w.apply(this,arguments)},e.clean||(e.clean=function(t,a,i,o){a=a||document,a=!a.nodeType&&a[0]||a,a=a.ownerDocument||a,r("jQuery.clean() is deprecated");var s,u,c,l,d=[];if(e.merge(d,e.buildFragment(t,a).childNodes),i)for(c=function(e){return!e.type||j.test(e.type)?o?o.push(e.parentNode?e.parentNode.removeChild(e):e):i.appendChild(e):n},s=0;null!=(u=d[s]);s++)e.nodeName(u,"script")&&c(u)||(i.appendChild(u),u.getElementsByTagName!==n&&(l=e.grep(e.merge([],u.getElementsByTagName("script")),c),d.splice.apply(d,[s+1,0].concat(l)),s+=l.length));return d});var Q=e.event.add,x=e.event.remove,k=e.event.trigger,N=e.fn.toggle,T=e.fn.live,M=e.fn.die,S="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",C=RegExp("\\b(?:"+S+")\\b"),H=/(?:^|\s)hover(\.\S+|)\b/,A=function(t){return"string"!=typeof t||e.event.special.hover?t:(H.test(t)&&r("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),t&&t.replace(H,"mouseenter$1 mouseleave$1"))};e.event.props&&"attrChange"!==e.event.props[0]&&e.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),e.event.dispatch&&a(e.event,"handle",e.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),e.event.add=function(e,t,n,a,i){e!==document&&C.test(t)&&r("AJAX events should be attached to document: "+t),Q.call(this,e,A(t||""),n,a,i)},e.event.remove=function(e,t,n,r,a){x.call(this,e,A(t)||"",n,r,a)},e.fn.error=function(){var e=Array.prototype.slice.call(arguments,0);return r("jQuery.fn.error() is deprecated"),e.splice(0,0,"error"),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this)},e.fn.toggle=function(t,n){if(!e.isFunction(t)||!e.isFunction(n))return N.apply(this,arguments);r("jQuery.fn.toggle(handler, handler...) is deprecated");var a=arguments,i=t.guid||e.guid++,o=0,s=function(n){var r=(e._data(this,"lastToggle"+t.guid)||0)%o;return e._data(this,"lastToggle"+t.guid,r+1),n.preventDefault(),a[r].apply(this,arguments)||!1};for(s.guid=i;a.length>o;)a[o++].guid=i;return this.click(s)},e.fn.live=function(t,n,a){return r("jQuery.fn.live() is deprecated"),T?T.apply(this,arguments):(e(this.context).on(t,this.selector,n,a),this)},e.fn.die=function(t,n){return r("jQuery.fn.die() is deprecated"),M?M.apply(this,arguments):(e(this.context).off(t,this.selector||"**",n),this)},e.event.trigger=function(e,t,n,a){return n||C.test(e)||r("Global events are undocumented and deprecated"),k.call(this,e,t,n||document,a)},e.each(S.split("|"),function(t,n){e.event.special[n]={setup:function(){var t=this;return t!==document&&(e.event.add(document,n+"."+e.guid,function(){e.event.trigger(n,null,t,!0)}),e._data(this,n,e.guid++)),!1},teardown:function(){return this!==document&&e.event.remove(document,n+"."+e._data(this,n)),!1}}})}(jQuery,window); var stacks = {}; stacks.jQuery = jQuery.noConflict(true); stacks.api_totalcms_blog_gallery = {}; stacks.api_totalcms_blog_gallery = (function(stack) { var jQuery = stacks.jQuery;var $ = jQuery; $(document).ready(function(){$('.total-cms-list img').error(function(){$(this).attr('src','../../rw_common/plugins/stacks/total-cms/missing.jpg');});}); return stack;})(stacks.api_totalcms_blog_gallery); stacks.com_barthpartners_biscuitbox3 = {}; stacks.com_barthpartners_biscuitbox3 = (function(stack) { var jQuery = stacks.jQuery;var $ = jQuery; (function($) { "use strict"; var BiscuitBox = function(element, prefs) { var obj = this; var elmt = $(element); var consentKey = "BiscuitBox"; var consentExpiryDate = "BiscuitBoxExpiryDate"; var btnAccept = elmt.find(".biscuitbox-btnaccept button, .biscuitbox-btnaccept a"); var btnDecline = elmt.find(".biscuitbox-btndecline button, .biscuitbox-btndecline a"); var btnRevoke = elmt.find(".biscuitbox-btnrevoke button, .biscuitbox-btnrevoke a"); var preferences = $.extend({ expiryDays: 365, consentIsImplied: false, externalScripts: [], scriptCollection: function() {} }, prefs || {}); this.getStatus = function() { var status = "DECLINE"; if (localStorage.getItem(consentKey)) { var exDate = Date.parse(localStorage.getItem(consentExpiryDate)); var today = Date.parse(Date()); if (exDate > today) { if (localStorage.getItem(consentKey) === "ACCEPT") { status = "ACCEPT"; } } else { status = "EXPIRED"; } } else { status = "ASK"; }; return status; }; this.setConsent = function() { var exDate = new Date(); exDate.setDate(exDate.getDate() + (preferences.expiryDays || 365)); localStorage.setItem(consentKey, "ACCEPT"); localStorage.setItem(consentExpiryDate, exDate); obj.publishScripts(); }; this.declineConsent = function() { var exDate = new Date(); exDate.setDate(exDate.getDate() + (preferences.expiryDays || 365)); localStorage.setItem(consentKey, "DECLINE"); localStorage.setItem(consentExpiryDate, exDate); if (preferences.consentIsImplied) { window.location.reload(); } }; this.revokeDecision = function() { localStorage.removeItem(consentKey); localStorage.removeItem(consentExpiryDate); }; this.publishScripts = function() { preferences.scriptCollection.call(); for (var i in preferences.externalScripts) { obj.loadExternalScript({ uri: preferences.externalScripts[i][0], type: preferences.externalScripts[i][1], position: preferences.externalScripts[i][2] }); } }; this.evaluateSituation = function() { if (obj.getStatus() === "ACCEPT") { obj.publishScripts(); }; if (obj.getStatus() === "ASK") { if (preferences.consentIsImplied) { obj.publishScripts(); } obj.openMessage(); }; if (obj.getStatus() === "EXPIRED") { if (preferences.consentIsImplied) { obj.publishScripts(); } obj.openMessage(); }; }; this.setDecisionEvent = function() { btnAccept.one("click", function(){ obj.closeMessage(); obj.setConsent(); }); btnDecline.one("click", function(){ obj.closeMessage(); obj.declineConsent(); }); btnRevoke.one("click", function(){ obj.revokeDecision(); obj.evaluateSituation(); }); }; this.openMessage = function() { obj.setDecisionEvent(); element.css("display", "flex").hide().fadeIn(); }; this.closeMessage = function() { element.fadeOut(); }; this.loadExternalScript = function(options) { var parameters = $.extend({ uri: "", type: "js", position: "head" }, options); var defaultPosition = String(parameters.position); var appendix; if (parameters.type === "js") { appendix = document.createElement("script"); appendix.type = "text/javascript"; appendix.src = parameters.uri; } else if (parameters.type === "css") { appendix = document.createElement("link"); appendix.type = "text/css"; appendix.rel = "stylesheet"; appendix.href = parameters.uri; } switch (parameters.position) { case "head": $("head").append(appendix); break; case "body": $("body").append(appendix); break; default: $("#" + defaultPosition).append(appendix); } }; this.init = function() { elmt.appendTo("body"); elmt.addClass("biscuitbox"); obj.evaluateSituation(); }; this.init(); }; $.fn.biscuitBox = function(prefs) { var element = $(this); if (element.data("biscuitbox")) return element.data("biscuitBox"); var biscuitBox = new BiscuitBox(this, prefs); element.data("biscuitbox", biscuitBox); return biscuitBox; }; })(jQuery); return stack;})(stacks.com_barthpartners_biscuitbox3); stacks.com_joeworkman_stacks_totalcms_admin_styles = {}; stacks.com_joeworkman_stacks_totalcms_admin_styles = (function(stack) { var jQuery = stacks.jQuery;var $ = jQuery; $(document).ready(function(){var focusedElement=false;$("body").on("focusin","textarea.format-selection,input.format-selection",function(){focusedElement=$(this);}).on("focusout","textarea.format-selection,input.format-selection",function(){setTimeout(function(){if(focusedElement!==false&&!focusedElement.is(':focus'))focusedElement=false;},500);});$(".totaltip").each(function(){if($("#totaltip").exists()){$(this).remove();} else{$(this).appendTo('body').hide().attr('id','totaltip');}});if($("#totaltip").exists()){stacks.totalMousePos={x:-9999,y:-100};$("body").on("mousemove","textarea.format-selection",function(event){stacks.totalMousePos.x=event.pageX-window.scrollX;stacks.totalMousePos.y=event.pageY-window.scrollY;});$("textarea.format-selection").afterselect(function(){var totaltip=$("#totaltip");totaltip.hide().css({top:stacks.totalMousePos.y+15,left:stacks.totalMousePos.x-15}).fadeIn('fast');$("textarea,input").one("mousedown keydown scroll",function(event){totaltip.removeAttr('style');});$(document).one("scroll",function(event){totaltip.removeAttr('style');});});} $('.totaltip a,.totalbar button').click(function(){if(focusedElement!==false)focusedElement.closest('form.text-form').addClass('unsaved');});$('.totalbar').first().clone().hide().appendTo('body');$("textarea").keydown(function(e){var keyCode=e.keyCode||e.which;if(keyCode==9){e.preventDefault();var selected=focusedElement.textrange();focusedElement.closest('form.text-form').addClass('unsaved');focusedElement.textrange('replace',"\t").trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.end+1);}});$('.totalbar-bold').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),boldRegex=/^\s*\*\*(.+)\*\*.*/,markdown;if(selected.text===''){markdown="**** ";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.end+2);} else if(selected.text.match(boldRegex)){markdown=selected.text.replace(boldRegex,'$1');focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{markdown="**"+selected.text+"**";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-italic').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),italicRegex=/^\s*_(.+)_.*/,markdown;if(selected.text===''){markdown="__ ";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.end+1);} else if(selected.text.match(italicRegex)){markdown=selected.text.replace(italicRegex,'$1');focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{markdown="_"+selected.text+"_";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-header').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),alltext=focusedElement.val(),start=alltext.substr(selected.start-1,1),end=alltext.substr(selected.end,1),h3regex=/^#{3}\s*(.*)/,markdown;if(selected.text===''){markdown="### ";var setcursor=selected.end+4;if(start!=='#'&&start!=="\n"&&selected.start!==0){markdown="\n\n"+markdown;setcursor=setcursor+2;} focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',setcursor);} else if(selected.text.match(h3regex)){markdown=selected.text.replace(h3regex,'$1');focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{var newstart=false,newend=false;markdown="### "+selected.text;if(start!=="\n"&&selected.start!==0){markdown="\n\n"+markdown;newstart=true;} if(end!=="\n"){markdown=markdown+"\n\n";newend=true;} focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();var redo=focusedElement.textrange(),redoStart=redo.start,redoLength=redo.length;if(newstart){redoStart=redoStart+2;redoLength=redoLength-2;} if(newend){redoLength=redoLength-2;} focusedElement.textrange('set',redoStart,redoLength);}}});$('.totalbar-link').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),question=$(this).data('ask')||"Please enter url or email address",answer=$(this).data('answer')||"http://",markdown=false,url;if(selected.text===''){url=prompt(question,answer);if(url!==null&&url!=='')markdown="<"+url+">";} else if(!selected.text.match(/^\s*<\S+>/)&&!selected.text.match(/^\[.+\]\(\S+\)/)){url=prompt(question,answer);if(url!==null&&url!==''){if(url.match(/@/))url='mailto:'+url;markdown="["+selected.text+"]("+url+")";}} if(markdown!==false) focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}});$('.totalbar-list').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),alltext=focusedElement.val(),start=alltext.substr(selected.start-1,1),end=alltext.substr(selected.end,1),startpos=selected.end,newstart=false,newend=false,listRegex=/^\*\s+(.*)/,markdown;if(selected.text===''){markdown="* ";var setcursor=selected.end+2;if(!end.match(/\S/)){markdown=markdown+"\n";} focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',setcursor);} else if(selected.text.match(listRegex)){markdown=selected.text.split(/\n/).map(function(line){return line.replace(listRegex,'$1');}).filter(function(line){return line!=='';}).join("\n");focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{markdown=selected.text.split(/\n/).map(function(line){if(line==='')return'';return line.match(/^\*/)?line:"* "+line;}).join("\n");if(!start.match(/\n/)&&selected.start!==0){markdown="\n\n"+markdown;newstart=true;} if(!end.match(/\n\n/)){markdown=markdown+"\n";newend=true;} focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-numlist').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),alltext=focusedElement.val(),start=alltext.substr(selected.start-1,1),end=alltext.substr(selected.end,1),startpos=selected.end,newstart=false,newend=false,listRegex=/^\d+\.\s+(.*)/,markdown;if(selected.text===''){markdown="1. ";var setcursor=selected.end+2;if(!end.match(/\S/)){markdown=markdown+"\n";} focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',setcursor);} else if(selected.text.match(listRegex)){markdown=selected.text.split(/\n/).map(function(line){return line.replace(listRegex,'$1');}).filter(function(line){return line!=='';}).join("\n");focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{var index=1;markdown=selected.text.split(/\n/).map(function(line){var newline=line.match(/^\d\./)?line:index+". "+line;index=index+1;return newline;}).join("\n");if(!start.match(/\n/)&&selected.start!==0){markdown="\n\n"+markdown;newstart=true;} if(!end.match(/\n\n/)){markdown=markdown+"\n";newend=true;} focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-indent').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange();if(selected.text===''){var alltext=focusedElement.val(),end=alltext.substr(selected.end,1);if(end.match(/[\d\*]/)){markdown="\t";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}} else{markdown=selected.text.split(/\n/).map(function(line){return"\t"+line;}).join("\n");focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-dedent').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange();if(selected.text===''){var alltext=focusedElement.val(),start=alltext.substr(selected.start-1,1),end=alltext.substr(selected.end,1);if(selected.start!==0&&start==="\t"){alltext=alltext.slice(0,selected.start-1)+alltext.slice(selected.start);focusedElement.val(alltext).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.start-1);} else if(end==="\t"){alltext=alltext.slice(0,selected.start)+alltext.slice(selected.start+1);focusedElement.val(alltext).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.start);}} else{markdown=selected.text.split(/\n/).map(function(line){return line.replace(/^\t/,'');}).join("\n");focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-image').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),question=$(this).data('ask')||"Please enter an image url",answer=$(this).data('answer')||"http://",imgRegex=/^\!\[.*\]\(.+\)/;if(!selected.text.match(imgRegex)){var alt=selected.text;var url=prompt(question,answer);if(url!==null&&url!==''){markdown=url.match(imgRegex)?url+' ':"!["+selected.text+"]("+url+") ";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}}});$('.totalbar-blockquote').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange();if(selected.text===''){markdown="\n> ";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.start+1);} else{markdown=selected.text.split(/\n/).map(function(line){var bqRegex=/^\>\s*/;return line.match(bqRegex)?line.replace(bqRegex,''):"> "+line;}).join("\n");focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-code').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),codeStrRegex=/^\s*\`(.+)\`/,markdown;if(selected.text===''){markdown="`` ";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.end+1);} else if(selected.text.match(/\n/)){if(selected.text.match(/\n\t/)){markdown=selected.text.split(/\n/).map(function(line){return line.replace(/^\t(.*)/,'$1');}).filter(function(line){return line!=='';}).join("\n");focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{markdown=selected.text.split(/\n/).map(function(line){return"\t"+line;}).join("\n");focusedElement.textrange('replace',"\n"+markdown).trigger('updateInfo').focus();}} else if(selected.text.match(codeStrRegex)){markdown=selected.text.replace(codeStrRegex,'$1');focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();} else{markdown="`"+selected.text+"`";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();}}});$('.totalbar-rule').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange(),markdown="\n---\n\n";focusedElement.textrange('replace',markdown).trigger('updateInfo').focus();focusedElement.textrange('setcursor',selected.end+6);}});$('.totalbar-erase').click(function(){if(focusedElement!==false){var selected=focusedElement.textrange();var plaintext=selected.text.split(/\n/).map(function(line){line=line.replace(/^#+\s*(.+)/,'$1');line=line.replace(/\*\*(.+?)\*\*/g,'$1');line=line.replace(/\s_(.+?)_\s/g,' $1 ');line=line.replace(/^_(.+?)_$/g,'$1');line=line.replace(/^\t+(.+)/,'$1');line=line.replace(/^\*\s+(.+)/,'$1');line=line.replace(/^\d+\.\s+(.+)/,'$1');line=line.replace(/^\>+\s*(.+)/,'$1');return line;}).join("\n").replace(/\n{3}/g,"\n");focusedElement.textrange('replace',plaintext).trigger('updateInfo').focus();}});$('.totalbar-rewind').click(function(){if(focusedElement!==false){var form=focusedElement.closest('form.total-form'),slug=$('input[name=slug]',form).val(),type=$('input[name=type]',form).val(),get_url=stacks.totalcms.totalapi+'?'+$.param({'slug':slug,'type':type});$.ajax({url:get_url,cache:false,success:function(data){focusedElement.val(data.data);form.removeClass('unsaved');}});}});}); if(Cookies.get('total-interim')){$.ajax({type:'GET',url:"https://passport.weavers.space/total-cms/"+window.location.hostname+"/jsonCallback",async:true,jsonpCallback:'jsonCallback',contentType:"application/json",dataType:'jsonp',success:function(data){data.type='passport';$.debug('Interim Passport Check',data);$.ajax({type:"POST",url:stacks.totalcms.totalapi,headers:stacks.totalcms.requestheaders,data:data,});},error:function(e){console.error('Interim Passport Check Error',e.message);}});} return stack;})(stacks.com_joeworkman_stacks_totalcms_admin_styles); stacks.de_futural_gallerystack3_slider_royal = {}; stacks.de_futural_gallerystack3_slider_royal = (function(stack) { var jQuery = stacks.jQuery;var $ = jQuery;// jQuery RoyalSlider plugin. Copyright Dmitry Semenov http://dimsemenov.com // jquery.royalslider v9.5.7 (function(n){function v(b,f){var c,a=this,e=window.navigator,g=e.userAgent.toLowerCase();a.uid=n.rsModules.uid++;a.ns=".rs"+a.uid;var d=document.createElement("div").style,h=["webkit","Moz","ms","O"],k="",l=0,q;for(c=0;ca.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)|| [];return{browser:a[1]||"",version:a[2]||"0"}}(g);h={};c.browser&&(h[c.browser]=!0,h.version=c.version);h.chrome&&(h.webkit=!0);a._a=h;a.isAndroid=-1 a.numSlides-1&&(a.st.startSlideId=a.numSlides-1):a.st.startSlideId=0;a._o=a.staticSlideId=a.currSlideId=a._u=a.st.startSlideId;a.currSlide=a.slides[a.currSlideId];a._v=0;a.pointerMultitouch=!1;a.slider.addClass((a._h?"rsHor":"rsVer")+(a._l?"":" rsFade"));d='
';a.slidesSpacing=a.st.slidesSpacing;a._w=(a._h?a.slider.width():a.slider.height())+a.st.slidesSpacing;a._x=Boolean(0=a.numSlides&&(a._z=!1);a._a1=a._z&&a._l?2===a.numSlides?1:2:0;a._b1= 6>a.numSlides?a.numSlides:6;a._c1=0;a._d1=0;a.slidesJQ=[];for(c=0;c
'));a._e1=d=n(d+"
");var m=a.ns,k=function(b,c,d,e,f){a._j1=b+c+m;a._k1=b+d+m;a._l1=b+e+m;f&&(a._m1=b+f+m)};c=e.pointerEnabled;a.pointerEnabled=c||e.msPointerEnabled;a.pointerEnabled?(a.hasTouch=!1,a._n1=.2,a.pointerMultitouch=Boolean(1');e=a._p1.children(".rsSlide");a._r1=a.slidesJQ[a.currSlideId];a._s1=0;a._e?(a._t1="transition-property",a._u1="transition-duration",a._v1="transition-timing-function",a._w1=a._x1=a._g+"transform",a._f?(h.webkit&&!h.chrome&&a.slider.addClass("rsWebkit3d"), a._y1="translate3d(",a._z1="px, ",a._a2="px, 0px)"):(a._y1="translate(",a._z1="px, ",a._a2="px)"),a._l?a._p1[a._g+a._t1]=a._g+"transform":(h={},h[a._g+a._t1]="opacity",h[a._g+a._u1]=a.st.transitionSpeed+"ms",h[a._g+a._v1]=a.st.css3easeInOut,e.css(h))):(a._x1="left",a._w1="top");var p;n(window).on("resize"+a.ns,function(){p&&clearTimeout(p);p=setTimeout(function(){a.updateSliderSize()},50)});a.ev.trigger("rsAfterPropsSetup");a.updateSliderSize();a.st.keyboardNavEnabled&&a._b2();a.st.arrowsNavHideOnTouch&& (a.hasTouch||a.pointerMultitouch)&&(a.st.arrowsNav=!1);a.st.arrowsNav&&(e=a._o1,n('
').appendTo(e),a._c2=e.children(".rsArrowLeft").click(function(b){b.preventDefault();a.prev()}),a._d2=e.children(".rsArrowRight").click(function(b){b.preventDefault();a.next()}),a.st.arrowsNavAutoHide&&!a.hasTouch&&(a._c2.addClass("rsHidden"),a._d2.addClass("rsHidden"),e.one("mousemove.arrowshover", function(){a._c2.removeClass("rsHidden");a._d2.removeClass("rsHidden")}),e.hover(function(){a._e2||(a._c2.removeClass("rsHidden"),a._d2.removeClass("rsHidden"))},function(){a._e2||(a._c2.addClass("rsHidden"),a._d2.addClass("rsHidden"))})),a.ev.on("rsOnUpdateNav",function(){a._f2()}),a._f2());if(a.hasTouch&&a.st.sliderTouch||!a.hasTouch&&a.st.sliderDrag)a._p1.on(a._j1,function(b){a._g2(b)});else a.dragSuccess=!1;var r=["rsPlayBtnIcon","rsPlayBtn","rsCloseVideoBtn","rsCloseVideoIcn"];a._p1.click(function(b){if(!a.dragSuccess){var c= n(b.target).attr("class");if(-1!==n.inArray(c,r)&&a.toggleVideo())return!1;if(a.st.navigateByClick&&!a._h2){if(n(b.target).closest(".rsNoDrag",a._r1).length)return!0;a._i2(b)}a.ev.trigger("rsSlideClick",b)}}).on("click.rs","a",function(b){if(a.dragSuccess)return!1;a._h2=!0;setTimeout(function(){a._h2=!1},3)});a.ev.trigger("rsAfterInit")}n.rsModules||(n.rsModules={uid:0});v.prototype={constructor:v,_i2:function(b){b=b[this._h?"pageX":"pageY"]-this._j2;b>=this._q?this.next():0>b&&this.prev()},_t:function(){var b; b=this.st.numImagesToPreload;if(this._z=this.st.loop)2===this.numSlides?(this._z=!1,this.st.loopRewind=!0):2>this.numSlides&&(this.st.loopRewind=this._z=!1);this._z&&0=this.numSlides?b=1:this.st.numImagesToPreload>(this.numSlides-1)/2&&(b=Math.floor((this.numSlides-1)/2)));this._y=b},_s:function(b,f){function c(b,c){c?g.images.push(b.attr(c)):g.images.push(b.text());if(h){h=!1;g.caption="src"===c?b.attr("alt"):b.contents();g.image=g.images[0];g.videoURL=b.attr("data-rsVideo");var d=b.attr("data-rsw"), e=b.attr("data-rsh");"undefined"!==typeof d&&!1!==d&&"undefined"!==typeof e&&!1!==e?(g.iW=parseInt(d,10),g.iH=parseInt(e,10)):a.st.imgWidth&&a.st.imgHeight&&(g.iW=a.st.imgWidth,g.iH=a.st.imgHeight)}}var a=this,e,g={},d,h=!0;b=n(b);a._k2=b;a.ev.trigger("rsBeforeParseNode",[b,g]);if(!g.stopParsing)return b=a._k2,g.id=a._r,g.contentAdded=!1,a._r++,g.images=[],g.isBig=!1,g.hasCover||(b.hasClass("rsImg")?(d=b,e=!0):(d=b.find(".rsImg"),d.length&&(e=!0)),e?(g.bigImage=d.eq(0).attr("data-rsBigImg"),d.each(function(){var a= n(this);a.is("a")?c(a,"href"):a.is("img")?c(a,"src"):c(a)})):b.is("img")&&(b.addClass("rsImg rsMainSlideImage"),c(b,"src"))),d=b.find(".rsCaption"),d.length&&(g.caption=d.remove()),g.content=b,a.ev.trigger("rsAfterParseNode",[b,g]),f&&a.slides.push(g),0===g.images.length&&(g.isLoaded=!0,g.isRendered=!1,g.isLoading=!1,g.images=null),g},_b2:function(){var b=this,f,c,a=function(a){37===a?b.prev():39===a&&b.next()};b._b.on("keydown"+b.ns,function(e){if(!b.st.keyboardNavEnabled)return!0;if(!(b._l2||(c= e.keyCode,37!==c&&39!==c||f))){if(document.activeElement&&/(INPUT|SELECT|TEXTAREA)/i.test(document.activeElement.tagName))return!0;b.isFullscreen&&e.preventDefault();a(c);f=setInterval(function(){a(c)},700)}}).on("keyup"+b.ns,function(a){f&&(clearInterval(f),f=null)})},goTo:function(b,f){b!==this.currSlideId&&this._m2(b,this.st.transitionSpeed,!0,!f)},destroy:function(b){this.ev.trigger("rsBeforeDestroy");this._b.off("keydown"+this.ns+" keyup"+this.ns+" "+this._k1+" "+this._l1);this._p1.off(this._j1+ " click");this.slider.data("royalSlider",null);n.removeData(this.slider,"royalSlider");n(window).off("resize"+this.ns);this.loadingTimeout&&clearTimeout(this.loadingTimeout);b&&this.slider.remove();this.ev=this.slider=this.slides=null},_n2:function(b,f){function c(c,f,g){c.isAdded?(a(f,c),e(f,c)):(g||(g=d.slidesJQ[f]),c.holder?g=c.holder:(g=d.slidesJQ[f]=n(g),c.holder=g),c.appendOnLoaded=!1,e(f,c,g),a(f,c),d._p2(c,g,b),c.isAdded=!0)}function a(a,c){c.contentAdded||(d.setItemHtml(c,b),b||(c.contentAdded= !0))}function e(a,b,c){d._l&&(c||(c=d.slidesJQ[a]),c.css(d._i,(a+d._d1+p)*d._w))}function g(a){if(l){if(a>q-1)return g(a-q);if(0>a)return g(q+a)}return a}var d=this,h,k,l=d._z,q=d.numSlides;if(!isNaN(f))return g(f);var m=d.currSlideId,p,r=b?Math.abs(d._o2-d.currSlideId)>=d.numSlides-1?0:1:d._y,t=Math.min(2,r),w=!1,v=!1,u;for(k=m;km-1-t;k--)if(u=g(k),(h=d.slides[u])&&(!h.isAdded||!h.positionSet)){v=!0;break}if(w)for(k= m;km-1-r;k--)u=g(k),p=Math.floor((d._u-(m-k))/q)*q,(h=d.slides[u])&&c(h,u);if(!b)for(t=g(m-r),m=g(m+r),r=t>m?0:t,k=0;km&&k>t-1||!(km)||(h=d.slides[k])&&h.holder&&(h.holder.detach(),h.isAdded=!1)},setItemHtml:function(b,f){var c=this,a=function(){if(!b.images)b.isRendered=!0,b.isLoaded=!0,b.isLoading=!1,d(!0);else if(!b.isLoading){var a,f;b.content.hasClass("rsImg")?(a=b.content, f=!0):a=b.content.find(".rsImg:not(img)");a&&!a.is("img")&&a.each(function(){var a=n(this),c='';f?b.content=n(c):a.replaceWith(c)});a=f?b.content:b.content.find("img.rsImg");k();a.eq(0).addClass("rsMainSlideImage");b.iW&&b.iH&&(b.isLoaded||c._q2(b),d());b.isLoading=!0;if(b.isBig)n("").on("load.rs error.rs",function(a){n(this).off("load.rs error.rs");e([this],!0)}).attr("src",b.image);else{b.loaded=[];b.numStartedLoad=0;a=function(a){n(this).off("load.rs error.rs"); b.loaded.push(this);b.loaded.length===b.numStartedLoad&&e(b.loaded,!1)};for(var g=0;g");b.numStartedLoad++;h.on("load.rs error.rs",a).attr("src",b.images[g])}}}},e=function(a,c){if(a.length){var d=a[0];if(c!==b.isBig)(d=b.holder.children())&&1this._n3?g=this._h3+a*this._n1:g=this.currSlideId&&0=this.numSlides-1&&0>d-this._d3&&(g=this._h3+a*this._n1));this._h3=g;200a){if(!g)b.preventDefault(), c._z2="y";else if(e){c._v3(b);return}c._l3=!0}}},_v3:function(b,f){this._r3=!0;this._a3=this._l2=!1;this._y2(b)},_y2:function(b,f){function c(a){return 100>a?100:500=t)a(!0,d);else{if(!v&&!f)if(0>=r){if(0=t-1&&0>w){a(!0,d);return}if(f){h=e._i3;if(h>e._n3)h=e._n3;else if(hl?(l+=e._z3/(15/(m/d*.003)),d=d*l/m,m=l):0>g&&m>p&&(p+=e._z3/(15/(m/d*.003)),d=d*p/m,m=p);l=Math.max(Math.round(d/ .003),50);h+=m*(0>g?-1:1);if(h>e._n3){e._a4(h,l,!0,e._n3,200);return}if(hq&&b++;return b},p+qw?a(!1,d):(l=l(m-p),e._m2(e.currSlideId-l,c(Math.abs(e._p-(-e._u-e._d1+l)*e._w)/d),!1,!0,!0)):p-q>m?0this.numSlides)f=this.numSlides;this.slides.splice(f,0,c);this.slidesJQ.splice(f,0,n('
'));f<=this.currSlideId&&this.currSlideId++;this.ev.trigger("rsOnAppendSlide", [c,f]);this._f4(f);f===this.currSlideId&&this.ev.trigger("rsAfterSlideChange")},removeSlide:function(b){var f=this.slides[b];f&&(f.holder&&f.holder.remove(),b=f._u?0:Math.floor(f._u/b);f.numSlides=f.slides.length;0===f.numSlides?(f.currSlideId=f._d1=f._u= 0,f.currSlide=f._g4=null):f._u=b*f.numSlides+f.currSlideId;for(b=0;b=f.numSlides?f.goTo(f.numSlides-1):0>f.currSlideId&&f.goTo(0);f._t();f._l&&f._p1.css(f._g+f._u1,"0ms");f._h4&&clearTimeout(f._h4);f._h4=setTimeout(function(){f._l&&f._p3((-f._u-f._d1)*f._w);f._n2();f._l||f._r1.css({display:"block",opacity:1})},14);f.ev.trigger("rsOnUpdateNav")},_i1:function(){this._f1&&this._l&&(this._g1? this._e1.css("cursor",this._g1):(this._e1.removeClass("grabbing-cursor"),this._e1.addClass("grab-cursor")))},_w2:function(){this._f1&&this._l&&(this._h1?this._e1.css("cursor",this._h1):(this._e1.removeClass("grab-cursor"),this._e1.addClass("grabbing-cursor")))},next:function(b){this._m2("next",this.st.transitionSpeed,!0,!b)},prev:function(b){this._m2("prev",this.st.transitionSpeed,!0,!b)},_m2:function(b,f,c,a,e){var g=this,d,h,k;g.ev.trigger("rsBeforeMove",[b,a]);k="next"===b?g.currSlideId+1:"prev"=== b?g.currSlideId-1:b=parseInt(b,10);if(!g._z){if(0>k){g._i4("left",!a);return}if(k>=g.numSlides){g._i4("right",!a);return}}g._r2&&(g._u2(!0),c=!1);h=k-g.currSlideId;k=g._o2=g.currSlideId;var l=g.currSlideId+h;a=g._u;var n;g._z?(l=g._n2(!1,l),a+=h):a=l;g._o=l;g._g4=g.slidesJQ[g.currSlideId];g._u=a;g.currSlideId=g._o;g.currSlide=g.slides[g.currSlideId];g._r1=g.slidesJQ[g.currSlideId];var l=g.st.slidesDiff,m=Boolean(0g.numSlides-1?p=g.numSlides-1:0>p&&(p=0);k=m?p-k:k-p;k>g._y&&(k=g._y);if(h>k+l)for(g._d1+=(h-(k+l))*(m?-1:1),f*=1.4,k=0;k=this.numSlides?(this._c2.css("display","none"),this._d2.css("display","none")):(this._c2.css("display", "block"),this._d2.css("display","block"),this._z||this.st.loopRewind||(0===this.currSlideId?this._c2.addClass("rsArrowDisabled"):this._c2.removeClass("rsArrowDisabled"),this.currSlideId===this.numSlides-1?this._d2.addClass("rsArrowDisabled"):this._d2.removeClass("rsArrowDisabled"))))},_x3:function(b,f,c,a,e){function g(){var a;h&&(a=h.data("rsTimeout"))&&(h!==k&&h.css({opacity:0,display:"none",zIndex:0}),clearTimeout(a),h.data("rsTimeout",""));if(a=k.data("rsTimeout"))clearTimeout(a),k.data("rsTimeout", "")}var d=this,h,k,l={};isNaN(d._c)&&(d._c=400);d._p=d._h3=b;d.ev.trigger("rsBeforeAnimStart");d._e?d._l?(d._c=parseInt(d._c,10),c=d._g+d._v1,l[d._g+d._u1]=d._c+"ms",l[c]=a?n.rsCSS3Easing[d.st.easeInOut]:n.rsCSS3Easing[d.st.easeOut],d._p1.css(l),a||!d.hasTouch?setTimeout(function(){d._p3(b)},5):d._p3(b)):(d._c=d.st.transitionSpeed,h=d._g4,k=d._r1,k.data("rsTimeout")&&k.css("opacity",0),g(),h&&h.data("rsTimeout",setTimeout(function(){l[d._g+d._u1]="0ms";l.zIndex=0;l.display="none";h.data("rsTimeout", "");h.css(l);setTimeout(function(){h.css("opacity",0)},16)},d._c+60)),l.display="block",l.zIndex=d._m,l.opacity=0,l[d._g+d._u1]="0ms",l[d._g+d._v1]=n.rsCSS3Easing[d.st.easeInOut],k.css(l),k.data("rsTimeout",setTimeout(function(){k.css(d._g+d._u1,d._c+"ms");k.data("rsTimeout",setTimeout(function(){k.css("opacity",1);k.data("rsTimeout","")},20))},20))):d._l?(l[d._h?d._x1:d._w1]=b+"px",d._p1.animate(l,d._c,a?d.st.easeInOut:d.st.easeOut)):(h=d._g4,k=d._r1,k.stop(!0,!0).css({opacity:0,display:"block", zIndex:d._m}),d._c=d.st.transitionSpeed,k.animate({opacity:1},d._c,d.st.easeInOut),g(),h&&h.data("rsTimeout",setTimeout(function(){h.stop(!0,!0).css({opacity:0,display:"none",zIndex:0})},d._c+60)));d._r2=!0;d.loadingTimeout&&clearTimeout(d.loadingTimeout);d.loadingTimeout=e?setTimeout(function(){d.loadingTimeout=null;e.call()},d._c+60):setTimeout(function(){d.loadingTimeout=null;d._k4(f)},d._c+60)},_u2:function(b){this._r2=!1;clearTimeout(this.loadingTimeout);if(this._l)if(!this._e)this._p1.stop(!0), this._p=parseInt(this._p1.css(this._h?this._x1:this._w1),10);else{if(!b){b=this._p;var f=this._h3=this._l4();this._p1.css(this._g+this._u1,"0ms");b!==f&&this._p3(f)}}else 20h||l>q)&&(d="fit");if("fill"===d||"fit"===d)m=h/k,p=q/l,m="fill"==d?m>p?m:p:"fit"==d?m';a._k5=b=c(b+"");a._l5=b.appendTo(a.slider).children();a._k5.on("click.rs",".rsNavItem",function(b){a._m5||a.goTo(c(this).index())})}),a.ev.on("rsOnAppendSlide",function(b,c,d){d>=a.numSlides?a._k5.append('
'): a._l5.eq(d).before('
');a._l5=a._k5.children()}),a.ev.on("rsOnRemoveSlide",function(b,c){var d=a._l5.eq(c);d&&d.length&&(d.remove(),a._l5=a._k5.children())}),a.ev.on("rsOnUpdateNav",function(){var b=a.currSlideId;a._n5&&a._n5.removeClass("rsNavSelected");b=a._l5.eq(b);b.addClass("rsNavSelected");a._n5=b}))}});c.rsModules.bullets=c.rsProto._i5})(jQuery); // jquery.rs.thumbnails v1.0.8 (function(f){f.extend(f.rsProto,{_h6:function(){var a=this;"thumbnails"===a.st.controlNavigation&&(a._i6={drag:!0,touch:!0,orientation:"horizontal",navigation:!0,arrows:!0,arrowLeft:null,arrowRight:null,spacing:4,arrowsAutoHide:!1,appendSpan:!1,transitionSpeed:600,autoCenter:!0,fitInViewport:!0,firstMargin:!0,paddingTop:0,paddingBottom:0},a.st.thumbs=f.extend({},a._i6,a.st.thumbs),a._j6=!0,!1===a.st.thumbs.firstMargin?a.st.thumbs.firstMargin=0:!0===a.st.thumbs.firstMargin&&(a.st.thumbs.firstMargin= a.st.thumbs.spacing),a.ev.on("rsBeforeParseNode",function(a,b,c){b=f(b);c.thumbnail=b.find(".rsTmb").remove();c.thumbnail.length?c.thumbnail=f(document.createElement("div")).append(c.thumbnail).html():(c.thumbnail=b.attr("data-rsTmb"),c.thumbnail||(c.thumbnail=b.find(".rsImg").attr("data-rsTmb")),c.thumbnail=c.thumbnail?'':"")}),a.ev.one("rsAfterPropsSetup",function(){a._k6()}),a._n5=null,a.ev.on("rsOnUpdateNav",function(){var e=f(a._l5[a.currSlideId]);e!==a._n5&&(a._n5&& (a._n5.removeClass("rsNavSelected"),a._n5=null),a._l6&&a._m6(a.currSlideId),a._n5=e.addClass("rsNavSelected"))}),a.ev.on("rsOnAppendSlide",function(e,b,c){e="'+a._o6+b.thumbnail+"";a._e&&a._s3.css(a._g+"transition-duration","0ms");c>=a.numSlides?a._s3.append(e):a._l5.eq(c).before(e);a._l5=a._s3.children();a.updateThumbsSize(!0)}),a.ev.on("rsOnRemoveSlide",function(e,b){var c=a._l5.eq(b);c&&(a._e&&a._s3.css(a._g+"transition-duration","0ms"),c.remove(), a._l5=a._s3.children(),a.updateThumbsSize(!0))}))},_k6:function(){var a=this,e="rsThumbs",b=a.st.thumbs,c="",g,d,h=b.spacing;a._j5=!0;a._e3="vertical"===b.orientation?!1:!0;a._n6=g=h?' style="margin-'+(a._e3?"right":"bottom")+":"+h+'px;"':"";a._i3=0;a._p6=!1;a._m5=!1;a._l6=!1;a._q6=b.arrows&&b.navigation;d=a._e3?"Hor":"Ver";a.slider.addClass("rsWithThumbs rsWithThumbs"+d);c+='
';a._o6=b.appendSpan?'': "";for(var k=0;k'+d.thumbnail+a._o6+"
";c=f(c+"
");g={};b.paddingTop&&(g[a._e3?"paddingTop":"paddingLeft"]=b.paddingTop);b.paddingBottom&&(g[a._e3?"paddingBottom":"paddingRight"]=b.paddingBottom);c.css(g);a._s3=f(c).find("."+e+"Container");a._q6&&(e+="Arrow",b.arrowLeft?a._r6=b.arrowLeft:(a._r6=f('
'),c.append(a._r6)),b.arrowRight?a._s6=b.arrowRight: (a._s6=f('
'),c.append(a._s6)),a._r6.click(function(){var b=(Math.floor(a._i3/a._t6)+a._u6)*a._t6+a.st.thumbs.firstMargin;a._a4(b>a._n3?a._n3:b)}),a._s6.click(function(){var b=(Math.floor(a._i3/a._t6)-a._u6)*a._t6+a.st.thumbs.firstMargin;a._a4(bthis._z3?(a===this.numSlides-1&&(b=1),d=-a+this._u6-2+b,c=d*this._t6+this._z3%this._t6+this._v6-this._n3):0!==a?(a-1)*this._t6<=-this._i3+this._n3&&a-1<=this.numSlides-this._u6&&(c=(-a+1)*this._t6+ this._n3):c=this._n3,c!==this._i3&&(b=void 0===c?this._i3:c,b>this._n3?this._q3(this._n3):b':"")}),a.ev.one("rsAfterPropsSetup",function(){a._g6()}),a.ev.on("rsOnAppendSlide", function(c,d,b){b>=a.numSlides?a._k5.append('
'+d.thumbnail+"
"):a._l5.eq(b).before('
'+item.thumbnail+"
");a._l5=a._k5.children()}),a.ev.on("rsOnRemoveSlide",function(c,d){var b=a._l5.eq(d);b&&(b.remove(),a._l5=a._k5.children())}),a.ev.on("rsOnUpdateNav",function(){var c=a.currSlideId;a._n5&&a._n5.removeClass("rsNavSelected");c=a._l5.eq(c);c.addClass("rsNavSelected");a._n5=c}))},_g6:function(){var a=this,c;a._j5=!0;c='
'; for(var d=0;d'+a.slides[d].thumbnail+"
";c=e(c+"");a._k5=c;a._l5=c.children(".rsNavItem");a.slider.append(c);a._k5.click(function(b){b=e(b.target).closest(".rsNavItem");b.length&&a.goTo(b.index())})}});e.rsModules.tabs=e.rsProto._f6})(jQuery); // jquery.rs.fullscreen v1.0.6 (function(c){c.extend(c.rsProto,{_q5:function(){var a=this;a._r5={enabled:!1,keyboardNav:!0,buttonFS:!0,nativeFS:!1,doubleTap:!0};a.st.fullscreen=c.extend({},a._r5,a.st.fullscreen);if(a.st.fullscreen.enabled)a.ev.one("rsBeforeSizeSet",function(){a._s5()})},_s5:function(){var a=this;a._t5=!a.st.keyboardNavEnabled&&a.st.fullscreen.keyboardNav;if(a.st.fullscreen.nativeFS){var b={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"", prefix:""},d=["webkit","moz","o","ms","khtml"];if("undefined"!=typeof document.cancelFullScreen)b.supportsFullScreen=!0;else for(var e=0,f=d.length;e
').appendTo(a._o1).on("click.rs",function(){a.isFullscreen?a.exitFullscreen():a.enterFullscreen()}))},enterFullscreen:function(a){var b= this;if(b._u5)if(a)b._u5.requestFullScreen(c("html")[0]);else{b._b.on(b._u5.fullScreenEventName,function(a){b._u5.isFullScreen()?b.enterFullscreen(!0):b.exitFullscreen(!0)});b._u5.requestFullScreen(c("html")[0]);return}if(!b._w5){b._w5=!0;b._b.on("keyup"+b.ns+"fullscreen",function(a){27===a.keyCode&&b.exitFullscreen()});b._t5&&b._b2();a=c(window);b._x5=a.scrollTop();b._y5=a.scrollLeft();b._z5=c("html").attr("style");b._a6=c("body").attr("style");b._b6=b.slider.attr("style");c("body, html").css({overflow:"hidden", height:"100%",width:"100%",margin:"0",padding:"0"});b.slider.addClass("rsFullscreen");var d;for(d=0;d':'';a.content.hasClass("rsImg")?a.content=c(d):a.content.find(".rsImg").eq(0).replaceWith(d);a.isLoaded||a.isLoading||!a.holder||a.holder.html(a.content)}});c.rsModules.fullscreen=c.rsProto._q5})(jQuery); // jquery.rs.autoplay v1.0.5 (function(b){b.extend(b.rsProto,{_x4:function(){var a=this,d;a._y4={enabled:!1,stopAtAction:!0,pauseOnHover:!0,delay:2E3};!a.st.autoPlay&&a.st.autoplay&&(a.st.autoPlay=a.st.autoplay);a.st.autoPlay=b.extend({},a._y4,a.st.autoPlay);a.st.autoPlay.enabled&&(a.ev.on("rsBeforeParseNode",function(a,c,f){c=b(c);if(d=c.attr("data-rsDelay"))f.customDelay=parseInt(d,10)}),a.ev.one("rsAfterInit",function(){a._z4()}),a.ev.on("rsBeforeDestroy",function(){a.stopAutoPlay();a.slider.off("mouseenter mouseleave");b(window).off("blur"+ a.ns+" focus"+a.ns)}))},_z4:function(){var a=this;a.startAutoPlay();a.ev.on("rsAfterContentSet",function(b,e){a._l2||a._r2||!a._a5||e!==a.currSlide||a._b5()});a.ev.on("rsDragRelease",function(){a._a5&&a._c5&&(a._c5=!1,a._b5())});a.ev.on("rsAfterSlideChange",function(){a._a5&&a._c5&&(a._c5=!1,a.currSlide.isLoaded&&a._b5())});a.ev.on("rsDragStart",function(){a._a5&&(a.st.autoPlay.stopAtAction?a.stopAutoPlay():(a._c5=!0,a._d5()))});a.ev.on("rsBeforeMove",function(b,e,c){a._a5&&(c&&a.st.autoPlay.stopAtAction? a.stopAutoPlay():(a._c5=!0,a._d5()))});a._e5=!1;a.ev.on("rsVideoStop",function(){a._a5&&(a._e5=!1,a._b5())});a.ev.on("rsVideoPlay",function(){a._a5&&(a._c5=!1,a._d5(),a._e5=!0)});b(window).on("blur"+a.ns,function(){a._a5&&(a._c5=!0,a._d5())}).on("focus"+a.ns,function(){a._a5&&a._c5&&(a._c5=!1,a._b5())});a.st.autoPlay.pauseOnHover&&(a._f5=!1,a.slider.hover(function(){a._a5&&(a._c5=!1,a._d5(),a._f5=!0)},function(){a._a5&&(a._f5=!1,a._b5())}))},toggleAutoPlay:function(){this._a5?this.stopAutoPlay(): this.startAutoPlay()},startAutoPlay:function(){this._a5=!0;this.currSlide.isLoaded&&this._b5()},stopAutoPlay:function(){this._e5=this._f5=this._c5=this._a5=!1;this._d5()},_b5:function(){var a=this;a._f5||a._e5||(a._g5=!0,a._h5&&clearTimeout(a._h5),a._h5=setTimeout(function(){var b;a._z||a.st.loopRewind||(b=!0,a.st.loopRewind=!0);a.next(!0);b&&(a.st.loopRewind=!1)},a.currSlide.customDelay?a.currSlide.customDelay:a.st.autoPlay.delay))},_d5:function(){this._f5||this._e5||(this._g5=!1,this._h5&&(clearTimeout(this._h5), this._h5=null))}});b.rsModules.autoplay=b.rsProto._x4})(jQuery); // jquery.rs.video v1.1.3 (function(f){f.extend(f.rsProto,{_z6:function(){var a=this;a._a7={autoHideArrows:!0,autoHideControlNav:!1,autoHideBlocks:!1,autoHideCaption:!1,disableCSS3inFF:!0,youTubeCode:'',vimeoCode:''};a.st.video=f.extend({},a._a7, a.st.video);a.ev.on("rsBeforeSizeSet",function(){a._b7&&setTimeout(function(){var b=a._r1,b=b.hasClass("rsVideoContainer")?b:b.find(".rsVideoContainer");a._c7&&a._c7.css({width:b.width(),height:b.height()})},32)});var d=a._a.mozilla;a.ev.on("rsAfterParseNode",function(b,c,e){b=f(c);if(e.videoURL){a.st.video.disableCSS3inFF&&d&&(a._e=a._f=!1);c=f('
');var g=f('
');b.hasClass("rsImg")? e.content=c.append(b).append(g):e.content.find(".rsImg").wrap(c).after(g)}});a.ev.on("rsAfterSlideChange",function(){a.stopVideo()})},toggleVideo:function(){return this._b7?this.stopVideo():this.playVideo()},playVideo:function(){var a=this;if(!a._b7){var d=a.currSlide;if(!d.videoURL)return!1;a._d7=d;var b=a._e7=d.content,d=d.videoURL,c,e;d.match(/youtu\.be/i)||d.match(/youtube\.com/i)?(e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,(e=d.match(e))&&11==e[7].length&& (c=e[7]),void 0!==c&&(a._c7=a.st.video.youTubeCode.replace("stacks_in_1_page7",c))):d.match(/vimeo\.com/i)&&(e=/(www\.)?vimeo.com\/(\d+)($|\/)/,(e=d.match(e))&&(c=e[2]),void 0!==c&&(a._c7=a.st.video.vimeoCode.replace("stacks_in_1_page7",c)));a.videoObj=f(a._c7);a.ev.trigger("rsOnCreateVideoElement",[d]);a.videoObj.length&&(a._c7=f('
'),a._c7.find(".rsPreloader").after(a.videoObj),b=b.hasClass("rsVideoContainer")? b:b.find(".rsVideoContainer"),a._c7.css({width:b.width(),height:b.height()}).find(".rsCloseVideoBtn").off("click.rsv").on("click.rsv",function(b){a.stopVideo();b.preventDefault();b.stopPropagation();return!1}),b.append(a._c7),a.isIPAD&&b.addClass("rsIOSVideo"),a._f7(!1),setTimeout(function(){a._c7.addClass("rsVideoActive")},10),a.ev.trigger("rsVideoPlay"),a._b7=!0);return!0}return!1},stopVideo:function(){var a=this;return a._b7?(a.isIPAD&&a.slider.find(".rsCloseVideoBtn").remove(),a._f7(!0),setTimeout(function(){a.ev.trigger("rsOnDestroyVideoElement", [a.videoObj]);var d=a._c7.find("iframe");if(d.length)try{d.attr("src","")}catch(b){}a._c7.remove();a._c7=null},16),a.ev.trigger("rsVideoStop"),a._b7=!1,!0):!1},_f7:function(a,d){var b=[],c=this.st.video;c.autoHideArrows&&(this._c2&&(b.push(this._c2,this._d2),this._e2=!a),this._v5&&b.push(this._v5));c.autoHideControlNav&&this._k5&&b.push(this._k5);c.autoHideBlocks&&this._d7.animBlocks&&b.push(this._d7.animBlocks);c.autoHideCaption&&this.globalCaption&&b.push(this.globalCaption);this.slider[a?"removeClass": "addClass"]("rsVideoPlaying");if(b.length)for(c=0;c=d.delay?12:d.delay))})}});l.rsModules.animatedBlocks=l.rsProto._p4})(jQuery); // jquery.rs.auto-height v1.0.3 (function(b){b.extend(b.rsProto,{_w4:function(){var a=this;if(a.st.autoHeight){var b,c,e,f=!0,d=function(d){e=a.slides[a.currSlideId];(b=e.holder)&&(c=b.height())&&void 0!==c&&c>(a.st.minAutoHeight||30)&&(a._c4=c,a._e||!d?a._e1.css("height",c):a._e1.stop(!0,!0).animate({height:c},a.st.transitionSpeed),a.ev.trigger("rsAutoHeightChange",c),f&&(a._e&&setTimeout(function(){a._e1.css(a._g+"transition","height "+a.st.transitionSpeed+"ms ease-in-out")},16),f=!1))};a.ev.on("rsMaybeSizeReady.rsAutoHeight", function(a,b){e===b&&d()});a.ev.on("rsAfterContentSet.rsAutoHeight",function(a,b){e===b&&d()});a.slider.addClass("rsAutoHeight");a.ev.one("rsAfterInit",function(){setTimeout(function(){d(!1);setTimeout(function(){a.slider.append('
')},16)},16)});a.ev.on("rsBeforeAnimStart",function(){d(!0)});a.ev.on("rsBeforeSizeSet",function(){setTimeout(function(){d(!1)},16)})}}});b.rsModules.autoHeight=b.rsProto._w4})(jQuery); // jquery.rs.global-caption v1.0.1 (function(b){b.extend(b.rsProto,{_d6:function(){var a=this;a.st.globalCaption&&(a.ev.on("rsAfterInit",function(){a.globalCaption=b('
').appendTo(a.st.globalCaptionInside?a._e1:a.slider);a.globalCaption.html(a.currSlide.caption||"")}),a.ev.on("rsBeforeAnimStart",function(){a.globalCaption.html(a.currSlide.caption||"")}))}});b.rsModules.globalCaption=b.rsProto._d6})(jQuery); // jquery.rs.active-class v1.0.1 (function(c){c.rsProto._o4=function(){var b,a=this;if(a.st.addActiveClass)a.ev.on("rsOnUpdateNav",function(){b&&clearTimeout(b);b=setTimeout(function(){a._g4&&a._g4.removeClass("rsActiveSlide");a._r1&&a._r1.addClass("rsActiveSlide");b=null},50)})};c.rsModules.activeClass=c.rsProto._o4})(jQuery); // jquery.rs.deeplinking v1.0.6 + jQuery hashchange plugin v1.3 Copyright (c) 2010 Ben Alman (function(b){b.extend(b.rsProto,{_o5:function(){var a=this,h,d,f;a._p5={enabled:!1,change:!1,prefix:""};a.st.deeplinking=b.extend({},a._p5,a.st.deeplinking);if(a.st.deeplinking.enabled){var g=a.st.deeplinking.change,e=a.st.deeplinking.prefix,c="#"+e,k=function(){var a=window.location.hash;return a&&0b||(b>a.numSlides-1&&(b=a.numSlides-1), a.goTo(b)))}),a.ev.on("rsBeforeAnimStart",function(){d&&clearTimeout(d);f&&clearTimeout(f)}),a.ev.on("rsAfterSlideChange",function(){d&&clearTimeout(d);f&&clearTimeout(f);f=setTimeout(function(){h=!0;window.location.replace((""+window.location).split("#")[0]+c+(a.currSlideId+1));d=setTimeout(function(){h=!1;d=null},60)},400)}));a.ev.on("rsBeforeDestroy",function(){d=f=null;g&&b(window).off("hashchange"+a.ns)})}}});b.rsModules.deeplinking=b.rsProto._o5})(jQuery); (function(b,a,h){function d(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}"$:nomunge";var f=document,g,e=b.event.special,c=f.documentMode,k="onhashchange"in a&&(c===h||7').hide().one("load",function(){c||m(d());g()}).attr("src",c||"javascript:0").insertAfter("body")[0].contentWindow,f.onpropertychange= function(){try{"title"===event.propertyName&&(a.document.title=f.title)}catch(b){}})};e.stop=n;q=function(){return d(a.location.href)};m=function(c,e){var d=a.document,g=b.fn.hashchange.domain;c!==e&&(d.title=f.title,d.open(),g&&d.write('