filebrowser/assets/js/plugins.min.js

12 lines
367 KiB
JavaScript
Raw Normal View History

2015-09-19 13:25:35 +00:00
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){function c(a){var b="length"in a&&a.length,c=_.type(a);return"function"===c||_.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}function d(a,b,c){if(_.isFunction(b))return _.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return _.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(ha.test(b))return _.filter(b,a,c);b=_.filter(b,a)}return _.grep(a,function(a){return U.call(b,a)>=0!==c})}function e(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function f(a){var b=oa[a]={};return _.each(a.match(na)||[],function(a,c){b[c]=!0}),b}function g(){Z.removeEventListener("DOMContentLoaded",g,!1),a.removeEventListener("load",g,!1),_.ready()}function h(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=_.expando+h.uid++}function i(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(ua,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:ta.test(c)?_.parseJSON(c):c}catch(e){}sa.set(a,b,c)}else c=void 0;return c}function j(){return!0}function k(){return!1}function l(){try{return Z.activeElement}catch(a){}}function m(a,b){return _.nodeName(a,"table")&&_.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function n(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function o(a){var b=Ka.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function p(a,b){for(var c=0,d=a.length;d>c;c++)ra.set(a[c],"globalEval",!b||ra.get(b[c],"globalEval"))}function q(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(ra.hasData(a)&&(f=ra.access(a),g=ra.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)_.event.add(b,e,j[e][c])}sa.hasData(a)&&(h=sa.access(a),i=_.extend({},h),sa.set(b,i))}}function r(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&_.nodeName(a,b)?_.merge([a],c):c}function s(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ya.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function t(b,c){var d,e=_(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:_.css(e[0],"display");return e.detach(),f}function u(a){var b=Z,c=Oa[a];return c||(c=t(a,b),"none"!==c&&c||(Na=(Na||_("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=Na[0].contentDocument,b.write(),b.close(),c=t(a,b),Na.detach()),Oa[a]=c),c}function v(a,b,c){var d,e,f,g,h=a.style;return c=c||Ra(a),c&&(g=c.getPropertyValue(b)||c[b]),c&&(""!==g||_.contains(a.ownerDocument,a)||(g=_.style(a,b)),Qa.test(g)&&Pa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function w(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}function x(a,b){if(b in a)return b;for(var c=b[0].toUpperCase()+b.slice(1),d=b,e=Xa.length;e--;)if(b=Xa[e]+c,b in a)return b;return d}function y(a,b,c){var d=Ta.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function z(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=_.css(a,c+wa[f],!0,e)),d?("content"===c&&(g-=_.css(a,"padding"+wa[f],!0,e)),"margin"!==c&&(g-=_.css(a,"border"+wa[f]+"Width",!0,e))):(g+=_.css(a,"padding"+wa[f],!0,e),"padding"!==c&&(g+=_.css(a,"border"+wa[f]+"Width",!0,e)));return g}function A(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ra(a),g="border-box"===_.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=v(a,b,f),(0>e||null==e)&&(e=a.style[b]),Qa.test(e
if("string"!=typeof a)return this.pushStack(_(a).filter(function(){for(b=0;c>b;b++)if(_.contains(e[b],this))return!0}));for(b=0;c>b;b++)_.find(a,e[b],d);return d=this.pushStack(c>1?_.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(d(this,a||[],!1))},not:function(a){return this.pushStack(d(this,a||[],!0))},is:function(a){return!!d(this,"string"==typeof a&&fa.test(a)?_(a):a||[],!1).length}});var ia,ja=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ka=_.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:ja.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||ia).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof _?b[0]:b,_.merge(this,_.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:Z,!0)),ga.test(c[1])&&_.isPlainObject(b))for(c in b)_.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=Z.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=Z,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):_.isFunction(a)?"undefined"!=typeof ia.ready?ia.ready(a):a(_):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),_.makeArray(a,this))};ka.prototype=_.fn,ia=_(Z);var la=/^(?:parents|prev(?:Until|All))/,ma={children:!0,contents:!0,next:!0,prev:!0};_.extend({dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&_(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),_.fn.extend({has:function(a){var b=_(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(_.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=fa.test(a)||"string"!=typeof a?_(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&_.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?_.unique(f):f)},index:function(a){return a?"string"==typeof a?U.call(_(a),this[0]):U.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(_.unique(_.merge(this.get(),_(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),_.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return _.dir(a,"parentNode")},parentsUntil:function(a,b,c){return _.dir(a,"parentNode",c)},next:function(a){return e(a,"nextSibling")},prev:function(a){return e(a,"previousSibling")},nextAll:function(a){return _.dir(a,"nextSibling")},prevAll:function(a){return _.dir(a,"previousSibling")},nextUntil:function(a,b,c){return _.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return _.dir(a,"previousSibling",c)},siblings:function(a){return _.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return _.sibling(a.firstChild)},contents:function(a){return a.contentDocument||_.merge([],a.childNodes)}},function(a,b){_.fn[a]=function(c,d){var e=_.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=_.filter(d,e)),this.length>1&&(ma[a]||_.unique(e),la.test(a)&&e.reverse()),this.pushStack(e)}});var na=/\S+/g,oa={};_.Callbacks=function(a){a="string"==typeof a?oa[a]||f(a):_.extend({},a);var b,c,d,e,g,h,i=[],j=!a.once&&[],k=function(f){for(b=a.memory&&f,c=!0,h=e||0,e=0,g=i.length,d=!0;i&&g>h;h++)if(i[h].apply(f[0],f[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function f(b){_.each(b,function(b,c){var d=_.type(c);"function"===d?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),d?g=i.length:b&&(e=c,k(b))}return this},remove:function(){return i&&_.each(arguments,function(a,b){for(var c;(c=_.inArray(b,i,c))>-1;)i.splice(c,1),d&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return a?_.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],g=0,t
e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),_.each(["toggle","show","hide"],function(a,b){var c=_.fn[b];_.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(E(b,!0),a,d,e)}}),_.each({slideDown:E("show"),slideUp:E("hide"),slideToggle:E("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){_.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),_.timers=[],_.fx.tick=function(){var a,b=0,c=_.timers;for(Ya=_.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||_.fx.stop(),Ya=void 0},_.fx.timer=function(a){_.timers.push(a),a()?_.fx.start():_.timers.pop()},_.fx.interval=13,_.fx.start=function(){Za||(Za=setInterval(_.fx.tick,_.fx.interval))},_.fx.stop=function(){clearInterval(Za),Za=null},_.fx.speeds={slow:600,fast:200,_default:400},_.fn.delay=function(a,b){return a=_.fx?_.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a=Z.createElement("input"),b=Z.createElement("select"),c=b.appendChild(Z.createElement("option"));a.type="checkbox",Y.checkOn=""!==a.value,Y.optSelected=c.selected,b.disabled=!0,Y.optDisabled=!c.disabled,a=Z.createElement("input"),a.value="t",a.type="radio",Y.radioValue="t"===a.value}();var db,eb,fb=_.expr.attrHandle;_.fn.extend({attr:function(a,b){return qa(this,_.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){_.removeAttr(this,a)})}}),_.extend({attr:function(a,b,c){var d,e,f=a.nodeType;return a&&3!==f&&8!==f&&2!==f?typeof a.getAttribute===za?_.prop(a,b,c):(1===f&&_.isXMLDoc(a)||(b=b.toLowerCase(),d=_.attrHooks[b]||(_.expr.match.bool.test(b)?eb:db)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=_.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void _.removeAttr(a,b)):void 0},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(na);if(f&&1===a.nodeType)for(;c=f[e++];)d=_.propFix[c]||c,_.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!Y.radioValue&&"radio"===b&&_.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),eb={set:function(a,b,c){return b===!1?_.removeAttr(a,c):a.setAttribute(c,c),c}},_.each(_.expr.match.bool.source.match(/\w+/g),function(a,b){var c=fb[b]||_.find.attr;fb[b]=function(a,b,d){var e,f;return d||(f=fb[b],fb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,fb[b]=f),e}});var gb=/^(?:input|select|textarea|button)$/i;_.fn.extend({prop:function(a,b){return qa(this,_.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[_.propFix[a]||a]})}}),_.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;return a&&3!==g&&8!==g&&2!==g?(f=1!==g||!_.isXMLDoc(a),f&&(b=_.propFix[b]||b,e=_.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]):void 0},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||gb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),Y.optSelected||(_.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),_.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){_.propFix[this.toLowerCase()]=this});var hb=/[\t\r\n\f]/g;_.fn.extend({addClass:function(a){var b,c,d,e,f,g,h="string"==typeof a&&a,i=0,j=this.length;if(_.isFunction(a))return this.each(function(b){_(this).addClass(a.call(this,b,this.className))});if(h)for(b=(a||"").match(na)||[];j>i;i++)if(c=this[i],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(hb," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=_.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g
}],14:[function(a,b){"use strict";function c(a,b){b.event.bind(a,"scroll",function(){e(a)})}var d=a("../instances"),e=a("../update-geometry");b.exports=function(a){var b=d.get(a);c(a,b)}},{"../instances":18,"../update-geometry":19}],15:[function(a,b){"use strict";function c(a,b){function c(){var a=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===a.toString().length?null:a.getRangeAt(0).commonAncestorContainer}function g(){i||(i=setInterval(function(){return e.get(a)?(a.scrollTop=a.scrollTop+j.top,a.scrollLeft=a.scrollLeft+j.left,void f(a)):void clearInterval(i)},50))}function h(){i&&(clearInterval(i),i=null),d.stopScrolling(a)}var i=null,j={top:0,left:0},k=!1;b.event.bind(b.ownerDocument,"selectionchange",function(){a.contains(c())?k=!0:(k=!1,h())}),b.event.bind(window,"mouseup",function(){k&&(k=!1,h())}),b.event.bind(window,"mousemove",function(b){if(k){var c={x:b.pageX,y:b.pageY},e={left:a.offsetLeft,right:a.offsetLeft+a.offsetWidth,top:a.offsetTop,bottom:a.offsetTop+a.offsetHeight};c.x<e.left+3?(j.left=-5,d.startScrolling(a,"x")):c.x>e.right-3?(j.left=5,d.startScrolling(a,"x")):j.left=0,c.y<e.top+3?(j.top=e.top+3-c.y<5?-5:-20,d.startScrolling(a,"y")):c.y>e.bottom-3?(j.top=c.y-e.bottom+3<5?5:20,d.startScrolling(a,"y")):j.top=0,0===j.top&&0===j.left?h():g()}})}var d=a("../../lib/helper"),e=a("../instances"),f=a("../update-geometry");b.exports=function(a){var b=e.get(a);c(a,b)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(a,b){"use strict";function c(a,b,c,f){function g(c,d){var e=a.scrollTop,f=a.scrollLeft,g=Math.abs(c),h=Math.abs(d);if(h>g){if(0>d&&e===b.contentHeight-b.containerHeight||d>0&&0===e)return!b.settings.swipePropagation}else if(g>h&&(0>c&&f===b.contentWidth-b.containerWidth||c>0&&0===f))return!b.settings.swipePropagation;return!0}function h(b,c){a.scrollTop=a.scrollTop-c,a.scrollLeft=a.scrollLeft-b,e(a)}function i(){t=!0}function j(){t=!1}function k(a){return a.targetTouches?a.targetTouches[0]:a}function l(a){return a.targetTouches&&1===a.targetTouches.length?!0:a.pointerType&&"mouse"!==a.pointerType&&a.pointerType!==a.MSPOINTER_TYPE_MOUSE?!0:!1}function m(a){if(l(a)){u=!0;var b=k(a);p.pageX=b.pageX,p.pageY=b.pageY,q=(new Date).getTime(),null!==s&&clearInterval(s),a.stopPropagation()}}function n(a){if(!t&&u&&l(a)){var b=k(a),c={pageX:b.pageX,pageY:b.pageY},d=c.pageX-p.pageX,e=c.pageY-p.pageY;h(d,e),p=c;var f=(new Date).getTime(),i=f-q;i>0&&(r.x=d/i,r.y=e/i,q=f),g(d,e)&&(a.stopPropagation(),a.preventDefault())}}function o(){!t&&u&&(u=!1,clearInterval(s),s=setInterval(function(){return d.get(a)?Math.abs(r.x)<.01&&Math.abs(r.y)<.01?void clearInterval(s):(h(30*r.x,30*r.y),r.x*=.8,void(r.y*=.8)):void clearInterval(s)},10))}var p={},q=0,r={},s=null,t=!1,u=!1;c&&(b.event.bind(window,"touchstart",i),b.event.bind(window,"touchend",j),b.event.bind(a,"touchstart",m),b.event.bind(a,"touchmove",n),b.event.bind(a,"touchend",o)),f&&(window.PointerEvent?(b.event.bind(window,"pointerdown",i),b.event.bind(window,"pointerup",j),b.event.bind(a,"pointerdown",m),b.event.bind(a,"pointermove",n),b.event.bind(a,"pointerup",o)):window.MSPointerEvent&&(b.event.bind(window,"MSPointerDown",i),b.event.bind(window,"MSPointerUp",j),b.event.bind(a,"MSPointerDown",m),b.event.bind(a,"MSPointerMove",n),b.event.bind(a,"MSPointerUp",o)))}var d=a("../instances"),e=a("../update-geometry");b.exports=function(a,b,e){var f=d.get(a);c(a,f,b,e)}},{"../instances":18,"../update-geometry":19}],17:[function(a,b){"use strict";var c=a("../lib/class"),d=a("../lib/helper"),e=a("./instances"),f=a("./update-geometry"),g=a("./handler/click-rail"),h=a("./handler/drag-scrollbar"),i=a("./handler/keyboard"),j=a("./handler/mouse-wheel"),k=a("./handler/native-scroll"),l=a("./handler/selection"),m=a("./handler/touch");b.exports=function(a,b){b="object"==typeof b?b:{},c.add(a,"ps-container");var n=e.add(a);n.settings=d.extend(n.settings,b),g(a),h(a),j(a),k(a),l(a),(d.env.supportsTouch||d.env.supportsIePointer)&&m(a,d.env.supportsTouch,d.env.supportsIePointer),n.settings.useKeyboard&
2015-09-20 09:33:23 +00:00
for(b;b<c.length;b+=1)a+=e.td(c[b],d[b])+"\n";return a},e.thead=function(){var a,b=[].slice.apply(arguments[0]),c=[].slice.apply(arguments[1]);return a="<thead>\n",a+="<tr>\n",a+=e.ths.apply(this,[b,c]),a+="</tr>\n",a+="</thead>\n"},e.tr=function(){var a,b=[].slice.apply(arguments[0]),c=[].slice.apply(arguments[1]);return a="<tr>\n",a+=e.tds.apply(this,[b,c]),a+="</tr>\n"},a=function(a){var b,c,d=0,f=a.split("\n"),g=[];for(d;d<f.length;d+=1){if(b=f[d],b.trim().match(/^[|].*[|]$/)){b=b.trim();var h=[],i=f[d+1].trim(),j=[],k=0;if(i.match(/^[|][-=|: ]+[|]$/))for(j=i.substring(1,i.length-1).split("|"),k=0;k<j.length;++k)j[k]=j[k].trim(),j[k].match(/^[:][-=| ]+[:]$/)?j[k]="text-align:center;":j[k].match(/^[-=| ]+[:]$/)?j[k]="text-align:right;":j[k].match(/^[:][-=| ]+$/)?j[k]="text-align:left;":j[k]="";if(h.push("<table>"),c=b.substring(1,b.length-1).split("|"),0===j.length)for(k=0;k<c.length;++k)j.push("text-align:left");if(h.push(e.thead.apply(this,[c,j])),b=f[++d],b.trim().match(/^[|][-=|: ]+[|]$/)){for(b=f[++d],h.push("<tbody>");b.trim().match(/^[|].*[|]$/);)b=b.trim(),h.push(e.tr.apply(this,[b.substring(1,b.length-1).split("|"),j])),b=f[++d];h.push("</tbody>"),h.push("</table>"),g.push(h.join("\n"));continue}b=f[--d]}g.push(b)}return g.join("\n")},{parse:a}};if(b.tables){var f=e();return f.parse(a)}return a}),d.subParser("unescapeSpecialChars",function(a){"use strict";return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)})});var i=this;"undefined"!=typeof module&&module.exports?module.exports=d:"function"==typeof define&&define.amd?define("showdown",function(){"use strict";return d}):i.showdown=d}.call(this),!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):b(a.jQuery)}(this,function(a){"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b});var b={init:function(b){return this.options=a.extend({},a.noty.defaults,b),this.options.layout=this.options.custom?a.noty.layouts.inline:a.noty.layouts[this.options.layout],a.noty.themes[this.options.theme]?this.options.theme=a.noty.themes[this.options.theme]:b.themeClassName=this.options.theme,delete b.layout,delete b.theme,this.options=a.extend({},this.options,this.options.layout.options),this.options.id="noty_"+(new Date).getTime()*Math.floor(1e6*Math.random()),this.options=a.extend({},this.options,b),this._build(),this},_build:function(){var b=a('<div class="noty_bar noty_type_'+this.options.type+'"></div>').attr("id",this.options.id);if(b.append(this.options.template).find(".noty_text").html(this.options.text),this.$bar=null!==this.options.layout.parent.object?a(this.options.layout.parent.object).css(this.options.layout.parent.css).append(b):b,this.options.themeClassName&&this.$bar.addClass(this.options.themeClassName).addClass("noty_container_type_"+this.options.type),this.options.buttons){this.options.closeWith=[],this.options.timeout=!1;var c=a("<div/>").addClass("noty_buttons");null!==this.options.layout.parent.object?this.$bar.find(".noty_bar").append(c):this.$bar.append(c);var d=this;a.each(this.options.buttons,function(b,c){var e=a("<button/>").addClass(c.addClass?c.addClass:"gray").html(c.text).attr("id",c.id?c.id:"button-"+b).attr("title",c.title).appendTo(d.$bar.find(".noty_buttons")).on("click",function(b){a.isFunction(c.onClick)&&c.onClick.call(e,d,b)})})}this.$message=this.$bar.find(".noty_message"),this.$closeButton=this.$bar.find(".noty_close"),this.$buttons=this.$bar.find(".noty_buttons"),a.noty.store[this.options.id]=this},show:function(){var b=this;return b.options.custom?b.options.custom.find(b.options.layout.container.selector).append(b.$bar):a(b.options.layout.container.selector).append(b.$bar),b.options.theme&&b.options.theme.style&&b.options.theme.style.apply(b),"function"===a.type(b.options.layout.css)?this.options.layout.css.apply(b.$bar):b.$bar.css(this.options.layout.css||{}),b.$bar.addClass(b.options.layout.addClass),b.options.layout.container.style.apply(a(b.options.layout.containe
2015-09-22 18:37:01 +00:00
},c.container&&(c.container=q(c.container)),c}function q(b){if(b=a(b),b.length){if(""!==b.selector&&b.context===document)return b;if(b.attr("id"))return a("#"+b.attr("id"));throw"cant get selector for pjax container!"}throw"no pjax container for "+b.selector}function r(a,b){return a.filter(b).add(a.find(b))}function s(b){return a.parseHTML(b,document,!0)}function t(b,c,d){var e={},f=/<html/i.test(b),g=c.getResponseHeader("X-PJAX-URL");if(e.url=g?m(n(g)):d.requestUrl,f)var h=a(s(b.match(/<head[^>]*>([\s\S.]*)<\/head>/i)[0])),i=a(s(b.match(/<body[^>]*>([\s\S.]*)<\/body>/i)[0]));else var h=i=a(s(b));if(0===i.length)return e;if(e.title=r(h,"title").last().text(),d.fragment){if("body"===d.fragment)var j=i;else var j=r(i,d.fragment).first();j.length&&(e.contents="body"===d.fragment?j:j.contents(),e.title||(e.title=j.attr("title")||j.data("title")))}else f||(e.contents=i);return e.contents&&(e.contents=e.contents.not(function(){return a(this).is("title")}),e.contents.find("title").remove(),e.scripts=r(e.contents,"script[src]").remove(),e.contents=e.contents.not(e.scripts)),e.title&&(e.title=a.trim(e.title)),e}function u(b){if(b){var c=a("script[src]");b.each(function(){var b=this.src,d=c.filter(function(){return this.src===b});if(!d.length){var e=document.createElement("script"),f=a(this).attr("type");f&&(e.type=f),e.src=a(this).attr("src"),document.head.appendChild(e)}})}}function v(a,b){E[a]=b,G.push(a),x(F,0),x(G,e.defaults.maxCacheLength)}function w(a,b,c){var d,f;E[b]=c,"forward"===a?(d=G,f=F):(d=F,f=G),d.push(b),(b=f.pop())&&delete E[b],x(d,e.defaults.maxCacheLength)}function x(a,b){for(;a.length>b;)delete E[a.shift()]}function y(){return a("meta").filter(function(){var b=a(this).attr("http-equiv");return b&&"X-PJAX-VERSION"===b.toUpperCase()}).attr("content")}function z(){a.fn.pjax=b,a.pjax=e,a.pjax.enable=a.noop,a.pjax.disable=A,a.pjax.click=c,a.pjax.submit=d,a.pjax.reload=f,a.pjax.defaults={timeout:650,push:!0,replace:!1,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:y},a(window).on("popstate.pjax",h)}function A(){a.fn.pjax=function(){return this},a.pjax=i,a.pjax.enable=z,a.pjax.disable=a.noop,a.pjax.click=a.noop,a.pjax.submit=a.noop,a.pjax.reload=function(){window.location.reload()},a(window).off("popstate.pjax",h)}var B=!0,C=window.location.href,D=window.history.state;D&&D.container&&(e.state=D),"state"in window.history&&(B=!1);var E={},F=[],G=[];a.inArray("state",a.event.props)<0&&a.event.props.push("state"),a.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),a.support.pjax?z():A()}(jQuery),!function(a){"use strict";a.fn.serializeJSON=function(b){var c,d,e,f,g,h,i;return h=a.serializeJSON,i=h.optsWithDefaults(b),h.validateOptions(i),d=this.serializeArray(),h.readCheckboxUncheckedValues(d,this,i),c={},a.each(d,function(a,b){e=h.splitInputNameIntoKeysArray(b.name),f=e.pop(),"skip"!==f&&(g=h.parseValue(b.value,f,i),i.parseWithFunction&&"_"===f&&(g=i.parseWithFunction(g,b.name)),h.deepSet(c,e,g,i))}),c},a.serializeJSON={defaultOptions:{parseNumbers:!1,parseBooleans:!1,parseNulls:!1,parseAll:!1,parseWithFunction:null,checkboxUncheckedValue:void 0,useIntKeysAsArrayIndex:!1},optsWithDefaults:function(b){var c,d;return null==b&&(b={}),c=a.serializeJSON,d=c.optWithDefaults("parseAll",b),{parseNumbers:d||c.optWithDefaults("parseNumbers",b),parseBooleans:d||c.optWithDefaults("parseBooleans",b),parseNulls:d||c.optWithDefaults("parseNulls",b),parseWithFunction:c.optWithDefaults("parseWithFunction",b),checkboxUncheckedValue:c.optWithDefaults("checkboxUncheckedValue",b),useIntKeysAsArrayIndex:c.optWithDefaults("useIntKeysAsArrayIndex",b)}},optWithDefaults:function(b,c){return c[b]!==!1&&""!==c[b]&&(c[b]||a.serializeJSON.defaultOptions[b])},validateOptions:function(a){var b,c;c=["parseNumbers","parseBooleans","parseNulls","parseAll","parseWithFunction","checkboxUncheckedValue","useIntKeysAsArrayIndex"];for(b in a)if(-1===c.indexOf(b))throw new Error("serializeJSON ERROR: invalid option '"+b+"'.
e.style.height=Math.max(0,d.bottom-d.top)*a.options.cursorHeight+"px",d.other){var f=c.appendChild(Ne("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));f.style.display="",f.style.left=d.other.left+"px",f.style.top=d.other.top+"px",f.style.height=.85*(d.other.bottom-d.other.top)+"px"}}function Ka(a,b,c){function d(a,b,c,d){0>b&&(b=0),b=Math.round(b),d=Math.round(d),h.appendChild(Ne("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?k-a:c)+"px; height: "+(d-b)+"px"))}function e(b,c,e){function f(c,d){return lb(a,Gf(b,c),"div",l,d)}var h,i,l=Xd(g,b),m=l.text.length;return Ze(ce(l),c||0,null==e?m:e,function(a,b,g){var l,n,o,p=f(a,"left");if(a==b)l=p,n=o=p.left;else{if(l=f(b-1,"right"),"rtl"==g){var q=p;p=l,l=q}n=p.left,o=l.right}null==c&&0==a&&(n=j),l.top-p.top>3&&(d(n,p.top,null,p.bottom),n=j,p.bottom<l.top&&d(n,p.bottom,null,l.top)),null==e&&b==m&&(o=k),(!h||p.top<h.top||p.top==h.top&&p.left<h.left)&&(h=p),(!i||l.bottom>i.bottom||l.bottom==i.bottom&&l.right>i.right)&&(i=l),j+1>n&&(n=j),d(n,l.top,o-n,l.bottom)}),{start:h,end:i}}var f=a.display,g=a.doc,h=document.createDocumentFragment(),i=Sa(a.display),j=i.left,k=Math.max(f.sizerWidth,Ua(a)-f.sizer.offsetLeft)-i.right,l=b.from(),m=b.to();if(l.line==m.line)e(l.line,l.ch,m.ch);else{var n=Xd(g,l.line),o=Xd(g,m.line),p=qd(n)==qd(o),q=e(l.line,l.ch,p?n.text.length+1:null).end,r=e(m.line,p?0:null,m.ch).start;p&&(q.top<r.top-2?(d(q.right,q.top,null,q.bottom),d(j,r.top,r.left,r.bottom)):d(q.right,q.top,r.left-q.right,q.bottom)),q.bottom<r.top&&d(j,q.bottom,null,r.top)}c.appendChild(h)}function La(a){if(a.state.focused){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?b.blinker=setInterval(function(){b.cursorDiv.style.visibility=(c=!c)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(b.cursorDiv.style.visibility="hidden")}}function Ma(a,b){a.doc.mode.startState&&a.doc.frontier<a.display.viewTo&&a.state.highlight.set(b,Je(Na,a))}function Na(a){var b=a.doc;if(b.frontier<b.first&&(b.frontier=b.first),!(b.frontier>=a.display.viewTo)){var c=+new Date+a.options.workTime,d=cg(b.mode,Pa(a,b.frontier)),e=[];b.iter(b.frontier,Math.min(b.first+b.size,a.display.viewTo+500),function(f){if(b.frontier>=a.display.viewFrom){var g=f.styles,h=f.text.length>a.options.maxHighlightLength,i=Gd(a,f,h?cg(b.mode,d):d,!0);f.styles=i.styles;var j=f.styleClasses,k=i.classes;k?f.styleClasses=k:j&&(f.styleClasses=null);for(var l=!g||g.length!=f.styles.length||j!=k&&(!j||!k||j.bgClass!=k.bgClass||j.textClass!=k.textClass),m=0;!l&&m<g.length;++m)l=g[m]!=f.styles[m];l&&e.push(b.frontier),f.stateAfter=h?d:cg(b.mode,d)}else f.text.length<=a.options.maxHighlightLength&&Id(a,f.text,d),f.stateAfter=b.frontier%5==0?cg(b.mode,d):null;return++b.frontier,+new Date>c?(Ma(a,a.options.workDelay),!0):void 0}),e.length&&Cb(a,function(){for(var b=0;b<e.length;b++)Jb(a,e[b],"text")})}}function Oa(a,b,c){for(var d,e,f=a.doc,g=c?-1:b-(a.doc.mode.innerMode?1e3:100),h=b;h>g;--h){if(h<=f.first)return f.first;var i=Xd(f,h-1);if(i.stateAfter&&(!c||h<=f.frontier))return h;var j=Hg(i.text,null,a.options.tabSize);(null==e||d>j)&&(e=h-1,d=j)}return e}function Pa(a,b,c){var d=a.doc,e=a.display;if(!d.mode.startState)return!0;var f=Oa(a,b,c),g=f>d.first&&Xd(d,f-1).stateAfter;return g=g?cg(d.mode,g):dg(d.mode),d.iter(f,b,function(c){Id(a,c.text,g);var h=f==b-1||f%5==0||f>=e.viewFrom&&f<e.viewTo;c.stateAfter=h?cg(d.mode,g):null,++f}),c&&(d.frontier=f),g}function Qa(a){return a.lineSpace.offsetTop}function Ra(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Sa(a){if(a.cachedPaddingH)return a.cachedPaddingH;var b=Pe(a.measure,Ne("pre","x")),c=window.getComputedStyle?window.getComputedStyle(b):b.currentStyle,d={left:parseInt(c.paddingLeft),right:parseInt(c.paddingRight)};return isNaN(d.left)||isNaN(d.right)||(a.cachedPaddingH=d),d}function Ta(a){return Cg-a.display.nativeBarWidth}function Ua(a){return a.display.scroller.clientWidth-Ta(a)-a.display.barWidth}function Va(a){return a.display.scroll
}else d[g]=new ma(i,i)}return new la(d,a.sel.primIndex)}function xc(a,b,c){var d={canceled:!1,from:b.from,to:b.to,text:b.text,origin:b.origin,cancel:function(){this.canceled=!0}};return c&&(d.update=function(b,c,d,e){b&&(this.from=qa(a,b)),c&&(this.to=qa(a,c)),d&&(this.text=d),void 0!==e&&(this.origin=e)}),Ag(a,"beforeChange",a,d),a.cm&&Ag(a.cm,"beforeChange",a.cm,d),d.canceled?null:{from:d.from,to:d.to,text:d.text,origin:d.origin}}function yc(a,b,c){if(a.cm){if(!a.cm.curOp)return Db(a.cm,yc)(a,b,c);if(a.cm.state.suppressEdits)return}if(!(ze(a,"beforeChange")||a.cm&&ze(a.cm,"beforeChange"))||(b=xc(a,b,!0))){var d=Ef&&!c&&gd(a,b.from,b.to);if(d)for(var e=d.length-1;e>=0;--e)zc(a,{from:d[e].from,to:d[e].to,text:e?[""]:b.text});else zc(a,b)}}function zc(a,b){if(1!=b.text.length||""!=b.text[0]||0!=Hf(b.from,b.to)){var c=uc(a,b);he(a,b,c,a.cm?a.cm.curOp.id:NaN),Cc(a,b,c,dd(a,b));var d=[];Vd(a,function(a,c){c||-1!=Ee(d,a.history)||(re(a.history,b),d.push(a.history)),Cc(a,b,null,dd(a,b))})}}function Ac(a,b,c){if(!a.cm||!a.cm.state.suppressEdits){for(var d,e=a.history,f=a.sel,g="undo"==b?e.done:e.undone,h="undo"==b?e.undone:e.done,i=0;i<g.length&&(d=g[i],c?!d.ranges||d.equals(a.sel):d.ranges);i++);if(i!=g.length){for(e.lastOrigin=e.lastSelOrigin=null;d=g.pop(),d.ranges;){if(ke(d,h),c&&!d.equals(a.sel))return void Ba(a,d,{clearRedo:!1});f=d}var j=[];ke(f,h),h.push({changes:j,generation:e.generation}),e.generation=d.generation||++e.maxGeneration;for(var k=ze(a,"beforeChange")||a.cm&&ze(a.cm,"beforeChange"),i=d.changes.length-1;i>=0;--i){var l=d.changes[i];if(l.origin=b,k&&!xc(a,l,!1))return void(g.length=0);j.push(ee(a,l));var m=i?uc(a,l):De(g);Cc(a,l,m,fd(a,l)),!i&&a.cm&&a.cm.scrollIntoView({from:l.from,to:Vf(l)});var n=[];Vd(a,function(a,b){b||-1!=Ee(n,a.history)||(re(a.history,l),n.push(a.history)),Cc(a,l,null,fd(a,l))})}}}}function Bc(a,b){if(0!=b&&(a.first+=b,a.sel=new la(Fe(a.sel.ranges,function(a){return new ma(Gf(a.anchor.line+b,a.anchor.ch),Gf(a.head.line+b,a.head.ch))}),a.sel.primIndex),a.cm)){Ib(a.cm,a.first,a.first-b,b);for(var c=a.cm.display,d=c.viewFrom;d<c.viewTo;d++)Jb(a.cm,d,"gutter")}}function Cc(a,b,c,d){if(a.cm&&!a.cm.curOp)return Db(a.cm,Cc)(a,b,c,d);if(b.to.line<a.first)return void Bc(a,b.text.length-1-(b.to.line-b.from.line));if(!(b.from.line>a.lastLine())){if(b.from.line<a.first){var e=b.text.length-1-(a.first-b.from.line);Bc(a,e),b={from:Gf(a.first,0),to:Gf(b.to.line+e,b.to.ch),text:[De(b.text)],origin:b.origin}}var f=a.lastLine();b.to.line>f&&(b={from:b.from,to:Gf(f,Xd(a,f).text.length),text:[b.text[0]],origin:b.origin}),b.removed=Yd(a,b.from,b.to),c||(c=uc(a,b)),a.cm?Dc(a.cm,b,d):Sd(a,b,d),Ca(a,c,Eg)}}function Dc(a,b,c){var d=a.doc,e=a.display,g=b.from,h=b.to,i=!1,j=g.line;a.options.lineWrapping||(j=_d(qd(Xd(d,g.line))),d.iter(j,h.line+1,function(a){return a==e.maxLine?(i=!0,!0):void 0})),d.sel.contains(b.from,b.to)>-1&&ye(a),Sd(d,b,c,f(a)),a.options.lineWrapping||(d.iter(j,g.line+b.text.length,function(a){var b=l(a);b>e.maxLineLength&&(e.maxLine=a,e.maxLineLength=b,e.maxLineChanged=!0,i=!1)}),i&&(a.curOp.updateMaxLine=!0)),d.frontier=Math.min(d.frontier,g.line),Ma(a,400);var k=b.text.length-(h.line-g.line)-1;b.full?Ib(a):g.line!=h.line||1!=b.text.length||Rd(a.doc,b)?Ib(a,g.line,h.line+1,k):Jb(a,g.line,"text");var m=ze(a,"changes"),n=ze(a,"change");if(n||m){var o={from:g,to:h,text:b.text,removed:b.removed,origin:b.origin};n&&ve(a,"change",a,o),m&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(o)}a.display.selForContextMenu=null}function Ec(a,b,c,d,e){if(d||(d=c),Hf(d,c)<0){var f=d;d=c,c=f}"string"==typeof b&&(b=a.splitLines(b)),yc(a,{from:c,to:d,text:b,origin:e})}function Fc(a,b){if(!xe(a,"scrollCursorIntoView")){var c=a.display,d=c.sizer.getBoundingClientRect(),e=null;if(b.top+d.top<0?e=!0:b.bottom+d.top>(window.innerHeight||document.documentElement.clientHeight)&&(e=!1),null!=e&&!wf){var f=Ne("div","",null,"position: absolute; top: "+(b.top-c.viewOffset-Qa(a.display))+"px; height: "+(b.bottom-b.top+Ta(a)+c.barHeight)+"px; left: "+b.left+"px; width: 2px;");a.display.lineSpace.appendChild(f),f.sc
}function Se(a,b){for(var c=a.split(" "),d=0;d<c.length;d++)c[d]&&!Re(c[d]).test(b)&&(b+=" "+c[d]);return b}function Te(a){if(document.body.getElementsByClassName)for(var b=document.body.getElementsByClassName("CodeMirror"),c=0;c<b.length;c++){var d=b[c].CodeMirror;d&&a(d)}}function Ue(){Ug||(Ve(),Ug=!0)}function Ve(){var a;yg(window,"resize",function(){null==a&&(a=setTimeout(function(){a=null,Te(Rb)},100))}),yg(window,"blur",function(){Te(qc)})}function We(a){if(null==Qg){var b=Ne("span","");Pe(a,Ne("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(Qg=b.offsetWidth<=1&&b.offsetHeight>2&&!(of&&8>pf))}var c=Qg?Ne("span",""):Ne("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}function Xe(a){if(null!=Rg)return Rg;var b=Pe(a,document.createTextNode("AخA")),c=Lg(b,0,1).getBoundingClientRect();if(!c||c.left==c.right)return!1;var d=Lg(b,1,2).getBoundingClientRect();return Rg=d.right-c.right<3}function Ye(a){if(null!=Zg)return Zg;var b=Pe(a,Ne("span","x")),c=b.getBoundingClientRect(),d=Lg(b,0,1).getBoundingClientRect();return Zg=Math.abs(c.left-d.left)>1}function Ze(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=!1,f=0;f<a.length;++f){var g=a[f];(g.from<c&&g.to>b||b==c&&g.to==b)&&(d(Math.max(g.from,b),Math.min(g.to,c),1==g.level?"rtl":"ltr"),e=!0)}e||d(b,c,"ltr")}function $e(a){return a.level%2?a.to:a.from}function _e(a){return a.level%2?a.from:a.to}function af(a){var b=ce(a);return b?$e(b[0]):0}function bf(a){var b=ce(a);return b?_e(De(b)):a.text.length}function cf(a,b){var c=Xd(a.doc,b),d=qd(c);d!=c&&(b=_d(d));var e=ce(d),f=e?e[0].level%2?bf(d):af(d):0;return Gf(b,f)}function df(a,b){for(var c,d=Xd(a.doc,b);c=od(d);)d=c.find(1,!0).line,b=null;var e=ce(d),f=e?e[0].level%2?af(d):bf(d):d.text.length;return Gf(null==b?_d(d):b,f)}function ef(a,b){var c=cf(a,b.line),d=Xd(a.doc,c.line),e=ce(d);if(!e||0==e[0].level){var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&b.ch<=f&&b.ch;return Gf(c.line,g?0:f)}return c}function ff(a,b,c){var d=a[0].level;return b==d?!0:c==d?!1:c>b}function gf(a,b){_g=null;for(var c,d=0;d<a.length;++d){var e=a[d];if(e.from<b&&e.to>b)return d;if(e.from==b||e.to==b){if(null!=c)return ff(a,e.level,a[c].level)?(e.from!=e.to&&(_g=c),d):(e.from!=e.to&&(_g=d),c);c=d}}return c}function hf(a,b,c,d){if(!d)return b+c;do b+=c;while(b>0&&Me(a.text.charAt(b)));return b}function jf(a,b,c,d){var e=ce(a);if(!e)return kf(a,b,c,d);for(var f=gf(e,b),g=e[f],h=hf(a,b,g.level%2?-c:c,d);;){if(h>g.from&&h<g.to)return h;if(h==g.from||h==g.to)return gf(e,h)==f?h:(g=e[f+=c],c>0==g.level%2?g.to:g.from);if(g=e[f+=c],!g)return null;h=c>0==g.level%2?hf(a,g.to,-1,d):hf(a,g.from,1,d)}}function kf(a,b,c,d){var e=b+c;if(d)for(;e>0&&Me(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var lf=/gecko\/\d/i.test(navigator.userAgent),mf=/MSIE \d/.test(navigator.userAgent),nf=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),of=mf||nf,pf=of&&(mf?document.documentMode||6:nf[1]),qf=/WebKit\//.test(navigator.userAgent),rf=qf&&/Qt\/\d+\.\d+/.test(navigator.userAgent),sf=/Chrome\//.test(navigator.userAgent),tf=/Opera\//.test(navigator.userAgent),uf=/Apple Computer/.test(navigator.vendor),vf=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),wf=/PhantomJS/.test(navigator.userAgent),xf=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),yf=xf||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),zf=xf||/Mac/.test(navigator.platform),Af=/win/i.test(navigator.platform),Bf=tf&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);Bf&&(Bf=Number(Bf[1])),Bf&&Bf>=15&&(tf=!1,qf=!0);var Cf=zf&&(rf||tf&&(null==Bf||12.11>Bf)),Df=lf||of&&pf>=9,Ef=!1,Ff=!1;p.prototype=Ie({update:function(a){var b=a.scrollWidth>a.clientWidth+1,c=a.scrollHeight>a.clientHeight+1,d=a.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=b?d+"px":"0";var e=a.viewHeight-(b?d:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+e)+"px"}else this.vert.style.display="
pred:d,val:e})};var cg=a.copyState=function(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c},dg=a.startState=function(a,b,c){return a.startState?a.startState(b,c):!0};a.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);if(!c||c.mode==a)break;b=c.state,a=c.mode}return c||{mode:a,state:b}};var eg=a.commands={selectAll:function(a){a.setSelection(Gf(a.firstLine(),0),Gf(a.lastLine()),Eg)},singleSelection:function(a){a.setSelection(a.getCursor("anchor"),a.getCursor("head"),Eg)},killLine:function(a){Oc(a,function(b){if(b.empty()){var c=Xd(a.doc,b.head.line).text.length;return b.head.ch==c&&b.head.line<a.lastLine()?{from:b.head,to:Gf(b.head.line+1,0)}:{from:b.head,to:Gf(b.head.line,c)}}return{from:b.from(),to:b.to()}})},deleteLine:function(a){Oc(a,function(b){return{from:Gf(b.from().line,0),to:qa(a.doc,Gf(b.to().line+1,0))}})},delLineLeft:function(a){Oc(a,function(a){return{from:Gf(a.from().line,0),to:a.from()}})},delWrappedLineLeft:function(a){Oc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return{from:d,to:b.from()}})},delWrappedLineRight:function(a){Oc(a,function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div");return{from:b.from(),to:d}})},undo:function(a){a.undo()},redo:function(a){a.redo()},undoSelection:function(a){a.undoSelection()},redoSelection:function(a){a.redoSelection()},goDocStart:function(a){a.extendSelection(Gf(a.firstLine(),0))},goDocEnd:function(a){a.extendSelection(Gf(a.lastLine()))},goLineStart:function(a){a.extendSelectionsBy(function(b){return cf(a,b.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){a.extendSelectionsBy(function(b){return ef(a,b.head)},{origin:"+move",bias:1})},goLineEnd:function(a){a.extendSelectionsBy(function(b){return df(a,b.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:c},"div")},Gg)},goLineLeft:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5;return a.coordsChar({left:0,top:c},"div")},Gg)},goLineLeftSmart:function(a){a.extendSelectionsBy(function(b){var c=a.charCoords(b.head,"div").top+5,d=a.coordsChar({left:0,top:c},"div");return d.ch<a.getLine(d.line).search(/\S/)?ef(a,b.head):d},Gg)},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goGroupRight:function(a){a.moveH(1,"group")},goGroupLeft:function(a){a.moveH(-1,"group")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},delGroupBefore:function(a){a.deleteH(-1,"group")},delGroupAfter:function(a){a.deleteH(1,"group")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection(" ")},insertSoftTab:function(a){for(var b=[],c=a.listSelections(),d=a.options.tabSize,e=0;e<c.length;e++){var f=c[e].from(),g=Hg(a.getLine(f.line),f.ch,d);b.push(new Array(d-g%d+1).join(" "))}a.replaceSelections(b)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){Cb(a,function(){for(var b=a.listSelections(),c=[],d=0;d<b.length;d++){var e=b[d].head,f=Xd(a.doc,e.line).text;if(f)if(e.ch==f.length&&(e=new Gf(e.line,e.ch-1)),e.ch>0)e=new Gf(e.line,e.ch+1),a.replaceRange(f.charAt(e.ch-1)+f.charAt(e.ch-2),Gf(e.line,e.ch-2),e,"+t
v.push(new b(0,k-u[0].length,k))),2==v[0].level&&v.unshift(new b(1,v[0].to,v[0].to)),v[0].level!=De(v).level&&v.push(new b(v[0].level,k,k)),v}}();return a.version="5.7.0",a}),function(a){"object"==typeof exports&&"object"==typeof module?a(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],a):a(CodeMirror)}(function(a){"use strict";function b(a){for(var b={},c=0;c<a.length;++c)b[a[c]]=!0;return b}function c(a,b){for(var c,d=!1;null!=(c=a.next());){if(d&&"/"==c){b.tokenize=null;break}d="*"==c}return["comment","comment"]}a.defineMode("css",function(b,c){function d(a,b){return o=b,a}function e(a,b){var c=a.next();if(r[c]){var e=r[c](a,b);if(e!==!1)return e}return"@"==c?(a.eatWhile(/[\w\\\-]/),d("def",a.current())):"="==c||("~"==c||"|"==c)&&a.eat("=")?d(null,"compare"):'"'==c||"'"==c?(b.tokenize=f(c),b.tokenize(a,b)):"#"==c?(a.eatWhile(/[\w\\\-]/),d("atom","hash")):"!"==c?(a.match(/^\s*\w*/),d("keyword","important")):/\d/.test(c)||"."==c&&a.eat(/\d/)?(a.eatWhile(/[\w.%]/),d("number","unit")):"-"!==c?/[,+>*\/]/.test(c)?d(null,"select-op"):"."==c&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?d("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(c)?d(null,c):"u"==c&&a.match(/rl(-prefix)?\(/)||"d"==c&&a.match("omain(")||"r"==c&&a.match("egexp(")?(a.backUp(1),b.tokenize=g,d("property","word")):/[\w\\\-]/.test(c)?(a.eatWhile(/[\w\\\-]/),d("property","word")):d(null,null):/[\d.]/.test(a.peek())?(a.eatWhile(/[\w.%]/),d("number","unit")):a.match(/^-[\w\\\-]+/)?(a.eatWhile(/[\w\\\-]/),a.match(/^\s*:/,!1)?d("variable-2","variable-definition"):d("variable-2","variable")):a.match(/^\w+-/)?d("meta","meta"):void 0}function f(a){return function(b,c){for(var e,f=!1;null!=(e=b.next());){if(e==a&&!f){")"==a&&b.backUp(1);break}f=!f&&"\\"==e}return(e==a||!f&&")"!=a)&&(c.tokenize=null),d("string","string")}}function g(a,b){return a.next(),a.match(/\s*[\"\')]/,!1)?b.tokenize=null:b.tokenize=f(")"),d(null,"(")}function h(a,b,c){this.type=a,this.indent=b,this.prev=c}function i(a,b,c,d){return a.context=new h(c,b.indentation()+(d===!1?0:q),a.context),c}function j(a){return a.context.prev&&(a.context=a.context.prev),a.context.type}function k(a,b,c){return E[c.context.type](a,b,c)}function l(a,b,c,d){for(var e=d||1;e>0;e--)c.context=c.context.prev;return k(a,b,c)}function m(a){var b=a.current().toLowerCase();p=B.hasOwnProperty(b)?"atom":A.hasOwnProperty(b)?"keyword":"variable"}var n=c;c.propertyKeywords||(c=a.resolveMode("text/css")),c.inline=n.inline;var o,p,q=b.indentUnit,r=c.tokenHooks,s=c.documentTypes||{},t=c.mediaTypes||{},u=c.mediaFeatures||{},v=c.mediaValueKeywords||{},w=c.propertyKeywords||{},x=c.nonStandardPropertyKeywords||{},y=c.fontProperties||{},z=c.counterDescriptors||{},A=c.colorKeywords||{},B=c.valueKeywords||{},C=c.allowNested,D=c.supportsAtComponent===!0,E={};return E.top=function(a,b,c){if("{"==a)return i(c,b,"block");if("}"==a&&c.context.prev)return j(c);if(D&&/@component/.test(a))return i(c,b,"atComponentBlock");if(/^@(-moz-)?document$/.test(a))return i(c,b,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(a))return i(c,b,"atBlock");if(/^@(font-face|counter-style)/.test(a))return c.stateArg=a,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(a))return"keyframes";if(a&&"@"==a.charAt(0))return i(c,b,"at");if("hash"==a)p="builtin";else if("word"==a)p="tag";else{if("variable-definition"==a)return"maybeprop";if("interpolation"==a)return i(c,b,"interpolation");if(":"==a)return"pseudo";if(C&&"("==a)return i(c,b,"parens")}return c.context.type},E.block=function(a,b,c){if("word"==a){var d=b.current().toLowerCase();return w.hasOwnProperty(d)?(p="property","maybeprop"):x.hasOwnProperty(d)?(p="string-2","maybeprop"):C?(p=b.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(p+=" error","maybeprop")}return"meta"==a?"block":C||"hash"!=a&&"qualifier"!=a?E.top(a,b,c):(p="error","block")},E.maybeprop=function(a,b,c){return":"==a?i(c,b,"prop"):k(a,b,c)},E.prop=function(a,b,c){if(";"==a)return j(c);if("{"==a&&C)return i(c,b,"propBlock");if("}"==a||"{"==a)return l(a,b,c);
o(ba)):"("==a?o(q,s(")"),M(ca,")"),t,v,r):void 0}function ca(a){return"spread"==a?o(ca):n(T,P,Q)}function da(a,b){return"variable"==a?(p(b),o(ea)):void 0}function ea(a,b){return"extends"==b?o(w,ea):"{"==a?o(s("}"),fa,t):void 0}function fa(a,b){return"variable"==a||"keyword"==Da.style?"static"==b?(Da.marked="keyword",o(fa)):(Da.marked="property","get"==b||"set"==b?o(ga,ba,fa):o(ba,fa)):"*"==b?(Da.marked="keyword",o(fa)):";"==a?o(fa):"}"==a?o():void 0}function ga(a){return"variable"!=a?n():(Da.marked="property",o())}function ha(a,b){return"*"==b?(Da.marked="keyword",o(la,u(";"))):"default"==b?(Da.marked="keyword",o(w,u(";"))):n(v)}function ia(a){return"string"==a?o():n(ja,la)}function ja(a,b){return"{"==a?N(ja,"}"):("variable"==a&&p(b),"*"==b&&(Da.marked="keyword"),o(ka))}function ka(a,b){return"as"==b?(Da.marked="keyword",o(ja)):void 0}function la(a,b){return"from"==b?(Da.marked="keyword",o(w)):void 0}function ma(a){return"]"==a?o():n(x,na)}function na(a){return"for"==a?n(oa,u("]")):","==a?o(M(A,"]")):n(M(x,"]"))}function oa(a){return"for"==a?o(Y,oa):"if"==a?o(w,oa):void 0}function pa(a,b){return"operator"==a.lastType||","==a.lastType||za.test(b.charAt(0))||/[,.]/.test(b.charAt(0))}var qa,ra,sa=b.indentUnit,ta=c.statementIndent,ua=c.jsonld,va=c.json||ua,wa=c.typescript,xa=c.wordCharacters||/[\w$\xa1-\uffff]/,ya=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={"if":a("if"),"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"debugger":d,"var":a("var"),"const":a("var"),let:a("var"),async:a("async"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,"typeof":e,"instanceof":e,"true":f,"false":f,"null":f,undefined:f,NaN:f,Infinity:f,"this":a("this"),"class":a("class"),"super":a("atom"),await:d,"yield":d,"export":a("export"),"import":a("import"),"extends":d};if(wa){var h={type:"variable",style:"variable-3"},i={"interface":a("interface"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),string:h,number:h,bool:h,any:h};for(var j in i)g[j]=i[j]}return g}(),za=/[+\-*&%=<>!?|~^]/,Aa=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Ba="([{}])",Ca={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0,"jsonld-keyword":!0},Da={state:null,column:null,marked:null,cc:null},Ea={name:"this",next:{name:"arguments"}};return t.lex=!0,{startState:function(a){var b={tokenize:f,lastType:"sof",cc:[],lexical:new k((a||0)-sa,0,"block",!1),localVars:c.localVars,context:c.localVars&&{vars:c.localVars},indented:0};return c.globalVars&&"object"==typeof c.globalVars&&(b.globalVars=c.globalVars),b},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation(),j(a,b)),b.tokenize!=h&&a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==qa?c:(b.lastType="operator"!=qa||"++"!=ra&&"--"!=ra?qa:"incdec",m(b,c,qa,ra,a))},indent:function(b,d){if(b.tokenize==h)return a.Pass;if(b.tokenize!=f)return 0;var e=d&&d.charAt(0),g=b.lexical;if(!/^\s*else\b/.test(d))for(var i=b.cc.length-1;i>=0;--i){var j=b.cc[i];if(j==t)g=g.prev;else if(j!=X)break}"stat"==g.type&&"}"==e&&(g=g.prev),ta&&")"==g.type&&"stat"==g.prev.type&&(g=g.prev);var k=g.type,l=e==k;return"vardef"==k?g.indented+("operator"==b.lastType||","==b.lastType?g.info+1:0):"form"==k&&"{"==e?g.indented:"form"==k?g.indented+sa:"stat"==k?g.indented+(pa(b,d)?ta||sa:0):"switch"!=g.info||l||0==c.doubleIndentSwitch?g.align?g.column+(l?0:1):g.indented+(l?0:sa):g.indented+(/^(?:case|default)\b/.test(d)?sa:2*sa)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:va?null:"/*",blockCommentEnd:va?null:"*/",lineComment:va?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:va?"json":"javascript",jsonldMode:ua,jsonMode:va}}),a.registerHelper("wordChars"