mirror of
https://github.com/liabru/matter-js.git
synced 2024-11-30 10:20:52 -05:00
117 lines
No EOL
367 KiB
JavaScript
117 lines
No EOL
367 KiB
JavaScript
/*!
|
||
* matter-demo bundle 0.19.0 by @liabru
|
||
* http://brm.io/matter-js/
|
||
* License MIT
|
||
*/
|
||
(this.webpackJsonpMatterDemo=this.webpackJsonpMatterDemo||[]).push([[2],{akk5:function(e,t,n){
|
||
/*!
|
||
* matter-tools 0.14.0 by @liabru
|
||
* https://github.com/liabru/matter-tools
|
||
* License MIT
|
||
*
|
||
* The MIT License (MIT)
|
||
*
|
||
* Copyright (c) 2014 Liam Brummitt
|
||
*
|
||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||
* of this software and associated documentation files (the "Software"), to deal
|
||
* in the Software without restriction, including without limitation the rights
|
||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||
* copies of the Software, and to permit persons to whom the Software is
|
||
* furnished to do so, subject to the following conditions:
|
||
*
|
||
* The above copyright notice and this permission notice shall be included in
|
||
* all copies or substantial portions of the Software.
|
||
*
|
||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||
* THE SOFTWARE.
|
||
*/
|
||
var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/demo/lib/",n(n.s=6)}([function(t,n){t.exports=e},function(e,t,n){"use strict";const r=e.exports={};r.injectStyles=function(e,t){if(document.getElementById(t))return;let n=document.createElement("div");n.innerHTML=`<style id="${t}" type="text/css">${e}</style>`;let i=document.head.querySelector("style:last-of-type");i?r.domInsertBefore(n.firstElementChild,i):document.head.appendChild(n.firstElementChild)},r.injectScript=function(e,t,n){if(document.getElementById(t))return;let r=document.createElement("script");r.id=t,r.src=e,r.onload=n,document.body.appendChild(r)},r.domRemove=function(e){return e.parentElement.removeChild(e)},r.domInsertBefore=function(e,t){return t.parentNode.insertBefore(e,t.previousElementSibling)}},function(e,t,n){"use strict";const r=e.exports={},i=n(8),o=n(0),s=o.Common,a=o.Engine;r.create=function(){let e=new i({prefix:"$",cleanup:!0});return e.parse=e.resurrect,e},r.clone=function(e,t){var n=e.parse(r.serialise(e,t));return n.id=s.nextId(),n},r.saveState=function(e,t,n){localStorage.setItem(n,r.serialise(e,t.world))},r.loadState=function(e,t,n){var r=e.parse(localStorage.getItem(n));r&&a.merge(t,{world:r})},r.serialise=function(e,t,n){return n=n||0,e.stringify(t,(function(e,t){if(!/^#/.exec(e)&&"number"==typeof t){var n=parseFloat(t.toFixed(3));return 0===n&&0!==t?t:n}return t}),n)}},function(e,t,n){"use strict";const r=e.exports={},i=n(7),o=n(1),s=n(2),a=n(0),l=a.Engine,d=a.Detector,c=a.Grid,h=a.World,u=a.Bodies,p=a.Events,f=a.Composite;r.create=function(e,t,r){i.GUI.TEXT_CLOSED="▲",i.GUI.TEXT_OPEN="▼";var a={engine:e,runner:t,render:r,datGui:new i.GUI({autoPlace:!1}),broadphase:"grid",broadphaseCache:{grid:e.broadphase.controller===c?e.broadphase:c.create(),bruteForce:{detector:d.bruteForce}},amount:1,size:40,sides:4,density:.001,restitution:0,friction:.1,frictionStatic:.5,frictionAir:.01,offset:{x:0,y:0},renderer:"canvas",chamfer:0,isRecording:!1};s&&(a.serializer=s.create());let l=n(9);return o.injectStyles(l,"matter-gui-style"),g(a),a},r.update=function(e){var t,n=e.datGui;for(t in n.__folders)r.update(e,n.__folders[t]);for(t in n.__controllers){var i=n.__controllers[t];i.updateDisplay&&i.updateDisplay()}},r.closeAll=function(e){var t=e.datGui;for(var n in t.__folders)t.__folders[n].close()},r.destroy=function(e){e.datGui.domElement.parentElement.removeChild(e.datGui.domElement),e.datGui.destroy()};var g=function(e){var t=e.engine,n=e.runner,r=e.datGui,i={addBody:function(){_(e)},clear:function(){m(e)},save:function(){s.saveState(e.serializer,t,"guiState"),p.trigger(e,"save")},load:function(){s.loadState(e.serializer,t,"guiState"),p.trigger(e,"load")}},o=r.addFolder("Metrics");if(n&&o.add(n,"fps").listen(),t.metrics.extended&&(n&&(o.add(n,"delta").listen(),o.add(n,"correction").listen()),t&&(o.add(t.metrics,"bodies").listen(),o.add(t.metrics,"collisions").listen(),o.add(t.metrics,"pairs").listen(),o.add(t.metrics,"broadEff").listen(),o.add(t.metrics,"midEff").listen(),o.add(t.metrics,"narrowEff").listen(),o.add(t.metrics,"narrowReuse").listen()),o.open()),t){var a=r.addFolder("Add Body");a.add(e,"amount",1,5).step(1),a.add(e,"size",5,150).step(1),a.add(e,"sides",1,8).step(1),a.add(e,"density",1e-4,.01).step(.001),a.add(e,"friction",0,1).step(.05),a.add(e,"frictionStatic",0,10).step(.1),a.add(e,"frictionAir",0,10*e.frictionAir).step(e.frictionAir/10),a.add(e,"restitution",0,1).step(.1),a.add(e,"chamfer",0,30).step(2),a.add(i,"addBody"),a.open();var l=r.addFolder("World");e.serializer&&(l.add(i,"load"),l.add(i,"save")),l.add(i,"clear"),l.open();var d=r.addFolder("Gravity");d.add(t.world.gravity,"scale",0,.001).step(1e-4),d.add(t.world.gravity,"x",-1,1).step(.01),d.add(t.world.gravity,"y",-1,1).step(.01);var c=r.addFolder("Engine");c.add(t,"enableSleeping"),c.add(t.timing,"timeScale",0,1.2).step(.05).listen(),c.add(t,"velocityIterations",1,10).step(1),c.add(t,"positionIterations",1,10).step(1),c.add(t,"constraintIterations",1,10).step(1),n&&c.add(n,"enabled")}if(e.render){var h=r.addFolder("Render");h.add(e.render.options,"wireframes").onFinishChange((function(e){e||(f.setValue(!1),u.setValue(!1))})),h.add(e.render.options,"showDebug"),h.add(e.render.options,"showPositions"),h.add(e.render.options,"showBroadphase"),h.add(e.render.options,"showBounds"),h.add(e.render.options,"showVelocity"),h.add(e.render.options,"showCollisions"),h.add(e.render.options,"showSeparations");var u=h.add(e.render.options,"showAxes"),f=h.add(e.render.options,"showAngleIndicator");h.add(e.render.options,"showSleeping"),h.add(e.render.options,"showIds"),h.add(e.render.options,"showVertexNumbers"),h.add(e.render.options,"showConvexHulls"),h.add(e.render.options,"showInternalEdges"),h.add(e.render.options,"enabled"),h.open()}document.body.appendChild(e.datGui.domElement)},_=function(e){var t=e.engine,n={density:e.density,friction:e.friction,frictionStatic:e.frictionStatic,frictionAir:e.frictionAir,restitution:e.restitution};e.chamfer&&e.sides>2&&(n.chamfer={radius:e.chamfer});for(var r=0;r<e.amount;r++)h.add(t.world,u.polygon(e.offset.x+120+r*e.size+50*r,e.offset.y+200,e.sides,e.size,n))},m=function(e){for(var t=e.engine,n=f.allConstraints(t.world),r=null,i=0;i<n.length;i+=1){var o=n[i];if("Mouse Constraint"===o.label){r=o;break}}if(h.clear(t.world,!0),l.clear(t),r&&f.add(t.world,r),e.render){var s=e.render.controller;s.clear&&s.clear(e.render)}p.trigger(e,"clear")}},function(e,t,n){"use strict";const r=e.exports={},i=n(10),o=n(5);n(11);const s=n(1),a=n(2),l=n(0),d=l.Body,c=l.Bounds,h=l.Composite,u=l.Common,p=l.Events,f=l.Mouse,g=l.Query,_=l.Vertices,m=l.Vector,v=l.MouseConstraint;var b;r.create=function(e,t,l){var d={engine:null,render:null,isPaused:!1,selected:[],selectStart:null,selectEnd:null,selectBounds:c.create(),mousePrevPosition:{x:0,y:0},offset:{x:0,y:0},autoExpand:!0,autoHide:!0,autoRewind:!0,hasExpanded:!1,bodyClass:"",exportIndent:0,clipboard:[],controls:{container:null,worldTree:null},root:h.create({label:"Root"}),keyBindings:[]};d=u.extend(d,l),r.instance=d,d.engine=e,d.render=t,d.render?(d.mouse=f.create(d.render.canvas),d.mouseConstraint=v.create(e,{mouse:d.mouse})):d.mouse={position:{x:0,y:0}},a&&(d.serializer=a.create(),localStorage.removeItem("pauseState")),b=o("body"),h.add(d.root,e.world),e.world.isModified=!0,e.world.parent=null;let p=n(12);return s.injectStyles(p,"js-tree-style"),p=n(13),s.injectStyles(p,"matter-inspector-style"),d.keyBind=u.chain(i,(e=>{d.keyBindings.push(e)})),x(d),E(d),k(d),j(d),d},r.destroy=function(e){e.controls.worldTree.data("jstree").destroy(),[].slice.call(document.body.querySelectorAll(".ins-container",".vakata-context",".jstree-marker")).forEach(s.domRemove),e.keyBindings.forEach((e=>{i.unbind(e)})),p.off(e.engine,"beforeUpdate",e.beforeEngineUpdate),e.render&&(p.off(e.render,"afterRender",e.afterRender),p.off(e.mouseConstraint))};var x=function(e){var t,n=e.controls,r=o('<div class="ins-container">'),i=o('<div class="ins-top-panel">'),s=o('<div class="ins-control-group">'),l=o('<input class="ins-search-box" type="search" placeholder="search">'),d=o('<button class="ins-import-button ins-button">Import</button>'),c=o('<button class="ins-export-button ins-button">Export</button>'),h=o('<button class="ins-pause-button ins-button">Pause</button>'),u=o('<button class="ins-help-button ins-button">Help</button>'),p=o('<button aria-label="Add composite body" title="Add composite body" class="ins-add-button ins-button">+</button>');a?s.append(h,d,c,u):s.append(h,u),r.prepend(i,l,p),b.prepend(r),n.pauseButton=h,n.importButton=d,n.exportButton=c,n.helpButton=u,n.searchBox=l,n.container=r,n.addCompositeButton=p,n.pauseButton.click((function(){D(e,!e.isPaused)})),n.exportButton.click((function(){V(e)})),n.importButton.click((function(){K(e)})),n.helpButton.click((function(){y(e)})),n.addCompositeButton.click((function(){U(e)})),n.searchBox.keyup((function(){clearTimeout(t),t=setTimeout((function(){var e=n.searchBox.val();n.worldTree.data("jstree").search(e)}),250)}))},y=function(){alert("Matter Tools\n\nDrag nodes in the tree to move them between composites.\nUse browser's developer console to inspect selected objects.\nNote: selections only render if renderer supports it.\n\n[shift + space] pause or play simulation.\n[right click] and drag on empty space to select a region.\n[right click] and drag on an object to move it.\n[right click + shift] and drag to move whole selection.\n\n[ctrl-c] to copy selected world objects.\n[ctrl-v] to paste copied world objects to mouse position.\n[del] or [backspace] delete selected objects.\n\n[shift + s] scale-xy selected objects with mouse or arrows.\n[shift + s + d] scale-x selected objects with mouse or arrows.\n[shift + s + f] scale-y selected objects with mouse or arrows.\n[shift + r] rotate selected objects with mouse or arrows.\n\n[shift + q] set selected objects as static (can't be undone).\n[shift + i] import objects.\n[shift + o] export selected objects.\n[shift + h] toggle Matter.Gui.\n[shift + y] toggle auto-hide.\n[shift + r] toggle auto-rewind on play/pause.\n\n[shift + j] show this help message.")},j=function(e){e.keyBind("shift+space",(function(){D(e,!e.isPaused)})),e.serializer&&(e.keyBind("shift+o",(function(){V(e)})),e.keyBind("shift+i",(function(){K(e)}))),e.keyBind("shift+j",(function(){y(e)})),e.keyBind("shift+y",(function(){e.autoHide=!e.autoHide,b.toggleClass("ins-auto-hide gui-auto-hide",e.autoHide)})),e.keyBind("shift+r",(function(){e.autoRewind=!e.autoRewind,e.autoRewind||localStorage.removeItem("pauseState")})),e.keyBind("shift+q",(function(){for(var t=0;t<e.selected.length;t++){var n=e.selected[t].data;"body"!==n.type||n.isStatic||d.setStatic(n,!0)}})),e.keyBind("del",(function(){S(e)})),e.keyBind("backspace",(function(){S(e)})),e.serializer&&(e.keyBind("ctrl+c",(function(){T(e)})),e.keyBind("ctrl+v",(function(){O(e)}))),o(document).unbind("keydown").bind("keydown",(function(e){var t=!1;if(8===e.keyCode){var n=e.srcElement||e.target;t=("INPUT"!==n.tagName.toUpperCase()||"TEXT"!==n.type.toUpperCase()&&"PASSWORD"!==n.type.toUpperCase()&&"FILE"!==n.type.toUpperCase()&&"EMAIL"!==n.type.toUpperCase()&&"SEARCH"!==n.type.toUpperCase())&&"TEXTAREA"!==n.tagName.toUpperCase()||n.readOnly||n.disabled}t&&e.preventDefault()}))},k=function(e){var t,n=e.engine,r=e.controls;r.worldTree=o('<div class="ins-world-tree">').jstree({core:{check_callback:!0,animation:!1},dnd:{copy:!1},search:{show_only_matches:!0,fuzzy:!1},types:{"#":{valid_children:[]},body:{valid_children:[]},constraint:{valid_children:[]},composite:{valid_children:[]},bodies:{valid_children:["body"]},constraints:{valid_children:["constraint"]},composites:{valid_children:["composite"]}},plugins:["dnd","types","unique","search"]}),r.container.append(r.worldTree),e.hasExpanded=!1,r.worldTree.on("refresh.jstree",(function(){e.autoExpand&&!e.hasExpanded&&(e.hasExpanded=!0,r.worldTree.jstree("open_all"))})),r.worldTree.on("changed.jstree",(function(i,o){var s=[],a=r.worldTree.data("jstree");"select_node"===o.action&&(clearTimeout(t),t=setTimeout((function(){o.selected=a.get_selected();for(var t=0;t<o.selected.length;t++){var r=o.selected[t],i=r.split("_")[0],l=r.split("_")[1],d=h.get(n.world,l,i);switch(i){case"body":case"constraint":case"composite":s.push(d)}}R(e,s)}),1))})),o(document).on("dnd_stop.vakata",(function(t,n){for(var i=r.worldTree.data("jstree"),o=n.data.nodes,s=0;s<o.length;s++){var a=i.get_node(o[s]),l=i.get_node(i.get_parent(o[s])),d=a.data.compositeId,c=l.data.compositeId;if(d!==c){var u=o[s],p=u.split("_")[0],f=u.split("_")[1],g=h.get(e.root,f,p),_=h.get(e.root,d,"composite"),m=h.get(e.root,c,"composite");h.move(_,g,m)}}})),r.worldTree.on("dblclick.jstree",(function(){for(var e=r.worldTree.data("jstree"),t=e.get_selected(),n=0;n<t.length;n++){var i=t[n];switch(i.split("_")[0]){case"composite":case"composites":case"bodies":case"constraints":for(var o=e.get_node(i).children,s=0;s<o.length;s++)e.select_node(o[s],!1)}}}))},w=function(e,t){-1===e.bodyClass.indexOf(" "+t)&&(b.addClass(t),e.bodyClass=" "+b.attr("class"))},A=function(e,t){for(var n=!1,r=t.split(" "),i=0;i<r.length&&!(n=-1!==e.bodyClass.indexOf(" "+r[i]));i++);n&&(b.removeClass(t),e.bodyClass=" "+b.attr("class"))},C=function(e){return m.add(e.mouse.position,e.offset)},E=function(e){var t=e.engine,n=e.mouse,r=C(e),o=e.controls;e.beforeEngineUpdate=function(){var s=(r=C(e)).x-e.mousePrevPosition.x+(i.isPressed("up")+i.isPressed("right")-i.isPressed("down")-i.isPressed("left"));if(t.world.isModified){var a=M(e.root,null,!0);H(o.worldTree.data("jstree"),a),R(e,[])}if(null!==e.selectStart&&(e.selectEnd.x=r.x,e.selectEnd.y=r.y,c.update(e.selectBounds,[e.selectStart,e.selectEnd])),i.shift&&i.isPressed("r")){var l=.03*Math.max(-2,Math.min(2,s));w(e,"ins-cursor-rotate"),P(e,l)}else A(e,"ins-cursor-rotate");if(i.shift&&i.isPressed("s")){var d,h,p=1+.02*Math.max(-2,Math.min(2,s));w(e,"ins-cursor-scale"),i.isPressed("d")?(d=p,h=1):i.isPressed("f")?(d=1,h=p):d=h=p,B(e,d,h)}else A(e,"ins-cursor-scale");2===n.button?(w(e,"ins-cursor-move"),L(e,r.x,r.y)):A(e,"ins-cursor-move"),e.mousePrevPosition=u.clone(r)},p.on(e.engine,"beforeUpdate",e.beforeEngineUpdate),e.mouseConstraint&&(p.on(e.mouseConstraint,"mouseup",(function(){if(null!==e.selectStart){var n=g.region(h.allBodies(t.world),e.selectBounds);R(e,n)}e.selectStart=null,e.selectEnd=null,p.trigger(e,"selectEnd")})),p.on(e.mouseConstraint,"mousedown",(function(){var o,s=h.allBodies(t.world),a=h.allConstraints(t.world),l=i.shift||i.control,d=e.controls.worldTree.data("jstree");if(2===n.button){var f=!1;for(o=0;o<s.length;o++){var g=s[o];if(c.contains(g.bounds,r)&&_.contains(g.vertices,r)){l?F(e,g):R(e,[g]),f=!0;break}}if(!f){for(o=0;o<a.length;o++){var v=a[o],b=v.bodyA,x=v.bodyB;if(-1===v.label.indexOf("Mouse Constraint")){var y=v.pointA,j=v.pointB;if(b&&(y=m.add(b.position,v.pointA)),x&&(j=m.add(x.position,v.pointB)),y&&j){var k=m.magnitudeSquared(m.sub(r,y)),A=m.magnitudeSquared(m.sub(r,j));if(k<100||A<100){l?F(e,v):R(e,[v]),f=!0;break}}}}f?(e.selectStart=null,e.selectEnd=null):(d.deselect_all(!0),R(e,[]),e.selectStart=u.clone(r),e.selectEnd=u.clone(r),c.update(e.selectBounds,[e.selectStart,e.selectEnd]),p.trigger(e,"selectStart"))}}2===n.button&&e.selected.length>0&&(w(e,"ins-cursor-move"),N(e))}))),e.render&&(e.afterRender=function(){var t=e.render.controller,n=e.render.context;t.inspector&&t.inspector(e,n)},p.on(e.render,"afterRender",e.afterRender))},S=function(e){var t,n,r=[],i=e.controls.worldTree.data("jstree");for(n=0;n<e.selected.length;n++)(t=e.selected[n].data)!==e.engine.world&&r.push(t);var o=i.get_selected();for(n=0;n<o.length;n++){var s=i.get_node(o[n]);if("composite"===s.type&&(s=i.get_node(s.children[0])).data){var a=s.data.compositeId;(t=h.get(e.root,a,"composite"))&&t!==e.engine.world&&(r.push(t),i.delete_node(o[n]))}}h.remove(e.root,r,!0),R(e,[])},T=function(e){e.clipboard.length=0;for(var t=0;t<e.selected.length;t++){var n=e.selected[t].data;"body"===n.type&&e.clipboard.push(n)}},O=function(e){if(e.serializer){for(var t=[],n=e.controls.worldTree.data("jstree"),r=0;r<e.clipboard.length;r++){var i=e.clipboard[r],o=a.clone(e.serializer,i);d.translate(o,{x:50,y:50});var s=n.get_node(i.type+"_"+i.id,!1).data.compositeId,l=h.get(e.engine.world,s,"composite");h.add(l,o),t.push(o)}setTimeout((function(){R(e,t)}),200)}},N=function(e){for(var t,n,r=e.selected,i=C(e),o=0;o<r.length;o++)(n=(t=r[o]).data).position?t.mousedownOffset={x:i.x-n.position.x,y:i.y-n.position.y}:n.pointA&&!n.bodyA?t.mousedownOffset={x:i.x-n.pointA.x,y:i.y-n.pointA.y}:n.pointB&&!n.bodyB&&(t.mousedownOffset={x:i.x-n.pointB.x,y:i.y-n.pointB.y})},L=function(e,t,n){for(var r,i,o=e.selected,s=0;s<o.length;s++)if(i=(r=o[s]).data,r.mousedownOffset)switch(i.type){case"body":var a={x:t-i.position.x-r.mousedownOffset.x,y:n-i.position.y-r.mousedownOffset.y};d.translate(i,a),i.positionPrev.x=i.position.x,i.positionPrev.y=i.position.y;break;case"constraint":var l=i.pointA;i.bodyA&&(l=i.pointB),l.x=t-r.mousedownOffset.x,l.y=n-r.mousedownOffset.y;var c=i.bodyA?m.add(i.bodyA.position,i.pointA):i.pointA,h=i.bodyB?m.add(i.bodyB.position,i.pointB):i.pointB;i.length=m.magnitude(m.sub(c,h))}},B=function(e,t,n){for(var r,i=e.selected,o=0;o<i.length;o++)switch((r=i[o].data).type){case"body":d.scale(r,t,n,r.position),r.circleRadius&&(r.circleRadius*=t)}},P=function(e,t){for(var n,r=e.selected,i=0;i<r.length;i++)switch((n=r[i].data).type){case"body":d.rotate(n,t)}},D=function(e,t){t?(e.autoRewind&&e.serializer&&(R(e,[]),a.loadState(e.serializer,e.engine,"pauseState")),e.engine.timing.timeScale=0,e.isPaused=!0,e.controls.pauseButton.text("Play"),p.trigger(e,"paused")):(e.autoRewind&&e.serializer&&a.saveState(e.serializer,e.engine,"pauseState"),e.engine.timing.timeScale=1,e.isPaused=!1,e.controls.pauseButton.text("Pause"),p.trigger(e,"play"))},R=function(e,t){var n,r,i=e.controls.worldTree.data("jstree");for(r=0;r<e.selected.length;r++)n=e.selected[r].data,i.deselect_node(n.type+"_"+n.id,!0);for(e.selected=[],t.length>0&&console.clear(),r=0;r<t.length;r++)(n=t[r])&&(F(e,n),r<5?console.log(n.label+" "+n.id+": %O",n):6===r&&console.warn("Omitted inspecting "+(t.length-5)+" more objects"))},F=function(e,t){if(t){var n=e.controls.worldTree.data("jstree");e.selected.push({data:t}),n.select_node(t.type+"_"+t.id,!0)}},H=function(e,t){t[0].state=t[0].state||{opened:!0},e.settings.core.data=t,e.refresh(-1)},M=function(e,t,n){var r=[],i={id:"composite_"+e.id,data:{compositeId:t},type:"composite",text:(e.label?e.label:"Composite")+" "+e.id,li_attr:{class:"jstree-node-type-composite"}},o=z(e.composites,e.id);return o.id="composites_"+e.id,r.push(o),n?o.children:((o=I(e.bodies,e.id)).id="bodies_"+e.id,r.push(o),(o=q(e.constraints,e.id)).id="constraints_"+e.id,r.push(o),i.children=r,i)},z=function(e,t){for(var n={type:"composites",text:"Composites",data:{compositeId:t},children:[],li_attr:{class:"jstree-node-type-composites"}},r=0;r<e.length;r++){var i=e[r];n.children.push(M(i,t))}return n},I=function(e,t){for(var n={type:"bodies",text:"Bodies",data:{compositeId:t},children:[],li_attr:{class:"jstree-node-type-bodies"}},r=0;r<e.length;r++){var i=e[r];n.children.push({type:"body",id:"body_"+i.id,data:{compositeId:t},text:(i.label?i.label:"Body")+" "+i.id,li_attr:{class:"jstree-node-type-body"}})}return n},q=function(e,t){for(var n={type:"constraints",text:"Constraints",data:{compositeId:t},children:[],li_attr:{class:"jstree-node-type-constraints"}},r=0;r<e.length;r++){var i=e[r];n.children.push({type:"constraint",id:"constraint_"+i.id,data:{compositeId:t},text:(i.label?i.label:"Constraint")+" "+i.id,li_attr:{class:"jstree-node-type-constraint"}})}return n},U=function(e){var t=h.create();h.add(e.root,t),e.root.composites.splice(e.root.composites.length-1,1),e.root.composites.unshift(t),h.setModified(e.engine.world,!0,!0,!1)},V=function(e){if(e.serializer)if(0!==e.selected.length){for(var t="export-objects",n=h.create({label:"Exported Objects"}),r=0;r<e.selected.length;r++){var i=e.selected[r].data;h.get(n,i.id,i.type)||(h.add(n,i),1===e.selected.length&&(t="export-"+i.label+"-"+i.id))}t=t.toLowerCase().replace(/[^\w\-]/g,"")+".json";var o=a.serialise(e.serializer,n,e.exportIndent);if("WebkitAppearance"in document.documentElement.style){var s=new Blob([o],{type:"application/json"}),l=document.createElement("a");l.download=t,l.href=(window.webkitURL||window.URL).createObjectURL(s),l.dataset.downloadurl=["application/json",l.download,l.href].join(":"),l.click()}else window.open("data:application/json;charset=utf-8,"+escape(o));p.trigger(e,"export")}else alert("No objects were selected, so export could not be created. Can only export objects that are in the World composite.");else alert("No serializer.")},K=function(e){if(e.serializer){var t,n=document.createElement("div");n.innerHTML='<input type="file">',(t=n.firstChild).addEventListener("change",(function(){var n=t.files[0];if(n.name.match(/\.(txt|json)$/)){var r=new FileReader;r.onload=function(){var t=e.serializer.parse(r.result);if(t){t.label="Imported Objects",h.rebase(t),h.add(e.root,t),e.root.composites.splice(e.root.composites.length-1,1),e.root.composites.unshift(t);var n=e.controls.worldTree.data("jstree"),i=M(e.root,null,!0);H(n,i)}},r.readAsText(n)}else alert("File not supported, .json or .txt JSON files only")})),t.click()}else alert("No serializer.")}},function(e,t,n){var r;/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(e){return o.flat.call(e)}:function(e){return o.concat.apply([],e)},d=o.push,c=o.indexOf,h={},u=h.toString,p=h.hasOwnProperty,f=p.toString,g=f.call(Object),_={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},v=function(e){return null!=e&&e===e.window},b=n.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function y(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in x)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function j(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?h[u.call(e)]||"object":typeof e}var k="3.5.1",w=function(e,t){return new w.fn.init(e,t)};function A(e){var t=!!e&&"length"in e&&e.length,n=j(e);return!m(e)&&!v(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}w.fn=w.prototype={jquery:k,constructor:w,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(w.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:d,sort:o.sort,splice:o.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[a]||{},a++),"object"==typeof s||m(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(e=arguments[a]))for(t in e)r=e[t],"__proto__"!==t&&s!==r&&(d&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[t],o=i&&!Array.isArray(n)?[]:i||w.isPlainObject(n)?n:{},i=!1,s[t]=w.extend(d,o,r)):void 0!==r&&(s[t]=r));return s},w.extend({expando:"jQuery"+(k+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==u.call(e)||(t=s(e))&&("function"!=typeof(n=p.call(t,"constructor")&&t.constructor)||f.call(n)!==g))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){y(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(A(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(A(Object(e))?w.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:c.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(A(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return l(s)},guid:1,support:_}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=o[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){h["[object "+t+"]"]=t.toLowerCase()}));var C=function(e){var t,n,r,i,o,s,a,l,d,c,h,u,p,f,g,_,m,v,b,x="sizzle"+1*new Date,y=e.document,j=0,k=0,w=le(),A=le(),C=le(),E=le(),S=function(e,t){return e===t&&(h=!0),0},T={}.hasOwnProperty,O=[],N=O.pop,L=O.push,B=O.push,P=O.slice,D=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",F="[\\x20\\t\\r\\n\\f]",H="(?:\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",M="\\["+F+"*("+H+")(?:"+F+"*([*^$|!~]?=)"+F+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+H+"))|)"+F+"*\\]",z=":("+H+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",I=new RegExp(F+"+","g"),q=new RegExp("^"+F+"+|((?:^|[^\\\\])(?:\\\\.)*)"+F+"+$","g"),U=new RegExp("^"+F+"*,"+F+"*"),V=new RegExp("^"+F+"*([>+~]|"+F+")"+F+"*"),K=new RegExp(F+"|>"),$=new RegExp(z),G=new RegExp("^"+H+"$"),W={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"<22>":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){u()},se=xe((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{B.apply(O=P.call(y.childNodes),y.childNodes),O[y.childNodes.length].nodeType}catch(t){B={apply:O.length?function(e,t){L.apply(e,P.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function ae(e,t,r,i){var o,a,d,c,h,f,m,v=t&&t.ownerDocument,y=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==y&&9!==y&&11!==y)return r;if(!i&&(u(t),t=t||p,g)){if(11!==y&&(h=Z.exec(e)))if(o=h[1]){if(9===y){if(!(d=t.getElementById(o)))return r;if(d.id===o)return r.push(d),r}else if(v&&(d=v.getElementById(o))&&b(t,d)&&d.id===o)return r.push(d),r}else{if(h[2])return B.apply(r,t.getElementsByTagName(e)),r;if((o=h[3])&&n.getElementsByClassName&&t.getElementsByClassName)return B.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!E[e+" "]&&(!_||!_.test(e))&&(1!==y||"object"!==t.nodeName.toLowerCase())){if(m=e,v=t,1===y&&(K.test(e)||V.test(e))){for((v=ee.test(e)&&me(t.parentNode)||t)===t&&n.scope||((c=t.getAttribute("id"))?c=c.replace(re,ie):t.setAttribute("id",c=x)),a=(f=s(e)).length;a--;)f[a]=(c?"#"+c:":scope")+" "+be(f[a]);m=f.join(",")}try{return B.apply(r,v.querySelectorAll(m)),r}catch(t){E(e,!0)}finally{c===x&&t.removeAttribute("id")}}}return l(e.replace(q,"$1"),t,r,i)}function le(){var e=[];return function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function de(e){return e[x]=!0,e}function ce(e){var t=p.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function he(e,t){for(var n=e.split("|"),i=n.length;i--;)r.attrHandle[n[i]]=t}function ue(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function pe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function fe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ge(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function _e(e){return de((function(t){return t=+t,de((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(t in n=ae.support={},o=ae.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!X.test(t||n&&n.nodeName||"HTML")},u=ae.setDocument=function(e){var t,i,s=e?e.ownerDocument||e:y;return s!=p&&9===s.nodeType&&s.documentElement&&(f=(p=s).documentElement,g=!o(p),y!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=ce((function(e){return f.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),n.attributes=ce((function(e){return e.className="i",!e.getAttribute("className")})),n.getElementsByTagName=ce((function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length})),n.getElementsByClassName=Q.test(p.getElementsByClassName),n.getById=ce((function(e){return f.appendChild(e).id=x,!p.getElementsByName||!p.getElementsByName(x).length})),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},m=[],_=[],(n.qsa=Q.test(p.querySelectorAll))&&(ce((function(e){var t;f.appendChild(e).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+F+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+F+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+x+"-]").length||_.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||_.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+x+"+*").length||_.push(".#.+[+~]"),e.querySelectorAll("\\\f"),_.push("[\\r\\n\\f]")})),ce((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+F+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&_.push(":enabled",":disabled"),f.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")}))),(n.matchesSelector=Q.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ce((function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),m.push("!=",z)})),_=_.length&&new RegExp(_.join("|")),m=m.length&&new RegExp(m.join("|")),t=Q.test(f.compareDocumentPosition),b=t||Q.test(f.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},S=t?function(e,t){if(e===t)return h=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==y&&b(y,e)?-1:t==p||t.ownerDocument==y&&b(y,t)?1:c?D(c,e)-D(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return h=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:c?D(c,e)-D(c,t):0;if(i===o)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?ue(s[r],a[r]):s[r]==y?-1:a[r]==y?1:0}),p},ae.matches=function(e,t){return ae(e,null,null,t)},ae.matchesSelector=function(e,t){if(u(e),n.matchesSelector&&g&&!E[t+" "]&&(!m||!m.test(t))&&(!_||!_.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){E(t,!0)}return 0<ae(t,p,null,[e]).length},ae.contains=function(e,t){return(e.ownerDocument||e)!=p&&u(e),b(e,t)},ae.attr=function(e,t){(e.ownerDocument||e)!=p&&u(e);var i=r.attrHandle[t.toLowerCase()],o=i&&T.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},ae.escape=function(e){return(e+"").replace(re,ie)},ae.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},ae.uniqueSort=function(e){var t,r=[],i=0,o=0;if(h=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(S),h){for(;t=e[o++];)t===e[o]&&(i=r.push(o));for(;i--;)e.splice(r[i],1)}return c=null,e},i=ae.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[r++];)n+=i(t);return n},(r=ae.selectors={cacheLength:50,createPseudo:de,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ae.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ae.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&$.test(n)&&(t=s(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=w[e+" "];return t||(t=new RegExp("(^|"+F+")"+e+"("+F+"|$)"))&&w(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=ae.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&-1<i.indexOf(n):"$="===t?n&&i.slice(-n.length)===n:"~="===t?-1<(" "+i.replace(I," ")+" ").indexOf(n):"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var d,c,h,u,p,f,g=o!==s?"nextSibling":"previousSibling",_=t.parentNode,m=a&&t.nodeName.toLowerCase(),v=!l&&!a,b=!1;if(_){if(o){for(;g;){for(u=t;u=u[g];)if(a?u.nodeName.toLowerCase()===m:1===u.nodeType)return!1;f=g="only"===e&&!f&&"nextSibling"}return!0}if(f=[s?_.firstChild:_.lastChild],s&&v){for(b=(p=(d=(c=(h=(u=_)[x]||(u[x]={}))[u.uniqueID]||(h[u.uniqueID]={}))[e]||[])[0]===j&&d[1])&&d[2],u=p&&_.childNodes[p];u=++p&&u&&u[g]||(b=p=0)||f.pop();)if(1===u.nodeType&&++b&&u===t){c[e]=[j,p,b];break}}else if(v&&(b=p=(d=(c=(h=(u=t)[x]||(u[x]={}))[u.uniqueID]||(h[u.uniqueID]={}))[e]||[])[0]===j&&d[1]),!1===b)for(;(u=++p&&u&&u[g]||(b=p=0)||f.pop())&&((a?u.nodeName.toLowerCase()!==m:1!==u.nodeType)||!++b||(v&&((c=(h=u[x]||(u[x]={}))[u.uniqueID]||(h[u.uniqueID]={}))[e]=[j,b]),u!==t)););return(b-=i)===r||b%r==0&&0<=b/r}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||ae.error("unsupported pseudo: "+e);return i[x]?i(t):1<i.length?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?de((function(e,n){for(var r,o=i(e,t),s=o.length;s--;)e[r=D(e,o[s])]=!(n[r]=o[s])})):function(e){return i(e,0,n)}):i}},pseudos:{not:de((function(e){var t=[],n=[],r=a(e.replace(q,"$1"));return r[x]?de((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:de((function(e){return function(t){return 0<ae(e,t).length}})),contains:de((function(e){return e=e.replace(te,ne),function(t){return-1<(t.textContent||i(t)).indexOf(e)}})),lang:de((function(e){return G.test(e||"")||ae.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return J.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:_e((function(){return[0]})),last:_e((function(e,t){return[t-1]})),eq:_e((function(e,t,n){return[n<0?n+t:n]})),even:_e((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:_e((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:_e((function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e})),gt:_e((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=r.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=pe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=fe(t);function ve(){}function be(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function xe(e,t,n){var r=t.dir,i=t.next,o=i||r,s=n&&"parentNode"===o,a=k++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,l){var d,c,h,u=[j,a];if(l){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,l))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(c=(h=t[x]||(t[x]={}))[t.uniqueID]||(h[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((d=c[o])&&d[0]===j&&d[1]===a)return u[2]=d[2];if((c[o]=u)[2]=e(t,n,l))return!0}return!1}}function ye(e){return 1<e.length?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function je(e,t,n,r,i){for(var o,s=[],a=0,l=e.length,d=null!=t;a<l;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),d&&t.push(a)));return s}function ke(e,t,n,r,i,o){return r&&!r[x]&&(r=ke(r)),i&&!i[x]&&(i=ke(i,o)),de((function(o,s,a,l){var d,c,h,u=[],p=[],f=s.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ae(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),_=!e||!o&&t?g:je(g,u,e,a,l),m=n?i||(o?e:f||r)?[]:s:_;if(n&&n(_,m,a,l),r)for(d=je(m,p),r(d,[],a,l),c=d.length;c--;)(h=d[c])&&(m[p[c]]=!(_[p[c]]=h));if(o){if(i||e){if(i){for(d=[],c=m.length;c--;)(h=m[c])&&d.push(_[c]=h);i(null,m=[],d,l)}for(c=m.length;c--;)(h=m[c])&&-1<(d=i?D(o,h):u[c])&&(o[d]=!(s[d]=h))}}else m=je(m===s?m.splice(f,m.length):m),i?i(null,s,m,l):B.apply(s,m)}))}function we(e){for(var t,n,i,o=e.length,s=r.relative[e[0].type],a=s||r.relative[" "],l=s?1:0,c=xe((function(e){return e===t}),a,!0),h=xe((function(e){return-1<D(t,e)}),a,!0),u=[function(e,n,r){var i=!s&&(r||n!==d)||((t=n).nodeType?c(e,n,r):h(e,n,r));return t=null,i}];l<o;l++)if(n=r.relative[e[l].type])u=[xe(ye(u),n)];else{if((n=r.filter[e[l].type].apply(null,e[l].matches))[x]){for(i=++l;i<o&&!r.relative[e[i].type];i++);return ke(1<l&&ye(u),1<l&&be(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(q,"$1"),n,l<i&&we(e.slice(l,i)),i<o&&we(e=e.slice(i)),i<o&&be(e))}u.push(n)}return ye(u)}return ve.prototype=r.filters=r.pseudos,r.setFilters=new ve,s=ae.tokenize=function(e,t){var n,i,o,s,a,l,d,c=A[e+" "];if(c)return t?0:c.slice(0);for(a=e,l=[],d=r.preFilter;a;){for(s in n&&!(i=U.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),n=!1,(i=V.exec(a))&&(n=i.shift(),o.push({value:n,type:i[0].replace(q," ")}),a=a.slice(n.length)),r.filter)!(i=W[s].exec(a))||d[s]&&!(i=d[s](i))||(n=i.shift(),o.push({value:n,type:s,matches:i}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ae.error(e):A(e,l).slice(0)},a=ae.compile=function(e,t){var n,i,o,a,l,c,h=[],f=[],_=C[e+" "];if(!_){for(t||(t=s(e)),n=t.length;n--;)(_=we(t[n]))[x]?h.push(_):f.push(_);(_=C(e,(i=f,a=0<(o=h).length,l=0<i.length,c=function(e,t,n,s,c){var h,f,_,m=0,v="0",b=e&&[],x=[],y=d,k=e||l&&r.find.TAG("*",c),w=j+=null==y?1:Math.random()||.1,A=k.length;for(c&&(d=t==p||t||c);v!==A&&null!=(h=k[v]);v++){if(l&&h){for(f=0,t||h.ownerDocument==p||(u(h),n=!g);_=i[f++];)if(_(h,t||p,n)){s.push(h);break}c&&(j=w)}a&&((h=!_&&h)&&m--,e&&b.push(h))}if(m+=v,a&&v!==m){for(f=0;_=o[f++];)_(b,x,t,n);if(e){if(0<m)for(;v--;)b[v]||x[v]||(x[v]=N.call(s));x=je(x)}B.apply(s,x),c&&!e&&0<x.length&&1<m+o.length&&ae.uniqueSort(s)}return c&&(j=w,d=y),b},a?de(c):c))).selector=e}return _},l=ae.select=function(e,t,n,i){var o,l,d,c,h,u="function"==typeof e&&e,p=!i&&s(e=u.selector||e);if(n=n||[],1===p.length){if(2<(l=p[0]=p[0].slice(0)).length&&"ID"===(d=l[0]).type&&9===t.nodeType&&g&&r.relative[l[1].type]){if(!(t=(r.find.ID(d.matches[0].replace(te,ne),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(l.shift().value.length)}for(o=W.needsContext.test(e)?0:l.length;o--&&(d=l[o],!r.relative[c=d.type]);)if((h=r.find[c])&&(i=h(d.matches[0].replace(te,ne),ee.test(l[0].type)&&me(t.parentNode)||t))){if(l.splice(o,1),!(e=i.length&&be(l)))return B.apply(n,i),n;break}}return(u||a(e,p))(i,t,!g,n,!t||ee.test(e)&&me(t.parentNode)||t),n},n.sortStable=x.split("").sort(S).join("")===x,n.detectDuplicates=!!h,u(),n.sortDetached=ce((function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))})),ce((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),n.attributes&&ce((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),ce((function(e){return null==e.getAttribute("disabled")}))||he(R,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null})),ae}(n);w.find=C,w.expr=C.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=C.uniqueSort,w.text=C.getText,w.isXMLDoc=C.isXML,w.contains=C.contains,w.escapeSelector=C.escape;var E=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},T=w.expr.match.needsContext;function O(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(e,t,n){return m(t)?w.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?w.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?w.grep(e,(function(e){return-1<c.call(t,e)!==n})):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,(function(e){return 1===e.nodeType})))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter((function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return 1<r?w.uniqueSort(n):n},filter:function(e){return this.pushStack(L(this,e||[],!1))},not:function(e){return this.pushStack(L(this,e||[],!0))},is:function(e){return!!L(this,"string"==typeof e&&T.test(e)?w(e):e||[],!1).length}});var B,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||B,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:P.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),N.test(r[1])&&w.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=b.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,B=w(b);var D=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function F(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],s="string"!=typeof e&&w(e);if(!T.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?c.call(w(e),this[0]):c.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return E(e,"parentNode")},parentsUntil:function(e,t,n){return E(e,"parentNode",n)},next:function(e){return F(e,"nextSibling")},prev:function(e){return F(e,"previousSibling")},nextAll:function(e){return E(e,"nextSibling")},prevAll:function(e){return E(e,"previousSibling")},nextUntil:function(e,t,n){return E(e,"nextSibling",n)},prevUntil:function(e,t,n){return E(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&s(e.contentDocument)?e.contentDocument:(O(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},(function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),1<this.length&&(R[e]||w.uniqueSort(i),D.test(e)&&i.reverse()),this.pushStack(i)}}));var H=/[^\x20\t\r\n\f]+/g;function M(e){return e}function z(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.Callbacks=function(e){var t,n;e="string"==typeof e?(t=e,n={},w.each(t.match(H)||[],(function(e,t){n[t]=!0})),n):w.extend({},e);var r,i,o,s,a=[],l=[],d=-1,c=function(){for(s=s||e.once,o=r=!0;l.length;d=-1)for(i=l.shift();++d<a.length;)!1===a[d].apply(i[0],i[1])&&e.stopOnFalse&&(d=a.length,i=!1);e.memory||(i=!1),r=!1,s&&(a=i?[]:"")},h={add:function(){return a&&(i&&!r&&(d=a.length-1,l.push(i)),function t(n){w.each(n,(function(n,r){m(r)?e.unique&&h.has(r)||a.push(r):r&&r.length&&"string"!==j(r)&&t(r)}))}(arguments),i&&!r&&c()),this},remove:function(){return w.each(arguments,(function(e,t){for(var n;-1<(n=w.inArray(t,a,n));)a.splice(n,1),n<=d&&d--})),this},has:function(e){return e?-1<w.inArray(e,a):0<a.length},empty:function(){return a&&(a=[]),this},disable:function(){return s=l=[],a=i="",this},disabled:function(){return!a},lock:function(){return s=l=[],i||r||(a=i=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),r||c()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!o}};return h},w.extend({Deferred:function(e){var t=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred((function(n){w.each(t,(function(t,r){var i=m(e[r[4]])&&e[r[4]];o[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&m(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var o=0;function s(e,t,r,i){return function(){var a=this,l=arguments,d=function(){var n,d;if(!(e<o)){if((n=r.apply(a,l))===t.promise())throw new TypeError("Thenable self-resolution");d=n&&("object"==typeof n||"function"==typeof n)&&n.then,m(d)?i?d.call(n,s(o,t,M,i),s(o,t,z,i)):(o++,d.call(n,s(o,t,M,i),s(o,t,z,i),s(o,t,M,t.notifyWith))):(r!==M&&(a=void 0,l=[n]),(i||t.resolveWith)(a,l))}},c=i?d:function(){try{d()}catch(n){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(n,c.stackTrace),o<=e+1&&(r!==z&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),n.setTimeout(c))}}return w.Deferred((function(n){t[0][3].add(s(0,n,m(i)?i:M,n.notifyWith)),t[1][3].add(s(0,n,m(e)?e:M)),t[2][3].add(s(0,n,m(r)?r:z))})).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(t,(function(e,n){var s=n[2],a=n[5];i[n[1]]=s.add,a&&s.add((function(){r=a}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),i.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=a.call(arguments),o=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=1<arguments.length?a.call(arguments):n,--t||o.resolveWith(r,i)}};if(t<=1&&(I(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||m(i[n]&&i[n].then)))return o.then();for(;n--;)I(i[n],s(n),o.reject);return o.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&q.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},w.readyException=function(e){n.setTimeout((function(){throw e}))};var U=w.Deferred();function V(){b.removeEventListener("DOMContentLoaded",V),n.removeEventListener("load",V),w.ready()}w.fn.ready=function(e){return U.then(e).catch((function(e){w.readyException(e)})),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0)!==e&&0<--w.readyWait||U.resolveWith(b,[w])}}),w.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(w.ready):(b.addEventListener("DOMContentLoaded",V),n.addEventListener("load",V));var K=function(e,t,n,r,i,o,s){var a=0,l=e.length,d=null==n;if("object"===j(n))for(a in i=!0,n)K(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,m(r)||(s=!0),d&&(s?(t.call(e,r),t=null):(d=t,t=function(e,t,n){return d.call(w(e),n)})),t))for(;a<l;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:d?t.call(e):l?t(e[0],n):o},$=/^-ms-/,G=/-([a-z])/g;function W(e,t){return t.toUpperCase()}function X(e){return e.replace($,"ms-").replace(G,W)}var J=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=w.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},J(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(H)||[]).length;for(;n--;)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var Q=new Y,Z=new Y,ee=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,te=/[A-Z]/g;function ne(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(te,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:ee.test(i)?JSON.parse(i):i)}catch(e){}Z.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return Z.hasData(e)||Q.hasData(e)},data:function(e,t,n){return Z.access(e,t,n)},removeData:function(e,t){Z.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===e){if(this.length&&(i=Z.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=X(r.slice(5)),ne(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each((function(){Z.set(this,e)})):K(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=Z.get(o,e))||void 0!==(n=ne(o,e))?n:void 0;this.each((function(){Z.set(this,e,t)}))}),null,t,1<arguments.length,null,!0)},removeData:function(e){return this.each((function(){Z.remove(this,e)}))}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){w.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:w.Callbacks("once memory").add((function(){Q.remove(e,[t+"queue",n])}))})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each((function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){w.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=Q.get(o[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],se=b.documentElement,ae=function(e){return w.contains(e.ownerDocument,e)},le={composed:!0};se.getRootNode&&(ae=function(e){return w.contains(e.ownerDocument,e)||e.getRootNode(le)===e.ownerDocument});var de=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ae(e)&&"none"===w.css(e,"display")};function ce(e,t,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return w.css(e,t,"")},l=a(),d=n&&n[3]||(w.cssNumber[t]?"":"px"),c=e.nodeType&&(w.cssNumber[t]||"px"!==d&&+l)&&ie.exec(w.css(e,t));if(c&&c[3]!==d){for(l/=2,d=d||c[3],c=+l||1;s--;)w.style(e,t,c+d),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),c/=o;c*=2,w.style(e,t,c+d),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=d,r.start=c,r.end=i)),i}var he={};function ue(e,t){for(var n,r,i,o,s,a,l,d=[],c=0,h=e.length;c<h;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(d[c]=Q.get(r,"display")||null,d[c]||(r.style.display="")),""===r.style.display&&de(r)&&(d[c]=(l=s=o=void 0,s=(i=r).ownerDocument,a=i.nodeName,(l=he[a])||(o=s.body.appendChild(s.createElement(a)),l=w.css(o,"display"),o.parentNode.removeChild(o),"none"===l&&(l="block"),he[a]=l)))):"none"!==n&&(d[c]="none",Q.set(r,"display",n)));for(c=0;c<h;c++)null!=d[c]&&(e[c].style.display=d[c]);return e}w.fn.extend({show:function(){return ue(this,!0)},hide:function(){return ue(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){de(this)?w(this).show():w(this).hide()}))}});var pe,fe,ge=/^(?:checkbox|radio)$/i,_e=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,me=/^$|^module$|\/(?:java|ecma)script/i;pe=b.createDocumentFragment().appendChild(b.createElement("div")),(fe=b.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),pe.appendChild(fe),_.checkClone=pe.cloneNode(!0).cloneNode(!0).lastChild.checked,pe.innerHTML="<textarea>x</textarea>",_.noCloneChecked=!!pe.cloneNode(!0).lastChild.defaultValue,pe.innerHTML="<option></option>",_.option=!!pe.lastChild;var ve={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function be(e,t){var n;return n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&O(e,t)?w.merge([e],n):n}function xe(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}ve.tbody=ve.tfoot=ve.colgroup=ve.caption=ve.thead,ve.th=ve.td,_.option||(ve.optgroup=ve.option=[1,"<select multiple='multiple'>","</select>"]);var ye=/<|&#?\w+;/;function je(e,t,n,r,i){for(var o,s,a,l,d,c,h=t.createDocumentFragment(),u=[],p=0,f=e.length;p<f;p++)if((o=e[p])||0===o)if("object"===j(o))w.merge(u,o.nodeType?[o]:o);else if(ye.test(o)){for(s=s||h.appendChild(t.createElement("div")),a=(_e.exec(o)||["",""])[1].toLowerCase(),l=ve[a]||ve._default,s.innerHTML=l[1]+w.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;w.merge(u,s.childNodes),(s=h.firstChild).textContent=""}else u.push(t.createTextNode(o));for(h.textContent="",p=0;o=u[p++];)if(r&&-1<w.inArray(o,r))i&&i.push(o);else if(d=ae(o),s=be(h.appendChild(o),"script"),d&&xe(s),n)for(c=0;o=s[c++];)me.test(o.type||"")&&n.push(o);return h}var ke=/^key/,we=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ae=/^([^.]*)(?:\.(.+)|)/;function Ce(){return!0}function Ee(){return!1}function Se(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Te(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)Te(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Ee;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return w().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=w.guid++)),e.each((function(){w.event.add(this,t,i,r,n)}))}function Oe(e,t,n){n?(Q.set(e,t,!1),w.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=Q.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(w.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=a.call(arguments),Q.set(this,t,o),r=n(this,t),this[t](),o!==(i=Q.get(this,t))||r?Q.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i.value}else o.length&&(Q.set(this,t,{value:w.event.trigger(w.extend(o[0],w.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,t)&&w.event.add(e,t,Ce)}w.event={global:{},add:function(e,t,n,r,i){var o,s,a,l,d,c,h,u,p,f,g,_=Q.get(e);if(J(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(se,i),n.guid||(n.guid=w.guid++),(l=_.events)||(l=_.events=Object.create(null)),(s=_.handle)||(s=_.handle=function(t){return void 0!==w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),d=(t=(t||"").match(H)||[""]).length;d--;)p=g=(a=Ae.exec(t[d])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=w.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,h=w.event.special[p]||{},c=w.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:f.join(".")},o),(u=l[p])||((u=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(e,r,f,s)||e.addEventListener&&e.addEventListener(p,s)),h.add&&(h.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?u.splice(u.delegateCount++,0,c):u.push(c),w.event.global[p]=!0)},remove:function(e,t,n,r,i){var o,s,a,l,d,c,h,u,p,f,g,_=Q.hasData(e)&&Q.get(e);if(_&&(l=_.events)){for(d=(t=(t||"").match(H)||[""]).length;d--;)if(p=g=(a=Ae.exec(t[d])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=w.event.special[p]||{},u=l[p=(r?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=u.length;o--;)c=u[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(u.splice(o,1),c.selector&&u.delegateCount--,h.remove&&h.remove.call(e,c));s&&!u.length&&(h.teardown&&!1!==h.teardown.call(e,f,_.handle)||w.removeEvent(e,p,_.handle),delete l[p])}else for(p in l)w.event.remove(e,p+t[d],n,r,!0);w.isEmptyObject(l)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,s,a=new Array(arguments.length),l=w.event.fix(e),d=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=w.event.special[l.type]||{};for(a[0]=l,t=1;t<arguments.length;t++)a[t]=arguments[t];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(s=w.event.handlers.call(this,l,d),t=0;(i=s[t++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((w.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(e,t){var n,r,i,o,s,a=[],l=t.delegateCount,d=e.target;if(l&&d.nodeType&&!("click"===e.type&&1<=e.button))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&("click"!==e.type||!0!==d.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[i=(r=t[n]).selector+" "]&&(s[i]=r.needsContext?-1<w(i,this).index(d):w.find(i,this,null,[d]).length),s[i]&&o.push(r);o.length&&a.push({elem:d,handlers:o})}return d=this,l<t.length&&a.push({elem:d,handlers:t.slice(l)}),a},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:m(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return ge.test(t.type)&&t.click&&O(t,"input")&&Oe(t,"click",Ce),!1},trigger:function(e){var t=this||e;return ge.test(t.type)&&t.click&&O(t,"input")&&Oe(t,"click"),!0},_default:function(e){var t=e.target;return ge.test(t.type)&&t.click&&O(t,"input")&&Q.get(t,"click")||O(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ce:Ee,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:Ee,isPropagationStopped:Ee,isImmediatePropagationStopped:Ee,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ce,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ce,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ce,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&ke.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&we.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(e,t){w.event.special[e]={setup:function(){return Oe(this,e,Se),!1},trigger:function(){return Oe(this,e),!0},delegateType:t}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||w.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),w.fn.extend({on:function(e,t,n,r){return Te(this,e,t,n,r)},one:function(e,t,n,r){return Te(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Ee),this.each((function(){w.event.remove(this,e,n,t)}))}});var Ne=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,Be=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Pe(e,t){return O(e,"table")&&O(11!==t.nodeType?t:t.firstChild,"tr")&&w(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,s,a;if(1===t.nodeType){if(Q.hasData(e)&&(a=Q.get(e).events))for(i in Q.remove(t,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)w.event.add(t,i,a[i][n]);Z.hasData(e)&&(o=Z.access(e),s=w.extend({},o),Z.set(t,s))}}function He(e,t,n,r){t=l(t);var i,o,s,a,d,c,h=0,u=e.length,p=u-1,f=t[0],g=m(f);if(g||1<u&&"string"==typeof f&&!_.checkClone&&Le.test(f))return e.each((function(i){var o=e.eq(i);g&&(t[0]=f.call(this,i,o.html())),He(o,t,n,r)}));if(u&&(o=(i=je(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=w.map(be(i,"script"),De)).length;h<u;h++)d=i,h!==p&&(d=w.clone(d,!0,!0),a&&w.merge(s,be(d,"script"))),n.call(e[h],d,h);if(a)for(c=s[s.length-1].ownerDocument,w.map(s,Re),h=0;h<a;h++)d=s[h],me.test(d.type||"")&&!Q.access(d,"globalEval")&&w.contains(c,d)&&(d.src&&"module"!==(d.type||"").toLowerCase()?w._evalUrl&&!d.noModule&&w._evalUrl(d.src,{nonce:d.nonce||d.getAttribute("nonce")},c):y(d.textContent.replace(Be,""),d,c))}return e}function Me(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(be(r)),r.parentNode&&(n&&ae(r)&&xe(be(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,s,a,l,d,c=e.cloneNode(!0),h=ae(e);if(!(_.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(s=be(c),r=0,i=(o=be(e)).length;r<i;r++)a=o[r],"input"===(d=(l=s[r]).nodeName.toLowerCase())&&ge.test(a.type)?l.checked=a.checked:"input"!==d&&"textarea"!==d||(l.defaultValue=a.defaultValue);if(t)if(n)for(o=o||be(e),s=s||be(c),r=0,i=o.length;r<i;r++)Fe(o[r],s[r]);else Fe(e,c);return 0<(s=be(c,"script")).length&&xe(s,!h&&be(e,"script")),c},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(J(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return K(this,(function(e){return void 0===e?w.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return He(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Pe(this,e).appendChild(e)}))},prepend:function(){return He(this,arguments,(function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Pe(this,e);t.insertBefore(e,t.firstChild)}}))},before:function(){return He(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return He(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(be(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return w.clone(this,e,t)}))},html:function(e){return K(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ne.test(e)&&!ve[(_e.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(be(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return He(this,arguments,(function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(be(this)),n&&n.replaceChild(t,this))}),e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),w(i[s])[t](n),d.apply(r,n.get());return this.pushStack(r)}}));var ze=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),Ie=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=n),t.getComputedStyle(e)},qe=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},Ue=new RegExp(oe.join("|"),"i");function Ve(e,t,n){var r,i,o,s,a=e.style;return(n=n||Ie(e))&&(""!==(s=n.getPropertyValue(t)||n[t])||ae(e)||(s=w.style(e,t)),!_.pixelBoxStyles()&&ze.test(s)&&Ue.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o)),void 0!==s?s+"":s}function Ke(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(c){d.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",se.appendChild(d).appendChild(c);var e=n.getComputedStyle(c);r="1%"!==e.top,l=12===t(e.marginLeft),c.style.right="60%",s=36===t(e.right),i=36===t(e.width),c.style.position="absolute",o=12===t(c.offsetWidth/3),se.removeChild(d),c=null}}function t(e){return Math.round(parseFloat(e))}var r,i,o,s,a,l,d=b.createElement("div"),c=b.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",_.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(_,{boxSizingReliable:function(){return e(),i},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),r},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,t,r,i;return null==a&&(e=b.createElement("table"),t=b.createElement("tr"),r=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px",t.style.height="1px",r.style.height="9px",se.appendChild(e).appendChild(t).appendChild(r),i=n.getComputedStyle(t),a=3<parseInt(i.height),se.removeChild(e)),a}}))}();var $e=["Webkit","Moz","ms"],Ge=b.createElement("div").style,We={};function Xe(e){return w.cssProps[e]||We[e]||(e in Ge?e:We[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=$e.length;n--;)if((e=$e[n]+t)in Ge)return e}(e)||e)}var Je=/^(none|table(?!-c[ea]).+)/,Ye=/^--/,Qe={position:"absolute",visibility:"hidden",display:"block"},Ze={letterSpacing:"0",fontWeight:"400"};function et(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function tt(e,t,n,r,i,o){var s="width"===t?1:0,a=0,l=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=w.css(e,n+oe[s],!0,i)),r?("content"===n&&(l-=w.css(e,"padding"+oe[s],!0,i)),"margin"!==n&&(l-=w.css(e,"border"+oe[s]+"Width",!0,i))):(l+=w.css(e,"padding"+oe[s],!0,i),"padding"!==n?l+=w.css(e,"border"+oe[s]+"Width",!0,i):a+=w.css(e,"border"+oe[s]+"Width",!0,i));return!r&&0<=o&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))||0),l}function nt(e,t,n){var r=Ie(e),i=(!_.boxSizingReliable()||n)&&"border-box"===w.css(e,"boxSizing",!1,r),o=i,s=Ve(e,t,r),a="offset"+t[0].toUpperCase()+t.slice(1);if(ze.test(s)){if(!n)return s;s="auto"}return(!_.boxSizingReliable()&&i||!_.reliableTrDimensions()&&O(e,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===w.css(e,"boxSizing",!1,r),(o=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+tt(e,t,n||(i?"border":"content"),o,r,s)+"px"}function rt(e,t,n,r,i){return new rt.prototype.init(e,t,n,r,i)}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ve(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=X(t),l=Ye.test(t),d=e.style;if(l||(t=Xe(a)),s=w.cssHooks[t]||w.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:d[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ce(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(w.cssNumber[a]?"":"px")),_.clearCloneStyle||""!==n||0!==t.indexOf("background")||(d[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(l?d.setProperty(t,n):d[t]=n))}},css:function(e,t,n,r){var i,o,s,a=X(t);return Ye.test(t)||(t=Xe(a)),(s=w.cssHooks[t]||w.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ve(e,t,r)),"normal"===i&&t in Ze&&(i=Ze[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],(function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!Je.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?nt(e,t,r):qe(e,Qe,(function(){return nt(e,t,r)}))},set:function(e,n,r){var i,o=Ie(e),s=!_.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===w.css(e,"boxSizing",!1,o),l=r?tt(e,t,r,a,o):0;return a&&s&&(l-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-tt(e,t,"border",!1,o)-.5)),l&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),et(0,n,l)}}})),w.cssHooks.marginLeft=Ke(_.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Ve(e,"marginLeft"))||e.getBoundingClientRect().left-qe(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=et)})),w.fn.extend({css:function(e,t){return K(this,(function(e,t,n){var r,i,o={},s=0;if(Array.isArray(t)){for(r=Ie(e),i=t.length;s<i;s++)o[t[s]]=w.css(e,t[s],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)}),e,t,1<arguments.length)}}),((w.Tween=rt).prototype={constructor:rt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=rt.propHooks[this.prop];return e&&e.get?e.get(this):rt.propHooks._default.get(this)},run:function(e){var t,n=rt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rt.propHooks._default.set(this),this}}).init.prototype=rt.prototype,(rt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||!w.cssHooks[e.prop]&&null==e.elem.style[Xe(e.prop)]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=rt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=rt.prototype.init,w.fx.step={};var it,ot,st,at,lt=/^(?:toggle|show|hide)$/,dt=/queueHooks$/;function ct(){ot&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(ct):n.setTimeout(ct,w.fx.interval),w.fx.tick())}function ht(){return n.setTimeout((function(){it=void 0})),it=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function ft(e,t,n){var r,i,o=0,s=ft.prefilters.length,a=w.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var t=it||ht(),n=Math.max(0,d.startTime+d.duration-t),r=1-(n/d.duration||0),o=0,s=d.tweens.length;o<s;o++)d.tweens[o].run(r);return a.notifyWith(e,[d,r,n]),r<1&&s?n:(s||a.notifyWith(e,[d,1,0]),a.resolveWith(e,[d]),!1)},d=a.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:it||ht(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,d.opts,t,n,d.opts.specialEasing[t]||d.opts.easing);return d.tweens.push(r),r},stop:function(t){var n=0,r=t?d.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)d.tweens[n].run(1);return t?(a.notifyWith(e,[d,1,0]),a.resolveWith(e,[d,t])):a.rejectWith(e,[d,t]),this}}),c=d.props;for(function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=w.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,d.opts.specialEasing);o<s;o++)if(r=ft.prefilters[o].call(d,e,c,d.opts))return m(r.stop)&&(w._queueHooks(d.elem,d.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,pt,d),m(d.opts.start)&&d.opts.start.call(e,d),d.progress(d.opts.progress).done(d.opts.done,d.opts.complete).fail(d.opts.fail).always(d.opts.always),w.fx.timer(w.extend(l,{elem:e,anim:d,queue:d.opts.queue})),d}w.Animation=w.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ce(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(H);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,s,a,l,d,c,h="width"in t||"height"in t,u=this,p={},f=e.style,g=e.nodeType&&de(e),_=Q.get(e,"fxshow");for(r in n.queue||(null==(s=w._queueHooks(e,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,u.always((function(){u.always((function(){s.unqueued--,w.queue(e,"fx").length||s.empty.fire()}))}))),t)if(i=t[r],lt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!_||void 0===_[r])continue;g=!0}p[r]=_&&_[r]||w.style(e,r)}if((l=!w.isEmptyObject(t))||!w.isEmptyObject(p))for(r in h&&1===e.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(d=_&&_.display)&&(d=Q.get(e,"display")),"none"===(c=w.css(e,"display"))&&(d?c=d:(ue([e],!0),d=e.style.display||d,c=w.css(e,"display"),ue([e]))),("inline"===c||"inline-block"===c&&null!=d)&&"none"===w.css(e,"float")&&(l||(u.done((function(){f.display=d})),null==d&&(c=f.display,d="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",u.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),l=!1,p)l||(_?"hidden"in _&&(g=_.hidden):_=Q.access(e,"fxshow",{display:d}),o&&(_.hidden=!g),g&&ue([e],!0),u.done((function(){for(r in g||ue([e]),Q.remove(e,"fxshow"),p)w.style(e,r,p[r])}))),l=pt(g?_[r]:0,r,u),r in _||(_[r]=l.start,g&&(l.end=l.start,l.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(de).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),s=function(){var t=ft(this,w.extend({},e),o);(i||Q.get(this,"finish"))&&t.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,s=Q.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&dt.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=Q.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,s=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<s;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),w.each(["toggle","show","hide"],(function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}})),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(it=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),it=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){ot||(ot=!0,ct())},w.fx.stop=function(){ot=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(e,t){return e=w.fx&&w.fx.speeds[e]||e,t=t||"fx",this.queue(t,(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},st=b.createElement("input"),at=b.createElement("select").appendChild(b.createElement("option")),st.type="checkbox",_.checkOn=""!==st.value,_.optSelected=at.selected,(st=b.createElement("input")).value="t",st.type="radio",_.radioValue="t"===st.value;var gt,_t=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return K(this,w.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){w.removeAttr(this,e)}))}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?gt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!_.radioValue&&"radio"===t&&O(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(H);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),gt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=_t[t]||w.find.attr;_t[t]=function(e,t,r){var i,o,s=t.toLowerCase();return r||(o=_t[s],_t[s]=i,i=null!=n(e,t,r)?s:null,_t[s]=o),i}}));var mt=/^(?:input|select|textarea|button)$/i,vt=/^(?:a|area)$/i;function bt(e){return(e.match(H)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function yt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(H)||[]}w.fn.extend({prop:function(e,t){return K(this,w.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[w.propFix[e]||e]}))}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):mt.test(e.nodeName)||vt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(e){var t,n,r,i,o,s,a,l=0;if(m(e))return this.each((function(t){w(this).addClass(e.call(this,t,xt(this)))}));if((t=yt(e)).length)for(;n=this[l++];)if(i=xt(n),r=1===n.nodeType&&" "+bt(i)+" "){for(s=0;o=t[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=bt(r))&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,r,i,o,s,a,l=0;if(m(e))return this.each((function(t){w(this).removeClass(e.call(this,t,xt(this)))}));if(!arguments.length)return this.attr("class","");if((t=yt(e)).length)for(;n=this[l++];)if(i=xt(n),r=1===n.nodeType&&" "+bt(i)+" "){for(s=0;o=t[s++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(a=bt(r))&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):m(e)?this.each((function(n){w(this).toggleClass(e.call(this,n,xt(this),t),t)})):this.each((function(){var t,i,o,s;if(r)for(i=0,o=w(this),s=yt(e);t=s[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||((t=xt(this))&&Q.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Q.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+bt(xt(n))+" ").indexOf(t))return!0;return!1}});var jt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=m(e),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,(function(e){return null==e?"":e+""}))),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))}))):i?(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(jt,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:bt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:i.length;for(r=o<0?l:s?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!O(n.parentNode,"optgroup"))){if(t=w(n).val(),s)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=w.makeArray(t),s=i.length;s--;)((r=i[s]).selected=-1<w.inArray(w.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<w.inArray(w(e).val(),t)}},_.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),_.focusin="onfocusin"in n;var kt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(e,t,r,i){var o,s,a,l,d,c,h,u,f=[r||b],g=p.call(e,"type")?e.type:e,_=p.call(e,"namespace")?e.namespace.split("."):[];if(s=u=a=r=r||b,3!==r.nodeType&&8!==r.nodeType&&!kt.test(g+w.event.triggered)&&(-1<g.indexOf(".")&&(g=(_=g.split(".")).shift(),_.sort()),d=g.indexOf(":")<0&&"on"+g,(e=e[w.expando]?e:new w.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=_.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:w.makeArray(t,[e]),h=w.event.special[g]||{},i||!h.trigger||!1!==h.trigger.apply(r,t))){if(!i&&!h.noBubble&&!v(r)){for(l=h.delegateType||g,kt.test(l+g)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(r.ownerDocument||b)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)u=s,e.type=1<o?l:h.bindType||g,(c=(Q.get(s,"events")||Object.create(null))[e.type]&&Q.get(s,"handle"))&&c.apply(s,t),(c=d&&s[d])&&c.apply&&J(s)&&(e.result=c.apply(s,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||h._default&&!1!==h._default.apply(f.pop(),t)||!J(r)||d&&m(r[g])&&!v(r)&&((a=r[d])&&(r[d]=null),w.event.triggered=g,e.isPropagationStopped()&&u.addEventListener(g,wt),r[g](),e.isPropagationStopped()&&u.removeEventListener(g,wt),w.event.triggered=void 0,a&&(r[d]=a)),e.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each((function(){w.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),_.focusin||w.each({focus:"focusin",blur:"focusout"},(function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,t);i||r.addEventListener(e,n,!0),Q.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=Q.access(r,t)-1;i?Q.access(r,t,i):(r.removeEventListener(e,n,!0),Q.remove(r,t))}}}));var At=n.location,Ct={guid:Date.now()},Et=/\?/;w.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+e),t};var St=/\[\]$/,Tt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function Lt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,(function(t,i){n||St.test(e)?r(e,i):Lt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)}));else if(n||"object"!==j(t))r(e,t);else for(i in t)Lt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,(function(){i(this.name,this.value)}));else for(n in e)Lt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&Nt.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!ge.test(e))})).map((function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(e){return{name:t.name,value:e.replace(Tt,"\r\n")}})):{name:t.name,value:n.replace(Tt,"\r\n")}})).get()}});var Bt=/%20/g,Pt=/#.*$/,Dt=/([?&])_=[^&]*/,Rt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ft=/^(?:GET|HEAD)$/,Ht=/^\/\//,Mt={},zt={},It="*/".concat("*"),qt=b.createElement("a");function Ut(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(H)||[];if(m(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Vt(e,t,n,r){var i={},o=e===zt;function s(a){var l;return i[a]=!0,w.each(e[a]||[],(function(e,a){var d=a(t,n,r);return"string"!=typeof d||o||i[d]?o?!(l=d):void 0:(t.dataTypes.unshift(d),s(d),!1)})),l}return s(t.dataTypes[0])||!i["*"]&&s("*")}function Kt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}qt.href=At.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Kt(Kt(e,w.ajaxSettings),t):Kt(w.ajaxSettings,e)},ajaxPrefilter:Ut(Mt),ajaxTransport:Ut(zt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,i,o,s,a,l,d,c,h,u,p=w.ajaxSetup({},t),f=p.context||p,g=p.context&&(f.nodeType||f.jquery)?w(f):w.event,_=w.Deferred(),m=w.Callbacks("once memory"),v=p.statusCode||{},x={},y={},j="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(d){if(!s)for(s={};t=Rt.exec(o);)s[t[1].toLowerCase()+" "]=(s[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=s[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return d?o:null},setRequestHeader:function(e,t){return null==d&&(e=y[e.toLowerCase()]=y[e.toLowerCase()]||e,x[e]=t),this},overrideMimeType:function(e){return null==d&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(d)k.always(e[k.status]);else for(t in e)v[t]=[v[t],e[t]];return this},abort:function(e){var t=e||j;return r&&r.abort(t),A(0,t),this}};if(_.promise(k),p.url=((e||p.url||At.href)+"").replace(Ht,At.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(H)||[""],null==p.crossDomain){l=b.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=qt.protocol+"//"+qt.host!=l.protocol+"//"+l.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=w.param(p.data,p.traditional)),Vt(Mt,p,t,k),d)return k;for(h in(c=w.event&&p.global)&&0==w.active++&&w.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ft.test(p.type),i=p.url.replace(Pt,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Bt,"+")):(u=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Et.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Dt,"$1"),u=(Et.test(i)?"&":"?")+"_="+Ct.guid+++u),p.url=i+u),p.ifModified&&(w.lastModified[i]&&k.setRequestHeader("If-Modified-Since",w.lastModified[i]),w.etag[i]&&k.setRequestHeader("If-None-Match",w.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&k.setRequestHeader("Content-Type",p.contentType),k.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+It+"; q=0.01":""):p.accepts["*"]),p.headers)k.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,k,p)||d))return k.abort();if(j="abort",m.add(p.complete),k.done(p.success),k.fail(p.error),r=Vt(zt,p,t,k)){if(k.readyState=1,c&&g.trigger("ajaxSend",[k,p]),d)return k;p.async&&0<p.timeout&&(a=n.setTimeout((function(){k.abort("timeout")}),p.timeout));try{d=!1,r.send(x,A)}catch(e){if(d)throw e;A(-1,e)}}else A(-1,"No Transport");function A(e,t,s,l){var h,u,b,x,y,j=t;d||(d=!0,a&&n.clearTimeout(a),r=void 0,o=l||"",k.readyState=0<e?4:0,h=200<=e&&e<300||304===e,s&&(x=function(e,t,n){for(var r,i,o,s,a=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||e.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,k,s)),!h&&-1<w.inArray("script",p.dataTypes)&&(p.converters["text script"]=function(){}),x=function(e,t,n,r){var i,o,s,a,l,d={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)d[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=d[l+" "+o]||d["* "+o]))for(i in d)if((a=i.split(" "))[1]===o&&(s=d[l+" "+a[0]]||d["* "+a[0]])){!0===s?s=d[i]:!0!==d[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}(p,x,k,h),h?(p.ifModified&&((y=k.getResponseHeader("Last-Modified"))&&(w.lastModified[i]=y),(y=k.getResponseHeader("etag"))&&(w.etag[i]=y)),204===e||"HEAD"===p.type?j="nocontent":304===e?j="notmodified":(j=x.state,u=x.data,h=!(b=x.error))):(b=j,!e&&j||(j="error",e<0&&(e=0))),k.status=e,k.statusText=(t||j)+"",h?_.resolveWith(f,[u,j,k]):_.rejectWith(f,[k,j,b]),k.statusCode(v),v=void 0,c&&g.trigger(h?"ajaxSuccess":"ajaxError",[k,p,h?u:b]),m.fireWith(f,[k,j]),c&&(g.trigger("ajaxComplete",[k,p]),--w.active||w.event.trigger("ajaxStop")))}return k},getJSON:function(e,t,n){return w.get(e,t,n,"json")},getScript:function(e,t){return w.get(e,void 0,t,"script")}}),w.each(["get","post"],(function(e,t){w[t]=function(e,n,r,i){return m(n)&&(i=i||r,r=n,n=void 0),w.ajax(w.extend({url:e,type:t,dataType:i,data:n,success:r},w.isPlainObject(e)&&e))}})),w.ajaxPrefilter((function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),w._evalUrl=function(e,t,n){return w.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){w.globalEval(e,t,n)}})},w.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=w(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return m(e)?this.each((function(t){w(this).wrapInner(e.call(this,t))})):this.each((function(){var t=w(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=m(e);return this.each((function(n){w(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(e){return!w.expr.pseudos.visible(e)},w.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var $t={0:200,1223:204},Gt=w.ajaxSettings.xhr();_.cors=!!Gt&&"withCredentials"in Gt,_.ajax=Gt=!!Gt,w.ajaxTransport((function(e){var t,r;if(_.cors||Gt&&!e.crossDomain)return{send:function(i,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);t=function(e){return function(){t&&(t=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o($t[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),r=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(i){if(t)throw i}},abort:function(){t&&t()}}})),w.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),w.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return w.globalEval(e),e}}}),w.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),w.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=w("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var Wt,Xt=[],Jt=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||w.expando+"_"+Ct.guid++;return this[e]=!0,e}}),w.ajaxPrefilter("json jsonp",(function(e,t,r){var i,o,s,a=!1!==e.jsonp&&(Jt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Jt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Jt,"$1"+i):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||w.error(i+" was not called"),s[0]},e.dataTypes[0]="json",o=n[i],n[i]=function(){s=arguments},r.always((function(){void 0===o?w(n).removeProp(i):n[i]=o,e[i]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(i)),s&&m(o)&&o(s[0]),s=o=void 0})),"script"})),_.createHTMLDocument=((Wt=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Wt.childNodes.length),w.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(_.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=je([e],t,o),o&&o.length&&w(o).remove(),w.merge([],i.childNodes)));var r,i,o},w.fn.load=function(e,t,n){var r,i,o,s=this,a=e.indexOf(" ");return-1<a&&(r=bt(e.slice(a)),e=e.slice(0,a)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&w.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){o=arguments,s.html(r?w("<div>").append(w.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,o||[e.responseText,t,e])}))}),this},w.expr.pseudos.animated=function(e){return w.grep(w.timers,(function(t){return e===t.elem})).length},w.offset={setOffset:function(e,t,n){var r,i,o,s,a,l,d=w.css(e,"position"),c=w(e),h={};"static"===d&&(e.style.position="relative"),a=c.offset(),o=w.css(e,"top"),l=w.css(e,"left"),("absolute"===d||"fixed"===d)&&-1<(o+l).indexOf("auto")?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),m(t)&&(t=t.call(e,n,w.extend({},a))),null!=t.top&&(h.top=t.top-a.top+s),null!=t.left&&(h.left=t.left-a.left+i),"using"in t?t.using.call(e,h):("number"==typeof h.top&&(h.top+="px"),"number"==typeof h.left&&(h.left+="px"),c.css(h))}},w.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each((function(t){w.offset.setOffset(this,e,t)}));var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===w.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===w.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=w(e).offset()).top+=w.css(e,"borderTopWidth",!0),i.left+=w.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-w.css(r,"marginTop",!0),left:t.left-i.left-w.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===w.css(e,"position");)e=e.offsetParent;return e||se}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;w.fn[e]=function(r){return K(this,(function(e,r,i){var o;if(v(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),w.each(["top","left"],(function(e,t){w.cssHooks[t]=Ke(_.pixelPosition,(function(e,n){if(n)return n=Ve(e,t),ze.test(n)?w(e).position()[t]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(e,t){w.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){w.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return K(this,(function(t,n,i){var o;return v(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?w.css(t,n,a):w.style(t,n,i,a)}),t,s?i:void 0,s)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){w.fn[t]=function(e){return this.on(t,e)}})),w.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),w.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){w.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}}));var Yt=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=a.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||w.guid++,i},w.holdReady=function(e){e?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=O,w.isFunction=m,w.isWindow=v,w.camelCase=X,w.type=j,w.now=Date.now,w.isNumeric=function(e){var t=w.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},w.trim=function(e){return null==e?"":(e+"").replace(Yt,"")},void 0===(r=function(){return w}.apply(t,[]))||(e.exports=r);var Qt=n.jQuery,Zt=n.$;return w.noConflict=function(e){return n.$===w&&(n.$=Zt),e&&n.jQuery===w&&(n.jQuery=Qt),w},void 0===i&&(n.jQuery=n.$=w),w}))},function(e,t,n){e.exports={Gui:n(3),Inspector:n(4),Demo:n(14),Serializer:n(2)}},function(e,t,n){!function(e){"use strict";function t(e,t){var n=e.__state.conversionName.toString(),r=Math.round(e.r),i=Math.round(e.g),o=Math.round(e.b),s=e.a,a=Math.round(e.h),l=e.s.toFixed(1),d=e.v.toFixed(1);if(t||"THREE_CHAR_HEX"===n||"SIX_CHAR_HEX"===n){for(var c=e.hex.toString(16);c.length<6;)c="0"+c;return"#"+c}return"CSS_RGB"===n?"rgb("+r+","+i+","+o+")":"CSS_RGBA"===n?"rgba("+r+","+i+","+o+","+s+")":"HEX"===n?"0x"+e.hex.toString(16):"RGB_ARRAY"===n?"["+r+","+i+","+o+"]":"RGBA_ARRAY"===n?"["+r+","+i+","+o+","+s+"]":"RGB_OBJ"===n?"{r:"+r+",g:"+i+",b:"+o+"}":"RGBA_OBJ"===n?"{r:"+r+",g:"+i+",b:"+o+",a:"+s+"}":"HSV_OBJ"===n?"{h:"+a+",s:"+l+",v:"+d+"}":"HSVA_OBJ"===n?"{h:"+a+",s:"+l+",v:"+d+",a:"+s+"}":"unknown format"}function n(e,t,n){Object.defineProperty(e,t,{get:function(){return"RGB"===this.__state.space||z.recalculateRGB(this,t,n),this.__state[t]},set:function(e){"RGB"!==this.__state.space&&(z.recalculateRGB(this,t,n),this.__state.space="RGB"),this.__state[t]=e}})}function r(e,t){Object.defineProperty(e,t,{get:function(){return"HSV"===this.__state.space||z.recalculateHSV(this),this.__state[t]},set:function(e){"HSV"!==this.__state.space&&(z.recalculateHSV(this),this.__state.space="HSV"),this.__state[t]=e}})}function i(e){if("0"===e||E.isUndefined(e))return 0;var t=e.match(V);return E.isNull(t)?0:parseFloat(t[1])}function o(e){var t=e.toString();return t.indexOf(".")>-1?t.length-t.indexOf(".")-1:0}function s(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function a(e,t,n,r,i){return r+(e-t)/(n-t)*(i-r)}function l(e,t,n,r){e.style.background="",E.each(ee,(function(i){e.style.cssText+="background: "+i+"linear-gradient("+t+", "+n+" 0%, "+r+" 100%); "}))}function d(e){e.style.background="",e.style.cssText+="background: -moz-linear-gradient(top, #ff0000 0%, #ff00ff 17%, #0000ff 34%, #00ffff 50%, #00ff00 67%, #ffff00 84%, #ff0000 100%);",e.style.cssText+="background: -webkit-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -o-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: -ms-linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);",e.style.cssText+="background: linear-gradient(top, #ff0000 0%,#ff00ff 17%,#0000ff 34%,#00ffff 50%,#00ff00 67%,#ffff00 84%,#ff0000 100%);"}function c(e,t,n){var r=document.createElement("li");return t&&r.appendChild(t),n?e.__ul.insertBefore(r,n):e.__ul.appendChild(r),e.onResize(),r}function h(e){K.unbind(window,"resize",e.__resizeHandler),e.saveToLocalStorageIfPossible&&K.unbind(window,"unload",e.saveToLocalStorageIfPossible)}function u(e,t){var n=e.__preset_select[e.__preset_select.selectedIndex];n.innerHTML=t?n.value+"*":n.value}function p(e,t,n){if(n.__li=t,n.__gui=e,E.extend(n,{options:function(t){if(arguments.length>1){var r=n.__li.nextElementSibling;return n.remove(),g(e,n.object,n.property,{before:r,factoryArgs:[E.toArray(arguments)]})}if(E.isArray(t)||E.isObject(t)){var i=n.__li.nextElementSibling;return n.remove(),g(e,n.object,n.property,{before:i,factoryArgs:[t]})}},name:function(e){return n.__li.firstElementChild.firstElementChild.innerHTML=e,n},listen:function(){return n.__gui.listen(n),n},remove:function(){return n.__gui.remove(n),n}}),n instanceof Y){var r=new J(n.object,n.property,{min:n.__min,max:n.__max,step:n.__step});E.each(["updateDisplay","onChange","onFinishChange","step","min","max"],(function(e){var t=n[e],i=r[e];n[e]=r[e]=function(){var e=Array.prototype.slice.call(arguments);return i.apply(r,e),t.apply(n,e)}})),K.addClass(t,"has-slider"),n.domElement.insertBefore(r.domElement,n.domElement.firstElementChild)}else if(n instanceof J){var i=function(t){if(E.isNumber(n.__min)&&E.isNumber(n.__max)){var r=n.__li.firstElementChild.firstElementChild.innerHTML,i=n.__gui.__listening.indexOf(n)>-1;n.remove();var o=g(e,n.object,n.property,{before:n.__li.nextElementSibling,factoryArgs:[n.__min,n.__max,n.__step]});return o.name(r),i&&o.listen(),o}return t};n.min=E.compose(i,n.min),n.max=E.compose(i,n.max)}else n instanceof $?(K.bind(t,"click",(function(){K.fakeEvent(n.__checkbox,"click")})),K.bind(n.__checkbox,"click",(function(e){e.stopPropagation()}))):n instanceof Q?(K.bind(t,"click",(function(){K.fakeEvent(n.__button,"click")})),K.bind(t,"mouseover",(function(){K.addClass(n.__button,"hover")})),K.bind(t,"mouseout",(function(){K.removeClass(n.__button,"hover")}))):n instanceof Z&&(K.addClass(t,"color"),n.updateDisplay=E.compose((function(e){return t.style.borderLeftColor=n.__color.toString(),e}),n.updateDisplay),n.updateDisplay());n.setValue=E.compose((function(t){return e.getRoot().__preset_select&&n.isModified()&&u(e.getRoot(),!0),t}),n.setValue)}function f(e,t){var n=e.getRoot(),r=n.__rememberedObjects.indexOf(t.object);if(-1!==r){var i=n.__rememberedObjectIndecesToControllers[r];if(void 0===i&&(i={},n.__rememberedObjectIndecesToControllers[r]=i),i[t.property]=t,n.load&&n.load.remembered){var o=n.load.remembered,s=void 0;if(o[e.preset])s=o[e.preset];else{if(!o[se])return;s=o[se]}if(s[r]&&void 0!==s[r][t.property]){var a=s[r][t.property];t.initialValue=a,t.setValue(a)}}}}function g(e,t,n,r){if(void 0===t[n])throw new Error('Object "'+t+'" has no property "'+n+'"');var i=void 0;if(r.color)i=new Z(t,n);else{var o=[t,n].concat(r.factoryArgs);i=ne.apply(e,o)}r.before instanceof I&&(r.before=r.before.__li),f(e,i),K.addClass(i.domElement,"c");var s=document.createElement("span");K.addClass(s,"property-name"),s.innerHTML=i.property;var a=document.createElement("div");a.appendChild(s),a.appendChild(i.domElement);var l=c(e,a,r.before);return K.addClass(l,pe.CLASS_CONTROLLER_ROW),i instanceof Z?K.addClass(l,"color"):K.addClass(l,P(i.getValue())),p(e,l,i),e.__controllers.push(i),i}function _(e,t){return document.location.href+"."+t}function m(e,t,n){var r=document.createElement("option");r.innerHTML=t,r.value=t,e.__preset_select.appendChild(r),n&&(e.__preset_select.selectedIndex=e.__preset_select.length-1)}function v(e,t){t.style.display=e.useLocalStorage?"block":"none"}function b(e){var t=e.__save_row=document.createElement("li");K.addClass(e.domElement,"has-save"),e.__ul.insertBefore(t,e.__ul.firstChild),K.addClass(t,"save-row");var n=document.createElement("span");n.innerHTML=" ",K.addClass(n,"button gears");var r=document.createElement("span");r.innerHTML="Save",K.addClass(r,"button"),K.addClass(r,"save");var i=document.createElement("span");i.innerHTML="New",K.addClass(i,"button"),K.addClass(i,"save-as");var o=document.createElement("span");o.innerHTML="Revert",K.addClass(o,"button"),K.addClass(o,"revert");var s=e.__preset_select=document.createElement("select");if(e.load&&e.load.remembered?E.each(e.load.remembered,(function(t,n){m(e,n,n===e.preset)})):m(e,se,!1),K.bind(s,"change",(function(){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].innerHTML=e.__preset_select[t].value;e.preset=this.value})),t.appendChild(s),t.appendChild(n),t.appendChild(r),t.appendChild(i),t.appendChild(o),ae){var a=document.getElementById("dg-local-explain"),l=document.getElementById("dg-local-storage");document.getElementById("dg-save-locally").style.display="block","true"===localStorage.getItem(_(e,"isLocal"))&&l.setAttribute("checked","checked"),v(e,a),K.bind(l,"change",(function(){e.useLocalStorage=!e.useLocalStorage,v(e,a)}))}var d=document.getElementById("dg-new-constructor");K.bind(d,"keydown",(function(e){!e.metaKey||67!==e.which&&67!==e.keyCode||le.hide()})),K.bind(n,"click",(function(){d.innerHTML=JSON.stringify(e.getSaveObject(),void 0,2),le.show(),d.focus(),d.select()})),K.bind(r,"click",(function(){e.save()})),K.bind(i,"click",(function(){var t=prompt("Enter a new preset name.");t&&e.saveAs(t)})),K.bind(o,"click",(function(){e.revert()}))}function x(e){function t(t){return t.preventDefault(),e.width+=i-t.clientX,e.onResize(),i=t.clientX,!1}function n(){K.removeClass(e.__closeButton,pe.CLASS_DRAG),K.unbind(window,"mousemove",t),K.unbind(window,"mouseup",n)}function r(r){return r.preventDefault(),i=r.clientX,K.addClass(e.__closeButton,pe.CLASS_DRAG),K.bind(window,"mousemove",t),K.bind(window,"mouseup",n),!1}var i=void 0;e.__resize_handle=document.createElement("div"),E.extend(e.__resize_handle.style,{width:"6px",marginLeft:"-3px",height:"200px",cursor:"ew-resize",position:"absolute"}),K.bind(e.__resize_handle,"mousedown",r),K.bind(e.__closeButton,"mousedown",r),e.domElement.insertBefore(e.__resize_handle,e.domElement.firstElementChild)}function y(e,t){e.domElement.style.width=t+"px",e.__save_row&&e.autoPlace&&(e.__save_row.style.width=t+"px"),e.__closeButton&&(e.__closeButton.style.width=t+"px")}function j(e,t){var n={};return E.each(e.__rememberedObjects,(function(r,i){var o={},s=e.__rememberedObjectIndecesToControllers[i];E.each(s,(function(e,n){o[n]=t?e.initialValue:e.getValue()})),n[i]=o})),n}function k(e){for(var t=0;t<e.__preset_select.length;t++)e.__preset_select[t].value===e.preset&&(e.__preset_select.selectedIndex=t)}function w(e){0!==e.length&&re.call(window,(function(){w(e)})),E.each(e,(function(e){e.updateDisplay()}))}var A=Array.prototype.forEach,C=Array.prototype.slice,E={BREAK:{},extend:function(e){return this.each(C.call(arguments,1),(function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(n){this.isUndefined(t[n])||(e[n]=t[n])}.bind(this))}),this),e},defaults:function(e){return this.each(C.call(arguments,1),(function(t){(this.isObject(t)?Object.keys(t):[]).forEach(function(n){this.isUndefined(e[n])&&(e[n]=t[n])}.bind(this))}),this),e},compose:function(){var e=C.call(arguments);return function(){for(var t=C.call(arguments),n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},each:function(e,t,n){if(e)if(A&&e.forEach&&e.forEach===A)e.forEach(t,n);else if(e.length===e.length+0){var r=void 0,i=void 0;for(r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r)===this.BREAK)return}else for(var o in e)if(t.call(n,e[o],o)===this.BREAK)return},defer:function(e){setTimeout(e,0)},debounce:function(e,t,n){var r=void 0;return function(){var i=this,o=arguments,s=n||!r;clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(i,o)}),t),s&&e.apply(i,o)}},toArray:function(e){return e.toArray?e.toArray():C.call(e)},isUndefined:function(e){return void 0===e},isNull:function(e){return null===e},isNaN:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e){return isNaN(e)})),isArray:Array.isArray||function(e){return e.constructor===Array},isObject:function(e){return e===Object(e)},isNumber:function(e){return e===e+0},isString:function(e){return e===e+""},isBoolean:function(e){return!1===e||!0===e},isFunction:function(e){return e instanceof Function}},S=[{litmus:E.isString,conversions:{THREE_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString()+t[1].toString()+t[2].toString()+t[2].toString()+t[3].toString()+t[3].toString(),0)}},write:t},SIX_CHAR_HEX:{read:function(e){var t=e.match(/^#([A-F0-9]{6})$/i);return null!==t&&{space:"HEX",hex:parseInt("0x"+t[1].toString(),0)}},write:t},CSS_RGB:{read:function(e){var t=e.match(/^rgb\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3])}},write:t},CSS_RGBA:{read:function(e){var t=e.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);return null!==t&&{space:"RGB",r:parseFloat(t[1]),g:parseFloat(t[2]),b:parseFloat(t[3]),a:parseFloat(t[4])}},write:t}}},{litmus:E.isNumber,conversions:{HEX:{read:function(e){return{space:"HEX",hex:e,conversionName:"HEX"}},write:function(e){return e.hex}}}},{litmus:E.isArray,conversions:{RGB_ARRAY:{read:function(e){return 3===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2]}},write:function(e){return[e.r,e.g,e.b]}},RGBA_ARRAY:{read:function(e){return 4===e.length&&{space:"RGB",r:e[0],g:e[1],b:e[2],a:e[3]}},write:function(e){return[e.r,e.g,e.b,e.a]}}}},{litmus:E.isObject,conversions:{RGBA_OBJ:{read:function(e){return!!(E.isNumber(e.r)&&E.isNumber(e.g)&&E.isNumber(e.b)&&E.isNumber(e.a))&&{space:"RGB",r:e.r,g:e.g,b:e.b,a:e.a}},write:function(e){return{r:e.r,g:e.g,b:e.b,a:e.a}}},RGB_OBJ:{read:function(e){return!!(E.isNumber(e.r)&&E.isNumber(e.g)&&E.isNumber(e.b))&&{space:"RGB",r:e.r,g:e.g,b:e.b}},write:function(e){return{r:e.r,g:e.g,b:e.b}}},HSVA_OBJ:{read:function(e){return!!(E.isNumber(e.h)&&E.isNumber(e.s)&&E.isNumber(e.v)&&E.isNumber(e.a))&&{space:"HSV",h:e.h,s:e.s,v:e.v,a:e.a}},write:function(e){return{h:e.h,s:e.s,v:e.v,a:e.a}}},HSV_OBJ:{read:function(e){return!!(E.isNumber(e.h)&&E.isNumber(e.s)&&E.isNumber(e.v))&&{space:"HSV",h:e.h,s:e.s,v:e.v}},write:function(e){return{h:e.h,s:e.s,v:e.v}}}}}],T=void 0,O=void 0,N=function(){O=!1;var e=arguments.length>1?E.toArray(arguments):arguments[0];return E.each(S,(function(t){if(t.litmus(e))return E.each(t.conversions,(function(t,n){if(T=t.read(e),!1===O&&!1!==T)return O=T,T.conversionName=n,T.conversion=t,E.BREAK})),E.BREAK})),O},L=void 0,B={hsv_to_rgb:function(e,t,n){var r=Math.floor(e/60)%6,i=e/60-Math.floor(e/60),o=n*(1-t),s=n*(1-i*t),a=n*(1-(1-i)*t),l=[[n,a,o],[s,n,o],[o,n,a],[o,s,n],[a,o,n],[n,o,s]][r];return{r:255*l[0],g:255*l[1],b:255*l[2]}},rgb_to_hsv:function(e,t,n){var r=Math.min(e,t,n),i=Math.max(e,t,n),o=i-r,s=void 0;return 0===i?{h:NaN,s:0,v:0}:(s=e===i?(t-n)/o:t===i?2+(n-e)/o:4+(e-t)/o,(s/=6)<0&&(s+=1),{h:360*s,s:o/i,v:i/255})},rgb_to_hex:function(e,t,n){var r=this.hex_with_component(0,2,e);return r=this.hex_with_component(r,1,t),this.hex_with_component(r,0,n)},component_from_hex:function(e,t){return e>>8*t&255},hex_with_component:function(e,t,n){return n<<(L=8*t)|e&~(255<<L)}},P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},R=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),F=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;return void 0!==s?s.call(r):void 0},H=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},M=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},z=function(){function e(){if(D(this,e),this.__state=N.apply(this,arguments),!1===this.__state)throw new Error("Failed to interpret color arguments");this.__state.a=this.__state.a||1}return R(e,[{key:"toString",value:function(){return t(this)}},{key:"toHexString",value:function(){return t(this,!0)}},{key:"toOriginal",value:function(){return this.__state.conversion.write(this)}}]),e}();z.recalculateRGB=function(e,t,n){if("HEX"===e.__state.space)e.__state[t]=B.component_from_hex(e.__state.hex,n);else{if("HSV"!==e.__state.space)throw new Error("Corrupted color state");E.extend(e.__state,B.hsv_to_rgb(e.__state.h,e.__state.s,e.__state.v))}},z.recalculateHSV=function(e){var t=B.rgb_to_hsv(e.r,e.g,e.b);E.extend(e.__state,{s:t.s,v:t.v}),E.isNaN(t.h)?E.isUndefined(e.__state.h)&&(e.__state.h=0):e.__state.h=t.h},z.COMPONENTS=["r","g","b","h","s","v","hex","a"],n(z.prototype,"r",2),n(z.prototype,"g",1),n(z.prototype,"b",0),r(z.prototype,"h"),r(z.prototype,"s"),r(z.prototype,"v"),Object.defineProperty(z.prototype,"a",{get:function(){return this.__state.a},set:function(e){this.__state.a=e}}),Object.defineProperty(z.prototype,"hex",{get:function(){return"HEX"!==this.__state.space&&(this.__state.hex=B.rgb_to_hex(this.r,this.g,this.b),this.__state.space="HEX"),this.__state.hex},set:function(e){this.__state.space="HEX",this.__state.hex=e}});var I=function(){function e(t,n){D(this,e),this.initialValue=t[n],this.domElement=document.createElement("div"),this.object=t,this.property=n,this.__onChange=void 0,this.__onFinishChange=void 0}return R(e,[{key:"onChange",value:function(e){return this.__onChange=e,this}},{key:"onFinishChange",value:function(e){return this.__onFinishChange=e,this}},{key:"setValue",value:function(e){return this.object[this.property]=e,this.__onChange&&this.__onChange.call(this,e),this.updateDisplay(),this}},{key:"getValue",value:function(){return this.object[this.property]}},{key:"updateDisplay",value:function(){return this}},{key:"isModified",value:function(){return this.initialValue!==this.getValue()}}]),e}(),q={HTMLEvents:["change"],MouseEvents:["click","mousemove","mousedown","mouseup","mouseover"],KeyboardEvents:["keydown"]},U={};E.each(q,(function(e,t){E.each(e,(function(e){U[e]=t}))}));var V=/(\d+(\.\d+)?)px/,K={makeSelectable:function(e,t){void 0!==e&&void 0!==e.style&&(e.onselectstart=t?function(){return!1}:function(){},e.style.MozUserSelect=t?"auto":"none",e.style.KhtmlUserSelect=t?"auto":"none",e.unselectable=t?"on":"off")},makeFullscreen:function(e,t,n){var r=n,i=t;E.isUndefined(i)&&(i=!0),E.isUndefined(r)&&(r=!0),e.style.position="absolute",i&&(e.style.left=0,e.style.right=0),r&&(e.style.top=0,e.style.bottom=0)},fakeEvent:function(e,t,n,r){var i=n||{},o=U[t];if(!o)throw new Error("Event type "+t+" not supported.");var s=document.createEvent(o);switch(o){case"MouseEvents":var a=i.x||i.clientX||0,l=i.y||i.clientY||0;s.initMouseEvent(t,i.bubbles||!1,i.cancelable||!0,window,i.clickCount||1,0,0,a,l,!1,!1,!1,!1,0,null);break;case"KeyboardEvents":var d=s.initKeyboardEvent||s.initKeyEvent;E.defaults(i,{cancelable:!0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,keyCode:void 0,charCode:void 0}),d(t,i.bubbles||!1,i.cancelable,window,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.keyCode,i.charCode);break;default:s.initEvent(t,i.bubbles||!1,i.cancelable||!0)}E.defaults(s,r),e.dispatchEvent(s)},bind:function(e,t,n,r){var i=r||!1;return e.addEventListener?e.addEventListener(t,n,i):e.attachEvent&&e.attachEvent("on"+t,n),K},unbind:function(e,t,n,r){var i=r||!1;return e.removeEventListener?e.removeEventListener(t,n,i):e.detachEvent&&e.detachEvent("on"+t,n),K},addClass:function(e,t){if(void 0===e.className)e.className=t;else if(e.className!==t){var n=e.className.split(/ +/);-1===n.indexOf(t)&&(n.push(t),e.className=n.join(" ").replace(/^\s+/,"").replace(/\s+$/,""))}return K},removeClass:function(e,t){if(t)if(e.className===t)e.removeAttribute("class");else{var n=e.className.split(/ +/),r=n.indexOf(t);-1!==r&&(n.splice(r,1),e.className=n.join(" "))}else e.className=void 0;return K},hasClass:function(e,t){return new RegExp("(?:^|\\s+)"+t+"(?:\\s+|$)").test(e.className)||!1},getWidth:function(e){var t=getComputedStyle(e);return i(t["border-left-width"])+i(t["border-right-width"])+i(t["padding-left"])+i(t["padding-right"])+i(t.width)},getHeight:function(e){var t=getComputedStyle(e);return i(t["border-top-width"])+i(t["border-bottom-width"])+i(t["padding-top"])+i(t["padding-bottom"])+i(t.height)},getOffset:function(e){var t=e,n={left:0,top:0};if(t.offsetParent)do{n.left+=t.offsetLeft,n.top+=t.offsetTop,t=t.offsetParent}while(t);return n},isActive:function(e){return e===document.activeElement&&(e.type||e.href)}},$=function(e){function t(e,n){D(this,t);var r=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),i=r;return r.__prev=r.getValue(),r.__checkbox=document.createElement("input"),r.__checkbox.setAttribute("type","checkbox"),K.bind(r.__checkbox,"change",(function(){i.setValue(!i.__prev)}),!1),r.domElement.appendChild(r.__checkbox),r.updateDisplay(),r}return H(t,I),R(t,[{key:"setValue",value:function(e){var n=F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),this.__prev=this.getValue(),n}},{key:"updateDisplay",value:function(){return!0===this.getValue()?(this.__checkbox.setAttribute("checked","checked"),this.__checkbox.checked=!0,this.__prev=!0):(this.__checkbox.checked=!1,this.__prev=!1),F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(),G=function(e){function t(e,n,r){D(this,t);var i=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=r,s=i;if(i.__select=document.createElement("select"),E.isArray(o)){var a={};E.each(o,(function(e){a[e]=e})),o=a}return E.each(o,(function(e,t){var n=document.createElement("option");n.innerHTML=t,n.setAttribute("value",e),s.__select.appendChild(n)})),i.updateDisplay(),K.bind(i.__select,"change",(function(){var e=this.options[this.selectedIndex].value;s.setValue(e)})),i.domElement.appendChild(i.__select),i}return H(t,I),R(t,[{key:"setValue",value:function(e){var n=F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,e);return this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue()),n}},{key:"updateDisplay",value:function(){return K.isActive(this.__select)?this:(this.__select.value=this.getValue(),F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this))}}]),t}(),W=function(e){function t(e,n){function r(){o.setValue(o.__input.value)}D(this,t);var i=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=i;return i.__input=document.createElement("input"),i.__input.setAttribute("type","text"),K.bind(i.__input,"keyup",r),K.bind(i.__input,"change",r),K.bind(i.__input,"blur",(function(){o.__onFinishChange&&o.__onFinishChange.call(o,o.getValue())})),K.bind(i.__input,"keydown",(function(e){13===e.keyCode&&this.blur()})),i.updateDisplay(),i.domElement.appendChild(i.__input),i}return H(t,I),R(t,[{key:"updateDisplay",value:function(){return K.isActive(this.__input)||(this.__input.value=this.getValue()),F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(),X=function(e){function t(e,n,r){D(this,t);var i=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),s=r||{};return i.__min=s.min,i.__max=s.max,i.__step=s.step,E.isUndefined(i.__step)?0===i.initialValue?i.__impliedStep=1:i.__impliedStep=Math.pow(10,Math.floor(Math.log(Math.abs(i.initialValue))/Math.LN10))/10:i.__impliedStep=i.__step,i.__precision=o(i.__impliedStep),i}return H(t,I),R(t,[{key:"setValue",value:function(e){var n=e;return void 0!==this.__min&&n<this.__min?n=this.__min:void 0!==this.__max&&n>this.__max&&(n=this.__max),void 0!==this.__step&&n%this.__step!=0&&(n=Math.round(n/this.__step)*this.__step),F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setValue",this).call(this,n)}},{key:"min",value:function(e){return this.__min=e,this}},{key:"max",value:function(e){return this.__max=e,this}},{key:"step",value:function(e){return this.__step=e,this.__impliedStep=e,this.__precision=o(e),this}}]),t}(),J=function(e){function t(e,n,r){function i(){l.__onFinishChange&&l.__onFinishChange.call(l,l.getValue())}function o(e){var t=d-e.clientY;l.setValue(l.getValue()+t*l.__impliedStep),d=e.clientY}function s(){K.unbind(window,"mousemove",o),K.unbind(window,"mouseup",s),i()}D(this,t);var a=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,r));a.__truncationSuspended=!1;var l=a,d=void 0;return a.__input=document.createElement("input"),a.__input.setAttribute("type","text"),K.bind(a.__input,"change",(function(){var e=parseFloat(l.__input.value);E.isNaN(e)||l.setValue(e)})),K.bind(a.__input,"blur",(function(){i()})),K.bind(a.__input,"mousedown",(function(e){K.bind(window,"mousemove",o),K.bind(window,"mouseup",s),d=e.clientY})),K.bind(a.__input,"keydown",(function(e){13===e.keyCode&&(l.__truncationSuspended=!0,this.blur(),l.__truncationSuspended=!1,i())})),a.updateDisplay(),a.domElement.appendChild(a.__input),a}return H(t,X),R(t,[{key:"updateDisplay",value:function(){return this.__input.value=this.__truncationSuspended?this.getValue():s(this.getValue(),this.__precision),F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(),Y=function(e){function t(e,n,r,i,o){function s(e){e.preventDefault();var t=u.__background.getBoundingClientRect();return u.setValue(a(e.clientX,t.left,t.right,u.__min,u.__max)),!1}function l(){K.unbind(window,"mousemove",s),K.unbind(window,"mouseup",l),u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())}function d(e){var t=e.touches[0].clientX,n=u.__background.getBoundingClientRect();u.setValue(a(t,n.left,n.right,u.__min,u.__max))}function c(){K.unbind(window,"touchmove",d),K.unbind(window,"touchend",c),u.__onFinishChange&&u.__onFinishChange.call(u,u.getValue())}D(this,t);var h=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{min:r,max:i,step:o})),u=h;return h.__background=document.createElement("div"),h.__foreground=document.createElement("div"),K.bind(h.__background,"mousedown",(function(e){document.activeElement.blur(),K.bind(window,"mousemove",s),K.bind(window,"mouseup",l),s(e)})),K.bind(h.__background,"touchstart",(function(e){1===e.touches.length&&(K.bind(window,"touchmove",d),K.bind(window,"touchend",c),d(e))})),K.addClass(h.__background,"slider"),K.addClass(h.__foreground,"slider-fg"),h.updateDisplay(),h.__background.appendChild(h.__foreground),h.domElement.appendChild(h.__background),h}return H(t,X),R(t,[{key:"updateDisplay",value:function(){var e=(this.getValue()-this.__min)/(this.__max-this.__min);return this.__foreground.style.width=100*e+"%",F(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"updateDisplay",this).call(this)}}]),t}(),Q=function(e){function t(e,n,r){D(this,t);var i=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n)),o=i;return i.__button=document.createElement("div"),i.__button.innerHTML=void 0===r?"Fire":r,K.bind(i.__button,"click",(function(e){return e.preventDefault(),o.fire(),!1})),K.addClass(i.__button,"button"),i.domElement.appendChild(i.__button),i}return H(t,I),R(t,[{key:"fire",value:function(){this.__onChange&&this.__onChange.call(this),this.getValue().call(this.object),this.__onFinishChange&&this.__onFinishChange.call(this,this.getValue())}}]),t}(),Z=function(e){function t(e,n){function r(e){h(e),K.bind(window,"mousemove",h),K.bind(window,"touchmove",h),K.bind(window,"mouseup",o),K.bind(window,"touchend",o)}function i(e){u(e),K.bind(window,"mousemove",u),K.bind(window,"touchmove",u),K.bind(window,"mouseup",s),K.bind(window,"touchend",s)}function o(){K.unbind(window,"mousemove",h),K.unbind(window,"touchmove",h),K.unbind(window,"mouseup",o),K.unbind(window,"touchend",o),c()}function s(){K.unbind(window,"mousemove",u),K.unbind(window,"touchmove",u),K.unbind(window,"mouseup",s),K.unbind(window,"touchend",s),c()}function a(){var e=N(this.value);!1!==e?(f.__color.__state=e,f.setValue(f.__color.toOriginal())):this.value=f.__color.toString()}function c(){f.__onFinishChange&&f.__onFinishChange.call(f,f.__color.toOriginal())}function h(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=f.__saturation_field.getBoundingClientRect(),n=e.touches&&e.touches[0]||e,r=n.clientX,i=n.clientY,o=(r-t.left)/(t.right-t.left),s=1-(i-t.top)/(t.bottom-t.top);return s>1?s=1:s<0&&(s=0),o>1?o=1:o<0&&(o=0),f.__color.v=s,f.__color.s=o,f.setValue(f.__color.toOriginal()),!1}function u(e){-1===e.type.indexOf("touch")&&e.preventDefault();var t=f.__hue_field.getBoundingClientRect(),n=1-((e.touches&&e.touches[0]||e).clientY-t.top)/(t.bottom-t.top);return n>1?n=1:n<0&&(n=0),f.__color.h=360*n,f.setValue(f.__color.toOriginal()),!1}D(this,t);var p=M(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n));p.__color=new z(p.getValue()),p.__temp=new z(0);var f=p;p.domElement=document.createElement("div"),K.makeSelectable(p.domElement,!1),p.__selector=document.createElement("div"),p.__selector.className="selector",p.__saturation_field=document.createElement("div"),p.__saturation_field.className="saturation-field",p.__field_knob=document.createElement("div"),p.__field_knob.className="field-knob",p.__field_knob_border="2px solid ",p.__hue_knob=document.createElement("div"),p.__hue_knob.className="hue-knob",p.__hue_field=document.createElement("div"),p.__hue_field.className="hue-field",p.__input=document.createElement("input"),p.__input.type="text",p.__input_textShadow="0 1px 1px ",K.bind(p.__input,"keydown",(function(e){13===e.keyCode&&a.call(this)})),K.bind(p.__input,"blur",a),K.bind(p.__selector,"mousedown",(function(){K.addClass(this,"drag").bind(window,"mouseup",(function(){K.removeClass(f.__selector,"drag")}))})),K.bind(p.__selector,"touchstart",(function(){K.addClass(this,"drag").bind(window,"touchend",(function(){K.removeClass(f.__selector,"drag")}))}));var g=document.createElement("div");return E.extend(p.__selector.style,{width:"122px",height:"102px",padding:"3px",backgroundColor:"#222",boxShadow:"0px 1px 3px rgba(0,0,0,0.3)"}),E.extend(p.__field_knob.style,{position:"absolute",width:"12px",height:"12px",border:p.__field_knob_border+(p.__color.v<.5?"#fff":"#000"),boxShadow:"0px 1px 3px rgba(0,0,0,0.5)",borderRadius:"12px",zIndex:1}),E.extend(p.__hue_knob.style,{position:"absolute",width:"15px",height:"2px",borderRight:"4px solid #fff",zIndex:1}),E.extend(p.__saturation_field.style,{width:"100px",height:"100px",border:"1px solid #555",marginRight:"3px",display:"inline-block",cursor:"pointer"}),E.extend(g.style,{width:"100%",height:"100%",background:"none"}),l(g,"top","rgba(0,0,0,0)","#000"),E.extend(p.__hue_field.style,{width:"15px",height:"100px",border:"1px solid #555",cursor:"ns-resize",position:"absolute",top:"3px",right:"3px"}),d(p.__hue_field),E.extend(p.__input.style,{outline:"none",textAlign:"center",color:"#fff",border:0,fontWeight:"bold",textShadow:p.__input_textShadow+"rgba(0,0,0,0.7)"}),K.bind(p.__saturation_field,"mousedown",r),K.bind(p.__saturation_field,"touchstart",r),K.bind(p.__field_knob,"mousedown",r),K.bind(p.__field_knob,"touchstart",r),K.bind(p.__hue_field,"mousedown",i),K.bind(p.__hue_field,"touchstart",i),p.__saturation_field.appendChild(g),p.__selector.appendChild(p.__field_knob),p.__selector.appendChild(p.__saturation_field),p.__selector.appendChild(p.__hue_field),p.__hue_field.appendChild(p.__hue_knob),p.domElement.appendChild(p.__input),p.domElement.appendChild(p.__selector),p.updateDisplay(),p}return H(t,I),R(t,[{key:"updateDisplay",value:function(){var e=N(this.getValue());if(!1!==e){var t=!1;E.each(z.COMPONENTS,(function(n){if(!E.isUndefined(e[n])&&!E.isUndefined(this.__color.__state[n])&&e[n]!==this.__color.__state[n])return t=!0,{}}),this),t&&E.extend(this.__color.__state,e)}E.extend(this.__temp.__state,this.__color.__state),this.__temp.a=1;var n=this.__color.v<.5||this.__color.s>.5?255:0,r=255-n;E.extend(this.__field_knob.style,{marginLeft:100*this.__color.s-7+"px",marginTop:100*(1-this.__color.v)-7+"px",backgroundColor:this.__temp.toHexString(),border:this.__field_knob_border+"rgb("+n+","+n+","+n+")"}),this.__hue_knob.style.marginTop=100*(1-this.__color.h/360)+"px",this.__temp.s=1,this.__temp.v=1,l(this.__saturation_field,"left","#fff",this.__temp.toHexString()),this.__input.value=this.__color.toString(),E.extend(this.__input.style,{backgroundColor:this.__color.toHexString(),color:"rgb("+n+","+n+","+n+")",textShadow:this.__input_textShadow+"rgba("+r+","+r+","+r+",.7)"})}}]),t}(),ee=["-moz-","-o-","-webkit-","-ms-",""],te={load:function(e,t){var n=t||document,r=n.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,n.getElementsByTagName("head")[0].appendChild(r)},inject:function(e,t){var n=t||document,r=document.createElement("style");r.type="text/css",r.innerHTML=e;var i=n.getElementsByTagName("head")[0];try{i.appendChild(r)}catch(e){}}},ne=function(e,t){var n=e[t];return E.isArray(arguments[2])||E.isObject(arguments[2])?new G(e,t,arguments[2]):E.isNumber(n)?E.isNumber(arguments[2])&&E.isNumber(arguments[3])?E.isNumber(arguments[4])?new Y(e,t,arguments[2],arguments[3],arguments[4]):new Y(e,t,arguments[2],arguments[3]):E.isNumber(arguments[4])?new J(e,t,{min:arguments[2],max:arguments[3],step:arguments[4]}):new J(e,t,{min:arguments[2],max:arguments[3]}):E.isString(n)?new W(e,t):E.isFunction(n)?new Q(e,t,""):E.isBoolean(n)?new $(e,t):null},re=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ie=function(){function e(){D(this,e),this.backgroundElement=document.createElement("div"),E.extend(this.backgroundElement.style,{backgroundColor:"rgba(0,0,0,0.8)",top:0,left:0,display:"none",zIndex:"1000",opacity:0,WebkitTransition:"opacity 0.2s linear",transition:"opacity 0.2s linear"}),K.makeFullscreen(this.backgroundElement),this.backgroundElement.style.position="fixed",this.domElement=document.createElement("div"),E.extend(this.domElement.style,{position:"fixed",display:"none",zIndex:"1001",opacity:0,WebkitTransition:"-webkit-transform 0.2s ease-out, opacity 0.2s linear",transition:"transform 0.2s ease-out, opacity 0.2s linear"}),document.body.appendChild(this.backgroundElement),document.body.appendChild(this.domElement);var t=this;K.bind(this.backgroundElement,"click",(function(){t.hide()}))}return R(e,[{key:"show",value:function(){var e=this;this.backgroundElement.style.display="block",this.domElement.style.display="block",this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)",this.layout(),E.defer((function(){e.backgroundElement.style.opacity=1,e.domElement.style.opacity=1,e.domElement.style.webkitTransform="scale(1)"}))}},{key:"hide",value:function(){var e=this,t=function t(){e.domElement.style.display="none",e.backgroundElement.style.display="none",K.unbind(e.domElement,"webkitTransitionEnd",t),K.unbind(e.domElement,"transitionend",t),K.unbind(e.domElement,"oTransitionEnd",t)};K.bind(this.domElement,"webkitTransitionEnd",t),K.bind(this.domElement,"transitionend",t),K.bind(this.domElement,"oTransitionEnd",t),this.backgroundElement.style.opacity=0,this.domElement.style.opacity=0,this.domElement.style.webkitTransform="scale(1.1)"}},{key:"layout",value:function(){this.domElement.style.left=window.innerWidth/2-K.getWidth(this.domElement)/2+"px",this.domElement.style.top=window.innerHeight/2-K.getHeight(this.domElement)/2+"px"}}]),e}(),oe=function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}}(".dg ul{list-style:none;margin:0;padding:0;width:100%;clear:both}.dg.ac{position:fixed;top:0;left:0;right:0;height:0;z-index:0}.dg:not(.ac) .main{overflow:hidden}.dg.main{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear}.dg.main.taller-than-window{overflow-y:auto}.dg.main.taller-than-window .close-button{opacity:1;margin-top:-1px;border-top:1px solid #2c2c2c}.dg.main ul.closed .close-button{opacity:1 !important}.dg.main:hover .close-button,.dg.main .close-button.drag{opacity:1}.dg.main .close-button{-webkit-transition:opacity .1s linear;-o-transition:opacity .1s linear;-moz-transition:opacity .1s linear;transition:opacity .1s linear;border:0;line-height:19px;height:20px;cursor:pointer;text-align:center;background-color:#000}.dg.main .close-button.close-top{position:relative}.dg.main .close-button.close-bottom{position:absolute}.dg.main .close-button:hover{background-color:#111}.dg.a{float:right;margin-right:15px;overflow-y:visible}.dg.a.has-save>ul.close-top{margin-top:0}.dg.a.has-save>ul.close-bottom{margin-top:27px}.dg.a.has-save>ul.closed{margin-top:0}.dg.a .save-row{top:0;z-index:1002}.dg.a .save-row.close-top{position:relative}.dg.a .save-row.close-bottom{position:fixed}.dg li{-webkit-transition:height .1s ease-out;-o-transition:height .1s ease-out;-moz-transition:height .1s ease-out;transition:height .1s ease-out;-webkit-transition:overflow .1s linear;-o-transition:overflow .1s linear;-moz-transition:overflow .1s linear;transition:overflow .1s linear}.dg li:not(.folder){cursor:auto;height:27px;line-height:27px;padding:0 4px 0 5px}.dg li.folder{padding:0;border-left:4px solid rgba(0,0,0,0)}.dg li.title{cursor:pointer;margin-left:-4px}.dg .closed li:not(.title),.dg .closed ul li,.dg .closed ul li>*{height:0;overflow:hidden;border:0}.dg .cr{clear:both;padding-left:3px;height:27px;overflow:hidden}.dg .property-name{cursor:default;float:left;clear:left;width:40%;overflow:hidden;text-overflow:ellipsis}.dg .c{float:left;width:60%;position:relative}.dg .c input[type=text]{border:0;margin-top:4px;padding:3px;width:100%;float:right}.dg .has-slider input[type=text]{width:30%;margin-left:0}.dg .slider{float:left;width:66%;margin-left:-5px;margin-right:0;height:19px;margin-top:4px}.dg .slider-fg{height:100%}.dg .c input[type=checkbox]{margin-top:7px}.dg .c select{margin-top:5px}.dg .cr.function,.dg .cr.function .property-name,.dg .cr.function *,.dg .cr.boolean,.dg .cr.boolean *{cursor:pointer}.dg .cr.color{overflow:visible}.dg .selector{display:none;position:absolute;margin-left:-9px;margin-top:23px;z-index:10}.dg .c:hover .selector,.dg .selector.drag{display:block}.dg li.save-row{padding:0}.dg li.save-row .button{display:inline-block;padding:0px 6px}.dg.dialogue{background-color:#222;width:460px;padding:15px;font-size:13px;line-height:15px}#dg-new-constructor{padding:10px;color:#222;font-family:Monaco, monospace;font-size:10px;border:0;resize:none;box-shadow:inset 1px 1px 1px #888;word-wrap:break-word;margin:12px 0;display:block;width:440px;overflow-y:scroll;height:100px;position:relative}#dg-local-explain{display:none;font-size:11px;line-height:17px;border-radius:3px;background-color:#333;padding:8px;margin-top:10px}#dg-local-explain code{font-size:10px}#dat-gui-save-locally{display:none}.dg{color:#eee;font:11px 'Lucida Grande', sans-serif;text-shadow:0 -1px 0 #111}.dg.main::-webkit-scrollbar{width:5px;background:#1a1a1a}.dg.main::-webkit-scrollbar-corner{height:0;display:none}.dg.main::-webkit-scrollbar-thumb{border-radius:5px;background:#676767}.dg li:not(.folder){background:#1a1a1a;border-bottom:1px solid #2c2c2c}.dg li.save-row{line-height:25px;background:#dad5cb;border:0}.dg li.save-row select{margin-left:5px;width:108px}.dg li.save-row .button{margin-left:5px;margin-top:1px;border-radius:2px;font-size:9px;line-height:7px;padding:4px 4px 5px 4px;background:#c5bdad;color:#fff;text-shadow:0 1px 0 #b0a58f;box-shadow:0 -1px 0 #b0a58f;cursor:pointer}.dg li.save-row .button.gears{background:#c5bdad url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAANCAYAAAB/9ZQ7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQJJREFUeNpiYKAU/P//PwGIC/ApCABiBSAW+I8AClAcgKxQ4T9hoMAEUrxx2QSGN6+egDX+/vWT4e7N82AMYoPAx/evwWoYoSYbACX2s7KxCxzcsezDh3evFoDEBYTEEqycggWAzA9AuUSQQgeYPa9fPv6/YWm/Acx5IPb7ty/fw+QZblw67vDs8R0YHyQhgObx+yAJkBqmG5dPPDh1aPOGR/eugW0G4vlIoTIfyFcA+QekhhHJhPdQxbiAIguMBTQZrPD7108M6roWYDFQiIAAv6Aow/1bFwXgis+f2LUAynwoIaNcz8XNx3Dl7MEJUDGQpx9gtQ8YCueB+D26OECAAQDadt7e46D42QAAAABJRU5ErkJggg==) 2px 1px no-repeat;height:7px;width:8px}.dg li.save-row .button:hover{background-color:#bab19e;box-shadow:0 -1px 0 #b0a58f}.dg li.folder{border-bottom:0}.dg li.title{padding-left:16px;background:#000 url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==) 6px 10px no-repeat;cursor:pointer;border-bottom:1px solid rgba(255,255,255,0.2)}.dg .closed li.title{background-image:url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlGIWqMCbWAEAOw==)}.dg .cr.boolean{border-left:3px solid #806787}.dg .cr.color{border-left:3px solid}.dg .cr.function{border-left:3px solid #e61d5f}.dg .cr.number{border-left:3px solid #2FA1D6}.dg .cr.number input[type=text]{color:#2FA1D6}.dg .cr.string{border-left:3px solid #1ed36f}.dg .cr.string input[type=text]{color:#1ed36f}.dg .cr.function:hover,.dg .cr.boolean:hover{background:#111}.dg .c input[type=text]{background:#303030;outline:none}.dg .c input[type=text]:hover{background:#3c3c3c}.dg .c input[type=text]:focus{background:#494949;color:#fff}.dg .c .slider{background:#303030;cursor:ew-resize}.dg .c .slider-fg{background:#2FA1D6;max-width:100%}.dg .c .slider:hover{background:#3c3c3c}.dg .c .slider:hover .slider-fg{background:#44abda}\n");te.inject(oe);var se="Default",ae=function(){try{return!!window.localStorage}catch(e){return!1}}(),le=void 0,de=!0,ce=void 0,he=!1,ue=[],pe=function e(t){var n=this,r=t||{};this.domElement=document.createElement("div"),this.__ul=document.createElement("ul"),this.domElement.appendChild(this.__ul),K.addClass(this.domElement,"dg"),this.__folders={},this.__controllers=[],this.__rememberedObjects=[],this.__rememberedObjectIndecesToControllers=[],this.__listening=[],r=E.defaults(r,{closeOnTop:!1,autoPlace:!0,width:e.DEFAULT_WIDTH}),r=E.defaults(r,{resizable:r.autoPlace,hideable:r.autoPlace}),E.isUndefined(r.load)?r.load={preset:se}:r.preset&&(r.load.preset=r.preset),E.isUndefined(r.parent)&&r.hideable&&ue.push(this),r.resizable=E.isUndefined(r.parent)&&r.resizable,r.autoPlace&&E.isUndefined(r.scrollable)&&(r.scrollable=!0);var i=ae&&"true"===localStorage.getItem(_(this,"isLocal")),o=void 0,s=void 0;if(Object.defineProperties(this,{parent:{get:function(){return r.parent}},scrollable:{get:function(){return r.scrollable}},autoPlace:{get:function(){return r.autoPlace}},closeOnTop:{get:function(){return r.closeOnTop}},preset:{get:function(){return n.parent?n.getRoot().preset:r.load.preset},set:function(e){n.parent?n.getRoot().preset=e:r.load.preset=e,k(this),n.revert()}},width:{get:function(){return r.width},set:function(e){r.width=e,y(n,e)}},name:{get:function(){return r.name},set:function(e){r.name=e,s&&(s.innerHTML=r.name)}},closed:{get:function(){return r.closed},set:function(t){r.closed=t,r.closed?K.addClass(n.__ul,e.CLASS_CLOSED):K.removeClass(n.__ul,e.CLASS_CLOSED),this.onResize(),n.__closeButton&&(n.__closeButton.innerHTML=t?e.TEXT_OPEN:e.TEXT_CLOSED)}},load:{get:function(){return r.load}},useLocalStorage:{get:function(){return i},set:function(e){ae&&(i=e,e?K.bind(window,"unload",o):K.unbind(window,"unload",o),localStorage.setItem(_(n,"isLocal"),e))}}}),E.isUndefined(r.parent)){if(this.closed=r.closed||!1,K.addClass(this.domElement,e.CLASS_MAIN),K.makeSelectable(this.domElement,!1),ae&&i){n.useLocalStorage=!0;var a=localStorage.getItem(_(this,"gui"));a&&(r.load=JSON.parse(a))}this.__closeButton=document.createElement("div"),this.__closeButton.innerHTML=e.TEXT_CLOSED,K.addClass(this.__closeButton,e.CLASS_CLOSE_BUTTON),r.closeOnTop?(K.addClass(this.__closeButton,e.CLASS_CLOSE_TOP),this.domElement.insertBefore(this.__closeButton,this.domElement.childNodes[0])):(K.addClass(this.__closeButton,e.CLASS_CLOSE_BOTTOM),this.domElement.appendChild(this.__closeButton)),K.bind(this.__closeButton,"click",(function(){n.closed=!n.closed}))}else{void 0===r.closed&&(r.closed=!0);var l=document.createTextNode(r.name);K.addClass(l,"controller-name"),s=c(n,l),K.addClass(this.__ul,e.CLASS_CLOSED),K.addClass(s,"title"),K.bind(s,"click",(function(e){return e.preventDefault(),n.closed=!n.closed,!1})),r.closed||(this.closed=!1)}r.autoPlace&&(E.isUndefined(r.parent)&&(de&&(ce=document.createElement("div"),K.addClass(ce,"dg"),K.addClass(ce,e.CLASS_AUTO_PLACE_CONTAINER),document.body.appendChild(ce),de=!1),ce.appendChild(this.domElement),K.addClass(this.domElement,e.CLASS_AUTO_PLACE)),this.parent||y(n,r.width)),this.__resizeHandler=function(){n.onResizeDebounced()},K.bind(window,"resize",this.__resizeHandler),K.bind(this.__ul,"webkitTransitionEnd",this.__resizeHandler),K.bind(this.__ul,"transitionend",this.__resizeHandler),K.bind(this.__ul,"oTransitionEnd",this.__resizeHandler),this.onResize(),r.resizable&&x(this),o=function(){ae&&"true"===localStorage.getItem(_(n,"isLocal"))&&localStorage.setItem(_(n,"gui"),JSON.stringify(n.getSaveObject()))},this.saveToLocalStorageIfPossible=o,r.parent||function(){var e=n.getRoot();e.width+=1,E.defer((function(){e.width-=1}))}()};pe.toggleHide=function(){he=!he,E.each(ue,(function(e){e.domElement.style.display=he?"none":""}))},pe.CLASS_AUTO_PLACE="a",pe.CLASS_AUTO_PLACE_CONTAINER="ac",pe.CLASS_MAIN="main",pe.CLASS_CONTROLLER_ROW="cr",pe.CLASS_TOO_TALL="taller-than-window",pe.CLASS_CLOSED="closed",pe.CLASS_CLOSE_BUTTON="close-button",pe.CLASS_CLOSE_TOP="close-top",pe.CLASS_CLOSE_BOTTOM="close-bottom",pe.CLASS_DRAG="drag",pe.DEFAULT_WIDTH=245,pe.TEXT_CLOSED="Close Controls",pe.TEXT_OPEN="Open Controls",pe._keydownHandler=function(e){"text"===document.activeElement.type||72!==e.which&&72!==e.keyCode||pe.toggleHide()},K.bind(window,"keydown",pe._keydownHandler,!1),E.extend(pe.prototype,{add:function(e,t){return g(this,e,t,{factoryArgs:Array.prototype.slice.call(arguments,2)})},addColor:function(e,t){return g(this,e,t,{color:!0})},remove:function(e){this.__ul.removeChild(e.__li),this.__controllers.splice(this.__controllers.indexOf(e),1);var t=this;E.defer((function(){t.onResize()}))},destroy:function(){if(this.parent)throw new Error("Only the root GUI should be removed with .destroy(). For subfolders, use gui.removeFolder(folder) instead.");this.autoPlace&&ce.removeChild(this.domElement);var e=this;E.each(this.__folders,(function(t){e.removeFolder(t)})),K.unbind(window,"keydown",pe._keydownHandler,!1),h(this)},addFolder:function(e){if(void 0!==this.__folders[e])throw new Error('You already have a folder in this GUI by the name "'+e+'"');var t={name:e,parent:this};t.autoPlace=this.autoPlace,this.load&&this.load.folders&&this.load.folders[e]&&(t.closed=this.load.folders[e].closed,t.load=this.load.folders[e]);var n=new pe(t);this.__folders[e]=n;var r=c(this,n.domElement);return K.addClass(r,"folder"),n},removeFolder:function(e){this.__ul.removeChild(e.domElement.parentElement),delete this.__folders[e.name],this.load&&this.load.folders&&this.load.folders[e.name]&&delete this.load.folders[e.name],h(e);var t=this;E.each(e.__folders,(function(t){e.removeFolder(t)})),E.defer((function(){t.onResize()}))},open:function(){this.closed=!1},close:function(){this.closed=!0},hide:function(){this.domElement.style.display="none"},show:function(){this.domElement.style.display=""},onResize:function(){var e=this.getRoot();if(e.scrollable){var t=K.getOffset(e.__ul).top,n=0;E.each(e.__ul.childNodes,(function(t){e.autoPlace&&t===e.__save_row||(n+=K.getHeight(t))})),window.innerHeight-t-20<n?(K.addClass(e.domElement,pe.CLASS_TOO_TALL),e.__ul.style.height=window.innerHeight-t-20+"px"):(K.removeClass(e.domElement,pe.CLASS_TOO_TALL),e.__ul.style.height="auto")}e.__resize_handle&&E.defer((function(){e.__resize_handle.style.height=e.__ul.offsetHeight+"px"})),e.__closeButton&&(e.__closeButton.style.width=e.width+"px")},onResizeDebounced:E.debounce((function(){this.onResize()}),50),remember:function(){if(E.isUndefined(le)&&((le=new ie).domElement.innerHTML='<div id="dg-save" class="dg dialogue">\n\n Here\'s the new load parameter for your <code>GUI</code>\'s constructor:\n\n <textarea id="dg-new-constructor"></textarea>\n\n <div id="dg-save-locally">\n\n <input id="dg-local-storage" type="checkbox"/> Automatically save\n values to <code>localStorage</code> on exit.\n\n <div id="dg-local-explain">The values saved to <code>localStorage</code> will\n override those passed to <code>dat.GUI</code>\'s constructor. This makes it\n easier to work incrementally, but <code>localStorage</code> is fragile,\n and your friends may not see the same values you do.\n\n </div>\n\n </div>\n\n</div>'),this.parent)throw new Error("You can only call remember on a top level GUI.");var e=this;E.each(Array.prototype.slice.call(arguments),(function(t){0===e.__rememberedObjects.length&&b(e),-1===e.__rememberedObjects.indexOf(t)&&e.__rememberedObjects.push(t)})),this.autoPlace&&y(this,this.width)},getRoot:function(){for(var e=this;e.parent;)e=e.parent;return e},getSaveObject:function(){var e=this.load;return e.closed=this.closed,this.__rememberedObjects.length>0&&(e.preset=this.preset,e.remembered||(e.remembered={}),e.remembered[this.preset]=j(this)),e.folders={},E.each(this.__folders,(function(t,n){e.folders[n]=t.getSaveObject()})),e},save:function(){this.load.remembered||(this.load.remembered={}),this.load.remembered[this.preset]=j(this),u(this,!1),this.saveToLocalStorageIfPossible()},saveAs:function(e){this.load.remembered||(this.load.remembered={},this.load.remembered[se]=j(this,!0)),this.load.remembered[e]=j(this),this.preset=e,m(this,e,!0),this.saveToLocalStorageIfPossible()},revert:function(e){E.each(this.__controllers,(function(t){this.getRoot().load.remembered?f(e||this.getRoot(),t):t.setValue(t.initialValue),t.__onFinishChange&&t.__onFinishChange.call(t,t.getValue())}),this),E.each(this.__folders,(function(e){e.revert(e)})),e||u(this.getRoot(),!1)},listen:function(e){var t=0===this.__listening.length;this.__listening.push(e),t&&w(this.__listening)},updateDisplay:function(){E.each(this.__controllers,(function(e){e.updateDisplay()})),E.each(this.__folders,(function(e){e.updateDisplay()}))}});var fe={Color:z,math:B,interpret:N},ge={Controller:I,BooleanController:$,OptionController:G,StringController:W,NumberController:X,NumberControllerBox:J,NumberControllerSlider:Y,FunctionController:Q,ColorController:Z},_e={dom:K},me={GUI:pe},ve=pe,be={color:fe,controllers:ge,dom:_e,gui:me,GUI:ve};e.color=fe,e.controllers=ge,e.dom=_e,e.gui=me,e.GUI=ve,e.default=be,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t){
|
||
/**
|
||
* # ResurrectJS
|
||
* @version 1.0.3
|
||
* @license Public Domain
|
||
*
|
||
* ResurrectJS preserves object behavior (prototypes) and reference
|
||
* circularity with a special JSON encoding. Unlike regular JSON,
|
||
* Date, RegExp, DOM objects, and `undefined` are also properly
|
||
* preserved.
|
||
*
|
||
* ## Examples
|
||
*
|
||
* function Foo() {}
|
||
* Foo.prototype.greet = function() { return "hello"; };
|
||
*
|
||
* // Behavior is preserved:
|
||
* var necromancer = new Resurrect();
|
||
* var json = necromancer.stringify(new Foo());
|
||
* var foo = necromancer.resurrect(json);
|
||
* foo.greet(); // => "hello"
|
||
*
|
||
* // References to the same object are preserved:
|
||
* json = necromancer.stringify([foo, foo]);
|
||
* var array = necromancer.resurrect(json);
|
||
* array[0] === array[1]; // => true
|
||
* array[1].greet(); // => "hello"
|
||
*
|
||
* // Dates are restored properly
|
||
* json = necromancer.stringify(new Date());
|
||
* var date = necromancer.resurrect(json);
|
||
* Object.prototype.toString.call(date); // => "[object Date]"
|
||
*
|
||
* ## Options
|
||
*
|
||
* Options are provided to the constructor as an object with these
|
||
* properties:
|
||
*
|
||
* prefix ('#'): A prefix string used for temporary properties added
|
||
* to objects during serialization and deserialization. It is
|
||
* important that you don't use any properties beginning with this
|
||
* string. This option must be consistent between both
|
||
* serialization and deserialization.
|
||
*
|
||
* cleanup (false): Perform full property cleanup after both
|
||
* serialization and deserialization using the `delete`
|
||
* operator. This may cause performance penalties (breaking hidden
|
||
* classes in V8) on objects that ResurrectJS touches, so enable
|
||
* with care.
|
||
*
|
||
* revive (true): Restore behavior (__proto__) to objects that have
|
||
* been resurrected. If this is set to false during serialization,
|
||
* resurrection information will not be encoded. You still get
|
||
* circularity and Date support.
|
||
*
|
||
* resolver (Resurrect.NamespaceResolver(window)): Converts between
|
||
* a name and a prototype. Create a custom resolver if your
|
||
* constructors are not stored in global variables. The resolver
|
||
* has two methods: getName(object) and getPrototype(string).
|
||
*
|
||
* For example,
|
||
*
|
||
* var necromancer = new Resurrect({
|
||
* prefix: '__#',
|
||
* cleanup: true
|
||
* });
|
||
*
|
||
* ## Caveats
|
||
*
|
||
* * With the default resolver, all constructors must be named and
|
||
* stored in the global variable under that name. This is required
|
||
* so that the prototypes can be looked up and reconnected at
|
||
* resurrection time.
|
||
*
|
||
* * The wrapper objects Boolean, String, and Number will be
|
||
* unwrapped. This means extra properties added to these objects
|
||
* will not be preserved.
|
||
*
|
||
* * Functions cannot ever be serialized. Resurrect will throw an
|
||
* error if a function is found when traversing a data structure.
|
||
*
|
||
* @see http://nullprogram.com/blog/2013/03/28/
|
||
*/
|
||
function n(e){for(var t in this.table=null,this.prefix="#",this.cleanup=!1,this.revive=!0,e)e.hasOwnProperty(t)&&(this[t]=e[t]);this.refcode=this.prefix+"id",this.origcode=this.prefix+"original",this.buildcode=this.prefix+".",this.valuecode=this.prefix+"v"}e.exports=n,n.GLOBAL=(0,eval)("this"),n.escapeRegExp=function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},n.prototype.Error=function(e){this.message=e||"",this.stack=(new Error).stack},n.prototype.Error.prototype=Object.create(Error.prototype),n.prototype.Error.prototype.name="ResurrectError",n.NamespaceResolver=function(e){this.scope=e},n.NamespaceResolver.prototype.getPrototype=function(e){var t=this.scope[e];if(t)return t.prototype;throw new n.prototype.Error("Unknown constructor: "+e)},n.NamespaceResolver.prototype.getName=function(e){var t=e.constructor.name;if(null==t&&(t=/^\s*function\s*([A-Za-z0-9_$]*)/.exec(e.constructor)[1]),""===t)throw new n.prototype.Error("Can't serialize objects with anonymous constructors.");return"Object"===t||"Array"===t?null:t},n.prototype.resolver=new n.NamespaceResolver(n.GLOBAL),n.Node=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstChild},n.is=function(e){var t="[object "+e+"]";return function(e){return Object.prototype.toString.call(e)===t}},n.isArray=n.is("Array"),n.isString=n.is("String"),n.isBoolean=n.is("Boolean"),n.isNumber=n.is("Number"),n.isFunction=n.is("Function"),n.isDate=n.is("Date"),n.isRegExp=n.is("RegExp"),n.isObject=n.is("Object"),n.isAtom=function(e){return!n.isObject(e)&&!n.isArray(e)},n.isPrimitive=function(e){return null==e||n.isNumber(e)||n.isString(e)||n.isBoolean(e)},n.prototype.ref=function(e){var t={};return t[this.prefix]=void 0===e?-1:e[this.refcode],t},n.prototype.deref=function(e){return this.table[e[this.prefix]]},n.prototype.tag=function(e){if(this.revive){var t=this.resolver.getName(e);if(t){var n=Object.getPrototypeOf(e);if(this.resolver.getPrototype(t)!==n)throw new this.Error("Constructor mismatch!");e[this.prefix]=t}}return e[this.refcode]=this.table.length,this.table.push(e),e[this.refcode]},n.prototype.builder=function(e,t){var n={};return n[this.buildcode]=e,n[this.valuecode]=t,n},n.prototype.build=function(e){var t=e[this.buildcode].split(/\./).reduce((function(e,t){return e[t]}),n.GLOBAL),r=[null].concat(e[this.valuecode]),i=new(t.bind.apply(t,r));return n.isPrimitive(i)?i.valueOf():i},n.prototype.decode=function(e){if(this.prefix in e)return this.deref(e);if(this.buildcode in e)return this.build(e);throw new this.Error("Unknown encoding.")},n.prototype.isTagged=function(e){return this.refcode in e&&null!=e[this.refcode]},n.prototype.visit=function(e,t,r){if(n.isAtom(e))return t(e);if(this.isTagged(e))return this.ref(e);var i=null;if(n.isArray(e)){i=[],e[this.refcode]=this.tag(i);for(var o=0;o<e.length;o++)i.push(this.visit(e[o],t,r))}else for(var s in i=Object.create(Object.getPrototypeOf(e)),e[this.refcode]=this.tag(i),e){var a=e[s];if(e.hasOwnProperty(s)){if(r&&void 0!==a&&void 0===(a=r.call(e,s,e[s])))continue;i[s]=this.visit(a,t,r)}}return i[this.origcode]=e,this.ref(i)},n.prototype.handleAtom=function(e){var t=n.GLOBAL.Node||function(){};if(n.isFunction(e))throw new this.Error("Can't serialize functions.");if(e instanceof t){var r=new XMLSerializer;return this.builder("Resurrect.Node",[r.serializeToString(e)])}if(n.isDate(e))return this.builder("Date",[e.toISOString()]);if(n.isRegExp(e)){var i=e.toString().match(/\/(.+)\/([gimy]*)/).slice(1);return this.builder("RegExp",i)}return void 0===e?this.ref(void 0):!n.isNumber(e)||!isNaN(e)&&isFinite(e)?e:this.builder("Number",[e.toString()])},n.prototype.replacerWrapper=function(e){var t=new RegExp("^"+n.escapeRegExp(this.prefix));return function(n,r){return t.test(n)?r:e(n,r)}},n.prototype.stringify=function(e,t,r){if(n.isFunction(t))t=this.replacerWrapper(t);else if(n.isArray(t)){var i=t;t=function(e,t){return i.indexOf(e)>=0?t:void 0}}if(n.isAtom(e))return JSON.stringify(this.handleAtom(e),t,r);this.table=[],this.visit(e,this.handleAtom.bind(this),t);for(var o=0;o<this.table.length;o++)this.cleanup?delete this.table[o][this.origcode][this.refcode]:this.table[o][this.origcode][this.refcode]=null,delete this.table[o][this.refcode],delete this.table[o][this.origcode];var s=this.table;return this.table=null,JSON.stringify(s,null,r)},n.prototype.fixPrototype=function(e){if(this.prefix in e){var t=e[this.prefix],n=this.resolver.getPrototype(t);if("__proto__"in e)return e.__proto__=n,this.cleanup&&delete e[this.prefix],e;var r=Object.create(n);for(var i in e)e.hasOwnProperty(i)&&i!==this.prefix&&(r[i]=e[i]);return r}return e},n.prototype.resurrect=function(e){var t=null,r=JSON.parse(e);if(n.isArray(r)){if(this.table=r,this.revive)for(var i=0;i<this.table.length;i++)this.table[i]=this.fixPrototype(this.table[i]);for(i=0;i<this.table.length;i++){var o=this.table[i];for(var s in o)o.hasOwnProperty(s)&&(n.isAtom(o[s])||(o[s]=this.decode(o[s])))}t=this.table[0]}else n.isObject(r)?(this.table=[],t=this.decode(r)):t=r;return this.table=null,t}},function(e,t){e.exports='/*\n*\tMatterTools.Gui\n*/\n\nbody .dg .c,\nbody .dg .cr.function,\nbody .dg .c select,\nbody .dg .property-name,\nbody .dg .title {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\nbody .dg.main {\n z-index: 10;\n height: 100%;\n background: #14151f;\n position: fixed;\n top: 0;\n right: 0;\n padding: 48px 0 0 0;\n box-shadow: 0 0 7px rgba(0, 0, 0, 0.1);\n}\n\nbody .dg.main,\nbody .dg.main * {\n box-sizing: border-box;\n font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\nbody .dg.main *:focus,\nbody .dg.main *:active {\n outline: 0;\n}\n\nbody .dg.main *:-moz-focusring {\n outline: 3px solid #4da4e4;\n outline-offset: -1px;\n z-index: 5;\n}\n\nbody .dg.main *:focus-visible {\n outline: 3px solid #4da4e4;\n outline-offset: -1px;\n z-index: 5;\n}\n\nbody .dg.ac {\n position: static;\n top: inherit;\n left: inherit;\n bottom: inherit;\n right: inherit;\n}\n\nbody .dg.main {\n transform: translate(230px, 0);\n transition: transform ease;\n transition-delay: 2000ms;\n transition-duration: 300ms;\n}\n\nbody .dg.main:hover {\n transform: translate(0, 0);\n transition-delay: 0ms;\n transition-duration: 400ms;\n}\n\n@media only screen and (min-width: 1300px) {\n body .dg.main,\n body .dg.main:hover {\n transition-delay: 0ms;\n transform: translate(0, 0);\n }\n}\n\nbody .dg.main .close-button {\n display: none;\n}\n\nbody .dg.main > ul {\n height: 100%;\n background: #191921;\n overflow-y: auto;\n scrollbar-color: #0d0f1b #0d0f1b;\n scrollbar-width: thin;\n}\n\nbody .dg.main > ul:hover {\n scrollbar-color: #44444e #0d0f1b;\n scrollbar-width: thin;\n}\n\nbody .dg.main > ul::-webkit-scrollbar {\n background: #0d0f1b;\n width: 6px;\n height: 6px;\n}\n\nbody .dg.main > ul::-webkit-scrollbar-track,\nbody .dg.main > ul::-webkit-scrollbar-corner {\n background: #0d0f1b;\n}\n\nbody .dg.main > ul::-webkit-scrollbar-thumb {\n background: #0d0f1b;\n border-radius: 3px;\n}\n\nbody .dg.main > ul:hover::-webkit-scrollbar-thumb {\n background: #44444e;\n}\n\nbody .dg {\n color: #6d6d7d;\n text-shadow: none !important;\n font-size: 12px;\n}\n\nbody .dg .closed .cr {\n display: none;\n}\n\nbody .dg li:not(.folder) {\n height: 29px;\n background: #1c1c25;\n border-bottom: 0px;\n padding: 0 8px 0 12px;\n}\n\nbody .dg li.save-row .button {\n text-shadow: none !important;\n}\n\nbody .dg li.title {\n padding: 2px 0 0 24px;\n color: #6a6977;\n background: #0d0f1b\n url(data:image/gif;base64,R0lGODlhBQAFAJEAAP////Pz8////////yH5BAEAAAIALAAAAAAFAAUAAAIIlI+hKgFxoCgAOw==)\n no-repeat;\n background-position: 12px;\n}\n\nbody .dg li.title:hover {\n color: #9494a2;\n}\n\nbody .dg .cr.boolean:hover {\n background: #20212b;\n}\n\nbody .dg .cr.function {\n background: #262731;\n color: #636371;\n border-top: 1px solid #30313c;\n}\n\nbody .dg .cr.function:hover {\n background: #30313e;\n}\n\nbody .dg .cr.function:active {\n background: #2d2e3a;\n}\n\nbody .dg .cr.function:active .property-name {\n transform: translateY(1px);\n}\n\nbody .dg .c,\nbody .dg .property-name {\n width: 50%;\n}\n\nbody .dg .c select {\n margin-top: 2px;\n margin-left: -5px;\n padding: 3px 5px;\n}\n\nbody .dg .c select,\nbody .dg .c input[type="text"],\nbody .dg .cr.number input[type="text"] {\n text-align: right;\n background: transparent;\n color: #686c7b;\n border: 0;\n border-radius: 2px;\n overflow: hidden;\n font-size: 11px;\n}\n\nbody .dg .cr.number,\nbody .dg .cr.boolean,\nbody .dg .cr.function {\n border-left: 0;\n}\n\nbody .dg .c select,\nbody .dg .c select:focus {\n width: 88px;\n}\n\nbody .dg .c input[type="text"]:hover {\n background: #2b2c3a;\n}\n\nbody .dg .c input[type="text"]:focus {\n background: #2b2c3a;\n color: #fff;\n outline: none;\n}\n\nbody .dg .c input[type="checkbox"] {\n margin-top: 10px;\n border: none;\n border-radius: 50%;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n background: #35363e;\n display: block;\n width: 7px;\n height: 7px;\n float: right;\n}\n\nbody .dg .c input[type="checkbox"]:checked {\n background: #747784;\n}\n\nbody .dg .c .slider {\n background: #23232d;\n border-radius: 2px;\n box-shadow: none;\n padding: 0;\n overflow: hidden;\n}\n\nbody .dg .c .slider:hover {\n background: #282b3a;\n}\n\nbody .dg .c .slider-fg {\n background: #3f4354;\n border-radius: 0;\n margin-left: 0;\n padding-right: 0;\n}\n\nbody .dg .c .slider-fg:after {\n display: none;\n}\n\nbody .dg .c .slider:hover .slider-fg {\n background: #4d526b;\n}\n\nbody .dg li.folder {\n border-left: 0;\n}\n\nbody .dg.a {\n margin-right: 0;\n}\n'},function(e,t,n){!function(t){var n,r={},i={16:!1,18:!1,17:!1,91:!1},o="all",s={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},a={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},l=function(e){return a[e]||e.toUpperCase().charCodeAt(0)},d=[];for(n=1;n<20;n++)a["f"+n]=111+n;function c(e,t){for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function h(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var u={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};function p(e){for(n in i)i[n]=e[u[n]]}function f(e,t,n){var i,o;i=_(e),void 0===n&&(n=t,t="all");for(var s=0;s<i.length;s++)o=[],(e=i[s].split("+")).length>1&&(o=m(e),e=[e[e.length-1]]),e=e[0],(e=l(e))in r||(r[e]=[]),r[e].push({shortcut:i[s],scope:t,method:n,key:i[s],mods:o})}for(n in s)f[n]=!1;function g(){return o||"all"}function _(e){var t;return""==(t=(e=e.replace(/\s/g,"")).split(","))[t.length-1]&&(t[t.length-2]+=","),t}function m(e){for(var t=e.slice(0,e.length-1),n=0;n<t.length;n++)t[n]=s[t[n]];return t}function v(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,(function(){n(window.event)}))}v(document,"keydown",(function(e){!function(e){var t,n,o,a,l,h;if(t=e.keyCode,-1==c(d,t)&&d.push(t),93!=t&&224!=t||(t=91),t in i)for(o in i[t]=!0,s)s[o]==t&&(f[o]=!0);else if(p(e),f.filter.call(this,e)&&t in r)for(h=g(),a=0;a<r[t].length;a++)if((n=r[t][a]).scope==h||"all"==n.scope){for(o in l=n.mods.length>0,i)(!i[o]&&c(n.mods,+o)>-1||i[o]&&-1==c(n.mods,+o))&&(l=!1);(0!=n.mods.length||i[16]||i[18]||i[17]||i[91])&&!l||!1===n.method(e,n)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}(e)})),v(document,"keyup",(function(e){var t,n=e.keyCode,r=c(d,n);if(r>=0&&d.splice(r,1),93!=n&&224!=n||(n=91),n in i)for(t in i[n]=!1,s)s[t]==n&&(f[t]=!1)})),v(window,"focus",(function(){for(n in i)i[n]=!1;for(n in s)f[n]=!1}));var b=t.key;t.key=f,t.key.setScope=function(e){o=e||"all"},t.key.getScope=g,t.key.deleteScope=function(e){var t,n,i;for(t in r)for(n=r[t],i=0;i<n.length;)n[i].scope===e?n.splice(i,1):i++},t.key.filter=function(e){var t=(e.target||e.srcElement).tagName;return!("INPUT"==t||"SELECT"==t||"TEXTAREA"==t)},t.key.isPressed=function(e){return"string"==typeof e&&(e=l(e)),-1!=c(d,e)},t.key.getPressedKeyCodes=function(){return d.slice(0)},t.key.noConflict=function(){var e=t.key;return t.key=b,e},t.key.unbind=function(e,t){var n,i,o,s,a,d=[];for(n=_(e),s=0;s<n.length;s++){if((i=n[s].split("+")).length>1&&(d=m(i),e=i[i.length-1]),e=l(e),void 0===t&&(t=g()),!r[e])return;for(o=0;o<r[e].length;o++)(a=r[e][o]).scope===t&&h(a.mods,d)&&(r[e][o]={})}},e.exports=f}(this)},function(e,t,n){var r,i,o;/*! jsTree - v3.3.11 - 2020-12-18 - (MIT) */!function(s){"use strict";i=[n(5)],void 0===(o="function"==typeof(r=function(e,t){if(!e.jstree){var n=0,r=!1,i=!1,o=!1,s=[],a=e("script:last").attr("src"),l=window.document,d=window.setImmediate,c=window.Promise;!d&&c&&(d=function(e,t){c.resolve(t).then(e)}),e.jstree={version:"3.3.11",defaults:{plugins:[]},plugins:{},path:a&&-1!==a.indexOf("/")?a.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},e.jstree.create=function(t,r){var i=new e.jstree.core(++n),o=r;return r=e.extend(!0,{},e.jstree.defaults,r),o&&o.plugins&&(r.plugins=o.plugins),e.each(r.plugins,(function(e,t){"core"!==e&&(i=i.plugin(t,r[t]))})),e(t).data("jstree",i),i.init(t,r),i},e.jstree.destroy=function(){e(".jstree:jstree").jstree("destroy"),e(l).off(".jstree")},e.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},e.jstree.reference=function(t){var n=null,r=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!r||!r.length)try{r=e(t)}catch(e){}if(!r||!r.length)try{r=e("#"+t.replace(e.jstree.idregex,"\\$&"))}catch(e){}return r&&r.length&&(r=r.closest(".jstree")).length&&(r=r.data("jstree"))?n=r:e(".jstree").each((function(){var r=e(this).data("jstree");return r&&r._model.data[t]?(n=r,!1):void 0})),n},e.fn.jstree=function(n){var r="string"==typeof n,i=Array.prototype.slice.call(arguments,1),o=null;return!(!0===n&&!this.length)&&(this.each((function(){var s=e.jstree.reference(this),a=r&&s?s[n]:null;return o=r&&a?a.apply(s,i):null,s||r||n!==t&&!e.isPlainObject(n)||e.jstree.create(this,n),(s&&!r||!0===n)&&(o=s||!1),(null===o||o===t)&&void 0})),null!==o&&o!==t?o:this)},e.expr.pseudos.jstree=e.expr.createPseudo((function(n){return function(n){return e(n).hasClass("jstree")&&e(n).data("jstree")!==t}})),e.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:e.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(t){t.type="click",e(t.currentTarget).trigger(t)},enter:function(t){t.type="click",e(t.currentTarget).trigger(t)},left:function(t){if(t.preventDefault(),this.is_open(t.currentTarget))this.close_node(t.currentTarget);else{var n=this.get_parent(t.currentTarget);n&&n.id!==e.jstree.root&&this.get_node(n,!0).children(".jstree-anchor").focus()}},up:function(e){e.preventDefault();var t=this.get_prev_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},right:function(t){if(t.preventDefault(),this.is_closed(t.currentTarget))this.open_node(t.currentTarget,(function(e){this.get_node(e,!0).children(".jstree-anchor").focus()}));else if(this.is_open(t.currentTarget)){var n=this.get_node(t.currentTarget,!0).children(".jstree-children")[0];n&&e(this._firstChild(n)).children(".jstree-anchor").focus()}},down:function(e){e.preventDefault();var t=this.get_next_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").focus()},"*":function(e){this.open_all()},home:function(t){t.preventDefault();var n=this._firstChild(this.get_container_ul()[0]);n&&e(n).children(".jstree-anchor").filter(":visible").focus()},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().focus()},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},e.jstree.core.prototype={plugin:function(t,n){var r=e.jstree.plugins[t];return r?(this._data[t]={},r.prototype=this,new r(n,this)):this},init:function(t,n){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=e(t).addClass("jstree jstree-"+this._id),this.settings=n,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter((function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))})).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(e.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,n=l.createElement("LI");return n.setAttribute("role","none"),(e=l.createElement("I")).className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),n.appendChild(e),(e=l.createElement("A")).className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),e.setAttribute("role","treeitem"),(t=l.createElement("I")).className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),n.appendChild(e),e=t=null,n},_kbevent_to_func:function(e){var t={8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"},n=[];if(e.ctrlKey&&n.push("ctrl"),e.altKey&&n.push("alt"),e.shiftKey&&n.push("shift"),n.push(t[e.which]||e.which),"shift-shift"===(n=n.sort().join("-").toLowerCase())||"ctrl-ctrl"===n||"alt-alt"===n)return null;var r,i,o=this.settings.core.keyboard;for(r in o)if(o.hasOwnProperty(r)&&("-"!==(i=r)&&"+"!==i&&(i=(i=i.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),i===n))return o[r];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",(function(){return this.className.replace(/jstree[^ ]*|$/gi,"")})),this.element=null},bind:function(){var t="",n=null,r=0;this.element.on("dblclick.jstree",(function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(l.selection&&l.selection.empty)l.selection.empty();else if(window.getSelection){var t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}})).on("mousedown.jstree",e.proxy((function(e){e.target===this.element[0]&&(e.preventDefault(),r=+new Date)}),this)).on("mousedown.jstree",".jstree-ocl",(function(e){e.preventDefault()})).on("click.jstree",".jstree-ocl",e.proxy((function(e){this.toggle_node(e.target)}),this)).on("dblclick.jstree",".jstree-anchor",e.proxy((function(e){return!(!e.target.tagName||"input"!==e.target.tagName.toLowerCase())||void(this.settings.core.dblclick_toggle&&this.toggle_node(e.target))}),this)).on("click.jstree",".jstree-anchor",e.proxy((function(t){t.preventDefault(),t.currentTarget!==l.activeElement&&e(t.currentTarget).focus(),this.activate_node(t.currentTarget,t)}),this)).on("keydown.jstree",".jstree-anchor",e.proxy((function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var n=t.call(this,e);if(!1===n||!0===n)return n}}),this)).on("load_node.jstree",e.proxy((function(t,n){n.status&&(n.node.id!==e.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(e.proxy((function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var t,n,r=[];for(t=0,n=this._data.core.selected.length;n>t;t++)r=r.concat(this._model.data[this._data.core.selected[t]].parents);for(t=0,n=(r=e.vakata.array_unique(r)).length;n>t;t++)this.open_node(r[t],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}),this),0))}),this)).on("keypress.jstree",e.proxy((function(r){if(r.target.tagName&&"input"===r.target.tagName.toLowerCase())return!0;n&&clearTimeout(n),n=setTimeout((function(){t=""}),500);var i=String.fromCharCode(r.which).toLowerCase(),o=this.element.find(".jstree-anchor").filter(":visible"),s=o.index(l.activeElement)||0,a=!1;if((t+=i).length>1){if(o.slice(s).each(e.proxy((function(n,r){return 0===e(r).text().toLowerCase().indexOf(t)?(e(r).focus(),a=!0,!1):void 0}),this)),a)return;if(o.slice(0,s).each(e.proxy((function(n,r){return 0===e(r).text().toLowerCase().indexOf(t)?(e(r).focus(),a=!0,!1):void 0}),this)),a)return}if(new RegExp("^"+i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(t)){if(o.slice(s+1).each(e.proxy((function(t,n){return e(n).text().toLowerCase().charAt(0)===i?(e(n).focus(),a=!0,!1):void 0}),this)),a)return;if(o.slice(0,s+1).each(e.proxy((function(t,n){return e(n).text().toLowerCase().charAt(0)===i?(e(n).focus(),a=!0,!1):void 0}),this)),a)return}}),this)).on("init.jstree",e.proxy((function(){var e=this.settings.core.themes;this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)}),this)).on("loading.jstree",e.proxy((function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}),this)).on("blur.jstree",".jstree-anchor",e.proxy((function(t){this._data.core.focused=null,e(t.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")}),this)).on("focus.jstree",".jstree-anchor",e.proxy((function(t){var n=this.get_node(t.currentTarget);n&&n.id&&(this._data.core.focused=n.id),this.element.find(".jstree-hovered").not(t.currentTarget).trigger("mouseleave"),e(t.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")}),this)).on("focus.jstree",e.proxy((function(){if(+new Date-r>500&&!this._data.core.focused&&this.settings.core.restore_focus){r=0;var e=this.get_node(this.element.attr("aria-activedescendant"),!0);e&&e.find("> .jstree-anchor").focus()}}),this)).on("mouseenter.jstree",".jstree-anchor",e.proxy((function(e){this.hover_node(e.currentTarget)}),this)).on("mouseleave.jstree",".jstree-anchor",e.proxy((function(e){this.dehover_node(e.currentTarget)}),this))},unbind:function(){this.element.off(".jstree"),e(l).off(".jstree-"+this._id)},trigger:function(e,t){t||(t={}),t.instance=this,this.element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(t){var n=this.settings.core.strings;return e.isFunction(n)?n.call(this,t):n&&n[t]?n[t]:t},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling;return e},get_node:function(t,n){var r;t&&t.id&&(t=t.id),t instanceof e&&t.length&&t[0].id&&(t=t[0].id);try{if(this._model.data[t])t=this._model.data[t];else if("string"==typeof t&&this._model.data[t.replace(/^#/,"")])t=this._model.data[t.replace(/^#/,"")];else if("string"==typeof t&&(r=e("#"+t.replace(e.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")];else if((r=this.element.find(t)).length&&this._model.data[r.closest(".jstree-node").attr("id")])t=this._model.data[r.closest(".jstree-node").attr("id")];else{if(!(r=this.element.find(t)).length||!r.hasClass("jstree"))return!1;t=this._model.data[e.jstree.root]}return n&&(t=t.id===e.jstree.root?this.element:e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)),t}catch(e){return!1}},get_path:function(t,n,r){if(!(t=t.parents?t:this.get_node(t))||t.id===e.jstree.root||!t.parents)return!1;var i,o,s=[];for(s.push(r?t.id:t.text),i=0,o=t.parents.length;o>i;i++)s.push(r?t.parents[i]:this.get_text(t.parents[i]));return s=s.reverse().slice(1),n?s.join(n):s},get_next_dom:function(t,n){var r;if((t=this.get_node(t,!0))[0]===this.element[0]){for(r=this._firstChild(this.get_container_ul()[0]);r&&0===r.offsetHeight;)r=this._nextSibling(r);return!!r&&e(r)}if(!t||!t.length)return!1;if(n){r=t[0];do{r=this._nextSibling(r)}while(r&&0===r.offsetHeight);return!!r&&e(r)}if(t.hasClass("jstree-open")){for(r=this._firstChild(t.children(".jstree-children")[0]);r&&0===r.offsetHeight;)r=this._nextSibling(r);if(null!==r)return e(r)}r=t[0];do{r=this._nextSibling(r)}while(r&&0===r.offsetHeight);return null!==r?e(r):t.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(t,n){var r;if((t=this.get_node(t,!0))[0]===this.element[0]){for(r=this.get_container_ul()[0].lastChild;r&&0===r.offsetHeight;)r=this._previousSibling(r);return!!r&&e(r)}if(!t||!t.length)return!1;if(n){r=t[0];do{r=this._previousSibling(r)}while(r&&0===r.offsetHeight);return!!r&&e(r)}r=t[0];do{r=this._previousSibling(r)}while(r&&0===r.offsetHeight);if(null!==r){for(t=e(r);t.hasClass("jstree-open");)t=t.children(".jstree-children").first().children(".jstree-node:visible:last");return t}return!(!(r=t[0].parentNode.parentNode)||!r.className||-1===r.className.indexOf("jstree-node"))&&e(r)},get_parent:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.parent},get_children_dom:function(e){return(e=this.get_node(e,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!e||!e.length)&&e.children(".jstree-children").children(".jstree-node")},is_parent:function(e){return(e=this.get_node(e))&&(!1===e.state.loaded||e.children.length>0)},is_loaded:function(e){return(e=this.get_node(e))&&e.state.loaded},is_loading:function(e){return(e=this.get_node(e))&&e.state&&e.state.loading},is_open:function(e){return(e=this.get_node(e))&&e.state.opened},is_closed:function(e){return(e=this.get_node(e))&&this.is_parent(e)&&!e.state.opened},is_leaf:function(e){return!this.is_parent(e)},load_node:function(t,n){var r,i,o,s,a;if(e.isArray(t))return this._load_nodes(t.slice(),n),!0;if(!(t=this.get_node(t)))return n&&n.call(this,t,!1),!1;if(t.state.loaded){for(t.state.loaded=!1,o=0,s=t.parents.length;s>o;o++)this._model.data[t.parents[o]].children_d=e.vakata.array_filter(this._model.data[t.parents[o]].children_d,(function(n){return-1===e.inArray(n,t.children_d)}));for(r=0,i=t.children_d.length;i>r;r++)this._model.data[t.children_d[r]].state.selected&&(a=!0),delete this._model.data[t.children_d[r]];a&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,(function(n){return-1===e.inArray(n,t.children_d)}))),t.children=[],t.children_d=[],a&&this.trigger("changed",{action:"load_node",node:t,selected:this._data.core.selected})}return t.state.failed=!1,t.state.loading=!0,this.get_node(t,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(t,e.proxy((function(e){(t=this._model.data[t.id]).state.loading=!1,t.state.loaded=e,t.state.failed=!t.state.loaded;var r=this.get_node(t,!0),i=0,o=0,s=this._model.data,a=!1;for(i=0,o=t.children.length;o>i;i++)if(s[t.children[i]]&&!s[t.children[i]].state.hidden){a=!0;break}t.state.loaded&&r&&r.length&&(r.removeClass("jstree-closed jstree-open jstree-leaf"),a?"#"!==t.id&&r.addClass(t.state.opened?"jstree-open":"jstree-closed"):r.addClass("jstree-leaf")),r.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:t,status:e}),n&&n.call(this,t,e)}),this)),!0},_load_nodes:function(e,t,n,r){var i,o,s=!0,a=function(){this._load_nodes(e,t,!0)},l=this._model.data,d=[];for(i=0,o=e.length;o>i;i++)l[e[i]]&&(!l[e[i]].state.loaded&&!l[e[i]].state.failed||!n&&r)&&(this.is_loading(e[i])||this.load_node(e[i],a),s=!1);if(s){for(i=0,o=e.length;o>i;i++)l[e[i]]&&l[e[i]].state.loaded&&d.push(e[i]);t&&!t.done&&(t.call(this,d),t.done=!0)}},load_all:function(t,n){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var r,i,o=[],s=this._model.data,a=s[t.id].children_d;for(t.state&&!t.state.loaded&&o.push(t.id),r=0,i=a.length;i>r;r++)s[a[r]]&&s[a[r]].state&&!s[a[r]].state.loaded&&o.push(a[r]);o.length?this._load_nodes(o,(function(){this.load_all(t,n)})):(n&&n.call(this,t),this.trigger("load_all",{node:t}))},_load_node:function(t,n){var r,i=this.settings.core.data,o=function(){return 3!==this.nodeType&&8!==this.nodeType};return i?e.isFunction(i)?i.call(this,t,e.proxy((function(r){!1===r?n.call(this,!1):this["string"==typeof r?"_append_html_data":"_append_json_data"](t,"string"==typeof r?e(e.parseHTML(r)).filter(o):r,(function(e){n.call(this,e)}))}),this)):"object"==typeof i?i.url?(i=e.extend(!0,{},i),e.isFunction(i.url)&&(i.url=i.url.call(this,t)),e.isFunction(i.data)&&(i.data=i.data.call(this,t)),e.ajax(i).done(e.proxy((function(r,i,s){var a=s.getResponseHeader("Content-Type");return a&&-1!==a.indexOf("json")||"object"==typeof r?this._append_json_data(t,r,(function(e){n.call(this,e)})):a&&-1!==a.indexOf("html")||"string"==typeof r?this._append_html_data(t,e(e.parseHTML(r)).filter(o),(function(e){n.call(this,e)})):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:t.id,xhr:s})},this.settings.core.error.call(this,this._data.core.last_error),n.call(this,!1))}),this)).fail(e.proxy((function(e){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:t.id,xhr:e})},n.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}),this))):(r=e.isArray(i)?e.extend(!0,[],i):e.isPlainObject(i)?e.extend(!0,{},i):i,t.id===e.jstree.root?this._append_json_data(t,r,(function(e){n.call(this,e)})):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:t.id})},this.settings.core.error.call(this,this._data.core.last_error),n.call(this,!1))):"string"==typeof i?t.id===e.jstree.root?this._append_html_data(t,e(e.parseHTML(i)).filter(o),(function(e){n.call(this,e)})):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:t.id})},this.settings.core.error.call(this,this._data.core.last_error),n.call(this,!1)):n.call(this,!1):t.id===e.jstree.root?this._append_html_data(t,this._data.core.original_container_html.clone(!0),(function(e){n.call(this,e)})):n.call(this,!1)},_node_changed:function(t){(t=this.get_node(t))&&-1===e.inArray(t.id,this._model.changed)&&this._model.changed.push(t.id)},_append_html_data:function(t,n,r){(t=this.get_node(t)).children=[],t.children_d=[];var i,o,s,a=n.is("ul")?n.children():n,l=t.id,d=[],c=[],h=this._model.data,u=h[l],p=this._data.core.selected.length;for(a.each(e.proxy((function(t,n){(i=this._parse_model_from_html(e(n),l,u.parents.concat()))&&(d.push(i),c.push(i),h[i].children_d.length&&(c=c.concat(h[i].children_d)))}),this)),u.children=d,u.children_d=c,o=0,s=u.parents.length;s>o;o++)h[u.parents[o]].children_d=h[u.parents[o]].children_d.concat(c);this.trigger("model",{nodes:c,parent:l}),l!==e.jstree.root?(this._node_changed(l),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==p&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),r.call(this,!0)},_append_json_data:function(t,n,r,i){if(null!==this.element){(t=this.get_node(t)).children=[],t.children_d=[],n.d&&"string"==typeof(n=n.d)&&(n=JSON.parse(n)),e.isArray(n)||(n=[n]);var o=null,s={df:this._model.default_state,dat:n,par:t.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},a=this,l=function(e,t){e.data&&(e=e.data);var n,r,i,o,s=e.dat,l=e.par,d=[],c=[],h=[],u=e.df,p=e.t_id,f=e.t_cnt,g=e.m,_=g[l],m=e.sel,v=function(e,n,r){r=r?r.concat():[],n&&r.unshift(n);var i,o,s,a,l=e.id.toString(),d={id:l,text:e.text||"",icon:e.icon===t||e.icon,parent:n,parents:r,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(i in u)u.hasOwnProperty(i)&&(d.state[i]=u[i]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(d.icon=e.data.jstree.icon),(d.icon===t||null===d.icon||""===d.icon)&&(d.icon=!0),e&&e.data&&(d.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(d.state[i]=e.data.jstree[i]);if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(d.state[i]=e.state[i]);if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(d.li_attr[i]=e.li_attr[i]);if(d.li_attr.id||(d.li_attr.id=l),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(d.a_attr[i]=e.a_attr[i]);for(e&&e.children&&!0===e.children&&(d.state.loaded=!1,d.children=[],d.children_d=[]),g[d.id]=d,i=0,o=d.children.length;o>i;i++)s=v(g[d.children[i]],d.id,r),a=g[s],d.children_d.push(s),a.children_d.length&&(d.children_d=d.children_d.concat(a.children_d));return delete e.data,delete e.children,g[d.id].original=e,d.state.selected&&h.push(d.id),d.id},b=function(e,n,r){r=r?r.concat():[],n&&r.unshift(n);var i,o,s,a,l,d=!1;do{d="j"+p+"_"+ ++f}while(g[d]);for(i in l={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===t||e.icon,parent:n,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},u)u.hasOwnProperty(i)&&(l.state[i]=u[i]);if(e&&e.id&&(l.id=e.id.toString()),e&&e.text&&(l.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),(l.icon===t||null===l.icon||""===l.icon)&&(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(l.state[i]=e.data.jstree[i]);if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(l.state[i]=e.state[i]);if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(l.li_attr[i]=e.li_attr[i]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=d),l.li_attr.id||(l.li_attr.id=l.id),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(l.a_attr[i]=e.a_attr[i]);if(e&&e.children&&e.children.length){for(i=0,o=e.children.length;o>i;i++)s=b(e.children[i],l.id,r),a=g[s],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children_d.concat(l.children)}return e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete e.data,delete e.children,l.original=e,g[l.id]=l,l.state.selected&&h.push(l.id),l.id};if(s.length&&s[0].id!==t&&s[0].parent!==t){for(r=0,i=s.length;i>r;r++)s[r].children||(s[r].children=[]),s[r].state||(s[r].state={}),g[s[r].id.toString()]=s[r];for(r=0,i=s.length;i>r;r++)g[s[r].parent.toString()]?(g[s[r].parent.toString()].children.push(s[r].id.toString()),_.children_d.push(s[r].id.toString())):void 0!==a&&(a._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:s[r].id.toString(),parent:s[r].parent.toString()})},a.settings.core.error.call(a,a._data.core.last_error));for(r=0,i=_.children.length;i>r;r++)n=v(g[_.children[r]],l,_.parents.concat()),c.push(n),g[n].children_d.length&&(c=c.concat(g[n].children_d));for(r=0,i=_.parents.length;i>r;r++)g[_.parents[r]].children_d=g[_.parents[r]].children_d.concat(c);o={cnt:f,mod:g,sel:m,par:l,dpc:c,add:h}}else{for(r=0,i=s.length;i>r;r++)(n=b(s[r],l,_.parents.concat()))&&(d.push(n),c.push(n),g[n].children_d.length&&(c=c.concat(g[n].children_d)));for(_.children=d,_.children_d=c,r=0,i=_.parents.length;i>r;r++)g[_.parents[r]].children_d=g[_.parents[r]].children_d.concat(c);o={cnt:f,mod:g,sel:m,par:l,dpc:c,add:h}}return"undefined"!=typeof window&&void 0!==window.document?o:void postMessage(o)},c=function(t,n){if(null!==this.element){this._cnt=t.cnt;var i,o=this._model.data;for(i in o)o.hasOwnProperty(i)&&o[i].state&&o[i].state.loading&&t.mod[i]&&(t.mod[i].state.loading=!0);if(this._model.data=t.mod,n){var s,l=t.add,c=t.sel,h=this._data.core.selected.slice();if(o=this._model.data,c.length!==h.length||e.vakata.array_unique(c.concat(h)).length!==c.length){for(i=0,s=c.length;s>i;i++)-1===e.inArray(c[i],l)&&-1===e.inArray(c[i],h)&&(o[c[i]].state.selected=!1);for(i=0,s=h.length;s>i;i++)-1===e.inArray(h[i],c)&&(o[h[i]].state.selected=!0)}}t.add.length&&(this._data.core.selected=this._data.core.selected.concat(t.add)),this.trigger("model",{nodes:t.dpc,parent:t.par}),t.par!==e.jstree.root?(this._node_changed(t.par),this.redraw()):this.redraw(!0),t.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!n&&d?d((function(){r.call(a,!0)})):r.call(a,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+l.toString()],{type:"text/javascript"}))),!this._data.core.working||i?(this._data.core.working=!0,(o=new window.Worker(this._wrk)).onmessage=e.proxy((function(e){c.call(this,e.data,!0);try{o.terminate(),o=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}),this),s.par?o.postMessage(s):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([t,n,r,!0])}catch(e){c.call(this,l(s),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else c.call(this,l(s),!1)}},_parse_model_from_html:function(n,r,i){i=i?[].concat(i):[],r&&i.unshift(r);var o,s,a,l,d,c=this._model.data,h={id:!1,text:!1,icon:!0,parent:r,parents:i,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(a in this._model.default_state)this._model.default_state.hasOwnProperty(a)&&(h.state[a]=this._model.default_state[a]);if(l=e.vakata.attributes(n,!0),e.each(l,(function(t,n){return!(n=e.vakata.trim(n)).length||(h.li_attr[t]=n,void("id"===t&&(h.id=n.toString())))})),(l=n.children("a").first()).length&&(l=e.vakata.attributes(l,!0),e.each(l,(function(t,n){(n=e.vakata.trim(n)).length&&(h.a_attr[t]=n)}))),(l=n.children("a").first().length?n.children("a").first().clone():n.clone()).children("ins, i, ul").remove(),l=l.html(),l=e("<div></div>").html(l),h.text=this.settings.core.force_text?l.text():l.html(),l=n.data(),h.data=l?e.extend(!0,{},l):null,h.state.opened=n.hasClass("jstree-open"),h.state.selected=n.children("a").hasClass("jstree-clicked"),h.state.disabled=n.children("a").hasClass("jstree-disabled"),h.data&&h.data.jstree)for(a in h.data.jstree)h.data.jstree.hasOwnProperty(a)&&(h.state[a]=h.data.jstree[a]);(l=n.children("a").children(".jstree-themeicon")).length&&(h.icon=!l.hasClass("jstree-themeicon-hidden")&&l.attr("rel")),h.state.icon!==t&&(h.icon=h.state.icon),(h.icon===t||null===h.icon||""===h.icon)&&(h.icon=!0),l=n.children("ul").children("li");do{d="j"+this._id+"_"+ ++this._cnt}while(c[d]);return h.id=h.li_attr.id?h.li_attr.id.toString():d,l.length?(l.each(e.proxy((function(t,n){o=this._parse_model_from_html(e(n),h.id,i),s=this._model.data[o],h.children.push(o),s.children_d.length&&(h.children_d=h.children_d.concat(s.children_d))}),this)),h.children_d=h.children_d.concat(h.children)):n.hasClass("jstree-closed")&&(h.state.loaded=!1),h.li_attr.class&&(h.li_attr.class=h.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),h.a_attr.class&&(h.a_attr.class=h.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),c[h.id]=h,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_flat_json:function(e,n,r){r=r?r.concat():[],n&&r.unshift(n);var i,o,s,a,l=e.id.toString(),d=this._model.data,c=this._model.default_state,h={id:l,text:e.text||"",icon:e.icon===t||e.icon,parent:n,parents:r,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(i in c)c.hasOwnProperty(i)&&(h.state[i]=c[i]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(h.icon=e.data.jstree.icon),(h.icon===t||null===h.icon||""===h.icon)&&(h.icon=!0),e&&e.data&&(h.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(h.state[i]=e.data.jstree[i]);if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(h.state[i]=e.state[i]);if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(h.li_attr[i]=e.li_attr[i]);if(h.li_attr.id||(h.li_attr.id=l),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(h.a_attr[i]=e.a_attr[i]);for(e&&e.children&&!0===e.children&&(h.state.loaded=!1,h.children=[],h.children_d=[]),d[h.id]=h,i=0,o=h.children.length;o>i;i++)a=d[s=this._parse_model_from_flat_json(d[h.children[i]],h.id,r)],h.children_d.push(s),a.children_d.length&&(h.children_d=h.children_d.concat(a.children_d));return delete e.data,delete e.children,d[h.id].original=e,h.state.selected&&this._data.core.selected.push(h.id),h.id},_parse_model_from_json:function(e,n,r){r=r?r.concat():[],n&&r.unshift(n);var i,o,s,a,l,d=!1,c=this._model.data,h=this._model.default_state;do{d="j"+this._id+"_"+ ++this._cnt}while(c[d]);for(i in l={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===t||e.icon,parent:n,parents:r,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},h)h.hasOwnProperty(i)&&(l.state[i]=h[i]);if(e&&e.id&&(l.id=e.id.toString()),e&&e.text&&(l.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(l.icon=e.data.jstree.icon),(l.icon===t||null===l.icon||""===l.icon)&&(l.icon=!0),e&&e.data&&(l.data=e.data,e.data.jstree))for(i in e.data.jstree)e.data.jstree.hasOwnProperty(i)&&(l.state[i]=e.data.jstree[i]);if(e&&"object"==typeof e.state)for(i in e.state)e.state.hasOwnProperty(i)&&(l.state[i]=e.state[i]);if(e&&"object"==typeof e.li_attr)for(i in e.li_attr)e.li_attr.hasOwnProperty(i)&&(l.li_attr[i]=e.li_attr[i]);if(l.li_attr.id&&!l.id&&(l.id=l.li_attr.id.toString()),l.id||(l.id=d),l.li_attr.id||(l.li_attr.id=l.id),e&&"object"==typeof e.a_attr)for(i in e.a_attr)e.a_attr.hasOwnProperty(i)&&(l.a_attr[i]=e.a_attr[i]);if(e&&e.children&&e.children.length){for(i=0,o=e.children.length;o>i;i++)a=c[s=this._parse_model_from_json(e.children[i],l.id,r)],l.children.push(s),a.children_d.length&&(l.children_d=l.children_d.concat(a.children_d));l.children_d=l.children.concat(l.children_d)}return e&&e.children&&!0===e.children&&(l.state.loaded=!1,l.children=[],l.children_d=[]),delete e.data,delete e.children,l.original=e,c[l.id]=l,l.state.selected&&this._data.core.selected.push(l.id),l.id},_redraw:function(){var t,n,r,i=this._model.force_full_redraw?this._model.data[e.jstree.root].children.concat([]):this._model.changed.concat([]),o=l.createElement("UL"),s=this._data.core.focused;for(n=0,r=i.length;r>n;n++)(t=this.redraw_node(i[n],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&o.appendChild(t);this._model.force_full_redraw&&(o.className=this.get_container_ul()[0].className,o.setAttribute("role","group"),this.element.empty().append(o)),null!==s&&this.settings.core.restore_focus&&((t=this.get_node(s,!0))&&t.length&&t.children(".jstree-anchor")[0]!==l.activeElement?t.children(".jstree-anchor").focus():this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:i})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(t){var n=this.get_node(t),r=!1,i=!1,o=!1,s=l;if(!n)return!1;if(n.id===e.jstree.root)return this.redraw(!0);if(!(t=this.get_node(t,!0))||!t.length)return!1;if(t.children(".jstree-children").remove(),t=t[0],n.children.length&&n.state.loaded){for((o=s.createElement("UL")).setAttribute("role","group"),o.className="jstree-children",r=0,i=n.children.length;i>r;r++)o.appendChild(this.redraw_node(n.children[r],!0,!0));t.appendChild(o)}},redraw_node:function(t,n,r,i){var o=this.get_node(t),s=!1,a=!1,d=!1,c=!1,h=!1,u=!1,p="",f=l,g=this._model.data,_=!1,m=null,v=0,b=0,x=!1,y=!1;if(!o)return!1;if(o.id===e.jstree.root)return this.redraw(!0);if(n=n||0===o.children.length,t=l.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(o.id[0])?"\\3"+o.id[0]+" "+o.id.substr(1).replace(e.jstree.idregex,"\\$&"):o.id.replace(e.jstree.idregex,"\\$&"))):l.getElementById(o.id))t=e(t),r||((s=t.parent().parent()[0])===this.element[0]&&(s=null),a=t.index()),n||!o.children.length||t.children(".jstree-children").length||(n=!0),n||(d=t.children(".jstree-children")[0]),_=t.children(".jstree-anchor")[0]===l.activeElement,t.remove();else if(n=!0,!r){if(!(null===(s=o.parent!==e.jstree.root?e("#"+o.parent.replace(e.jstree.idregex,"\\$&"),this.element)[0]:null)||s&&g[o.parent].state.opened))return!1;a=e.inArray(o.id,null===s?g[e.jstree.root].children:g[o.parent].children)}for(c in t=this._data.core.node.cloneNode(!0),p="jstree-node ",o.li_attr)if(o.li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"!==c?t.setAttribute(c,o.li_attr[c]):p+=o.li_attr[c]}for(o.a_attr.id||(o.a_attr.id=o.id+"_anchor"),t.childNodes[1].setAttribute("aria-selected",!!o.state.selected),t.childNodes[1].setAttribute("aria-level",o.parents.length),this.settings.core.compute_elements_positions&&(t.childNodes[1].setAttribute("aria-setsize",g[o.parent].children.length),t.childNodes[1].setAttribute("aria-posinset",g[o.parent].children.indexOf(o.id)+1)),o.state.disabled&&t.childNodes[1].setAttribute("aria-disabled",!0),c=0,h=o.children.length;h>c;c++)if(!g[o.children[c]].state.hidden){x=!0;break}if(null!==o.parent&&g[o.parent]&&!o.state.hidden&&(c=e.inArray(o.id,g[o.parent].children),y=o.id,-1!==c))for(c++,h=g[o.parent].children.length;h>c&&(g[g[o.parent].children[c]].state.hidden||(y=g[o.parent].children[c]),y===o.id);c++);for(h in o.state.hidden&&(p+=" jstree-hidden"),o.state.loading&&(p+=" jstree-loading"),o.state.loaded&&!x?p+=" jstree-leaf":(p+=o.state.opened&&o.state.loaded?" jstree-open":" jstree-closed",t.childNodes[1].setAttribute("aria-expanded",o.state.opened&&o.state.loaded)),y===o.id&&(p+=" jstree-last"),t.id=o.id,t.className=p,p=(o.state.selected?" jstree-clicked":"")+(o.state.disabled?" jstree-disabled":""),o.a_attr)if(o.a_attr.hasOwnProperty(h)){if("href"===h&&"#"===o.a_attr[h])continue;"class"!==h?t.childNodes[1].setAttribute(h,o.a_attr[h]):p+=" "+o.a_attr[h]}if(p.length&&(t.childNodes[1].className="jstree-anchor "+p),(o.icon&&!0!==o.icon||!1===o.icon)&&(!1===o.icon?t.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===o.icon.indexOf("/")&&-1===o.icon.indexOf(".")?t.childNodes[1].childNodes[0].className+=" "+o.icon+" jstree-themeicon-custom":(t.childNodes[1].childNodes[0].style.backgroundImage='url("'+o.icon+'")',t.childNodes[1].childNodes[0].style.backgroundPosition="center center",t.childNodes[1].childNodes[0].style.backgroundSize="auto",t.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?t.childNodes[1].appendChild(f.createTextNode(o.text)):t.childNodes[1].innerHTML+=o.text,n&&o.children.length&&(o.state.opened||i)&&o.state.loaded){for((u=f.createElement("UL")).setAttribute("role","group"),u.className="jstree-children",c=0,h=o.children.length;h>c;c++)u.appendChild(this.redraw_node(o.children[c],n,!0));t.appendChild(u)}if(d&&t.appendChild(d),!r){for(s||(s=this.element[0]),c=0,h=s.childNodes.length;h>c;c++)if(s.childNodes[c]&&s.childNodes[c].className&&-1!==s.childNodes[c].className.indexOf("jstree-children")){m=s.childNodes[c];break}m||((m=f.createElement("UL")).setAttribute("role","group"),m.className="jstree-children",s.appendChild(m)),a<(s=m).childNodes.length?s.insertBefore(t,s.childNodes[a]):s.appendChild(t),_&&(v=this.element[0].scrollTop,b=this.element[0].scrollLeft,t.childNodes[1].focus(),this.element[0].scrollTop=v,this.element[0].scrollLeft=b)}return o.state.opened&&!o.state.loaded&&(o.state.opened=!1,setTimeout(e.proxy((function(){this.open_node(o.id,!1,0)}),this),0)),t},open_node:function(n,r,i){var o,s,a,l;if(e.isArray(n)){for(o=0,s=(n=n.slice()).length;s>o;o++)this.open_node(n[o],r,i);return!0}return!(!(n=this.get_node(n))||n.id===e.jstree.root)&&(i=i===t?this.settings.core.animation:i,this.is_closed(n)?this.is_loaded(n)?(a=this.get_node(n,!0),l=this,a.length&&(i&&a.children(".jstree-children").length&&a.children(".jstree-children").stop(!0,!0),n.children.length&&!this._firstChild(a.children(".jstree-children")[0])&&this.draw_children(n),i?(this.trigger("before_open",{node:n}),a.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(i,(function(){this.style.display="",l.element&&l.trigger("after_open",{node:n})}))):(this.trigger("before_open",{node:n}),a[0].className=a[0].className.replace("jstree-closed","jstree-open"),a[0].childNodes[1].setAttribute("aria-expanded",!0))),n.state.opened=!0,r&&r.call(this,n,!0),a.length||this.trigger("before_open",{node:n}),this.trigger("open_node",{node:n}),i&&a.length||this.trigger("after_open",{node:n}),!0):this.is_loading(n)?setTimeout(e.proxy((function(){this.open_node(n,r,i)}),this),500):void this.load_node(n,(function(e,t){return t?this.open_node(e,r,i):!!r&&r.call(this,e,!1)})):(r&&r.call(this,n,!1),!1))},_open_to:function(t){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var n,r,i=t.parents;for(n=0,r=i.length;r>n;n+=1)n!==e.jstree.root&&this.open_node(i[n],!1,0);return e("#"+t.id.replace(e.jstree.idregex,"\\$&"),this.element)},close_node:function(n,r){var i,o,s,a;if(e.isArray(n)){for(i=0,o=(n=n.slice()).length;o>i;i++)this.close_node(n[i],r);return!0}return!(!(n=this.get_node(n))||n.id===e.jstree.root)&&!this.is_closed(n)&&(r=r===t?this.settings.core.animation:r,s=this,a=this.get_node(n,!0),n.state.opened=!1,this.trigger("close_node",{node:n}),void(a.length?r?a.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(r,(function(){this.style.display="",a.children(".jstree-children").remove(),s.element&&s.trigger("after_close",{node:n})})):(a[0].className=a[0].className.replace("jstree-open","jstree-closed"),a.children(".jstree-anchor").attr("aria-expanded",!1),a.children(".jstree-children").remove(),this.trigger("after_close",{node:n})):this.trigger("after_close",{node:n})))},toggle_node:function(t){var n,r;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.toggle_node(t[n]);return!0}return this.is_closed(t)?this.open_node(t):this.is_open(t)?this.close_node(t):void 0},open_all:function(t,n,r){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var i,o,s,a=t.id===e.jstree.root?this.get_container_ul():this.get_node(t,!0);if(!a.length){for(i=0,o=t.children_d.length;o>i;i++)this.is_closed(this._model.data[t.children_d[i]])&&(this._model.data[t.children_d[i]].state.opened=!0);return this.trigger("open_all",{node:t})}r=r||a,s=this,(a=this.is_closed(t)?a.find(".jstree-closed").addBack():a.find(".jstree-closed")).each((function(){s.open_node(this,(function(e,t){t&&this.is_parent(e)&&this.open_all(e,n,r)}),n||0)})),0===r.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(r)})},close_all:function(t,n){if(t||(t=e.jstree.root),!(t=this.get_node(t)))return!1;var r,i,o=t.id===e.jstree.root?this.get_container_ul():this.get_node(t,!0),s=this;for(o.length&&(o=this.is_open(t)?o.find(".jstree-open").addBack():o.find(".jstree-open"),e(o.get().reverse()).each((function(){s.close_node(this,n||0)}))),r=0,i=t.children_d.length;i>r;r++)this._model.data[t.children_d[r]].state.opened=!1;this.trigger("close_all",{node:t})},is_disabled:function(e){return(e=this.get_node(e))&&e.state&&e.state.disabled},enable_node:function(t){var n,r;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.enable_node(t[n]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(t.state.disabled=!1,this.get_node(t,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),void this.trigger("enable_node",{node:t}))},disable_node:function(t){var n,r;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.disable_node(t[n]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(t.state.disabled=!0,this.get_node(t,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),void this.trigger("disable_node",{node:t}))},is_hidden:function(e){return!0===(e=this.get_node(e)).state.hidden},hide_node:function(t,n){var r,i;if(e.isArray(t)){for(r=0,i=(t=t.slice()).length;i>r;r++)this.hide_node(t[r],!0);return n||this.redraw(),!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&void(t.state.hidden||(t.state.hidden=!0,this._node_changed(t.parent),n||this.redraw(),this.trigger("hide_node",{node:t})))},show_node:function(t,n){var r,i;if(e.isArray(t)){for(r=0,i=(t=t.slice()).length;i>r;r++)this.show_node(t[r],!0);return n||this.redraw(),!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&void(t.state.hidden&&(t.state.hidden=!1,this._node_changed(t.parent),n||this.redraw(),this.trigger("show_node",{node:t})))},hide_all:function(t){var n,r=this._model.data,i=[];for(n in r)r.hasOwnProperty(n)&&n!==e.jstree.root&&!r[n].state.hidden&&(r[n].state.hidden=!0,i.push(n));return this._model.force_full_redraw=!0,t||this.redraw(),this.trigger("hide_all",{nodes:i}),i},show_all:function(t){var n,r=this._model.data,i=[];for(n in r)r.hasOwnProperty(n)&&n!==e.jstree.root&&r[n].state.hidden&&(r[n].state.hidden=!1,i.push(n));return this._model.force_full_redraw=!0,t||this.redraw(),this.trigger("show_all",{nodes:i}),i},activate_node:function(e,n){if(this.is_disabled(e))return!1;if(n&&"object"==typeof n||(n={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==t?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(n.metaKey||n.ctrlKey||n.shiftKey)&&(!n.shiftKey||this._data.core.last_clicked&&this.get_parent(e)&&this.get_parent(e)===this._data.core.last_clicked.parent))if(n.shiftKey){var r,i,o=this.get_node(e).id,s=this._data.core.last_clicked.id,a=this.get_node(this._data.core.last_clicked.parent).children,l=!1;for(r=0,i=a.length;i>r;r+=1)a[r]===o&&(l=!l),a[r]===s&&(l=!l),this.is_disabled(a[r])||!l&&a[r]!==o&&a[r]!==s?this.deselect_node(a[r],!0,n):this.is_hidden(a[r])||this.select_node(a[r],!0,!1,n);this.trigger("changed",{action:"select_node",node:this.get_node(e),selected:this._data.core.selected,event:n})}else this.is_selected(e)?this.deselect_node(e,!1,n):this.select_node(e,!1,!1,n);else!this.settings.core.multiple&&(n.metaKey||n.ctrlKey||n.shiftKey)&&this.is_selected(e)?this.deselect_node(e,!1,n):(this.deselect_all(!0),this.select_node(e,!1,!1,n),this._data.core.last_clicked=this.get_node(e));this.trigger("activate_node",{node:this.get_node(e),event:n})},hover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||e.children(".jstree-hovered").length)return!1;var t=this.element.find(".jstree-hovered"),n=this.element;t&&t.length&&this.dehover_node(t),e.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(e)}),setTimeout((function(){n.attr("aria-activedescendant",e[0].id)}),0)},dehover_node:function(e){return!!((e=this.get_node(e,!0))&&e.length&&e.children(".jstree-hovered").length)&&(e.children(".jstree-anchor").removeClass("jstree-hovered"),void this.trigger("dehover_node",{node:this.get_node(e)}))},select_node:function(t,n,r,i){var o,s,a;if(e.isArray(t)){for(s=0,a=(t=t.slice()).length;a>s;s++)this.select_node(t[s],n,r,i);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(o=this.get_node(t,!0),void(t.state.selected||(t.state.selected=!0,this._data.core.selected.push(t.id),r||(o=this._open_to(t)),o&&o.length&&o.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:t,selected:this._data.core.selected,event:i}),n||this.trigger("changed",{action:"select_node",node:t,selected:this._data.core.selected,event:i}))))},deselect_node:function(t,n,r){var i,o,s;if(e.isArray(t)){for(i=0,o=(t=t.slice()).length;o>i;i++)this.deselect_node(t[i],n,r);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(s=this.get_node(t,!0),void(t.state.selected&&(t.state.selected=!1,this._data.core.selected=e.vakata.array_remove_item(this._data.core.selected,t.id),s.length&&s.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:t,selected:this._data.core.selected,event:r}),n||this.trigger("changed",{action:"deselect_node",node:t,selected:this._data.core.selected,event:r}))))},select_all:function(t){var n,r,i=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[e.jstree.root].children_d.concat(),n=0,r=this._data.core.selected.length;r>n;n++)this._model.data[this._data.core.selected[n]]&&(this._model.data[this._data.core.selected[n]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),t||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:i})},deselect_all:function(e){var t,n,r=this._data.core.selected.concat([]);for(t=0,n=this._data.core.selected.length;n>t;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:r}),e||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:r})},is_selected:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.selected},get_selected:function(t){return t?e.map(this._data.core.selected,e.proxy((function(e){return this.get_node(e)}),this)):this._data.core.selected.slice()},get_top_selected:function(t){var n,r,i,o,s=this.get_selected(!0),a={};for(n=0,r=s.length;r>n;n++)a[s[n].id]=s[n];for(n=0,r=s.length;r>n;n++)for(i=0,o=s[n].children_d.length;o>i;i++)a[s[n].children_d[i]]&&delete a[s[n].children_d[i]];for(n in s=[],a)a.hasOwnProperty(n)&&s.push(n);return t?e.map(s,e.proxy((function(e){return this.get_node(e)}),this)):s},get_bottom_selected:function(t){var n,r,i=this.get_selected(!0),o=[];for(n=0,r=i.length;r>n;n++)i[n].children.length||o.push(i[n].id);return t?e.map(o,e.proxy((function(e){return this.get_node(e)}),this)):o},get_state:function(){var t,n={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(t in this._model.data)this._model.data.hasOwnProperty(t)&&t!==e.jstree.root&&(this._model.data[t].state.loaded&&this.settings.core.loaded_state&&n.core.loaded.push(t),this._model.data[t].state.opened&&n.core.open.push(t),this._model.data[t].state.selected&&n.core.selected.push(t));return n},set_state:function(n,r){if(n){if(n.core&&n.core.selected&&n.core.initial_selection===t&&(n.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),n.core){var i,o;if(n.core.loaded)return this.settings.core.loaded_state&&e.isArray(n.core.loaded)&&n.core.loaded.length?this._load_nodes(n.core.loaded,(function(e){delete n.core.loaded,this.set_state(n,r)})):(delete n.core.loaded,this.set_state(n,r)),!1;if(n.core.open)return e.isArray(n.core.open)&&n.core.open.length?this._load_nodes(n.core.open,(function(e){this.open_node(e,!1,0),delete n.core.open,this.set_state(n,r)})):(delete n.core.open,this.set_state(n,r)),!1;if(n.core.scroll)return n.core.scroll&&n.core.scroll.left!==t&&this.element.scrollLeft(n.core.scroll.left),n.core.scroll&&n.core.scroll.top!==t&&this.element.scrollTop(n.core.scroll.top),delete n.core.scroll,this.set_state(n,r),!1;if(n.core.selected)return i=this,(n.core.initial_selection===t||n.core.initial_selection===this._data.core.selected.concat([]).sort().join(","))&&(this.deselect_all(),e.each(n.core.selected,(function(e,t){i.select_node(t,!1,!0)}))),delete n.core.initial_selection,delete n.core.selected,this.set_state(n,r),!1;for(o in n)n.hasOwnProperty(o)&&"core"!==o&&-1===e.inArray(o,this.settings.plugins)&&delete n[o];if(e.isEmptyObject(n.core))return delete n.core,this.set_state(n,r),!1}return!e.isEmptyObject(n)||(n=null,r&&r.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(t,n){this._data.core.state=!0===n?{}:this.get_state(),n&&e.isFunction(n)&&(this._data.core.state=n.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[e.jstree.root]={id:e.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var r=this.get_container_ul()[0].className;t||(this.element.html("<ul class='"+r+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(e.jstree.root,(function(t,n){n&&(this.get_container_ul()[0].className=r,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(e.extend(!0,{},this._data.core.state),(function(){this.trigger("refresh")}))),this._data.core.state=null}))},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var n=[],r=[],i=this._data.core.selected.concat([]);r.push(t.id),!0===t.state.opened&&n.push(t.id),this.get_node(t,!0).find(".jstree-open").each((function(){r.push(this.id),n.push(this.id)})),this._load_nodes(r,e.proxy((function(e){this.open_node(n,!1,0),this.select_node(i),this.trigger("refresh_node",{node:t,nodes:e})}),this),!1,!0)},set_id:function(t,n){if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;var r,i,o=this._model.data,s=t.id;for(n=n.toString(),o[t.parent].children[e.inArray(t.id,o[t.parent].children)]=n,r=0,i=t.parents.length;i>r;r++)o[t.parents[r]].children_d[e.inArray(t.id,o[t.parents[r]].children_d)]=n;for(r=0,i=t.children.length;i>r;r++)o[t.children[r]].parent=n;for(r=0,i=t.children_d.length;i>r;r++)o[t.children_d[r]].parents[e.inArray(t.id,o[t.children_d[r]].parents)]=n;return-1!==(r=e.inArray(t.id,this._data.core.selected))&&(this._data.core.selected[r]=n),(r=this.get_node(t.id,!0))&&(r.attr("id",n),this.element.attr("aria-activedescendant")===t.id&&this.element.attr("aria-activedescendant",n)),delete o[t.id],t.id=n,t.li_attr.id=n,o[n]=t,this.trigger("set_id",{node:t,new:t.id,old:s}),!0},get_text:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.text},set_text:function(t,n){var r,i;if(e.isArray(t)){for(r=0,i=(t=t.slice()).length;i>r;r++)this.set_text(t[r],n);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root||(t.text=n,this.get_node(t,!0).length&&this.redraw_node(t.id),this.trigger("set_text",{obj:t,text:n}),0))},get_json:function(t,n,r){if(!(t=this.get_node(t||e.jstree.root)))return!1;n&&n.flat&&!r&&(r=[]);var i,o,s={id:t.id,text:t.text,icon:this.get_icon(t),li_attr:e.extend(!0,{},t.li_attr),a_attr:e.extend(!0,{},t.a_attr),state:{},data:(!n||!n.no_data)&&e.extend(!0,e.isArray(t.data)?[]:{},t.data)};if(n&&n.flat?s.parent=t.parent:s.children=[],n&&n.no_state)delete s.state;else for(i in t.state)t.state.hasOwnProperty(i)&&(s.state[i]=t.state[i]);if(n&&n.no_li_attr&&delete s.li_attr,n&&n.no_a_attr&&delete s.a_attr,n&&n.no_id&&(delete s.id,s.li_attr&&s.li_attr.id&&delete s.li_attr.id,s.a_attr&&s.a_attr.id&&delete s.a_attr.id),n&&n.flat&&t.id!==e.jstree.root&&r.push(s),!n||!n.no_children)for(i=0,o=t.children.length;o>i;i++)n&&n.flat?this.get_json(t.children[i],n,r):s.children.push(this.get_json(t.children[i],n));return n&&n.flat?r:t.id===e.jstree.root?s.children:s},create_node:function(n,r,i,o,s){if(null===n&&(n=e.jstree.root),!(n=this.get_node(n)))return!1;if(!(i=i===t?"last":i).toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(n))return this.load_node(n,(function(){this.create_node(n,r,i,o,!0)}));var a,l,d,c;switch(r||(r={text:this.get_string("New node")}),(r="string"==typeof r?{text:r}:e.extend(!0,{},r)).text===t&&(r.text=this.get_string("New node")),n.id===e.jstree.root&&("before"===i&&(i="first"),"after"===i&&(i="last")),i){case"before":a=this.get_node(n.parent),i=e.inArray(n.id,a.children),n=a;break;case"after":a=this.get_node(n.parent),i=e.inArray(n.id,a.children)+1,n=a;break;case"inside":case"first":i=0;break;case"last":i=n.children.length;break;default:i||(i=0)}if(i>n.children.length&&(i=n.children.length),r.id||(r.id=!0),!this.check("create_node",r,n,i))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===r.id&&delete r.id,!(r=this._parse_model_from_json(r,n.id,n.parents.concat())))return!1;for(a=this.get_node(r),(l=[]).push(r),l=l.concat(a.children_d),this.trigger("model",{nodes:l,parent:n.id}),n.children_d=n.children_d.concat(l),d=0,c=n.parents.length;c>d;d++)this._model.data[n.parents[d]].children_d=this._model.data[n.parents[d]].children_d.concat(l);for(r=a,a=[],d=0,c=n.children.length;c>d;d++)a[d>=i?d+1:d]=n.children[d];return a[i]=r.id,n.children=a,this.redraw_node(n,!0),this.trigger("create_node",{node:this.get_node(r),parent:n.id,position:i}),o&&o.call(this,this.get_node(r)),r.id},rename_node:function(t,n){var r,i,o;if(e.isArray(t)){for(r=0,i=(t=t.slice()).length;i>r;r++)this.rename_node(t[r],n);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root||(o=t.text,this.check("rename_node",t,this.get_parent(t),n)?(this.set_text(t,n),this.trigger("rename_node",{node:t,text:n,old:o}),0):(this.settings.core.error.call(this,this._data.core.last_error),1)))},delete_node:function(t){var n,r,i,o,s,a,l,d,c,h,u,p;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.delete_node(t[n]);return!0}if(!(t=this.get_node(t))||t.id===e.jstree.root)return!1;if(i=this.get_node(t.parent),o=e.inArray(t.id,i.children),h=!1,!this.check("delete_node",t,i,o))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==o&&(i.children=e.vakata.array_remove(i.children,o)),(s=t.children_d.concat([])).push(t.id),a=0,l=t.parents.length;l>a;a++)this._model.data[t.parents[a]].children_d=e.vakata.array_filter(this._model.data[t.parents[a]].children_d,(function(t){return-1===e.inArray(t,s)}));for(d=0,c=s.length;c>d;d++)if(this._model.data[s[d]].state.selected){h=!0;break}for(h&&(this._data.core.selected=e.vakata.array_filter(this._data.core.selected,(function(t){return-1===e.inArray(t,s)}))),this.trigger("delete_node",{node:t,parent:i.id}),h&&this.trigger("changed",{action:"delete_node",node:t,selected:this._data.core.selected,parent:i.id}),d=0,c=s.length;c>d;d++)delete this._model.data[s[d]];return-1!==e.inArray(this._data.core.focused,s)&&(this._data.core.focused=null,u=this.element[0].scrollTop,p=this.element[0].scrollLeft,i.id===e.jstree.root?this._model.data[e.jstree.root].children[0]&&this.get_node(this._model.data[e.jstree.root].children[0],!0).children(".jstree-anchor").focus():this.get_node(i,!0).children(".jstree-anchor").focus(),this.element[0].scrollTop=u,this.element[0].scrollLeft=p),this.redraw_node(i,!0),!0},check:function(t,n,r,i,o){n=n&&n.id?n:this.get_node(n),r=r&&r.id?r:this.get_node(r);var s=t.match(/^move_node|copy_node|create_node$/i)?r:n,a=this.settings.core.check_callback;if("move_node"===t||"copy_node"===t){if(!(o&&o.is_multi||"move_node"!==t||e.inArray(n.id,r.children)!==i))return this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1;if(!(o&&o.is_multi||n.id!==r.id&&("move_node"!==t||e.inArray(n.id,r.children)!==i)&&-1===e.inArray(r.id,n.children_d)))return this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1}return s&&s.data&&(s=s.data),s&&s.functions&&(!1===s.functions[t]||!0===s.functions[t])?(!1===s.functions[t]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+t,data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})}),s.functions[t]):!(!1===a||e.isFunction(a)&&!1===a.call(this,t,n,r,i,o)||a&&!1===a[t])||(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+t,data:JSON.stringify({chk:t,pos:i,obj:!(!n||!n.id)&&n.id,par:!(!r||!r.id)&&r.id})},!1)},last_error:function(){return this._data.core.last_error},move_node:function(n,r,i,o,s,a,l){var d,c,h,u,p,f,g,_,m,v,b,x,y,j;if(r=this.get_node(r),i=i===t?0:i,!r)return!1;if(!i.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(r))return this.load_node(r,(function(){this.move_node(n,r,i,o,!0,!1,l)}));if(e.isArray(n)){if(1!==n.length){for(d=0,c=n.length;c>d;d++)(m=this.move_node(n[d],r,i,o,s,!1,l))&&(r=m,i="after");return this.redraw(),!0}n=n[0]}if(!(n=n&&n.id?n:this.get_node(n))||n.id===e.jstree.root)return!1;if(h=(n.parent||e.jstree.root).toString(),p=i.toString().match(/^(before|after)$/)&&r.id!==e.jstree.root?this.get_node(r.parent):r,g=!(f=l||(this._model.data[n.id]?this:e.jstree.reference(n.id)))||!f._id||this._id!==f._id,u=f&&f._id&&h&&f._model.data[h]&&f._model.data[h].children?e.inArray(n.id,f._model.data[h].children):-1,f&&f._id&&(n=f._model.data[n.id]),g)return!!(m=this.copy_node(n,r,i,o,s,!1,l))&&(f&&f.delete_node(n),m);switch(r.id===e.jstree.root&&("before"===i&&(i="first"),"after"===i&&(i="last")),i){case"before":i=e.inArray(r.id,p.children);break;case"after":i=e.inArray(r.id,p.children)+1;break;case"inside":case"first":i=0;break;case"last":i=p.children.length;break;default:i||(i=0)}if(i>p.children.length&&(i=p.children.length),!this.check("move_node",n,p,i,{core:!0,origin:l,is_multi:f&&f._id&&f._id!==this._id,is_foreign:!f||!f._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(n.parent===p.id){for(_=p.children.concat(),-1!==(m=e.inArray(n.id,_))&&(_=e.vakata.array_remove(_,m),i>m&&i--),m=[],v=0,b=_.length;b>v;v++)m[v>=i?v+1:v]=_[v];m[i]=n.id,p.children=m,this._node_changed(p.id),this.redraw(p.id===e.jstree.root)}else{for((m=n.children_d.concat()).push(n.id),v=0,b=n.parents.length;b>v;v++){for(_=[],x=0,y=(j=f._model.data[n.parents[v]].children_d).length;y>x;x++)-1===e.inArray(j[x],m)&&_.push(j[x]);f._model.data[n.parents[v]].children_d=_}for(f._model.data[h].children=e.vakata.array_remove_item(f._model.data[h].children,n.id),v=0,b=p.parents.length;b>v;v++)this._model.data[p.parents[v]].children_d=this._model.data[p.parents[v]].children_d.concat(m);for(_=[],v=0,b=p.children.length;b>v;v++)_[v>=i?v+1:v]=p.children[v];for(_[i]=n.id,p.children=_,p.children_d.push(n.id),p.children_d=p.children_d.concat(n.children_d),n.parent=p.id,(m=p.parents.concat()).unshift(p.id),j=n.parents.length,n.parents=m,m=m.concat(),v=0,b=n.children_d.length;b>v;v++)this._model.data[n.children_d[v]].parents=this._model.data[n.children_d[v]].parents.slice(0,-1*j),Array.prototype.push.apply(this._model.data[n.children_d[v]].parents,m);(h===e.jstree.root||p.id===e.jstree.root)&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(h),this._node_changed(p.id)),a||this.redraw()}return o&&o.call(this,n,p,i),this.trigger("move_node",{node:n,parent:p.id,position:i,old_parent:h,old_position:u,is_multi:f&&f._id&&f._id!==this._id,is_foreign:!f||!f._id,old_instance:f,new_instance:this}),n.id},copy_node:function(n,r,i,o,s,a,l){var d,c,h,u,p,f,g,_,m,v;if(r=this.get_node(r),i=i===t?0:i,!r)return!1;if(!i.toString().match(/^(before|after)$/)&&!s&&!this.is_loaded(r))return this.load_node(r,(function(){this.copy_node(n,r,i,o,!0,!1,l)}));if(e.isArray(n)){if(1!==n.length){for(d=0,c=n.length;c>d;d++)(u=this.copy_node(n[d],r,i,o,s,!0,l))&&(r=u,i="after");return this.redraw(),!0}n=n[0]}if(!(n=n&&n.id?n:this.get_node(n))||n.id===e.jstree.root)return!1;switch(_=(n.parent||e.jstree.root).toString(),m=i.toString().match(/^(before|after)$/)&&r.id!==e.jstree.root?this.get_node(r.parent):r,!(v=l||(this._model.data[n.id]?this:e.jstree.reference(n.id)))||!v._id||(this._id,v._id),v&&v._id&&(n=v._model.data[n.id]),r.id===e.jstree.root&&("before"===i&&(i="first"),"after"===i&&(i="last")),i){case"before":i=e.inArray(r.id,m.children);break;case"after":i=e.inArray(r.id,m.children)+1;break;case"inside":case"first":i=0;break;case"last":i=m.children.length;break;default:i||(i=0)}if(i>m.children.length&&(i=m.children.length),!this.check("copy_node",n,m,i,{core:!0,origin:l,is_multi:v&&v._id&&v._id!==this._id,is_foreign:!v||!v._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(g=v?v.get_json(n,{no_id:!0,no_data:!0,no_state:!0}):n))return!1;if(!0===g.id&&delete g.id,!(g=this._parse_model_from_json(g,m.id,m.parents.concat())))return!1;for(u=this.get_node(g),n&&n.state&&!1===n.state.loaded&&(u.state.loaded=!1),(h=[]).push(g),h=h.concat(u.children_d),this.trigger("model",{nodes:h,parent:m.id}),p=0,f=m.parents.length;f>p;p++)this._model.data[m.parents[p]].children_d=this._model.data[m.parents[p]].children_d.concat(h);for(h=[],p=0,f=m.children.length;f>p;p++)h[p>=i?p+1:p]=m.children[p];return h[i]=u.id,m.children=h,m.children_d.push(u.id),m.children_d=m.children_d.concat(u.children_d),m.id===e.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(m.id),a||this.redraw(m.id===e.jstree.root),o&&o.call(this,u,m,i),this.trigger("copy_node",{node:u,original:n,parent:m.id,position:i,old_parent:_,old_position:v&&v._id&&_&&v._model.data[_]&&v._model.data[_].children?e.inArray(n.id,v._model.data[_].children):-1,is_multi:v&&v._id&&v._id!==this._id,is_foreign:!v||!v._id,old_instance:v,new_instance:this}),u.id},cut:function(t){if(t||(t=this._data.core.selected.concat()),e.isArray(t)||(t=[t]),!t.length)return!1;var n,s,a,l=[];for(s=0,a=t.length;a>s;s++)(n=this.get_node(t[s]))&&n.id&&n.id!==e.jstree.root&&l.push(n);return!!l.length&&(r=l,o=this,i="move_node",void this.trigger("cut",{node:t}))},copy:function(t){if(t||(t=this._data.core.selected.concat()),e.isArray(t)||(t=[t]),!t.length)return!1;var n,s,a,l=[];for(s=0,a=t.length;a>s;s++)(n=this.get_node(t[s]))&&n.id&&n.id!==e.jstree.root&&l.push(n);return!!l.length&&(r=l,o=this,i="copy_node",void this.trigger("copy",{node:t}))},get_buffer:function(){return{mode:i,node:r,inst:o}},can_paste:function(){return!1!==i&&!1!==r},paste:function(e,t){return!!((e=this.get_node(e))&&i&&i.match(/^(copy_node|move_node)$/)&&r)&&(this[i](r,e,t,!1,!1,!1,o)&&this.trigger("paste",{parent:e.id,node:r,mode:i}),r=!1,i=!1,void(o=!1))},clear_buffer:function(){r=!1,i=!1,o=!1,this.trigger("clear_buffer")},edit:function(t,n,r){var i,o,s,a,d,c,h,u,p,f=!1;return!!(t=this.get_node(t))&&(this.check("edit",t,this.get_parent(t))?(p=t,n="string"==typeof n?n:t.text,this.set_text(t,""),t=this._open_to(t),p.text=n,i=this._data.core.rtl,o=this.element.width(),this._data.core.focused=p.id,s=t.children(".jstree-anchor").focus(),a=e("<span></span>"),d=n,c=e("<div></div>",{css:{position:"absolute",top:"-200px",left:i?"0px":"-1000px",visibility:"hidden"}}).appendTo(l.body),h=e("<input />",{value:d,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:e.proxy((function(n){n.stopImmediatePropagation(),n.preventDefault();var i,o=a.children(".jstree-rename-input").val(),l=this.settings.core.force_text;""===o&&(o=d),c.remove(),a.replaceWith(s),a.remove(),d=l?d:e("<div></div>").append(e.parseHTML(d)).html(),t=this.get_node(t),this.set_text(t,d),(i=!!this.rename_node(t,l?e("<div></div>").text(o).text():e("<div></div>").append(e.parseHTML(o)).html()))||this.set_text(t,d),this._data.core.focused=p.id,setTimeout(e.proxy((function(){var e=this.get_node(p.id,!0);e.length&&(this._data.core.focused=p.id,e.children(".jstree-anchor").focus())}),this),0),r&&r.call(this,p,i,f,o),h=null}),this),keydown:function(e){var t=e.which;27===t&&(f=!0,this.value=d),(27===t||13===t||37===t||38===t||39===t||40===t||32===t)&&e.stopImmediatePropagation(),(27===t||13===t)&&(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){h.width(Math.min(c.text("pW"+this.value).width(),o))},keypress:function(e){return 13!==e.which&&void 0}}),u={fontFamily:s.css("fontFamily")||"",fontSize:s.css("fontSize")||"",fontWeight:s.css("fontWeight")||"",fontStyle:s.css("fontStyle")||"",fontStretch:s.css("fontStretch")||"",fontVariant:s.css("fontVariant")||"",letterSpacing:s.css("letterSpacing")||"",wordSpacing:s.css("wordSpacing")||""},a.attr("class",s.attr("class")).append(s.contents().clone()).append(h),s.replaceWith(a),c.css(u),h.css(u).width(Math.min(c.text("pW"+h[0].value).width(),o))[0].select(),void e(l).one("mousedown.jstree touchstart.jstree dnd_start.vakata",(function(t){h&&t.target!==h&&e(h).blur()}))):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(t,n){if(!t)return!1;if(!0===n){var r=this.settings.core.themes.dir;r||(r=e.jstree.path+"/themes"),n=r+"/"+t+"/style.css"}n&&-1===e.inArray(n,s)&&(e("head").append('<link rel="stylesheet" href="'+n+'" type="text/css" />'),s.push(n)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=t,this.element.addClass("jstree-"+t),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+t+"-responsive"),this.trigger("set_theme",{theme:t})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),this._data.core.themes.variant=e,e&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(n,r){var i,o,s,a;if(e.isArray(n)){for(i=0,o=(n=n.slice()).length;o>i;i++)this.set_icon(n[i],r);return!0}return!(!(n=this.get_node(n))||n.id===e.jstree.root||(a=n.icon,n.icon=!0===r||null===r||r===t||""===r||r,s=this.get_node(n,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===r?(s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),this.hide_icon(n)):!0===r||null===r||r===t||""===r?(s.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),!1===a&&this.show_icon(n)):-1===r.indexOf("/")&&-1===r.indexOf(".")?(s.removeClass(a).css("background",""),s.addClass(r+" jstree-themeicon-custom").attr("rel",r),!1===a&&this.show_icon(n)):(s.removeClass(a).css("background",""),s.addClass("jstree-themeicon-custom").css("background","url('"+r+"') center center no-repeat").attr("rel",r),!1===a&&this.show_icon(n)),0))},get_icon:function(t){return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.icon},hide_icon:function(t){var n,r;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.hide_icon(t[n]);return!0}return!(!(t=this.get_node(t))||t===e.jstree.root||(t.icon=!1,this.get_node(t,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),0))},show_icon:function(t){var n,r,i;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.show_icon(t[n]);return!0}return!(!(t=this.get_node(t))||t===e.jstree.root||(i=this.get_node(t,!0),t.icon=!i.length||i.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),t.icon||(t.icon=!0),i.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),0))}},e.vakata={},e.vakata.attributes=function(t,n){t=e(t)[0];var r=n?{}:[];return t&&t.attributes&&e.each(t.attributes,(function(t,i){-1===e.inArray(i.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==i.value&&""!==e.vakata.trim(i.value)&&(n?r[i.name]=i.value:r.push(i.name))})),r},e.vakata.array_unique=function(e){var n,r,i=[],o={};for(n=0,r=e.length;r>n;n++)o[e[n]]===t&&(i.push(e[n]),o[e[n]]=!0);return i},e.vakata.array_remove=function(e,t){return e.splice(t,1),e},e.vakata.array_remove_item=function(t,n){var r=e.inArray(n,t);return-1!==r?e.vakata.array_remove(t,r):t},e.vakata.array_filter=function(e,t,n,r,i){if(e.filter)return e.filter(t,n);for(i in r=[],e)~~i+""==i+""&&i>=0&&t.call(n,e[i],+i,e)&&r.push(e[i]);return r},e.vakata.trim=function(e){return String.prototype.trim?String.prototype.trim.call(e.toString()):e.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},e.jstree.plugins.changed=function(e,t){var n=[];this.trigger=function(e,r){var i,o;if(r||(r={}),"changed"===e.replace(".jstree","")){r.changed={selected:[],deselected:[]};var s={};for(i=0,o=n.length;o>i;i++)s[n[i]]=1;for(i=0,o=r.selected.length;o>i;i++)s[r.selected[i]]?s[r.selected[i]]=2:r.changed.selected.push(r.selected[i]);for(i=0,o=n.length;o>i;i++)1===s[n[i]]&&r.changed.deselected.push(n[i]);n=r.selected.slice()}t.trigger.call(this,e,r)},this.refresh=function(e,r){return n=[],t.refresh.apply(this,arguments)}};var h,u,p=l.createElement("I");p.className="jstree-icon jstree-checkbox",p.setAttribute("role","presentation"),e.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},e.jstree.plugins.checkbox=function(n,r){this.bind=function(){r.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",e.proxy((function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}),this)).on("loading.jstree",e.proxy((function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}),this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",e.proxy((function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)}),this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",e.proxy((function(e,t){var n,r,i=this._model.data,o=(i[t.parent],t.nodes);for(n=0,r=o.length;r>n;n++)i[o[n]].state.checked=i[o[n]].state.checked||i[o[n]].original&&i[o[n]].original.state&&i[o[n]].original.state.checked,i[o[n]].state.checked&&this._data.checkbox.selected.push(o[n])}),this)),(-1!==this.settings.checkbox.cascade.indexOf("up")||-1!==this.settings.checkbox.cascade.indexOf("down"))&&this.element.on("model.jstree",e.proxy((function(t,n){var r,i,o,s,a,l,d=this._model.data,c=d[n.parent],h=n.nodes,u=[],p=this.settings.checkbox.cascade,f=this.settings.checkbox.tie_selection;if(-1!==p.indexOf("down"))if(c.state[f?"selected":"checked"]){for(i=0,o=h.length;o>i;i++)d[h[i]].state[f?"selected":"checked"]=!0;this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(h)}else for(i=0,o=h.length;o>i;i++)if(d[h[i]].state[f?"selected":"checked"]){for(s=0,a=d[h[i]].children_d.length;a>s;s++)d[d[h[i]].children_d[s]].state[f?"selected":"checked"]=!0;this._data[f?"core":"checkbox"].selected=this._data[f?"core":"checkbox"].selected.concat(d[h[i]].children_d)}if(-1!==p.indexOf("up")){for(i=0,o=c.children_d.length;o>i;i++)d[c.children_d[i]].children.length||u.push(d[c.children_d[i]].parent);for(s=0,a=(u=e.vakata.array_unique(u)).length;a>s;s++)for(c=d[u[s]];c&&c.id!==e.jstree.root;){for(r=0,i=0,o=c.children.length;o>i;i++)r+=d[c.children[i]].state[f?"selected":"checked"];if(r!==o)break;c.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(c.id),(l=this.get_node(c,!0))&&l.length&&l.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}}this._data[f?"core":"checkbox"].selected=e.vakata.array_unique(this._data[f?"core":"checkbox"].selected)}),this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",e.proxy((function(t,n){var r,i,o,s,a=n.node,l=this._model.data,d=this.get_node(a.parent),c=this.settings.checkbox.cascade,h=this.settings.checkbox.tie_selection,u={},p=this._data[h?"core":"checkbox"].selected;for(r=0,i=p.length;i>r;r++)u[p[r]]=!0;if(-1!==c.indexOf("down")){var f=this._cascade_new_checked_state(a.id,!0),g=a.children_d.concat(a.id);for(r=0,i=g.length;i>r;r++)f.indexOf(g[r])>-1?u[g[r]]=!0:delete u[g[r]]}if(-1!==c.indexOf("up"))for(;d&&d.id!==e.jstree.root;){for(o=0,r=0,i=d.children.length;i>r;r++)o+=l[d.children[r]].state[h?"selected":"checked"];if(o!==i)break;d.state[h?"selected":"checked"]=!0,u[d.id]=!0,(s=this.get_node(d,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(h?"jstree-clicked":"jstree-checked"),d=this.get_node(d.parent)}for(r in p=[],u)u.hasOwnProperty(r)&&p.push(r);this._data[h?"core":"checkbox"].selected=p}),this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",e.proxy((function(t,n){var r,i,o,s=this.get_node(e.jstree.root),a=this._model.data;for(r=0,i=s.children_d.length;i>r;r++)(o=a[s.children_d[r]])&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1)}),this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",e.proxy((function(t,n){var r,i,o,s=n.node,a=(this.get_node(s,!0),this.settings.checkbox.cascade),l=this.settings.checkbox.tie_selection,d=this._data[l?"core":"checkbox"].selected,c=s.children_d.concat(s.id);if(-1!==a.indexOf("down")){var h=this._cascade_new_checked_state(s.id,!1);d=e.vakata.array_filter(d,(function(e){return-1===c.indexOf(e)||h.indexOf(e)>-1}))}if(-1!==a.indexOf("up")&&-1===d.indexOf(s.id)){for(r=0,i=s.parents.length;i>r;r++)(o=this._model.data[s.parents[r]]).state[l?"selected":"checked"]=!1,o&&o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=!1),(o=this.get_node(s.parents[r],!0))&&o.length&&o.attr("aria-selected",!1).children(".jstree-anchor").removeClass(l?"jstree-clicked":"jstree-checked");d=e.vakata.array_filter(d,(function(e){return-1===s.parents.indexOf(e)}))}this._data[l?"core":"checkbox"].selected=d}),this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",e.proxy((function(t,n){for(var r,i,o,s,a=this.get_node(n.parent),l=this._model.data,d=this.settings.checkbox.tie_selection;a&&a.id!==e.jstree.root&&!a.state[d?"selected":"checked"];){for(o=0,r=0,i=a.children.length;i>r;r++)o+=l[a.children[r]].state[d?"selected":"checked"];if(!(i>0&&o===i))break;a.state[d?"selected":"checked"]=!0,this._data[d?"core":"checkbox"].selected.push(a.id),(s=this.get_node(a,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(d?"jstree-clicked":"jstree-checked"),a=this.get_node(a.parent)}}),this)).on("move_node.jstree",e.proxy((function(t,n){var r,i,o,s,a,l=n.is_multi,d=n.old_parent,c=this.get_node(n.parent),h=this._model.data,u=this.settings.checkbox.tie_selection;if(!l)for(r=this.get_node(d);r&&r.id!==e.jstree.root&&!r.state[u?"selected":"checked"];){for(i=0,o=0,s=r.children.length;s>o;o++)i+=h[r.children[o]].state[u?"selected":"checked"];if(!(s>0&&i===s))break;r.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(r.id),(a=this.get_node(r,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),r=this.get_node(r.parent)}for(r=c;r&&r.id!==e.jstree.root;){for(i=0,o=0,s=r.children.length;s>o;o++)i+=h[r.children[o]].state[u?"selected":"checked"];if(i===s)r.state[u?"selected":"checked"]||(r.state[u?"selected":"checked"]=!0,this._data[u?"core":"checkbox"].selected.push(r.id),(a=this.get_node(r,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"));else{if(!r.state[u?"selected":"checked"])break;r.state[u?"selected":"checked"]=!1,this._data[u?"core":"checkbox"].selected=e.vakata.array_remove_item(this._data[u?"core":"checkbox"].selected,r.id),(a=this.get_node(r,!0))&&a.length&&a.attr("aria-selected",!1).children(".jstree-anchor").removeClass(u?"jstree-clicked":"jstree-checked")}r=this.get_node(r.parent)}}),this))},this.get_undetermined=function(n){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var r,i,o,s,a={},l=this._model.data,d=this.settings.checkbox.tie_selection,c=this._data[d?"core":"checkbox"].selected,h=[],u=this,p=[];for(r=0,i=c.length;i>r;r++)if(l[c[r]]&&l[c[r]].parents)for(o=0,s=l[c[r]].parents.length;s>o&&a[l[c[r]].parents[o]]===t;o++)l[c[r]].parents[o]!==e.jstree.root&&(a[l[c[r]].parents[o]]=!0,h.push(l[c[r]].parents[o]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each((function(){var n,d=u.get_node(this);if(d)if(d.state.loaded){for(r=0,i=d.children_d.length;i>r;r++)if(!(n=l[d.children_d[r]]).state.loaded&&n.original&&n.original.state&&n.original.state.undetermined&&!0===n.original.state.undetermined)for(a[n.id]===t&&n.id!==e.jstree.root&&(a[n.id]=!0,h.push(n.id)),o=0,s=n.parents.length;s>o;o++)a[n.parents[o]]===t&&n.parents[o]!==e.jstree.root&&(a[n.parents[o]]=!0,h.push(n.parents[o]))}else if(d.original&&d.original.state&&d.original.state.undetermined&&!0===d.original.state.undetermined)for(a[d.id]===t&&d.id!==e.jstree.root&&(a[d.id]=!0,h.push(d.id)),o=0,s=d.parents.length;s>o;o++)a[d.parents[o]]===t&&d.parents[o]!==e.jstree.root&&(a[d.parents[o]]=!0,h.push(d.parents[o]))})),r=0,i=h.length;i>r;r++)l[h[r]].state[d?"selected":"checked"]||p.push(n?l[h[r]]:h[r]);return p},this._undetermined=function(){if(null!==this.element){var e,t,n,r=this.get_undetermined(!1);for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),e=0,t=r.length;t>e;e++)(n=this.get_node(r[e],!0))&&n.length&&n.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(t,n,i,o){if(t=r.redraw_node.apply(this,arguments)){var s,a,l=null,d=null;for(s=0,a=t.childNodes.length;a>s;s++)if(t.childNodes[s]&&t.childNodes[s].className&&-1!==t.childNodes[s].className.indexOf("jstree-anchor")){l=t.childNodes[s];break}l&&(!this.settings.checkbox.tie_selection&&this._model.data[t.id].state.checked&&(l.className+=" jstree-checked"),d=p.cloneNode(!1),this._model.data[t.id].state.checkbox_disabled&&(d.className+=" jstree-checkbox-disabled"),l.insertBefore(d,l.childNodes[0]))}return i||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(e.proxy(this._undetermined,this),50)),t},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(t){t=this.get_node(t);var n,r,i=this.settings.checkbox.cascade,o=this.settings.checkbox.tie_selection,s=this._data[o?"core":"checkbox"].selected,a=this._model.data;if(!t||!0===t.state[o?"selected":"checked"]||-1===i.indexOf("undetermined")||-1===i.indexOf("down")&&-1===i.indexOf("up"))return!1;if(!t.state.loaded&&!0===t.original.state.undetermined)return!0;for(n=0,r=t.children_d.length;r>n;n++)if(-1!==e.inArray(t.children_d[n],s)||!a[t.children_d[n]].state.loaded&&a[t.children_d[n]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(t){var n,r,i;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.disable_checkbox(t[n]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(i=this.get_node(t,!0),void(t.state.checkbox_disabled||(t.state.checkbox_disabled=!0,i&&i.length&&i.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:t}))))},this.enable_checkbox=function(t){var n,r,i;if(e.isArray(t)){for(n=0,r=(t=t.slice()).length;r>n;n++)this.enable_checkbox(t[n]);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(i=this.get_node(t,!0),void(t.state.checkbox_disabled&&(t.state.checkbox_disabled=!1,i&&i.length&&i.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:t}))))},this.activate_node=function(t,n){return!e(n.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||e(n.target).hasClass("jstree-checkbox"))&&(n.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!e(n.target).hasClass("jstree-checkbox")?r.activate_node.call(this,t,n):!this.is_disabled(t)&&(this.is_checked(t)?this.uncheck_node(t,n):this.check_node(t,n),void this.trigger("activate_node",{node:this.get_node(t)})))},this._cascade_new_checked_state=function(e,t){var n,r,i,o=this,s=this.settings.checkbox.tie_selection,a=this._model.data[e],l=[],d=[];if(!this.settings.checkbox.cascade_to_disabled&&a.state.disabled||!this.settings.checkbox.cascade_to_hidden&&a.state.hidden)i=this.get_checked_descendants(e),a.state[s?"selected":"checked"]&&i.push(a.id),l=l.concat(i);else{if(a.children)for(n=0,r=a.children.length;r>n;n++){var c=a.children[n];i=o._cascade_new_checked_state(c,t),l=l.concat(i),i.indexOf(c)>-1&&d.push(c)}var h=o.get_node(a,!0),u=d.length>0&&d.length<a.children.length;a.original&&a.original.state&&a.original.state.undetermined&&(a.original.state.undetermined=u),u?(a.state[s?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked")):t&&d.length===a.children.length?(a.state[s?"selected":"checked"]=t,l.push(a.id),h.attr("aria-selected",!0).children(".jstree-anchor").addClass(s?"jstree-clicked":"jstree-checked")):(a.state[s?"selected":"checked"]=!1,h.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked"))}return l},this.get_checked_descendants=function(t){var n=this,r=n.settings.checkbox.tie_selection,i=n._model.data[t];return e.vakata.array_filter(i.children_d,(function(e){return n._model.data[e].state[r?"selected":"checked"]}))},this.check_node=function(t,n){if(this.settings.checkbox.tie_selection)return this.select_node(t,!1,!0,n);var r,i,o;if(e.isArray(t)){for(i=0,o=(t=t.slice()).length;o>i;i++)this.check_node(t[i],n);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(r=this.get_node(t,!0),void(t.state.checked||(t.state.checked=!0,this._data.checkbox.selected.push(t.id),r&&r.length&&r.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:t,selected:this._data.checkbox.selected,event:n}))))},this.uncheck_node=function(t,n){if(this.settings.checkbox.tie_selection)return this.deselect_node(t,!1,n);var r,i,o;if(e.isArray(t)){for(r=0,i=(t=t.slice()).length;i>r;r++)this.uncheck_node(t[r],n);return!0}return!(!(t=this.get_node(t))||t.id===e.jstree.root)&&(o=this.get_node(t,!0),void(t.state.checked&&(t.state.checked=!1,this._data.checkbox.selected=e.vakata.array_remove_item(this._data.checkbox.selected,t.id),o.length&&o.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:t,selected:this._data.checkbox.selected,event:n}))))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var t,n;for(this._data.checkbox.selected.concat([]),this._data.checkbox.selected=this._model.data[e.jstree.root].children_d.concat(),t=0,n=this._data.checkbox.selected.length;n>t;t++)this._model.data[this._data.checkbox.selected[t]]&&(this._model.data[this._data.checkbox.selected[t]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var e,t,n=this._data.checkbox.selected.concat([]);for(e=0,t=this._data.checkbox.selected.length;t>e;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:n})},this.is_checked=function(t){return this.settings.checkbox.tie_selection?this.is_selected(t):!(!(t=this.get_node(t))||t.id===e.jstree.root)&&t.state.checked},this.get_checked=function(t){return this.settings.checkbox.tie_selection?this.get_selected(t):t?e.map(this._data.checkbox.selected,e.proxy((function(e){return this.get_node(e)}),this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(t){if(this.settings.checkbox.tie_selection)return this.get_top_selected(t);var n,r,i,o,s=this.get_checked(!0),a={};for(n=0,r=s.length;r>n;n++)a[s[n].id]=s[n];for(n=0,r=s.length;r>n;n++)for(i=0,o=s[n].children_d.length;o>i;i++)a[s[n].children_d[i]]&&delete a[s[n].children_d[i]];for(n in s=[],a)a.hasOwnProperty(n)&&s.push(n);return t?e.map(s,e.proxy((function(e){return this.get_node(e)}),this)):s},this.get_bottom_checked=function(t){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(t);var n,r,i=this.get_checked(!0),o=[];for(n=0,r=i.length;r>n;n++)i[n].children.length||o.push(i[n].id);return t?e.map(o,e.proxy((function(e){return this.get_node(e)}),this)):o},this.load_node=function(t,n){var i,o,s;if(!e.isArray(t)&&!this.settings.checkbox.tie_selection&&(s=this.get_node(t))&&s.state.loaded)for(i=0,o=s.children_d.length;o>i;i++)this._model.data[s.children_d[i]].state.checked&&(this._data.checkbox.selected=e.vakata.array_remove_item(this._data.checkbox.selected,s.children_d[i]));return r.load_node.apply(this,arguments)},this.get_state=function(){var e=r.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection||(e.checkbox=this._data.checkbox.selected.slice()),e},this.set_state=function(t,n){var i=r.set_state.apply(this,arguments);if(i&&t.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var o=this;e.each(t.checkbox,(function(e,t){o.check_node(t)}))}return delete t.checkbox,this.set_state(t,n),!1}return i},this.refresh=function(e,t){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),r.refresh.apply(this,arguments)}},e.jstree.defaults.conditionalselect=function(){return!0},e.jstree.plugins.conditionalselect=function(e,t){this.activate_node=function(e,n){return this.settings.conditionalselect.call(this,this.get_node(e),n)?t.activate_node.call(this,e,n):void 0}},e.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(t,n){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference);n.create_node(r,{},"last",(function(e){try{n.edit(e)}catch(t){setTimeout((function(){n.edit(e)}),0)}}))}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference);n.edit(r)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference);n.is_selected(r)?n.delete_node(n.get_selected()):n.delete_node(r)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference);n.is_selected(r)?n.cut(n.get_top_selected()):n.cut(r)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference);n.is_selected(r)?n.copy(n.get_top_selected()):n.copy(r)}},paste:{separator_before:!1,icon:!1,_disabled:function(t){return!e.jstree.reference(t.reference).can_paste()},separator_after:!1,label:"Paste",action:function(t){var n=e.jstree.reference(t.reference),r=n.get_node(t.reference);n.paste(r)}}}}}}},e.jstree.plugins.contextmenu=function(n,r){this.bind=function(){r.bind.call(this);var t,n,i=0,o=null;this.element.on("init.jstree loading.jstree ready.jstree",e.proxy((function(){this.get_container_ul().addClass("jstree-contextmenu")}),this)).on("contextmenu.jstree",".jstree-anchor",e.proxy((function(e,t){"input"!==e.target.tagName.toLowerCase()&&(e.preventDefault(),i=e.ctrlKey?+new Date:0,(t||o)&&(i=+new Date+1e4),o&&clearTimeout(o),this.is_loading(e.currentTarget)||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY,e))}),this)).on("click.jstree",".jstree-anchor",e.proxy((function(t){this._data.contextmenu.visible&&(!i||+new Date-i>250)&&e.vakata.context.hide(),i=0}),this)).on("touchstart.jstree",".jstree-anchor",(function(r){r.originalEvent&&r.originalEvent.changedTouches&&r.originalEvent.changedTouches[0]&&(t=r.originalEvent.changedTouches[0].clientX,n=r.originalEvent.changedTouches[0].clientY,o=setTimeout((function(){e(r.currentTarget).trigger("contextmenu",!0)}),750))})).on("touchmove.vakata.jstree",(function(r){o&&r.originalEvent&&r.originalEvent.changedTouches&&r.originalEvent.changedTouches[0]&&(Math.abs(t-r.originalEvent.changedTouches[0].clientX)>10||Math.abs(n-r.originalEvent.changedTouches[0].clientY)>10)&&(clearTimeout(o),e.vakata.context.hide())})).on("touchend.vakata.jstree",(function(e){o&&clearTimeout(o)})),e(l).on("context_hide.vakata.jstree",e.proxy((function(t,n){this._data.contextmenu.visible=!1,e(n.reference).removeClass("jstree-context")}),this))},this.teardown=function(){this._data.contextmenu.visible&&e.vakata.context.hide(),r.teardown.call(this)},this.show_contextmenu=function(n,r,i,o){if(!(n=this.get_node(n))||n.id===e.jstree.root)return!1;var s=this.settings.contextmenu,a=this.get_node(n,!0).children(".jstree-anchor"),l=!1,d=!1;(s.show_at_node||r===t||i===t)&&(l=a.offset(),r=l.left,i=l.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(n)&&this.activate_node(n,o),d=s.items,e.isFunction(d)&&(d=d.call(this,n,e.proxy((function(e){this._show_contextmenu(n,r,i,e)}),this))),e.isPlainObject(d)&&this._show_contextmenu(n,r,i,d)},this._show_contextmenu=function(t,n,r,i){var o=this.get_node(t,!0).children(".jstree-anchor");e(l).one("context_show.vakata.jstree",e.proxy((function(t,n){var r="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";e(n.element).addClass(r),o.addClass("jstree-context")}),this)),this._data.contextmenu.visible=!0,e.vakata.context.show(o,{x:n,y:r},i),this.trigger("show_contextmenu",{node:t,x:n,y:r})}},function(e){var t=!1,n={element:!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1};e.vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(t){e(l).triggerHandler("context_"+t+".vakata",{reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}})},_execute:function(t){return!(!(t=n.items[t])||t._disabled&&(!e.isFunction(t._disabled)||t._disabled({item:t,reference:n.reference,element:n.element}))||!t.action)&&t.action.call(null,{item:t,reference:n.reference,element:n.element,position:{x:n.position_x,y:n.position_y}})},_parse:function(t,r){if(!t)return!1;r||(n.html="",n.items=[]);var i,o="",s=!1;return r&&(o+="<ul>"),e.each(t,(function(t,r){return!r||(n.items.push(r),!s&&r.separator_before&&(o+="<li class='vakata-context-separator'><a href='#' "+(e.vakata.context.settings.icons?"":'style="margin-left:0px;"')+"> </a></li>"),s=!1,o+="<li class='"+(r._class||"")+(!0===r._disabled||e.isFunction(r._disabled)&&r._disabled({item:r,reference:n.reference,element:n.element})?" vakata-contextmenu-disabled ":"")+"' "+(r.shortcut?" data-shortcut='"+r.shortcut+"' ":"")+">",o+="<a href='#' rel='"+(n.items.length-1)+"' "+(r.title?"title='"+r.title+"'":"")+">",e.vakata.context.settings.icons&&(o+="<i ",r.icon&&(o+=-1!==r.icon.indexOf("/")||-1!==r.icon.indexOf(".")?" style='background:url(\""+r.icon+"\") center center no-repeat' ":" class='"+r.icon+"' "),o+="></i><span class='vakata-contextmenu-sep'> </span>"),o+=(e.isFunction(r.label)?r.label({item:t,reference:n.reference,element:n.element}):r.label)+(r.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+r.shortcut+'">'+(r.shortcut_label||"")+"</span>":"")+"</a>",r.submenu&&(i=e.vakata.context._parse(r.submenu,!0))&&(o+=i),o+="</li>",void(r.separator_after&&(o+="<li class='vakata-context-separator'><a href='#' "+(e.vakata.context.settings.icons?"":'style="margin-left:0px;"')+"> </a></li>",s=!0)))})),o=o.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),r&&(o+="</ul>"),r||(n.html=o,e.vakata.context._trigger("parse")),o.length>10&&o},_show_submenu:function(n){if((n=e(n)).length&&n.children("ul").length){var r=n.children("ul"),i=n.offset().left,o=i+n.outerWidth(),s=n.offset().top,a=r.width(),l=r.height(),d=e(window).width()+e(window).scrollLeft(),c=e(window).height()+e(window).scrollTop();t?n[o-(a+10+n.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):n[o+a>d&&i>d-o?"addClass":"removeClass"]("vakata-context-right"),s+l+10>c&&r.css("bottom","-1px"),n.hasClass("vakata-context-right")?a>i&&r.css("margin-right",i-a):a>d-o&&r.css("margin-left",d-o-a),r.show()}},show:function(r,i,o){var s,a,d,c,h,u,p,f,g=!0;switch(n.element&&n.element.length&&n.element.width(""),g){case!i&&!r:return!1;case!!i&&!!r:n.reference=r,n.position_x=i.x,n.position_y=i.y;break;case!i&&!!r:n.reference=r,s=r.offset(),n.position_x=s.left+r.outerHeight(),n.position_y=s.top;break;case!!i&&!r:n.position_x=i.x,n.position_y=i.y}r&&!o&&e(r).data("vakata_contextmenu")&&(o=e(r).data("vakata_contextmenu")),e.vakata.context._parse(o)&&n.element.html(n.html),n.items.length&&(n.element.appendTo(l.body),a=n.element,d=n.position_x,c=n.position_y,h=a.width(),u=a.height(),p=e(window).width()+e(window).scrollLeft(),f=e(window).height()+e(window).scrollTop(),t&&(d-=a.outerWidth()-e(r).outerWidth())<e(window).scrollLeft()+20&&(d=e(window).scrollLeft()+20),d+h+20>p&&(d=p-(h+20)),c+u+20>f&&(c=f-(u+20)),n.element.css({left:d,top:c}).show().find("a").first().focus().parent().addClass("vakata-context-hover"),n.is_visible=!0,e.vakata.context._trigger("show"))},hide:function(){n.is_visible&&(n.element.hide().find("ul").hide().end().find(":focus").blur().end().detach(),n.is_visible=!1,e.vakata.context._trigger("hide"))}},e((function(){t="rtl"===e(l.body).css("direction");var r=!1;n.element=e("<ul class='vakata-context'></ul>"),n.element.on("mouseenter","li",(function(t){t.stopImmediatePropagation(),e.contains(this,t.relatedTarget)||(r&&clearTimeout(r),n.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),e(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),e.vakata.context._show_submenu(this))})).on("mouseleave","li",(function(t){e.contains(this,t.relatedTarget)||e(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")})).on("mouseleave",(function(t){e(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),e.vakata.context.settings.hide_onmouseleave&&(r=setTimeout((function(){e.vakata.context.hide()}),e.vakata.context.settings.hide_onmouseleave))})).on("click","a",(function(t){t.preventDefault(),e(this).blur().parent().hasClass("vakata-context-disabled")||!1===e.vakata.context._execute(e(this).attr("rel"))||e.vakata.context.hide()})).on("keydown","a",(function(t){var r=null;switch(t.which){case 13:case 32:t.type="click",t.preventDefault(),e(t.currentTarget).trigger(t);break;case 37:n.is_visible&&(n.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 38:n.is_visible&&((r=n.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(r=n.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),r.addClass("vakata-context-hover").children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 39:n.is_visible&&(n.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 40:n.is_visible&&((r=n.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(r=n.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),r.addClass("vakata-context-hover").children("a").focus(),t.stopImmediatePropagation(),t.preventDefault());break;case 27:e.vakata.context.hide(),t.preventDefault()}})).on("keydown",(function(e){e.preventDefault();var t=n.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();t.parent().not(".vakata-context-disabled")&&t.click()})),e(l).on("mousedown.vakata.jstree",(function(t){n.is_visible&&n.element[0]!==t.target&&!e.contains(n.element[0],t.target)&&e.vakata.context.hide()})).on("context_show.vakata.jstree",(function(e,r){n.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),t&&n.element.addClass("vakata-context-rtl").css("direction","rtl"),n.element.find("ul").hide().end()}))}))}(e),e.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},e.jstree.plugins.dnd=function(t,n){this.init=function(e,t){n.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in l.createElement("span")},this.bind=function(){n.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",e.proxy((function(t){if(this.settings.dnd.large_drag_target&&e(t.target).closest(".jstree-node")[0]!==t.currentTarget)return!0;if("touchstart"===t.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var n=this.get_node(t.target),r=this.is_selected(n)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,i=r>1?r+" "+this.get_string("nodes"):this.get_text(t.currentTarget);if(this.settings.core.force_text&&(i=e.vakata.html.escape(i)),n&&n.id&&n.id!==e.jstree.root&&(1===t.which||"touchstart"===t.type||"dragstart"===t.type)&&(!0===this.settings.dnd.is_draggable||e.isFunction(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,r>1?this.get_top_selected(!0):[n],t))){if(h={jstree:!0,origin:this,obj:this.get_node(n,!0),nodes:r>1?this.get_top_selected():[n.id]},u=t.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),e.vakata.dnd.start(t,h,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+i+'<ins class="jstree-copy" style="display:none;">+</ins></div>');e.vakata.dnd._trigger("start",t,{helper:e(),element:u,data:h})}}),this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",(function(t){return t.preventDefault(),e.vakata.dnd._trigger("move",t,{helper:e(),element:u,data:h}),!1})).on("drop.jstree",e.proxy((function(t){return t.preventDefault(),e.vakata.dnd._trigger("stop",t,{helper:e(),element:u,data:h}),!1}),this))},this.redraw_node=function(e,t,r,i){if((e=n.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{var o,s,a=null;for(o=0,s=e.childNodes.length;s>o;o++)if(e.childNodes[o]&&e.childNodes[o].className&&-1!==e.childNodes[o].className.indexOf("jstree-anchor")){a=e.childNodes[o];break}a&&a.setAttribute("draggable",!0)}return e}},e((function(){var n=!1,r=!1,i=!1,o=!1,s=e('<div id="jstree-marker"> </div>').hide();e(l).on("dragover.vakata.jstree",(function(t){u&&e.vakata.dnd._trigger("move",t,{helper:e(),element:u,data:h})})).on("drop.vakata.jstree",(function(t){u&&(e.vakata.dnd._trigger("stop",t,{helper:e(),element:u,data:h}),u=null,h=null)})).on("dnd_start.vakata.jstree",(function(e,t){n=!1,i=!1,t&&t.data&&t.data.jstree&&s.appendTo(l.body)})).on("dnd_move.vakata.jstree",(function(a,l){var d=l.event.target!==i.target;if(o&&(!l.event||"dragover"!==l.event.type||d)&&clearTimeout(o),l&&l.data&&l.data.jstree&&(!l.event.target.id||"jstree-marker"!==l.event.target.id)){i=l.event;var c,h,u,p,f,g,_,m,v,b,x,y,j,k,w,A,C,E=e.jstree.reference(l.event.target),S=!1,T=!1,O=!1;if(E&&E._data&&E._data.dnd)if(s.attr("class","jstree-"+E.get_theme()+(E.settings.core.themes.responsive?" jstree-dnd-responsive":"")),w=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey)),l.helper.children().attr("class","jstree-"+E.get_theme()+" jstree-"+E.get_theme()+"-"+E.get_theme_variant()+" "+(E.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[w?"show":"hide"](),l.event.target!==E.element[0]&&l.event.target!==E.get_container_ul()[0]||0!==E.get_container_ul().children().length){if((S=E.settings.dnd.large_drop_target?e(l.event.target).closest(".jstree-node").children(".jstree-anchor"):e(l.event.target).closest(".jstree-anchor"))&&S.length&&S.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(T=S.offset(),O=(l.event.pageY!==t?l.event.pageY:l.event.originalEvent.pageY)-T.top,u=S.outerHeight(),g=u/3>O?["b","i","a"]:O>u-u/3?["a","i","b"]:O>u/2?["i","a","b"]:["i","b","a"],e.each(g,(function(t,i){switch(i){case"b":c=T.left-6,h=T.top,p=E.get_parent(S),f=S.parent().index(),C="jstree-below";break;case"i":j=E.settings.dnd.inside_pos,k=E.get_node(S.parent()),c=T.left-2,h=T.top+u/2+1,p=k.id,f="first"===j?0:"last"===j?k.children.length:Math.min(j,k.children.length),C="jstree-inside";break;case"a":c=T.left-6,h=T.top+u,p=E.get_parent(S),f=S.parent().index()+1,C="jstree-above"}for(_=!0,m=0,v=l.data.nodes.length;v>m;m++)if(b=l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey))?"copy_node":"move_node",x=f,"move_node"===b&&"a"===i&&l.data.origin&&l.data.origin===E&&p===E.get_parent(l.data.nodes[m])&&(y=E.get_node(p),x>e.inArray(l.data.nodes[m],y.children)&&(x-=1)),!(_=_&&(E&&E.settings&&E.settings.dnd&&!1===E.settings.dnd.check_while_dragging||E.check(b,l.data.origin&&l.data.origin!==E?l.data.origin.get_node(l.data.nodes[m]):l.data.nodes[m],p,x,{dnd:!0,ref:E.get_node(S.parent()),pos:i,origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==E,is_foreign:!l.data.origin})))){E&&E.last_error&&(r=E.last_error());break}return"i"===i&&S.parent().is(".jstree-closed")&&E.settings.dnd.open_timeout&&(!l.event||"dragover"!==l.event.type||d)&&(o&&clearTimeout(o),o=setTimeout(function(e,t){return function(){e.open_node(t)}}(E,S),E.settings.dnd.open_timeout)),_?((A=E.get_node(p,!0)).hasClass(".jstree-dnd-parent")||(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),A.addClass("jstree-dnd-parent")),n={ins:E,par:p,pos:"i"!==i||"last"!==j||0!==f||E.is_loaded(k)?f:"last"},s.css({left:c+"px",top:h+"px"}).show(),s.removeClass("jstree-above jstree-inside jstree-below").addClass(C),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=w?"copy":"move"),r={},g=!0,!1):void 0})),!0===g))return}else{for(_=!0,m=0,v=l.data.nodes.length;v>m&&(_=_&&E.check(l.data.origin&&(l.data.origin.settings.dnd.always_copy||l.data.origin.settings.dnd.copy&&(l.event.metaKey||l.event.ctrlKey))?"copy_node":"move_node",l.data.origin&&l.data.origin!==E?l.data.origin.get_node(l.data.nodes[m]):l.data.nodes[m],e.jstree.root,"last",{dnd:!0,ref:E.get_node(e.jstree.root),pos:"i",origin:l.data.origin,is_multi:l.data.origin&&l.data.origin!==E,is_foreign:!l.data.origin}));m++);if(_)return n={ins:E,par:e.jstree.root,pos:"last"},s.hide(),l.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(l.event.originalEvent&&l.event.originalEvent.dataTransfer&&(l.event.originalEvent.dataTransfer.dropEffect=w?"copy":"move"))}e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),n=!1,l.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),l.event.originalEvent&&l.event.originalEvent.dataTransfer,s.hide()}})).on("dnd_scroll.vakata.jstree",(function(e,t){t&&t.data&&t.data.jstree&&(s.hide(),n=!1,i=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))})).on("dnd_stop.vakata.jstree",(function(t,a){if(e(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),o&&clearTimeout(o),a&&a.data&&a.data.jstree){s.hide().detach();var l,d,c=[];if(n){for(l=0,d=a.data.nodes.length;d>l;l++)c[l]=a.data.origin?a.data.origin.get_node(a.data.nodes[l]):a.data.nodes[l];n.ins[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(a.event.metaKey||a.event.ctrlKey))?"copy_node":"move_node"](c,n.par,n.pos,!1,!1,!1,a.data.origin)}else(l=e(a.event.target).closest(".jstree")).length&&r&&r.error&&"check"===r.error&&(l=l.jstree(!0))&&l.settings.core.error.call(this,r);i=!1,n=!1}})).on("keyup.jstree keydown.jstree",(function(t,a){(a=e.vakata.dnd._get())&&a.data&&a.data.jstree&&("keyup"===t.type&&27===t.which?(o&&clearTimeout(o),n=!1,r=!1,i=!1,o=!1,s.hide().detach(),e.vakata.dnd._clean()):(a.helper.find(".jstree-copy").first()[a.data.origin&&(a.data.origin.settings.dnd.always_copy||a.data.origin.settings.dnd.copy&&(t.metaKey||t.ctrlKey))?"show":"hide"](),i&&(i.metaKey=t.metaKey,i.ctrlKey=t.ctrlKey,e.vakata.dnd._trigger("move",i))))}))})),function(e){e.vakata.html={div:e("<div></div>"),escape:function(t){return e.vakata.html.div.text(t).html()},strip:function(t){return e.vakata.html.div.empty().append(e.parseHTML(t)).text()}};var n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1};e.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(n,r,i){i===t&&(i=e.vakata.dnd._get()),i.event=r,e(l).triggerHandler("dnd_"+n+".vakata",i)},_get:function(){return{data:n.data,element:n.element,helper:n.helper}},_clean:function(){n.helper&&n.helper.remove(),n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),n={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},u=null,e(l).off("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(l).off("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop)},_scroll:function(t){if(!n.scroll_e||!n.scroll_l&&!n.scroll_t)return n.scroll_i&&(clearInterval(n.scroll_i),n.scroll_i=!1),!1;if(!n.scroll_i)return n.scroll_i=setInterval(e.vakata.dnd._scroll,100),!1;if(!0===t)return!1;var r=n.scroll_e.scrollTop(),i=n.scroll_e.scrollLeft();n.scroll_e.scrollTop(r+n.scroll_t*e.vakata.dnd.settings.scroll_speed),n.scroll_e.scrollLeft(i+n.scroll_l*e.vakata.dnd.settings.scroll_speed),(r!==n.scroll_e.scrollTop()||i!==n.scroll_e.scrollLeft())&&e.vakata.dnd._trigger("scroll",n.scroll_e)},start:function(t,r,i){"touchstart"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=l.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_drag&&e.vakata.dnd.stop({});try{t.currentTarget.unselectable="on",t.currentTarget.onselectstart=function(){return!1},t.currentTarget.style&&(t.currentTarget.style.touchAction="none",t.currentTarget.style.msTouchAction="none",t.currentTarget.style.MozUserSelect="none")}catch(e){}return n.init_x=t.pageX,n.init_y=t.pageY,n.data=r,n.is_down=!0,n.element=t.currentTarget,n.target=t.target,n.is_touch="touchstart"===t.type,!1!==i&&(n.helper=e("<div id='vakata-dnd'></div>").html(i).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),e(l).on("mousemove.vakata.jstree touchmove.vakata.jstree",e.vakata.dnd.drag),e(l).on("mouseup.vakata.jstree touchend.vakata.jstree",e.vakata.dnd.stop),!1},drag:function(t){if("touchmove"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=l.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_down){if(!n.is_drag){if(!(Math.abs(t.pageX-n.init_x)>(n.is_touch?e.vakata.dnd.settings.threshold_touch:e.vakata.dnd.settings.threshold)||Math.abs(t.pageY-n.init_y)>(n.is_touch?e.vakata.dnd.settings.threshold_touch:e.vakata.dnd.settings.threshold)))return;n.helper&&(n.helper.appendTo(l.body),n.helper_w=n.helper.outerWidth()),n.is_drag=!0,e(n.target).one("click.vakata",!1),e.vakata.dnd._trigger("start",t)}var r=!1,i=!1,o=!1,s=!1,a=!1,d=!1,c=!1,h=!1,u=!1,p=!1;return n.scroll_t=0,n.scroll_l=0,n.scroll_e=!1,e(e(t.target).parentsUntil("body").addBack().get().reverse()).filter((function(){return/^auto|scroll$/.test(e(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)})).each((function(){var r=e(this),i=r.offset();return this.scrollHeight>this.offsetHeight&&(i.top+r.height()-t.pageY<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=1),t.pageY-i.top<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(i.left+r.width()-t.pageX<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=1),t.pageX-i.left<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=-1)),n.scroll_t||n.scroll_l?(n.scroll_e=e(this),!1):void 0})),n.scroll_e||(r=e(l),i=e(window),o=r.height(),s=i.height(),a=r.width(),d=i.width(),c=r.scrollTop(),h=r.scrollLeft(),o>s&&t.pageY-c<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=-1),o>s&&s-(t.pageY-c)<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_t=1),a>d&&t.pageX-h<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=-1),a>d&&d-(t.pageX-h)<e.vakata.dnd.settings.scroll_proximity&&(n.scroll_l=1),(n.scroll_t||n.scroll_l)&&(n.scroll_e=r)),n.scroll_e&&e.vakata.dnd._scroll(!0),n.helper&&(u=parseInt(t.pageY+e.vakata.dnd.settings.helper_top,10),p=parseInt(t.pageX+e.vakata.dnd.settings.helper_left,10),o&&u+25>o&&(u=o-50),a&&p+n.helper_w>a&&(p=a-(n.helper_w+2)),n.helper.css({left:p+"px",top:u+"px"})),e.vakata.dnd._trigger("move",t),!1}},stop:function(t){if("touchend"===t.type&&t.originalEvent&&t.originalEvent.changedTouches&&t.originalEvent.changedTouches[0]&&(t.pageX=t.originalEvent.changedTouches[0].pageX,t.pageY=t.originalEvent.changedTouches[0].pageY,t.target=l.elementFromPoint(t.originalEvent.changedTouches[0].pageX-window.pageXOffset,t.originalEvent.changedTouches[0].pageY-window.pageYOffset)),n.is_drag)t.target!==n.target&&e(n.target).off("click.vakata"),e.vakata.dnd._trigger("stop",t);else if("touchend"===t.type&&t.target===n.target){var r=setTimeout((function(){e(t.target).click()}),100);e(t.target).one("click",(function(){r&&clearTimeout(r)}))}return e.vakata.dnd._clean(),!1}}}(e),e.jstree.defaults.massload=null,e.jstree.plugins.massload=function(t,n){this.init=function(e,t){this._data.massload={},n.init.call(this,e,t)},this._load_nodes=function(t,r,i,o){var s,a,l,d=this.settings.massload,c=[],h=this._model.data;if(!i){for(s=0,a=t.length;a>s;s++)(!h[t[s]]||!h[t[s]].state.loaded&&!h[t[s]].state.failed||o)&&(c.push(t[s]),(l=this.get_node(t[s],!0))&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},c.length){if(e.isFunction(d))return d.call(this,c,e.proxy((function(e){var s,a;if(e)for(s in e)e.hasOwnProperty(s)&&(this._data.massload[s]=e[s]);for(s=0,a=t.length;a>s;s++)(l=this.get_node(t[s],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);n._load_nodes.call(this,t,r,i,o)}),this));if("object"==typeof d&&d&&d.url)return d=e.extend(!0,{},d),e.isFunction(d.url)&&(d.url=d.url.call(this,c)),e.isFunction(d.data)&&(d.data=d.data.call(this,c)),e.ajax(d).done(e.proxy((function(e,s,a){var d,c;if(e)for(d in e)e.hasOwnProperty(d)&&(this._data.massload[d]=e[d]);for(d=0,c=t.length;c>d;d++)(l=this.get_node(t[d],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);n._load_nodes.call(this,t,r,i,o)}),this)).fail(e.proxy((function(e){n._load_nodes.call(this,t,r,i,o)}),this))}}return n._load_nodes.call(this,t,r,i,o)},this._load_node=function(t,r){var i,o=this._data.massload[t.id],s=null;return o?(s=this["string"==typeof o?"_append_html_data":"_append_json_data"](t,"string"==typeof o?e(e.parseHTML(o)).filter((function(){return 3!==this.nodeType})):o,(function(e){r.call(this,e)})),(i=this.get_node(t.id,!0))&&i.length&&i.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[t.id],s):n._load_node.call(this,t,r)}},e.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},e.jstree.plugins.search=function(n,r){this.bind=function(){r.bind.call(this),this._data.search.str="",this._data.search.dom=e(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",e.proxy((function(t,n){if(this._data.search.som&&n.res.length){var r,i,o,s,a=this._model.data,l=[];for(r=0,i=n.res.length;i>r;r++)if(a[n.res[r]]&&!a[n.res[r]].state.hidden&&(l.push(n.res[r]),l=l.concat(a[n.res[r]].parents),this._data.search.smc))for(o=0,s=a[n.res[r]].children_d.length;s>o;o++)a[a[n.res[r]].children_d[o]]&&!a[a[n.res[r]].children_d[o]].state.hidden&&l.push(a[n.res[r]].children_d[o]);l=e.vakata.array_remove_item(e.vakata.array_unique(l),e.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(l,!0),this.redraw(!0)}}),this)).on("clear_search.jstree",e.proxy((function(e,t){this._data.search.som&&t.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}),this))},this.search=function(n,r,i,o,s,a){if(!1===n||""===e.vakata.trim(n.toString()))return this.clear_search();o=(o=this.get_node(o))&&o.id?o.id:null,n=n.toString();var l,d,c=this.settings.search,h=!!c.ajax&&c.ajax,u=this._model.data,p=null,f=[],g=[];if(this._data.search.res.length&&!s&&this.clear_search(),i===t&&(i=c.show_only_matches),a===t&&(a=c.show_only_matches_children),!r&&!1!==h)return e.isFunction(h)?h.call(this,n,e.proxy((function(t){t&&t.d&&(t=t.d),this._load_nodes(e.isArray(t)?e.vakata.array_unique(t):[],(function(){this.search(n,!0,i,o,s,a)}))}),this),o):((h=e.extend({},h)).data||(h.data={}),h.data.str=n,o&&(h.data.inside=o),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=e.ajax(h).fail(e.proxy((function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(h)},this.settings.core.error.call(this,this._data.core.last_error)}),this)).done(e.proxy((function(t){t&&t.d&&(t=t.d),this._load_nodes(e.isArray(t)?e.vakata.array_unique(t):[],(function(){this.search(n,!0,i,o,s,a)}))}),this)),this._data.search.lastRequest);if(s||(this._data.search.str=n,this._data.search.dom=e(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=i,this._data.search.smc=a),p=new e.vakata.search(n,!0,{caseSensitive:c.case_sensitive,fuzzy:c.fuzzy}),e.each(u[o||e.jstree.root].children_d,(function(e,t){var r=u[t];r.text&&!r.state.hidden&&(!c.search_leaves_only||r.state.loaded&&0===r.children.length)&&(c.search_callback&&c.search_callback.call(this,n,r)||!c.search_callback&&p.search(r.text).isMatch)&&(f.push(t),g=g.concat(r.parents))})),f.length){for(l=0,d=(g=e.vakata.array_unique(g)).length;d>l;l++)g[l]!==e.jstree.root&&u[g[l]]&&!0===this.open_node(g[l],null,0)&&this._data.search.opn.push(g[l]);s?(this._data.search.dom=this._data.search.dom.add(e(this.element[0].querySelectorAll("#"+e.map(f,(function(t){return-1!=="0123456789".indexOf(t[0])?"\\3"+t[0]+" "+t.substr(1).replace(e.jstree.idregex,"\\$&"):t.replace(e.jstree.idregex,"\\$&")})).join(", #")))),this._data.search.res=e.vakata.array_unique(this._data.search.res.concat(f))):(this._data.search.dom=e(this.element[0].querySelectorAll("#"+e.map(f,(function(t){return-1!=="0123456789".indexOf(t[0])?"\\3"+t[0]+" "+t.substr(1).replace(e.jstree.idregex,"\\$&"):t.replace(e.jstree.idregex,"\\$&")})).join(", #"))),this._data.search.res=f),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:n,res:this._data.search.res,show_only_matches:i})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=e(this.element[0].querySelectorAll("#"+e.map(this._data.search.res,(function(t){return-1!=="0123456789".indexOf(t[0])?"\\3"+t[0]+" "+t.substr(1).replace(e.jstree.idregex,"\\$&"):t.replace(e.jstree.idregex,"\\$&")})).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=e()},this.redraw_node=function(t,n,i,o){if((t=r.redraw_node.apply(this,arguments))&&-1!==e.inArray(t.id,this._data.search.res)){var s,a,l=null;for(s=0,a=t.childNodes.length;a>s;s++)if(t.childNodes[s]&&t.childNodes[s].className&&-1!==t.childNodes[s].className.indexOf("jstree-anchor")){l=t.childNodes[s];break}l&&(l.className+=" jstree-search")}return t}},function(e){e.vakata.search=function(t,n,r){r=r||{},!1!==(r=e.extend({},e.vakata.search.defaults,r)).fuzzy&&(r.fuzzy=!0),t=r.caseSensitive?t:t.toLowerCase();var i,o,s,a,l=r.location,d=r.distance,c=r.threshold,h=t.length;return h>32&&(r.fuzzy=!1),r.fuzzy&&(i=1<<h-1,o=function(){var e={},n=0;for(n=0;h>n;n++)e[t.charAt(n)]=0;for(n=0;h>n;n++)e[t.charAt(n)]|=1<<h-n-1;return e}(),s=function(e,t){var n=e/h,r=Math.abs(l-t);return d?n+r/d:r?1:n}),a=function(e){if(e=r.caseSensitive?e:e.toLowerCase(),t===e||-1!==e.indexOf(t))return{isMatch:!0,score:0};if(!r.fuzzy)return{isMatch:!1,score:1};var n,a,d,u,p,f,g,_,m,v=e.length,b=c,x=e.indexOf(t,l),y=h+v,j=1,k=[];for(-1!==x&&(b=Math.min(s(0,x),b),-1!==(x=e.lastIndexOf(t,l+h))&&(b=Math.min(s(0,x),b))),x=-1,n=0;h>n;n++){for(d=0,u=y;u>d;)s(n,l+u)<=b?d=u:y=u,u=Math.floor((y-d)/2+d);for(y=u,f=Math.max(1,l-u+1),g=Math.min(l+u,v)+h,(_=new Array(g+2))[g+1]=(1<<n)-1,a=g;a>=f;a--)if(m=o[e.charAt(a-1)],_[a]=0===n?(_[a+1]<<1|1)&m:(_[a+1]<<1|1)&m|(p[a+1]|p[a])<<1|1|p[a+1],_[a]&i&&b>=(j=s(n,a-1))){if(b=j,x=a-1,k.push(x),!(x>l))break;f=Math.max(1,2*l-x)}if(s(n+1,l)>b)break;p=_}return{isMatch:x>=0,score:j}},!0===n?{search:a}:a(n)},e.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1}}(e),e.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1},e.jstree.plugins.sort=function(t,n){this.bind=function(){n.bind.call(this),this.element.on("model.jstree",e.proxy((function(e,t){this.sort(t.parent,!0)}),this)).on("rename_node.jstree create_node.jstree",e.proxy((function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)}),this)).on("move_node.jstree copy_node.jstree",e.proxy((function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)}),this))},this.sort=function(t,n){var r,i;if((t=this.get_node(t))&&t.children&&t.children.length&&(t.children.sort(e.proxy(this.settings.sort,this)),n))for(r=0,i=t.children_d.length;i>r;r++)this.sort(t.children_d[r],!1)}};var f=!1;e.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},e.jstree.plugins.state=function(t,n){this.bind=function(){n.bind.call(this);var t=e.proxy((function(){this.element.on(this.settings.state.events,e.proxy((function(){f&&clearTimeout(f),f=setTimeout(e.proxy((function(){this.save_state()}),this),100)}),this)),this.trigger("state_ready")}),this);this.element.on("ready.jstree",e.proxy((function(e,n){this.element.one("restore_state.jstree",t),this.restore_state()||t()}),this))},this.save_state=function(){var t=this.get_state();this.settings.state.preserve_loaded||delete t.core.loaded;var n={state:t,ttl:this.settings.state.ttl,sec:+new Date};e.vakata.storage.set(this.settings.state.key,JSON.stringify(n))},this.restore_state=function(){var t=e.vakata.storage.get(this.settings.state.key);if(t)try{t=JSON.parse(t)}catch(e){return!1}return!(t&&t.ttl&&t.sec&&+new Date-t.sec>t.ttl||(t&&t.state&&(t=t.state),t&&e.isFunction(this.settings.state.filter)&&(t=this.settings.state.filter.call(this,t)),!t||(this.settings.state.preserve_loaded||delete t.core.loaded,this.element.one("set_state.jstree",(function(n,r){r.instance.trigger("restore_state",{state:e.extend(!0,{},t)})})),this.set_state(t),0)))},this.clear_state=function(){return e.vakata.storage.del(this.settings.state.key)}},function(e,t){e.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}}}(e),e.jstree.defaults.types={default:{}},e.jstree.defaults.types[e.jstree.root]={},e.jstree.plugins.types=function(n,r){this.init=function(n,i){var o,s;if(i&&i.types&&i.types.default)for(o in i.types)if("default"!==o&&o!==e.jstree.root&&i.types.hasOwnProperty(o))for(s in i.types.default)i.types.default.hasOwnProperty(s)&&i.types[o][s]===t&&(i.types[o][s]=i.types.default[s]);r.init.call(this,n,i),this._model.data[e.jstree.root].type=e.jstree.root},this.refresh=function(t,n){r.refresh.call(this,t,n),this._model.data[e.jstree.root].type=e.jstree.root},this.bind=function(){this.element.on("model.jstree",e.proxy((function(n,r){var i,o,s,a=this._model.data,l=r.nodes,d=this.settings.types,c="default";for(i=0,o=l.length;o>i;i++){if(c="default",a[l[i]].original&&a[l[i]].original.type&&d[a[l[i]].original.type]&&(c=a[l[i]].original.type),a[l[i]].data&&a[l[i]].data.jstree&&a[l[i]].data.jstree.type&&d[a[l[i]].data.jstree.type]&&(c=a[l[i]].data.jstree.type),a[l[i]].type=c,!0===a[l[i]].icon&&d[c].icon!==t&&(a[l[i]].icon=d[c].icon),d[c].li_attr!==t&&"object"==typeof d[c].li_attr)for(s in d[c].li_attr)if(d[c].li_attr.hasOwnProperty(s)){if("id"===s)continue;a[l[i]].li_attr[s]===t?a[l[i]].li_attr[s]=d[c].li_attr[s]:"class"===s&&(a[l[i]].li_attr.class=d[c].li_attr.class+" "+a[l[i]].li_attr.class)}if(d[c].a_attr!==t&&"object"==typeof d[c].a_attr)for(s in d[c].a_attr)if(d[c].a_attr.hasOwnProperty(s)){if("id"===s)continue;a[l[i]].a_attr[s]===t?a[l[i]].a_attr[s]=d[c].a_attr[s]:"href"===s&&"#"===a[l[i]].a_attr[s]?a[l[i]].a_attr.href=d[c].a_attr.href:"class"===s&&(a[l[i]].a_attr.class=d[c].a_attr.class+" "+a[l[i]].a_attr.class)}}a[e.jstree.root].type=e.jstree.root}),this)),r.bind.call(this)},this.get_json=function(t,n,i){var o,s,a=this._model.data,l=n?e.extend(!0,{},n,{no_id:!1}):{},d=r.get_json.call(this,t,l,i);if(!1===d)return!1;if(e.isArray(d))for(o=0,s=d.length;s>o;o++)d[o].type=d[o].id&&a[d[o].id]&&a[d[o].id].type?a[d[o].id].type:"default",n&&n.no_id&&(delete d[o].id,d[o].li_attr&&d[o].li_attr.id&&delete d[o].li_attr.id,d[o].a_attr&&d[o].a_attr.id&&delete d[o].a_attr.id);else d.type=d.id&&a[d.id]&&a[d.id].type?a[d.id].type:"default",n&&n.no_id&&(d=this._delete_ids(d));return d},this._delete_ids=function(t){if(e.isArray(t)){for(var n=0,r=t.length;r>n;n++)t[n]=this._delete_ids(t[n]);return t}return delete t.id,t.li_attr&&t.li_attr.id&&delete t.li_attr.id,t.a_attr&&t.a_attr.id&&delete t.a_attr.id,t.children&&e.isArray(t.children)&&(t.children=this._delete_ids(t.children)),t},this.check=function(n,i,o,s,a){if(!1===r.check.call(this,n,i,o,s,a))return!1;i=i&&i.id?i:this.get_node(i),o=o&&o.id?o:this.get_node(o);var l,d,c,h,u=i&&i.id?a&&a.origin?a.origin:e.jstree.reference(i.id):null;switch(u=u&&u._model&&u._model.data?u._model.data:null,n){case"create_node":case"move_node":case"copy_node":if("move_node"!==n||-1===e.inArray(i.id,o.children)){if((l=this.get_rules(o)).max_children!==t&&-1!==l.max_children&&l.max_children===o.children.length)return this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+n,data:JSON.stringify({chk:n,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!o||!o.id)&&o.id})},!1;if(l.valid_children!==t&&-1!==l.valid_children&&-1===e.inArray(i.type||"default",l.valid_children))return this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+n,data:JSON.stringify({chk:n,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!o||!o.id)&&o.id})},!1;if(u&&i.children_d&&i.parents){for(d=0,c=0,h=i.children_d.length;h>c;c++)d=Math.max(d,u[i.children_d[c]].parents.length);d=d-i.parents.length+1}(0>=d||d===t)&&(d=1);do{if(l.max_depth!==t&&-1!==l.max_depth&&l.max_depth<d)return this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+n,data:JSON.stringify({chk:n,pos:s,obj:!(!i||!i.id)&&i.id,par:!(!o||!o.id)&&o.id})},!1;o=this.get_node(o.parent),l=this.get_rules(o),d++}while(o)}}return!0},this.get_rules=function(e){if(!(e=this.get_node(e)))return!1;var n=this.get_type(e,!0);return n.max_depth===t&&(n.max_depth=-1),n.max_children===t&&(n.max_children=-1),n.valid_children===t&&(n.valid_children=-1),n},this.get_type=function(t,n){return!!(t=this.get_node(t))&&(n?e.extend({type:t.type},this.settings.types[t.type]):t.type)},this.set_type=function(n,r){var i,o,s,a,l,d,c,h,u=this._model.data;if(e.isArray(n)){for(o=0,s=(n=n.slice()).length;s>o;o++)this.set_type(n[o],r);return!0}if(i=this.settings.types,n=this.get_node(n),!i[r]||!n)return!1;if((c=this.get_node(n,!0))&&c.length&&(h=c.children(".jstree-anchor")),a=n.type,l=this.get_icon(n),n.type=r,(!0===l||!i[a]||i[a].icon!==t&&l===i[a].icon)&&this.set_icon(n,i[r].icon===t||i[r].icon),i[a]&&i[a].li_attr!==t&&"object"==typeof i[a].li_attr)for(d in i[a].li_attr)if(i[a].li_attr.hasOwnProperty(d)){if("id"===d)continue;"class"===d?(u[n.id].li_attr.class=(u[n.id].li_attr.class||"").replace(i[a].li_attr[d],""),c&&c.removeClass(i[a].li_attr[d])):u[n.id].li_attr[d]===i[a].li_attr[d]&&(u[n.id].li_attr[d]=null,c&&c.removeAttr(d))}if(i[a]&&i[a].a_attr!==t&&"object"==typeof i[a].a_attr)for(d in i[a].a_attr)if(i[a].a_attr.hasOwnProperty(d)){if("id"===d)continue;"class"===d?(u[n.id].a_attr.class=(u[n.id].a_attr.class||"").replace(i[a].a_attr[d],""),h&&h.removeClass(i[a].a_attr[d])):u[n.id].a_attr[d]===i[a].a_attr[d]&&("href"===d?(u[n.id].a_attr[d]="#",h&&h.attr("href","#")):(delete u[n.id].a_attr[d],h&&h.removeAttr(d)))}if(i[r].li_attr!==t&&"object"==typeof i[r].li_attr)for(d in i[r].li_attr)if(i[r].li_attr.hasOwnProperty(d)){if("id"===d)continue;u[n.id].li_attr[d]===t?(u[n.id].li_attr[d]=i[r].li_attr[d],c&&("class"===d?c.addClass(i[r].li_attr[d]):c.attr(d,i[r].li_attr[d]))):"class"===d&&(u[n.id].li_attr.class=i[r].li_attr[d]+" "+u[n.id].li_attr.class,c&&c.addClass(i[r].li_attr[d]))}if(i[r].a_attr!==t&&"object"==typeof i[r].a_attr)for(d in i[r].a_attr)if(i[r].a_attr.hasOwnProperty(d)){if("id"===d)continue;u[n.id].a_attr[d]===t?(u[n.id].a_attr[d]=i[r].a_attr[d],h&&("class"===d?h.addClass(i[r].a_attr[d]):h.attr(d,i[r].a_attr[d]))):"href"===d&&"#"===u[n.id].a_attr[d]?(u[n.id].a_attr.href=i[r].a_attr.href,h&&h.attr("href",i[r].a_attr.href)):"class"===d&&(u[n.id].a_attr.class=i[r].a_attr.class+" "+u[n.id].a_attr.class,h&&h.addClass(i[r].a_attr[d]))}return!0}},e.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(e,t){return e+" ("+t+")"}},e.jstree.plugins.unique=function(n,r){this.check=function(t,n,i,o,s){if(!1===r.check.call(this,t,n,i,o,s))return!1;if(n=n&&n.id?n:this.get_node(n),!(i=i&&i.id?i:this.get_node(i))||!i.children)return!0;var a,l,d,c="rename_node"===t?o:n.text,h=[],u=this.settings.unique.case_sensitive,p=this.settings.unique.trim_whitespace,f=this._model.data;for(a=0,l=i.children.length;l>a;a++)d=f[i.children[a]].text,u||(d=d.toLowerCase()),p&&(d=d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),h.push(d);switch(u||(c=c.toLowerCase()),p&&(c=c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),t){case"delete_node":return!0;case"rename_node":return d=n.text||"",u||(d=d.toLowerCase()),p&&(d=d.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),(a=-1===e.inArray(c,h)||n.text&&d===c)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:o,obj:!(!n||!n.id)&&n.id,par:!(!i||!i.id)&&i.id})}),a;case"create_node":return(a=-1===e.inArray(c,h))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:o,obj:!(!n||!n.id)&&n.id,par:!(!i||!i.id)&&i.id})}),a;case"copy_node":return(a=-1===e.inArray(c,h))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:o,obj:!(!n||!n.id)&&n.id,par:!(!i||!i.id)&&i.id})}),a;case"move_node":return(a=n.parent===i.id&&(!s||!s.is_multi)||-1===e.inArray(c,h))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+c+" already exists. Preventing: "+t,data:JSON.stringify({chk:t,pos:o,obj:!(!n||!n.id)&&n.id,par:!(!i||!i.id)&&i.id})}),a}return!0},this.create_node=function(n,i,o,s,a){if(!i||i.text===t){if(null===n&&(n=e.jstree.root),!(n=this.get_node(n)))return r.create_node.call(this,n,i,o,s,a);if(!(o=o===t?"last":o).toString().match(/^(before|after)$/)&&!a&&!this.is_loaded(n))return r.create_node.call(this,n,i,o,s,a);i||(i={});var l,d,c,h,u,p,f=this._model.data,g=this.settings.unique.case_sensitive,_=this.settings.unique.trim_whitespace,m=this.settings.unique.duplicate;for(d=l=this.get_string("New node"),c=[],h=0,u=n.children.length;u>h;h++)p=f[n.children[h]].text,g||(p=p.toLowerCase()),_&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),c.push(p);for(h=1,p=d,g||(p=p.toLowerCase()),_&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==e.inArray(p,c);)p=d=m.call(this,l,++h).toString(),g||(p=p.toLowerCase()),_&&(p=p.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));i.text=d}return r.create_node.call(this,n,i,o,s,a)}};var g=l.createElement("DIV");if(g.setAttribute("unselectable","on"),g.setAttribute("role","presentation"),g.className="jstree-wholerow",g.innerHTML=" ",e.jstree.plugins.wholerow=function(t,n){this.bind=function(){n.bind.call(this),this.element.on("ready.jstree set_state.jstree",e.proxy((function(){this.hide_dots()}),this)).on("init.jstree loading.jstree ready.jstree",e.proxy((function(){this.get_container_ul().addClass("jstree-wholerow-ul")}),this)).on("deselect_all.jstree",e.proxy((function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}),this)).on("changed.jstree",e.proxy((function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var n,r,i=!1;for(n=0,r=t.selected.length;r>n;n++)(i=this.get_node(t.selected[n],!0))&&i.length&&i.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}),this)).on("open_node.jstree",e.proxy((function(e,t){this.get_node(t.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}),this)).on("hover_node.jstree dehover_node.jstree",e.proxy((function(e,t){"hover_node"===e.type&&this.is_disabled(t.node)||this.get_node(t.node,!0).children(".jstree-wholerow")["hover_node"===e.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}),this)).on("contextmenu.jstree",".jstree-wholerow",e.proxy((function(t){if(this._data.contextmenu){t.preventDefault();var n=e.Event("contextmenu",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,pageX:t.pageX,pageY:t.pageY});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n)}}),this)).on("click.jstree",".jstree-wholerow",(function(t){t.stopImmediatePropagation();var n=e.Event("click",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()})).on("dblclick.jstree",".jstree-wholerow",(function(t){t.stopImmediatePropagation();var n=e.Event("dblclick",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()})).on("click.jstree",".jstree-leaf > .jstree-ocl",e.proxy((function(t){t.stopImmediatePropagation();var n=e.Event("click",{metaKey:t.metaKey,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey});e(t.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(n).focus()}),this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",e.proxy((function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1}),this)).on("mouseleave.jstree",".jstree-node",e.proxy((function(e){this.dehover_node(e.currentTarget)}),this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),n.teardown.call(this)},this.redraw_node=function(t,r,i,o){if(t=n.redraw_node.apply(this,arguments)){var s=g.cloneNode(!0);-1!==e.inArray(t.id,this._data.core.selected)&&(s.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===t.id&&(s.className+=" jstree-wholerow-hovered"),t.insertBefore(s,t.childNodes[0])}return t}},window.customElements&&Object&&Object.create){var _=Object.create(HTMLElement.prototype);_.createdCallback=function(){var t,n={core:{},plugins:[]};for(t in e.jstree.plugins)e.jstree.plugins.hasOwnProperty(t)&&this.attributes[t]&&(n.plugins.push(t),this.getAttribute(t)&&JSON.parse(this.getAttribute(t))&&(n[t]=JSON.parse(this.getAttribute(t))));for(t in e.jstree.defaults.core)e.jstree.defaults.core.hasOwnProperty(t)&&this.attributes[t]&&(n.core[t]=JSON.parse(this.getAttribute(t))||this.getAttribute(t));e(this).jstree(n)};try{window.customElements.define("vakata-jstree",(function(){}),{prototype:_})}catch(e){}}}})?r.apply(t,i):r)||(e.exports=o)}()},function(e,t){e.exports='/* jsTree default theme */\n.jstree-node,\n.jstree-children,\n.jstree-container-ul {\n display: block;\n margin: 0;\n padding: 0;\n list-style-type: none;\n list-style-image: none;\n}\n.jstree-node {\n white-space: nowrap;\n}\n.jstree-anchor {\n display: inline-block;\n color: black;\n white-space: nowrap;\n padding: 0 4px 0 1px;\n margin: 0;\n vertical-align: top;\n}\n.jstree-anchor:focus {\n outline: 0;\n}\n.jstree-anchor,\n.jstree-anchor:link,\n.jstree-anchor:visited,\n.jstree-anchor:hover,\n.jstree-anchor:active {\n text-decoration: none;\n color: inherit;\n}\n.jstree-icon {\n display: inline-block;\n text-decoration: none;\n margin: 0;\n padding: 0;\n vertical-align: top;\n text-align: center;\n}\n.jstree-icon:empty {\n display: inline-block;\n text-decoration: none;\n margin: 0;\n padding: 0;\n vertical-align: top;\n text-align: center;\n}\n.jstree-ocl {\n cursor: pointer;\n}\n.jstree-leaf > .jstree-ocl {\n cursor: default;\n}\n.jstree .jstree-open > .jstree-children {\n display: block;\n}\n.jstree .jstree-closed > .jstree-children,\n.jstree .jstree-leaf > .jstree-children {\n display: none;\n}\n.jstree-anchor > .jstree-themeicon {\n margin-right: 2px;\n}\n.jstree-no-icons .jstree-themeicon,\n.jstree-anchor > .jstree-themeicon-hidden {\n display: none;\n}\n.jstree-hidden,\n.jstree-node.jstree-hidden {\n display: none;\n}\n.jstree-rtl .jstree-anchor {\n padding: 0 1px 0 4px;\n}\n.jstree-rtl .jstree-anchor > .jstree-themeicon {\n margin-left: 2px;\n margin-right: 0;\n}\n.jstree-rtl .jstree-node {\n margin-left: 0;\n}\n.jstree-rtl .jstree-container-ul > .jstree-node {\n margin-right: 0;\n}\n.jstree-wholerow-ul {\n position: relative;\n display: inline-block;\n min-width: 100%;\n}\n.jstree-wholerow-ul .jstree-leaf > .jstree-ocl {\n cursor: pointer;\n}\n.jstree-wholerow-ul .jstree-anchor,\n.jstree-wholerow-ul .jstree-icon {\n position: relative;\n}\n.jstree-wholerow-ul .jstree-wholerow {\n width: 100%;\n cursor: pointer;\n position: absolute;\n left: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.jstree-contextmenu .jstree-anchor {\n -webkit-user-select: none;\n /* disable selection/Copy of UIWebView */\n -webkit-touch-callout: none;\n /* disable the IOS popup when long-press on a link */\n}\n.vakata-context {\n display: none;\n}\n.vakata-context,\n.vakata-context ul {\n margin: 0;\n padding: 2px;\n position: absolute;\n background: #f5f5f5;\n border: 1px solid #979797;\n box-shadow: 2px 2px 2px #999999;\n}\n.vakata-context ul {\n list-style: none;\n left: 100%;\n margin-top: -2.7em;\n margin-left: -4px;\n}\n.vakata-context .vakata-context-right ul {\n left: auto;\n right: 100%;\n margin-left: auto;\n margin-right: -4px;\n}\n.vakata-context li {\n list-style: none;\n}\n.vakata-context li > a {\n display: block;\n padding: 0 2em 0 2em;\n text-decoration: none;\n width: auto;\n color: black;\n white-space: nowrap;\n line-height: 2.4em;\n text-shadow: 1px 1px 0 white;\n border-radius: 1px;\n}\n.vakata-context li > a:hover {\n position: relative;\n background-color: #e8eff7;\n box-shadow: 0 0 2px #0a6aa1;\n}\n.vakata-context li > a.vakata-context-parent {\n background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==");\n background-position: right center;\n background-repeat: no-repeat;\n}\n.vakata-context li > a:focus {\n outline: 0;\n}\n.vakata-context .vakata-context-hover > a {\n position: relative;\n background-color: #e8eff7;\n box-shadow: 0 0 2px #0a6aa1;\n}\n.vakata-context .vakata-context-separator > a,\n.vakata-context .vakata-context-separator > a:hover {\n background: white;\n border: 0;\n border-top: 1px solid #e2e3e3;\n height: 1px;\n min-height: 1px;\n max-height: 1px;\n padding: 0;\n margin: 0 0 0 2.4em;\n border-left: 1px solid #e0e0e0;\n text-shadow: 0 0 0 transparent;\n box-shadow: 0 0 0 transparent;\n border-radius: 0;\n}\n.vakata-context .vakata-contextmenu-disabled a,\n.vakata-context .vakata-contextmenu-disabled a:hover {\n color: silver;\n background-color: transparent;\n border: 0;\n box-shadow: 0 0 0;\n}\n.vakata-context .vakata-contextmenu-disabled > a > i {\n filter: grayscale(100%);\n}\n.vakata-context li > a > i {\n text-decoration: none;\n display: inline-block;\n width: 2.4em;\n height: 2.4em;\n background: transparent;\n margin: 0 0 0 -2em;\n vertical-align: top;\n text-align: center;\n line-height: 2.4em;\n}\n.vakata-context li > a > i:empty {\n width: 2.4em;\n line-height: 2.4em;\n}\n.vakata-context li > a .vakata-contextmenu-sep {\n display: inline-block;\n width: 1px;\n height: 2.4em;\n background: white;\n margin: 0 0.5em 0 0;\n border-left: 1px solid #e2e3e3;\n}\n.vakata-context .vakata-contextmenu-shortcut {\n font-size: 0.8em;\n color: silver;\n opacity: 0.5;\n display: none;\n}\n.vakata-context-rtl ul {\n left: auto;\n right: 100%;\n margin-left: auto;\n margin-right: -4px;\n}\n.vakata-context-rtl li > a.vakata-context-parent {\n background-image: url("data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7");\n background-position: left center;\n background-repeat: no-repeat;\n}\n.vakata-context-rtl .vakata-context-separator > a {\n margin: 0 2.4em 0 0;\n border-left: 0;\n border-right: 1px solid #e2e3e3;\n}\n.vakata-context-rtl .vakata-context-left ul {\n right: auto;\n left: 100%;\n margin-left: -4px;\n margin-right: auto;\n}\n.vakata-context-rtl li > a > i {\n margin: 0 -2em 0 0;\n}\n.vakata-context-rtl li > a .vakata-contextmenu-sep {\n margin: 0 0 0 0.5em;\n border-left-color: white;\n background: #e2e3e3;\n}\n#jstree-marker {\n position: absolute;\n top: 0;\n left: 0;\n margin: -5px 0 0 0;\n padding: 0;\n border-right: 0;\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n border-left: 5px solid;\n width: 0;\n height: 0;\n font-size: 0;\n line-height: 0;\n}\n#jstree-dnd {\n line-height: 16px;\n margin: 0;\n padding: 4px;\n}\n#jstree-dnd .jstree-icon,\n#jstree-dnd .jstree-copy {\n display: inline-block;\n text-decoration: none;\n margin: 0 2px 0 0;\n padding: 0;\n width: 16px;\n height: 16px;\n}\n#jstree-dnd .jstree-ok {\n background: green;\n}\n#jstree-dnd .jstree-er {\n background: red;\n}\n#jstree-dnd .jstree-copy {\n margin: 0 2px 0 2px;\n}\n.jstree-default .jstree-node,\n.jstree-default .jstree-icon {\n background-repeat: no-repeat;\n background-color: transparent;\n}\n.jstree-default .jstree-anchor,\n.jstree-default .jstree-animated,\n.jstree-default .jstree-wholerow {\n transition: background-color 0.15s, box-shadow 0.15s;\n}\n.jstree-default .jstree-hovered {\n background: #e7f4f9;\n border-radius: 2px;\n box-shadow: inset 0 0 1px #cccccc;\n}\n.jstree-default .jstree-context {\n background: #e7f4f9;\n border-radius: 2px;\n box-shadow: inset 0 0 1px #cccccc;\n}\n.jstree-default .jstree-clicked {\n background: #beebff;\n border-radius: 2px;\n box-shadow: inset 0 0 1px #999999;\n}\n.jstree-default .jstree-no-icons .jstree-anchor > .jstree-themeicon {\n display: none;\n}\n.jstree-default .jstree-disabled {\n background: transparent;\n color: #666666;\n}\n.jstree-default .jstree-disabled.jstree-hovered {\n background: transparent;\n box-shadow: none;\n}\n.jstree-default .jstree-disabled.jstree-clicked {\n background: #efefef;\n}\n.jstree-default .jstree-disabled > .jstree-icon {\n opacity: 0.8;\n filter: url("data:image/svg+xml;utf8,<svg xmlns=\\\'http://www.w3.org/2000/svg\\\'><filter id=\\\'jstree-grayscale\\\'><feColorMatrix type=\\\'matrix\\\' values=\\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\\'/></filter></svg>#jstree-grayscale");\n /* Firefox 10+ */\n filter: gray;\n /* IE6-9 */\n -webkit-filter: grayscale(100%);\n /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default .jstree-search {\n font-style: italic;\n color: #8b0000;\n font-weight: bold;\n}\n.jstree-default .jstree-no-checkboxes .jstree-checkbox {\n display: none !important;\n}\n.jstree-default.jstree-checkbox-no-clicked .jstree-clicked {\n background: transparent;\n box-shadow: none;\n}\n.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered {\n background: #e7f4f9;\n}\n.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked {\n background: transparent;\n}\n.jstree-default.jstree-checkbox-no-clicked > .jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered {\n background: #e7f4f9;\n}\n.jstree-default > .jstree-striped {\n min-width: 100%;\n display: inline-block;\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==") left top repeat;\n}\n.jstree-default > .jstree-wholerow-ul .jstree-hovered,\n.jstree-default > .jstree-wholerow-ul .jstree-clicked {\n background: transparent;\n box-shadow: none;\n border-radius: 0;\n}\n.jstree-default .jstree-wholerow {\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n}\n.jstree-default .jstree-wholerow-hovered {\n background: #e7f4f9;\n}\n.jstree-default .jstree-wholerow-clicked {\n background: #beebff;\n background: -webkit-linear-gradient(top, #beebff 0%, #a8e4ff 100%);\n background: linear-gradient(to bottom, #beebff 0%, #a8e4ff 100%);\n}\n.jstree-default .jstree-node {\n min-height: 24px;\n line-height: 24px;\n margin-left: 24px;\n min-width: 24px;\n}\n.jstree-default .jstree-anchor {\n line-height: 24px;\n height: 24px;\n}\n.jstree-default .jstree-icon {\n width: 24px;\n height: 24px;\n line-height: 24px;\n}\n.jstree-default .jstree-icon:empty {\n width: 24px;\n height: 24px;\n line-height: 24px;\n}\n.jstree-default.jstree-rtl .jstree-node {\n margin-right: 24px;\n}\n.jstree-default .jstree-wholerow {\n height: 24px;\n}\n.jstree-default .jstree-node,\n.jstree-default .jstree-icon {\n background-image: url("32px.png");\n}\n.jstree-default .jstree-node {\n background-position: -292px -4px;\n background-repeat: repeat-y;\n}\n.jstree-default .jstree-last {\n background: transparent;\n}\n.jstree-default .jstree-open > .jstree-ocl {\n background-position: -132px -4px;\n}\n.jstree-default .jstree-closed > .jstree-ocl {\n background-position: -100px -4px;\n}\n.jstree-default .jstree-leaf > .jstree-ocl {\n background-position: -68px -4px;\n}\n.jstree-default .jstree-themeicon {\n background-position: -260px -4px;\n}\n.jstree-default > .jstree-no-dots .jstree-node,\n.jstree-default > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n background: transparent;\n}\n.jstree-default > .jstree-no-dots .jstree-open > .jstree-ocl {\n background-position: -36px -4px;\n}\n.jstree-default > .jstree-no-dots .jstree-closed > .jstree-ocl {\n background-position: -4px -4px;\n}\n.jstree-default .jstree-disabled {\n background: transparent;\n}\n.jstree-default .jstree-disabled.jstree-hovered {\n background: transparent;\n}\n.jstree-default .jstree-disabled.jstree-clicked {\n background: #efefef;\n}\n.jstree-default .jstree-checkbox {\n background-position: -164px -4px;\n}\n.jstree-default .jstree-checkbox:hover {\n background-position: -164px -36px;\n}\n.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default .jstree-checked > .jstree-checkbox {\n background-position: -228px -4px;\n}\n.jstree-default.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default .jstree-checked > .jstree-checkbox:hover {\n background-position: -228px -36px;\n}\n.jstree-default .jstree-anchor > .jstree-undetermined {\n background-position: -196px -4px;\n}\n.jstree-default .jstree-anchor > .jstree-undetermined:hover {\n background-position: -196px -36px;\n}\n.jstree-default .jstree-checkbox-disabled {\n opacity: 0.8;\n filter: url("data:image/svg+xml;utf8,<svg xmlns=\\\'http://www.w3.org/2000/svg\\\'><filter id=\\\'jstree-grayscale\\\'><feColorMatrix type=\\\'matrix\\\' values=\\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\\'/></filter></svg>#jstree-grayscale");\n /* Firefox 10+ */\n filter: gray;\n /* IE6-9 */\n -webkit-filter: grayscale(100%);\n /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default > .jstree-striped {\n background-size: auto 48px;\n}\n.jstree-default.jstree-rtl .jstree-node {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");\n background-position: 100% 1px;\n background-repeat: repeat-y;\n}\n.jstree-default.jstree-rtl .jstree-last {\n background: transparent;\n}\n.jstree-default.jstree-rtl .jstree-open > .jstree-ocl {\n background-position: -132px -36px;\n}\n.jstree-default.jstree-rtl .jstree-closed > .jstree-ocl {\n background-position: -100px -36px;\n}\n.jstree-default.jstree-rtl .jstree-leaf > .jstree-ocl {\n background-position: -68px -36px;\n}\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n background: transparent;\n}\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n background-position: -36px -36px;\n}\n.jstree-default.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n background-position: -4px -36px;\n}\n.jstree-default .jstree-themeicon-custom {\n background-color: transparent;\n background-image: none;\n background-position: 0 0;\n}\n.jstree-default > .jstree-container-ul .jstree-loading > .jstree-ocl {\n background: url("throbber.gif") center center no-repeat;\n}\n.jstree-default .jstree-file {\n background: url("32px.png") -100px -68px no-repeat;\n}\n.jstree-default .jstree-folder {\n background: url("32px.png") -260px -4px no-repeat;\n}\n.jstree-default > .jstree-container-ul > .jstree-node {\n margin-left: 0;\n margin-right: 0;\n}\n#jstree-dnd.jstree-default {\n line-height: 24px;\n padding: 0 4px;\n}\n#jstree-dnd.jstree-default .jstree-ok,\n#jstree-dnd.jstree-default .jstree-er {\n background-image: url("32px.png");\n background-repeat: no-repeat;\n background-color: transparent;\n}\n#jstree-dnd.jstree-default i {\n background: transparent;\n width: 24px;\n height: 24px;\n line-height: 24px;\n}\n#jstree-dnd.jstree-default .jstree-ok {\n background-position: -4px -68px;\n}\n#jstree-dnd.jstree-default .jstree-er {\n background-position: -36px -68px;\n}\n.jstree-default .jstree-ellipsis {\n overflow: hidden;\n}\n.jstree-default .jstree-ellipsis .jstree-anchor {\n width: calc(100% - 29px);\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.jstree-default.jstree-rtl .jstree-node {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");\n}\n.jstree-default.jstree-rtl .jstree-last {\n background: transparent;\n}\n.jstree-default-small .jstree-node {\n min-height: 18px;\n line-height: 18px;\n margin-left: 18px;\n min-width: 18px;\n}\n.jstree-default-small .jstree-anchor {\n line-height: 18px;\n height: 18px;\n}\n.jstree-default-small .jstree-icon {\n width: 18px;\n height: 18px;\n line-height: 18px;\n}\n.jstree-default-small .jstree-icon:empty {\n width: 18px;\n height: 18px;\n line-height: 18px;\n}\n.jstree-default-small.jstree-rtl .jstree-node {\n margin-right: 18px;\n}\n.jstree-default-small .jstree-wholerow {\n height: 18px;\n}\n.jstree-default-small .jstree-node,\n.jstree-default-small .jstree-icon {\n background-image: url("32px.png");\n}\n.jstree-default-small .jstree-node {\n background-position: -295px -7px;\n background-repeat: repeat-y;\n}\n.jstree-default-small .jstree-last {\n background: transparent;\n}\n.jstree-default-small .jstree-open > .jstree-ocl {\n background-position: -135px -7px;\n}\n.jstree-default-small .jstree-closed > .jstree-ocl {\n background-position: -103px -7px;\n}\n.jstree-default-small .jstree-leaf > .jstree-ocl {\n background-position: -71px -7px;\n}\n.jstree-default-small .jstree-themeicon {\n background-position: -263px -7px;\n}\n.jstree-default-small > .jstree-no-dots .jstree-node,\n.jstree-default-small > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n background: transparent;\n}\n.jstree-default-small > .jstree-no-dots .jstree-open > .jstree-ocl {\n background-position: -39px -7px;\n}\n.jstree-default-small > .jstree-no-dots .jstree-closed > .jstree-ocl {\n background-position: -7px -7px;\n}\n.jstree-default-small .jstree-disabled {\n background: transparent;\n}\n.jstree-default-small .jstree-disabled.jstree-hovered {\n background: transparent;\n}\n.jstree-default-small .jstree-disabled.jstree-clicked {\n background: #efefef;\n}\n.jstree-default-small .jstree-checkbox {\n background-position: -167px -7px;\n}\n.jstree-default-small .jstree-checkbox:hover {\n background-position: -167px -39px;\n}\n.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-small .jstree-checked > .jstree-checkbox {\n background-position: -231px -7px;\n}\n.jstree-default-small.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-small .jstree-checked > .jstree-checkbox:hover {\n background-position: -231px -39px;\n}\n.jstree-default-small .jstree-anchor > .jstree-undetermined {\n background-position: -199px -7px;\n}\n.jstree-default-small .jstree-anchor > .jstree-undetermined:hover {\n background-position: -199px -39px;\n}\n.jstree-default-small .jstree-checkbox-disabled {\n opacity: 0.8;\n filter: url("data:image/svg+xml;utf8,<svg xmlns=\\\'http://www.w3.org/2000/svg\\\'><filter id=\\\'jstree-grayscale\\\'><feColorMatrix type=\\\'matrix\\\' values=\\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\\'/></filter></svg>#jstree-grayscale");\n /* Firefox 10+ */\n filter: gray;\n /* IE6-9 */\n -webkit-filter: grayscale(100%);\n /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-small > .jstree-striped {\n background-size: auto 36px;\n}\n.jstree-default-small.jstree-rtl .jstree-node {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");\n background-position: 100% 1px;\n background-repeat: repeat-y;\n}\n.jstree-default-small.jstree-rtl .jstree-last {\n background: transparent;\n}\n.jstree-default-small.jstree-rtl .jstree-open > .jstree-ocl {\n background-position: -135px -39px;\n}\n.jstree-default-small.jstree-rtl .jstree-closed > .jstree-ocl {\n background-position: -103px -39px;\n}\n.jstree-default-small.jstree-rtl .jstree-leaf > .jstree-ocl {\n background-position: -71px -39px;\n}\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n background: transparent;\n}\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n background-position: -39px -39px;\n}\n.jstree-default-small.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n background-position: -7px -39px;\n}\n.jstree-default-small .jstree-themeicon-custom {\n background-color: transparent;\n background-image: none;\n background-position: 0 0;\n}\n.jstree-default-small > .jstree-container-ul .jstree-loading > .jstree-ocl {\n background: url("throbber.gif") center center no-repeat;\n}\n.jstree-default-small .jstree-file {\n background: url("32px.png") -103px -71px no-repeat;\n}\n.jstree-default-small .jstree-folder {\n background: url("32px.png") -263px -7px no-repeat;\n}\n.jstree-default-small > .jstree-container-ul > .jstree-node {\n margin-left: 0;\n margin-right: 0;\n}\n#jstree-dnd.jstree-default-small {\n line-height: 18px;\n padding: 0 4px;\n}\n#jstree-dnd.jstree-default-small .jstree-ok,\n#jstree-dnd.jstree-default-small .jstree-er {\n background-image: url("32px.png");\n background-repeat: no-repeat;\n background-color: transparent;\n}\n#jstree-dnd.jstree-default-small i {\n background: transparent;\n width: 18px;\n height: 18px;\n line-height: 18px;\n}\n#jstree-dnd.jstree-default-small .jstree-ok {\n background-position: -7px -71px;\n}\n#jstree-dnd.jstree-default-small .jstree-er {\n background-position: -39px -71px;\n}\n.jstree-default-small .jstree-ellipsis {\n overflow: hidden;\n}\n.jstree-default-small .jstree-ellipsis .jstree-anchor {\n width: calc(100% - 23px);\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.jstree-default-small.jstree-rtl .jstree-node {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==");\n}\n.jstree-default-small.jstree-rtl .jstree-last {\n background: transparent;\n}\n.jstree-default-large .jstree-node {\n min-height: 32px;\n line-height: 32px;\n margin-left: 32px;\n min-width: 32px;\n}\n.jstree-default-large .jstree-anchor {\n line-height: 32px;\n height: 32px;\n}\n.jstree-default-large .jstree-icon {\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n.jstree-default-large .jstree-icon:empty {\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n.jstree-default-large.jstree-rtl .jstree-node {\n margin-right: 32px;\n}\n.jstree-default-large .jstree-wholerow {\n height: 32px;\n}\n.jstree-default-large .jstree-node,\n.jstree-default-large .jstree-icon {\n background-image: url("32px.png");\n}\n.jstree-default-large .jstree-node {\n background-position: -288px 0px;\n background-repeat: repeat-y;\n}\n.jstree-default-large .jstree-last {\n background: transparent;\n}\n.jstree-default-large .jstree-open > .jstree-ocl {\n background-position: -128px 0px;\n}\n.jstree-default-large .jstree-closed > .jstree-ocl {\n background-position: -96px 0px;\n}\n.jstree-default-large .jstree-leaf > .jstree-ocl {\n background-position: -64px 0px;\n}\n.jstree-default-large .jstree-themeicon {\n background-position: -256px 0px;\n}\n.jstree-default-large > .jstree-no-dots .jstree-node,\n.jstree-default-large > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n background: transparent;\n}\n.jstree-default-large > .jstree-no-dots .jstree-open > .jstree-ocl {\n background-position: -32px 0px;\n}\n.jstree-default-large > .jstree-no-dots .jstree-closed > .jstree-ocl {\n background-position: 0px 0px;\n}\n.jstree-default-large .jstree-disabled {\n background: transparent;\n}\n.jstree-default-large .jstree-disabled.jstree-hovered {\n background: transparent;\n}\n.jstree-default-large .jstree-disabled.jstree-clicked {\n background: #efefef;\n}\n.jstree-default-large .jstree-checkbox {\n background-position: -160px 0px;\n}\n.jstree-default-large .jstree-checkbox:hover {\n background-position: -160px -32px;\n}\n.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n.jstree-default-large .jstree-checked > .jstree-checkbox {\n background-position: -224px 0px;\n}\n.jstree-default-large.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n.jstree-default-large .jstree-checked > .jstree-checkbox:hover {\n background-position: -224px -32px;\n}\n.jstree-default-large .jstree-anchor > .jstree-undetermined {\n background-position: -192px 0px;\n}\n.jstree-default-large .jstree-anchor > .jstree-undetermined:hover {\n background-position: -192px -32px;\n}\n.jstree-default-large .jstree-checkbox-disabled {\n opacity: 0.8;\n filter: url("data:image/svg+xml;utf8,<svg xmlns=\\\'http://www.w3.org/2000/svg\\\'><filter id=\\\'jstree-grayscale\\\'><feColorMatrix type=\\\'matrix\\\' values=\\\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\\\'/></filter></svg>#jstree-grayscale");\n /* Firefox 10+ */\n filter: gray;\n /* IE6-9 */\n -webkit-filter: grayscale(100%);\n /* Chrome 19+ & Safari 6+ */\n}\n.jstree-default-large > .jstree-striped {\n background-size: auto 64px;\n}\n.jstree-default-large.jstree-rtl .jstree-node {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==");\n background-position: 100% 1px;\n background-repeat: repeat-y;\n}\n.jstree-default-large.jstree-rtl .jstree-last {\n background: transparent;\n}\n.jstree-default-large.jstree-rtl .jstree-open > .jstree-ocl {\n background-position: -128px -32px;\n}\n.jstree-default-large.jstree-rtl .jstree-closed > .jstree-ocl {\n background-position: -96px -32px;\n}\n.jstree-default-large.jstree-rtl .jstree-leaf > .jstree-ocl {\n background-position: -64px -32px;\n}\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-node,\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-leaf > .jstree-ocl {\n background: transparent;\n}\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-open > .jstree-ocl {\n background-position: -32px -32px;\n}\n.jstree-default-large.jstree-rtl > .jstree-no-dots .jstree-closed > .jstree-ocl {\n background-position: 0px -32px;\n}\n.jstree-default-large .jstree-themeicon-custom {\n background-color: transparent;\n background-image: none;\n background-position: 0 0;\n}\n.jstree-default-large > .jstree-container-ul .jstree-loading > .jstree-ocl {\n background: url("throbber.gif") center center no-repeat;\n}\n.jstree-default-large .jstree-file {\n background: url("32px.png") -96px -64px no-repeat;\n}\n.jstree-default-large .jstree-folder {\n background: url("32px.png") -256px 0px no-repeat;\n}\n.jstree-default-large > .jstree-container-ul > .jstree-node {\n margin-left: 0;\n margin-right: 0;\n}\n#jstree-dnd.jstree-default-large {\n line-height: 32px;\n padding: 0 4px;\n}\n#jstree-dnd.jstree-default-large .jstree-ok,\n#jstree-dnd.jstree-default-large .jstree-er {\n background-image: url("32px.png");\n background-repeat: no-repeat;\n background-color: transparent;\n}\n#jstree-dnd.jstree-default-large i {\n background: transparent;\n width: 32px;\n height: 32px;\n line-height: 32px;\n}\n#jstree-dnd.jstree-default-large .jstree-ok {\n background-position: 0px -64px;\n}\n#jstree-dnd.jstree-default-large .jstree-er {\n background-position: -32px -64px;\n}\n.jstree-default-large .jstree-ellipsis {\n overflow: hidden;\n}\n.jstree-default-large .jstree-ellipsis .jstree-anchor {\n width: calc(100% - 37px);\n text-overflow: ellipsis;\n overflow: hidden;\n}\n.jstree-default-large.jstree-rtl .jstree-node {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==");\n}\n.jstree-default-large.jstree-rtl .jstree-last {\n background: transparent;\n}\n@media (max-width: 768px) {\n #jstree-dnd.jstree-dnd-responsive {\n line-height: 40px;\n font-weight: bold;\n font-size: 1.1em;\n text-shadow: 1px 1px white;\n }\n #jstree-dnd.jstree-dnd-responsive > i {\n background: transparent;\n width: 40px;\n height: 40px;\n }\n #jstree-dnd.jstree-dnd-responsive > .jstree-ok {\n background-image: url("40px.png");\n background-position: 0 -200px;\n background-size: 120px 240px;\n }\n #jstree-dnd.jstree-dnd-responsive > .jstree-er {\n background-image: url("40px.png");\n background-position: -40px -200px;\n background-size: 120px 240px;\n }\n #jstree-marker.jstree-dnd-responsive {\n border-left-width: 10px;\n border-top-width: 10px;\n border-bottom-width: 10px;\n margin-top: -10px;\n }\n}\n@media (max-width: 768px) {\n .jstree-default-responsive {\n /*\n\t.jstree-open > .jstree-ocl,\n\t.jstree-closed > .jstree-ocl { border-radius:20px; background-color:white; }\n\t*/\n }\n .jstree-default-responsive .jstree-icon {\n background-image: url("40px.png");\n }\n .jstree-default-responsive .jstree-node,\n .jstree-default-responsive .jstree-leaf > .jstree-ocl {\n background: transparent;\n }\n .jstree-default-responsive .jstree-node {\n min-height: 40px;\n line-height: 40px;\n margin-left: 40px;\n min-width: 40px;\n white-space: nowrap;\n }\n .jstree-default-responsive .jstree-anchor {\n line-height: 40px;\n height: 40px;\n }\n .jstree-default-responsive .jstree-icon,\n .jstree-default-responsive .jstree-icon:empty {\n width: 40px;\n height: 40px;\n line-height: 40px;\n }\n .jstree-default-responsive > .jstree-container-ul > .jstree-node {\n margin-left: 0;\n }\n .jstree-default-responsive.jstree-rtl .jstree-node {\n margin-left: 0;\n margin-right: 40px;\n background: transparent;\n }\n .jstree-default-responsive.jstree-rtl .jstree-container-ul > .jstree-node {\n margin-right: 0;\n }\n .jstree-default-responsive .jstree-ocl,\n .jstree-default-responsive .jstree-themeicon,\n .jstree-default-responsive .jstree-checkbox {\n background-size: 120px 240px;\n }\n .jstree-default-responsive .jstree-leaf > .jstree-ocl,\n .jstree-default-responsive.jstree-rtl .jstree-leaf > .jstree-ocl {\n background: transparent;\n }\n .jstree-default-responsive .jstree-open > .jstree-ocl {\n background-position: 0 0 !important;\n }\n .jstree-default-responsive .jstree-closed > .jstree-ocl {\n background-position: 0 -40px !important;\n }\n .jstree-default-responsive.jstree-rtl .jstree-closed > .jstree-ocl {\n background-position: -40px 0 !important;\n }\n .jstree-default-responsive .jstree-themeicon {\n background-position: -40px -40px;\n }\n .jstree-default-responsive .jstree-checkbox,\n .jstree-default-responsive .jstree-checkbox:hover {\n background-position: -40px -80px;\n }\n .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox,\n .jstree-default-responsive.jstree-checkbox-selection .jstree-clicked > .jstree-checkbox:hover,\n .jstree-default-responsive .jstree-checked > .jstree-checkbox,\n .jstree-default-responsive .jstree-checked > .jstree-checkbox:hover {\n background-position: 0 -80px;\n }\n .jstree-default-responsive .jstree-anchor > .jstree-undetermined,\n .jstree-default-responsive .jstree-anchor > .jstree-undetermined:hover {\n background-position: 0 -120px;\n }\n .jstree-default-responsive .jstree-anchor {\n font-weight: bold;\n font-size: 1.1em;\n text-shadow: 1px 1px white;\n }\n .jstree-default-responsive > .jstree-striped {\n background: transparent;\n }\n .jstree-default-responsive .jstree-wholerow {\n border-top: 1px solid rgba(255, 255, 255, 0.7);\n border-bottom: 1px solid rgba(64, 64, 64, 0.2);\n background: #ebebeb;\n height: 40px;\n }\n .jstree-default-responsive .jstree-wholerow-hovered {\n background: #e7f4f9;\n }\n .jstree-default-responsive .jstree-wholerow-clicked {\n background: #beebff;\n }\n .jstree-default-responsive .jstree-children .jstree-last > .jstree-wholerow {\n box-shadow: inset 0 -6px 3px -5px #666666;\n }\n .jstree-default-responsive .jstree-children .jstree-open > .jstree-wholerow {\n box-shadow: inset 0 6px 3px -5px #666666;\n border-top: 0;\n }\n .jstree-default-responsive .jstree-children .jstree-open + .jstree-open {\n box-shadow: none;\n }\n .jstree-default-responsive .jstree-node,\n .jstree-default-responsive .jstree-icon,\n .jstree-default-responsive .jstree-node > .jstree-ocl,\n .jstree-default-responsive .jstree-themeicon,\n .jstree-default-responsive .jstree-checkbox {\n background-image: url("40px.png");\n background-size: 120px 240px;\n }\n .jstree-default-responsive .jstree-node {\n background-position: -80px 0;\n background-repeat: repeat-y;\n }\n .jstree-default-responsive .jstree-last {\n background: transparent;\n }\n .jstree-default-responsive .jstree-leaf > .jstree-ocl {\n background-position: -40px -120px;\n }\n .jstree-default-responsive .jstree-last > .jstree-ocl {\n background-position: -40px -160px;\n }\n .jstree-default-responsive .jstree-themeicon-custom {\n background-color: transparent;\n background-image: none;\n background-position: 0 0;\n }\n .jstree-default-responsive .jstree-file {\n background: url("40px.png") 0 -160px no-repeat;\n background-size: 120px 240px;\n }\n .jstree-default-responsive .jstree-folder {\n background: url("40px.png") -40px -40px no-repeat;\n background-size: 120px 240px;\n }\n .jstree-default-responsive > .jstree-container-ul > .jstree-node {\n margin-left: 0;\n margin-right: 0;\n }\n}\n'},function(e,t){e.exports='/*\n*\tMatterTools.Inspector\n*/\n\n.ins-container,\n.jstree {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.ins-cursor-move canvas {\n cursor: move !important;\n}\n\n.ins-cursor-rotate canvas {\n cursor: ew-resize !important;\n}\n\n.ins-cursor-scale canvas {\n cursor: nwse-resize !important;\n}\n\n.ins-container {\n position: fixed;\n z-index: 10;\n width: 245px;\n bottom: 0;\n top: 0;\n left: 0;\n background: #191921;\n padding: 0;\n font-size: 13px;\n color: #7c7c85;\n box-shadow: 0 0 7px rgba(0, 0, 0, 0.1);\n}\n\n.ins-container,\n.ins-container * {\n box-sizing: border-box;\n font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.ins-container *:focus,\n.ins-container *:active {\n outline: 0;\n}\n\n.ins-container *:-moz-focusring {\n outline: 3px solid #4da4e4;\n outline-offset: -1px;\n z-index: 5;\n}\n\n.ins-container *:focus-visible {\n outline: 3px solid #4da4e4;\n outline-offset: -1px;\n z-index: 5;\n}\n\n.ins-container {\n transform: translate(-220px, 0);\n transition: transform ease;\n transition-delay: 2000ms;\n transition-duration: 300ms;\n}\n\n.ins-container:hover {\n transform: translate(0, 0);\n transition-delay: 0ms;\n transition-duration: 400ms;\n}\n\n@media only screen and (min-width: 1300px) {\n .ins-container,\n .ins-container:hover {\n transition-delay: 0ms;\n transform: translate(0, 0);\n }\n}\n\n.ins-world-tree {\n position: absolute;\n overflow: auto;\n top: 91px;\n left: 3px;\n right: 0;\n bottom: 0;\n scrollbar-color: #191921 #191921;\n scrollbar-width: thin;\n}\n\n.ins-world-tree:hover {\n scrollbar-color: #32323a #191921;\n scrollbar-width: thin;\n}\n\n.ins-world-tree::-webkit-scrollbar {\n background: #191921;\n width: 6px;\n height: 6px;\n}\n\n.ins-world-tree::-webkit-scrollbar-track,\n.ins-world-tree::-webkit-scrollbar-corner {\n background: #191921;\n}\n\n.ins-world-tree::-webkit-scrollbar-thumb {\n background: #191921;\n border-radius: 3px;\n}\n\n.ins-world-tree:hover::-webkit-scrollbar-thumb {\n background: #32323a;\n}\n\n.ins-add-button.ins-button {\n width: auto;\n height: auto;\n padding: 2px 5px;\n margin: 1px 10px 0px 0;\n right: 0px;\n min-width: 0;\n position: absolute;\n z-index: 100;\n}\n\n.ins-top-panel {\n height: 48px;\n background: #14151f;\n}\n\n.ins-search-box {\n margin: 7px 5px 9px 5px;\n border: 0;\n padding: 7px 8px;\n font-size: 13px;\n width: 235px;\n border-radius: 3px;\n background: #12131b;\n color: #8e8d96;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n.ins-search-box:focus {\n background: #0f1017;\n border: 0;\n outline: 0;\n}\n\n.ins-search-box::-webkit-search-cancel-button {\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n height: 15px;\n width: 8px;\n cursor: pointer;\n}\n\n.ins-search-box::-webkit-search-cancel-button:before {\n height: 10px;\n width: 10px;\n content: "x";\n line-height: 0;\n font-size: 13px;\n color: #999;\n font-weight: bold;\n cursor: pointer;\n}\n\n.ins-search-box::-webkit-input-placeholder {\n color: #56565f;\n}\n\n.ins-search-box:-moz-placeholder {\n color: #56565f;\n}\n\n.ins-search-box::-moz-placeholder {\n color: #56565f;\n}\n\n.ins-search-box:-ms-input-placeholder {\n color: #56565f;\n}\n\n.ins-control-group {\n display: block;\n clear: both;\n overflow: hidden;\n padding: 14px 20px 12px 20px;\n background: #191921;\n border-bottom: 1px solid #29292d;\n}\n\n.ins-button {\n display: block;\n float: left;\n font-size: 11px;\n line-height: 1;\n padding: 10px 11px;\n min-width: 49px;\n text-align: center;\n background: #0e0f15;\n border: 0;\n color: #b1b1c3;\n border-radius: 2px;\n outline: none;\n margin: 0;\n}\n\n.ins-button:hover {\n background: #000;\n}\n\n.ins-button:active {\n transform: translateY(1px);\n background: #000;\n}\n\n.jstree-default .jstree-search {\n font-style: italic;\n color: #aaa;\n font-weight: normal;\n}\n\n.jstree-default .jstree-wholerow-hovered,\n.jstree-default .jstree-hovered {\n background: transparent;\n border-radius: 0;\n box-shadow: none;\n}\n\n.jstree-default .jstree-wholerow {\n height: 28px;\n}\n\n.jstree-default .jstree-wholerow-clicked,\n.jstree-default .jstree-clicked {\n background: transparent;\n border-radius: 0;\n box-shadow: none;\n transition: none;\n}\n\n.jstree-default .jstree-leaf .jstree-clicked {\n color: #bbb !important;\n}\n\n.jstree-default .jstree-anchor {\n line-height: 27px;\n outline: none;\n}\n\n.jstree-default .jstree-container-ul {\n margin-bottom: 12px;\n}\n\n.jstree-default .jstree-container-ul > .jstree-node > .jstree-anchor:before,\n.jstree-default\n .jstree-open\n > .jstree-children\n > .jstree-node\n > .jstree-anchor:before {\n content: "";\n display: block;\n position: absolute;\n left: 0;\n right: 1px;\n height: 28px;\n border-radius: 0;\n box-shadow: none;\n border-right: none;\n pointer-events: none;\n background: rgb(44, 47, 62, 0.5);\n opacity: 0;\n}\n\n.jstree-default .jstree-anchor.jstree-clicked:before {\n opacity: 1 !important;\n pointer-events: none;\n}\n\n.jstree-default .jstree-node,\n.jstree-default .jstree-leaf .jstree-ocl,\n.jstree-default .jstree-icon {\n background: transparent;\n}\n\n.jstree-default .jstree-node {\n min-height: 28px;\n line-height: 28px;\n margin-left: 12px;\n min-width: 26px;\n}\n\n.jstree-default .jstree-icon {\n position: relative;\n}\n\n.jstree-default .jstree-icon:before {\n display: block;\n pointer-events: none;\n color: #d6d6d6;\n font-style: normal;\n font-size: 11px;\n position: absolute;\n top: 0px;\n left: 0px;\n width: 24px;\n line-height: 24px;\n transform-origin: 12px 12px;\n transform: translate(0px, -0px);\n}\n\n.jstree-default .jstree-open > .jstree-icon:before {\n content: "▾";\n top: 2px;\n}\n\n.jstree-default .jstree-closed > .jstree-icon:before {\n content: "▾";\n transform: rotate(-90deg) translate(-2px, 0px);\n}\n\n.jstree-leaf .jstree-icon:before {\n display: none;\n}\n\n.jstree-default .jstree-open .jstree-ocl {\n background-position: -38px -1px;\n}\n\n.jstree-default .jstree-closed .jstree-ocl {\n background-position: -4px -2px;\n}\n\n.jstree-anchor {\n padding: 1px 0;\n transition: none;\n}\n\n.jstree-anchor .jstree-icon {\n display: none;\n}\n\n.jstree-node-type-bodies > .jstree-anchor,\n.jstree-node-type-constraints > .jstree-anchor,\n.jstree-node-type-composites > .jstree-anchor {\n color: #51515d;\n}\n\n#vakata-dnd {\n font-size: 12px;\n color: #aaa;\n}\n'},function(e,t,n){"use strict";const r=e.exports={},i=n(3),o=n(4),s=n(1),a=n(0).Common;r._isIOS=window.navigator&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,r._matterLink="https://brm.io/matter-js/",r.create=function(e){let t=Object.assign({example:{instance:null},examples:[],resetOnOrientation:!1,preventZoom:!1,fullPage:!1,startExample:!0,appendTo:document.body,toolbar:{title:null,url:null,reset:!0,source:!1,inspector:!1,tools:!1,fullscreen:!0,exampleSelect:!1},tools:{inspector:null,gui:null},dom:{}},e||{});return(!e.toolbar||t.examples.length>1&&e.toolbar&&!1!==e.toolbar.exampleSelect)&&(t.toolbar.exampleSelect=!0),r._isIOS&&(t.toolbar.fullscreen=!1),i||(t.toolbar.tools=!1,t.tools.gui=!1),o||(t.toolbar.inspector=!1,t.tools.inspector=!1),t.dom=r._createDom(t),r._bindDom(t),t.fullPage||!1===t.inline||t.dom.root.classList.add("matter-demo-inline"),t.appendTo&&t.appendTo.appendChild(t.dom.root),t.startExample&&r.start(t,t.startExample),t},r.start=function(e,t){t="string"==typeof t?t:e.examples[0].id,window.location.hash.length>0&&(t=window.location.hash.slice(1)),r.setExampleById(e,t)},r.stop=function(e){e.example&&e.example.instance&&e.example.instance.stop()},r.reset=function(e){a._nextId=0,a._seed=0,r.setExample(e,e.example)},r.setExampleById=function(e,t){let n=e.examples.filter((e=>e.id===t))[0];r.setExample(e,n)},r.setExample=function(e,t){if(t){let n=e.example.instance;n&&(n.stop(),n.canvas&&n.canvas.parentElement.removeChild(n.canvas)),window.location.hash=t.id,e.example.instance=null,e.example=t,e.example.instance=n=t.init(e),!n.canvas&&n.render&&(n.canvas=n.render.canvas),n.canvas&&e.dom.root.appendChild(n.canvas),e.dom.exampleSelect.value=t.id,e.dom.buttonSource.href=t.sourceLink||e.url||"#",setTimeout((function(){e.tools.inspector&&r.setInspector(e,!0),e.tools.gui&&r.setGui(e,!0)}),500)}else r.setExample(e,e.examples[0])},r.setInspector=function(e,t){if(!t)return r._destroyTools(e,!0,!1),void e.dom.root.classList.toggle("matter-inspect-active",!1);let n=e.example.instance;r._destroyTools(e,!0,!1),e.dom.root.classList.toggle("matter-inspect-active",!0),e.tools.inspector=o.create(n.engine,n.render)},r.setGui=function(e,t){if(!t)return r._destroyTools(e,!1,!0),void e.dom.root.classList.toggle("matter-gui-active",!1);let n=e.example.instance;r._destroyTools(e,!1,!0),e.dom.root.classList.toggle("matter-gui-active",!0),e.tools.gui=i.create(n.engine,n.runner,n.render)},r._destroyTools=function(e,t,n){let r=e.tools.inspector,s=e.tools.gui;t&&r&&!0!==r&&(o.destroy(r),e.tools.inspector=null),n&&s&&!0!==s&&(i.destroy(s),e.tools.gui=null)},r._toggleFullscreen=function(e){let t=document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement;t?document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():(t=e.dom.root,t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT))},r._bindDom=function(e){var t=e.dom;if(window.addEventListener("orientationchange",(function(){setTimeout((()=>{e.resetOnOrientation&&r.reset(e)}),300)})),e.preventZoom){document.body.addEventListener("gesturestart",(function(e){e.preventDefault()}));var n,i=!0;document.body.addEventListener("touchstart",(function(e){i||e.preventDefault(),i=!1,clearTimeout(n),n=setTimeout((function(){i=!0}),500)}))}if(t.exampleSelect&&t.exampleSelect.addEventListener("change",(function(){let t=this.options[this.selectedIndex].value;r.setExampleById(e,t)})),t.buttonReset&&t.buttonReset.addEventListener("click",(function(){r.reset(e)})),t.buttonInspect&&t.buttonInspect.addEventListener("click",(function(){var t=!e.tools.inspector;r.setInspector(e,t)})),t.buttonTools&&t.buttonTools.addEventListener("click",(function(){var t=!e.tools.gui;r.setGui(e,t)})),t.buttonFullscreen){t.buttonFullscreen.addEventListener("click",(function(){r._toggleFullscreen(e)}));var o=function(){var e=document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen;document.body.classList.toggle("matter-is-fullscreen",e)};document.addEventListener("webkitfullscreenchange",o),document.addEventListener("mozfullscreenchange",o),document.addEventListener("fullscreenchange",o)}},r._createDom=function(e){let t=n(15);s.injectStyles(t,"matter-demo-style");let i=document.createElement("div"),o=e.examples.map((e=>`<option value="${e.id}">${e.name}</option>`)).join(" ");var a=e.preventZoom&&r._isIOS?"prevent-zoom-ios":"";i.innerHTML=`\n <div class="matter-demo ${e.toolbar.title} ${a}">\n <div class="matter-header-outer">\n <header class="matter-header">\n <div class="matter-header-inner">\n <h1 class="matter-demo-title">\n <a href="${e.toolbar.url}" target="_blank">\n ${e.toolbar.title}\n <svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5z"/>\n </svg>\n </a>\n </h1>\n <div class="matter-toolbar">\n <div class="matter-select-wrapper">\n <select aria-label="Select example" title="Select example" class="matter-example-select matter-select">\n ${o}\n </select>\n <svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M7 10l5 5 5-5z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>\n </div>\n <button class="matter-btn matter-btn-reset" title="Reset">\n <svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>\n </button>\n <a href="#" class="matter-btn matter-btn-source" title="Source" target="_blank">{ }</a>\n <button class="matter-btn matter-btn-tools" title="Tools">\n <svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/>\n <path d="M0 0h24v24H0z" fill="none"/>\n </svg>\n </button>\n <button class="matter-btn matter-btn-inspect" title="Inspect">\n <svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43zM19.93 11h2.02c-.2-2.01-1-3.84-2.21-5.32L18.31 7.1c.86 1.11 1.44 2.44 1.62 3.9zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zM15 12c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3zm3.31 4.9l1.43 1.43c1.21-1.48 2.01-3.32 2.21-5.32h-2.02c-.18 1.45-.76 2.78-1.62 3.89zM13 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.43-1.43c-1.1.86-2.43 1.44-3.89 1.62zm-7.32-.19C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43z"/>\n </svg>\n </button>\n <button class="matter-btn matter-btn-fullscreen" title="Fullscreen">\n <svg fill="#000000" height="22" viewBox="0 0 22 22" width="22" xmlns="http://www.w3.org/2000/svg">\n <path d="M0 0h24v24H0z" fill="none"/>\n <path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"/>\n </svg>\n </button>\n </div>\n <a class="matter-link" href="${r._matterLink}" title="matter.js" target="_blank">\n <svg class="matter-logo" height="100" viewBox="0 952.04859 330 100" width="268" xmlns="http://www.w3.org/2000/svg">\n <path id="m-triangle" style="fill:#76f09b;" d="m 115.83215,1052.3622 -57.916072,0 -57.916078053812107,0 L 28.958038,1002.2054 57.916077,952.04859 86.874114,1002.2054 Z" />\n <path id="m-square" style="fill:#f55f5f" d="m 168.03172,952.36218 0,100.00002 100,0 0,-100.00002 -100,0 z" />\n <circle id="m-circle" style="fill:#f5b862" r="12.947398" cy="1039.4148" cx="140.28374" />\n </svg>\n </a>\n </div>\n </header>\n </div>\n </div>\n `;let l={root:i.firstElementChild,title:i.querySelector(".matter-demo-title"),header:i.querySelector(".matter-header"),exampleSelect:i.querySelector(".matter-example-select"),buttonReset:i.querySelector(".matter-btn-reset"),buttonSource:i.querySelector(".matter-btn-source"),buttonTools:i.querySelector(".matter-btn-tools"),buttonInspect:i.querySelector(".matter-btn-inspect"),buttonFullscreen:i.querySelector(".matter-btn-fullscreen")};return e.toolbar.title||s.domRemove(l.title),e.toolbar.exampleSelect||s.domRemove(l.exampleSelect.parentElement),e.toolbar.reset||s.domRemove(l.buttonReset),e.toolbar.source||s.domRemove(l.buttonSource),e.toolbar.inspector||s.domRemove(l.buttonInspect),e.toolbar.tools||s.domRemove(l.buttonTools),e.toolbar.fullscreen||s.domRemove(l.buttonFullscreen),l}},function(e,t){e.exports='/*\n*\tMatterTools.Demo\n*/\n\n.matter-demo {\n display: flex;\n background: #14151f;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n height: 100vh;\n padding: 50px 0 0 0;\n}\n\n.matter-demo,\n.matter-demo * {\n box-sizing: border-box;\n font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.matter-demo *:focus,\n.matter-demo *:active {\n outline: 0;\n}\n\n.matter-demo *:-moz-focusring {\n outline: 3px solid #4da4e4;\n outline-offset: -1px;\n z-index: 5;\n}\n\n.matter-demo *:focus-visible {\n outline: 3px solid #4da4e4;\n outline-offset: -1px;\n z-index: 5;\n}\n\n.matter-demo.matter-demo-inline {\n padding: 0;\n height: inherit;\n}\n\n.matter-demo canvas {\n border-radius: 8px;\n border: 1px solid rgba(255, 255, 255, 0.07);\n max-width: 100%;\n max-height: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.matter-demo.matter-demo-inline canvas {\n max-height: calc(100% - 49px);\n}\n\n.matter-is-fullscreen .matter-demo {\n width: 100%;\n}\n\n.matter-is-fullscreen .dg.ac,\n.matter-is-fullscreen .ins-container {\n display: none;\n}\n\n.matter-header-outer {\n position: fixed;\n z-index: 100;\n top: 0;\n left: 0;\n right: 0;\n background: #0e0f19;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.matter-demo-inline .matter-header-outer {\n position: static;\n background: transparent;\n z-index: 0;\n width: 100%;\n}\n\n.matter-header {\n width: 100%;\n padding: 7px 20px 8px 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.matter-header-inner {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n}\n\n.matter-header h1 {\n display: none;\n margin: 0 12px 0 0;\n width: 18px;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.matter-header h1 a {\n color: #c5c5cc;\n font-size: 14px;\n font-weight: 400;\n display: block;\n text-decoration: none;\n padding: 3px 0 2px 0;\n border-bottom: 1px solid transparent;\n white-space: nowrap;\n float: right;\n}\n\n.matter-header h1 a:hover,\n.matter-header h1 a:focus {\n border-bottom: 1px solid #f5b862;\n color: #fff;\n outline: 0;\n}\n\n@media screen and (min-width: 300px) {\n .matter-header h1 {\n display: inline;\n }\n}\n\n@media screen and (min-width: 600px) {\n .matter-header h1 {\n width: auto;\n overflow: visible;\n }\n}\n\n.btn-home {\n display: none;\n}\n\n.matter-demo-title svg {\n fill: #fff;\n width: 14px;\n height: 14px;\n margin: 0px 0 -2px 2px;\n}\n\n.matter-link {\n text-decoration: none;\n line-height: 13px;\n margin: 0 -10px 0 0;\n flex-shrink: 0;\n}\n\n.matter-link:focus {\n outline: none;\n}\n\n.matter-logo {\n height: 33px;\n width: 46px;\n}\n\n@media screen and (min-width: 1024px) {\n .matter-logo {\n width: 50px;\n }\n}\n\n.matter-logo #m-triangle {\n transform-origin: 14px 856px;\n transition: transform 400ms ease;\n}\n\n.matter-link:focus #m-triangle,\n.matter-logo:hover #m-triangle {\n transform: rotate(-30deg) translate(-98px, -25px);\n}\n\n.matter-logo #m-circle {\n transition: transform 200ms ease;\n transition-delay: 300ms;\n}\n\n.matter-link:focus #m-circle,\n.matter-logo:hover #m-circle {\n transform: translate(18px, -33px);\n}\n\n.matter-logo #m-square {\n transition: transform 150ms ease;\n transition-delay: 400ms;\n}\n\n.matter-link:focus #m-square,\n.matter-logo:hover #m-square {\n transform: translate(47px, -2px);\n}\n\n.matter-toolbar {\n flex-grow: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 18px 0 0;\n}\n\n.matter-select {\n background: transparent;\n color: #c5c5cc;\n font-size: 14px;\n line-height: 33px;\n width: 100%;\n outline: none;\n padding: 0 25px 0 7px;\n margin: 0;\n border: 0;\n border-radius: 0;\n appearance: none;\n -moz-appearance: none;\n -webkit-appearance: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.matter-select option {\n background: #fff;\n color: #000;\n}\n\n.matter-select-wrapper {\n height: 33px;\n width: 100%;\n min-width: 100px;\n max-width: 175px;\n position: relative;\n display: inline-block;\n margin-right: 4%;\n}\n\n.matter-select-wrapper:after {\n content: " ";\n display: block;\n position: absolute;\n pointer-events: none;\n width: 28px;\n height: 100%;\n background: linear-gradient(-90deg, rgb(14 15 25), rgb(14 15 25 / 0));\n right: 23px;\n top: 0;\n}\n\n.matter-demo-inline .matter-select-wrapper:after {\n display: none;\n}\n\n.matter-select:hover,\n.matter-select-wrapper:hover .matter-select {\n color: #fff;\n}\n\n.matter-select:focus-visible {\n color: #fff;\n}\n\n.matter-select:-moz-focusring {\n color: #fff;\n}\n\n.matter-select:focus {\n outline: 0;\n}\n\n.matter-select-wrapper svg:hover,\n.matter-select-wrapper:hover svg {\n background: #232635;\n}\n\n.matter-select-wrapper:hover:after svg {\n fill: #fff;\n}\n\n.matter-select-wrapper svg {\n display: block;\n pointer-events: none;\n fill: #cecece;\n width: 20px;\n height: 20px;\n position: absolute;\n z-index: 2;\n top: 6px;\n right: 0;\n border-radius: 5px;\n background: #101119;\n}\n\n.matter-btn {\n border: 0;\n background: #0b0c15;\n width: 40px;\n height: 33px;\n border-radius: 2px;\n display: inline-block;\n font-size: 16px;\n line-height: 1;\n color: #c2cad4;\n text-decoration: none;\n text-align: center;\n cursor: default;\n flex-shrink: 0;\n flex-grow: 0;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.matter-btn svg {\n fill: #fff;\n width: 15px;\n height: 15px;\n margin: 2px 0 0 0;\n}\n\n.matter-demo-inline .matter-btn {\n background: #0f0f13;\n}\n\n.matter-btn:hover {\n background: #1c1f2d;\n outline: none;\n}\n\n.matter-btn:active {\n transform: translate(0px, 1px);\n}\n\n.matter-btn:focus-visible {\n background: #1c1f2d;\n outline: none;\n}\n\n.matter-btn:-moz-focusring {\n background: #1c1f2d;\n outline: none;\n}\n\n.matter-btn-tools {\n position: relative;\n display: none;\n font-size: 15px;\n}\n\n.matter-btn-tools svg {\n margin-left: -3px;\n}\n\n.matter-btn-inspect {\n position: relative;\n display: none;\n}\n\n.matter-btn-inspect svg {\n margin-left: -3px;\n}\n\n.matter-btn-source {\n display: none;\n font-size: 12px;\n text-align: center;\n line-height: 31px;\n}\n\n.matter-btn-fullscreen {\n position: relative;\n font-size: 18px;\n}\n\n.matter-btn-fullscreen svg {\n margin-left: -3px;\n}\n\n.matter-is-fullscreen .matter-btn-tools,\n.matter-is-fullscreen .matter-btn-inspect {\n display: none;\n}\n\n.matter-btn-fullscreen:after,\n.matter-btn-tools:after,\n.matter-btn-inspect:after {\n content: " ";\n position: absolute;\n bottom: 10px;\n width: 3px;\n height: 3px;\n background: #f5df75;\n border-radius: 1px;\n opacity: 0;\n transform: scale(0);\n transition: opacity 100ms ease, transform 100ms ease;\n}\n\n.matter-btn-inspect:after {\n left: 31px;\n}\n\n.matter-btn-tools:after {\n background: #f45f5f;\n left: 28px;\n}\n\n.matter-btn-fullscreen:after {\n background: #76f09b;\n left: 32px;\n}\n\n.matter-is-fullscreen .matter-btn-fullscreen:after,\n.matter-gui-active .matter-btn-tools:after,\n.matter-inspect-active .matter-btn-inspect:after {\n opacity: 1;\n transform: scale(1);\n}\n\n.ins-container,\nbody .dg {\n display: none;\n}\n\n@media screen and (min-width: 500px) {\n .ins-container,\n body .dg,\n .matter-btn-tools,\n .matter-btn-inspect,\n .matter-btn-source {\n display: block;\n }\n}\n'}])},e.exports=r(n("lniP"))}}]); |