diff --git a/bower.json b/bower.json index 1026010..52ec360 100644 --- a/bower.json +++ b/bower.json @@ -11,8 +11,8 @@ "tests" ], "dependencies": { - "jquery": "1.*", + "jquery": "2.*", "jquery-mousewheel": "~3.1.13", - "jquery.terminal": "~0.8.8" + "jquery.terminal": "~0.9.3" } } diff --git a/elixir.json b/elixir.json index 901483a..86d56c4 100644 --- a/elixir.json +++ b/elixir.json @@ -1,8 +1,7 @@ { "production": true, "sourcemaps": false, - "publicPath": "../../../../vendor/terminal", - "_publicPath": "public", + "publicPath": "public", "font": { "outputFolder": "fonts" }, diff --git a/gulpfile.js b/gulpfile.js index d611558..b5dd0c2 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -24,14 +24,21 @@ elixir(function(mix) { .scripts([ "jquery/dist/jquery.js", "jquery-mousewheel/jquery.mousewheel.js", - "jquery.terminal/js/jquery.terminal-0.8.8.js", + "jquery.terminal/js/jquery.terminal-src.js", + "jquery.terminal/js/unix_formatting.js", + "jquery.terminal/js/xml_formatting.js", ], config.get('public.js.outputFolder') + '/plugins.js', 'resources/assets/vendor') .sass([ 'app.scss' - ], config.get('public.css.outputFolder') + '/app.css') + ], config.get('public.css.outputFolder') + '/app.css', { + includePaths: ['resources/assets/vendor'] + }) .coffee([ '**/*.coffee' ], config.get('public.js.outputFolder') + '/app.js') + .copy([ + 'public' + ], '../../../../vendor/terminal') .browserSync({ files: [ 'src/**/*.php', diff --git a/public/css/app.css b/public/css/app.css index 03d8a45..b8662c1 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -1 +1 @@ -.cmd .prompt,.cmd span{float:left}.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output .format,.terminal .terminal-output div div{display:inline-block}.cmd .clipboard{position:absolute;bottom:0;left:0;opacity:.01;filter:alpha(opacity=.01);width:2px}.cmd>.clipboard{position:fixed}.terminal{padding:10px;position:relative;overflow:hidden}.cmd{padding:0;margin:0;height:1.3em}.cmd .cursor.blink{-webkit-animation:blink 1s infinite steps(1,start);animation:blink 1s infinite steps(1,start)}@keyframes blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@-webkit-keyframes blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}.cmd .prompt,.terminal .terminal-output div div{display:block;line-height:14px;height:auto}.cmd,.terminal{font-family:FreeMono,monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px}.cmd .cursor.blink,.cmd .inverted,.cmd .prompt span::selection,.cmd>span::selection,.terminal .inverted,.terminal .terminal-output div div a::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div span::selection{background-color:#aaa;color:#000}.terminal-output>div{min-height:14px}.terminal .terminal-output div span{display:inline-block}.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div span::-moz-selection{background-color:#aaa;color:#000}.cmd .prompt span::-moz-selection,.cmd>span::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div span::-moz-selection{background-color:#aaa;color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:1100}.clear{clear:both}.terminal a{color:#0F60FF}.terminal a:hover{color:red}body,html{background:#000;min-width:480px} \ No newline at end of file +.cmd .prompt,.cmd span{float:left}.cmd .format,.cmd .prompt,.cmd .prompt div,.terminal .terminal-output .format,.terminal .terminal-output div div{display:inline-block}.cmd .clipboard,.cmd .mask{position:absolute;display:block;bottom:0;height:16px;left:-10px}.cmd,.terminal{position:relative}.cmd,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre{margin:0}.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6{line-height:1.2em}.wrap{word-wrap:break-word;overflow:initial}.cmd .clipboard{left:-99999px;clip:rect(1px,1px,1px,1px);width:10px;height:10px;padding:0;resize:none;border:none;z-index:0;overflow:hidden;outline:0}.terminal .error{color:red}.terminal{padding:10px;overflow:auto}.cmd{padding:0;height:1.3em}.cmd .cursor.blink,.cmd .inverted,.terminal .inverted{background-color:#aaa;color:#000}.cmd .cursor.blink{-webkit-animation:terminal-blink 1s infinite steps(1,start);animation:terminal-blink 1s infinite steps(1,start)}@-webkit-keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}@keyframes terminal-blink{0%,100%{background-color:#000;color:#aaa}50%{background-color:#bbb;color:#000}}.cmd .prompt,.terminal .terminal-output div div{display:block;line-height:14px;height:auto}.cmd,.terminal{font-family:monospace;color:#aaa;background-color:#000;font-size:12px;line-height:14px}.terminal-output>div{min-height:14px}.terminal .terminal-output div span{display:inline-block}.cmd div,.cmd span,.terminal h1,.terminal h2,.terminal h3,.terminal h4,.terminal h5,.terminal h6,.terminal pre,.terminal td,.terminal-output a,.terminal-output span{-webkit-touch-callout:initial;-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:initial}.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@-moz-document url-prefix(){.terminal,.terminal-output,.terminal-output div{-webkit-touch-callout:initial;-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:initial}}.terminal table{border-collapse:collapse}.terminal td{border:1px solid #aaa}.cmd .prompt span::-moz-selection,.cmd div::-moz-selection,.cmd>span::-moz-selection,.terminal .terminal-output div div a::-moz-selection,.terminal .terminal-output div div::-moz-selection,.terminal .terminal-output div span::-moz-selection,.terminal h1::-moz-selection,.terminal h2::-moz-selection,.terminal h3::-moz-selection,.terminal h4::-moz-selection,.terminal h5::-moz-selection,.terminal h6::-moz-selection,.terminal pre::-moz-selection,.terminal td::-moz-selection{background-color:#aaa;color:#000}.cmd .prompt span::selection,.cmd div::selection,.cmd>span::selection,.terminal .terminal-output div div a::selection,.terminal .terminal-output div div::selection,.terminal .terminal-output div span::selection,.terminal h1::selection,.terminal h2::selection,.terminal h3::selection,.terminal h4::selection,.terminal h5::selection,.terminal h6::selection,.terminal pre::selection,.terminal td::selection{background-color:#aaa;color:#000}.terminal .terminal-output div.error,.terminal .terminal-output div.error div{color:red}.tilda{position:fixed;top:0;left:0;width:100%;z-index:1100}.clear{clear:both}.terminal a{color:#0F60FF}.terminal a:hover{color:red}body,html{background:#000;min-width:480px} \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index c85b0d0..a203d4b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -(function(){!function(n,r,t){var e,o,_,u,i,a,c,s,l,p;return o=n("meta[name='csrf-token']").attr("content"),n.ajaxSetup({headers:{"X-CSRF-TOKEN":o}}),c=function(n,r){return n=n.replace("[","[").replace("]","]"),"[[;"+r+";]"+n+"]"},i=function(n){return c(n,"#008400")},e=function(n){return c(n,"#a50")},u={copyright:[" __ _ _____ _ _ ","| | ___ ___ ___ _ _ ___| | |_ ____ ___ _____|_|___ ___| |","| |__| .'| _| .'| | | -_| | | || -_| _| | | | .'| |","|_____|__,|_| |__,|\\_/|___|_| |_||___|_| |_|_|_|_|_|_|__,|_|","","Copyright (c) 2015 Recca Tsai ",""].join("\n"),production:["",e("**************************************"),e("* Application In Production! *"),e("**************************************"),""].join("\n")},s=function(){var r;return r={},function(t,e,o,_){return r[t]=r[t]||0,e.pause(),n.ajax({url:t,dataType:"json",type:"post",data:{jsonrpc:"2.0",method:o,params:_,id:++r[t]}}).success(function(n){return n.result===!1?e.error(n.error):e.echo(n.result)}).error(function(n,r,t){return e.error(t)}).complete(function(){return e.resume()})}}(),p=function(){var r;return r=function(n){switch(n.toLowerCase()){case"y":case"yes":return!0;default:return!1}},function(t,e,o){var _;return null==e&&(e=""),null==o&&(o=">"),_=n.Deferred(),""!==e&&t.echo(e),t.push(function(n){_.resolve(r(n)),t.pop()},{prompt:o}),_.promise()}}(),l=function(n,r){return 0===n.indexOf(r)},a=function(n,r,t,e,o){return null==e&&(e=function(){}),n===t?(o||(o=t),r.push(function(n){e(o,n,r)},{prompt:o+">"}),!0):!1},_=function(r,t,o,_){var a,c,f,m;return null==_&&(_=null),a=n.terminal.parseCommand(r.trim()),a.name=a.name.replace(/^\.\//,""),a.name===o?(c=Terminal.endPoints[o],m=a.args,f=m.shift(),f||null===_||(f=_),"artisan"===o&&"production"===Terminal.environment&&-1===n.inArray("--force",m)&&(l(f,"migrate")===!0&&l(f,"migrate:status")===!1||l(f,"db:seed")===!0)?p(t,""+u.production,i("Do you really wish to run this command? [y/N] (yes/no)")+" ["+e("no")+"]: ").done(function(n){return n===!1?(m.push("--force"),s(c,t,f,m)):t.echo("\n"+e("Command Cancelled!"))}):s(c,t,f,m),!0):!1},n(t.body).terminal(function(n,r){""!==n&&a(n,r,"mysql",function(n,r,t){var e;return e=Terminal.endPoints[n],s(endpoint,t,r,[])})!==!0&&a(n,r,"artisan tinker",function(n,r,t){var e;return e=Terminal.endPoints[n],s(e,t,r,[])},"tinker")!==!0&&(_(n,r,"artisan","list")||_(n,r,"find")||r.error("Command '"+n+"' Not Found!"))},{greetings:u.copyright,onBlur:function(){return!1}})}(jQuery,window,document)}).call(this); \ No newline at end of file +(function(){!function(n,r,e){var t,o,_,i,u,a,c,s,l,m,p,f;return o=n("meta[name='csrf-token']").attr("content"),n.ajaxSetup({headers:{"X-CSRF-TOKEN":o}}),m=["artisan tinker","mysql","tinker"],_=["mysql"],n.each(Terminal.endPoints,function(r,e){return-1===n.inArray(r,m)?_.push(r):void 0}),_.sort(),s=function(n,r){return n=n.replace("[","[").replace("]","]"),"[[;"+r+";]"+n+"]"},a=function(n){return s(n,"#008400")},t=function(n){return s(n,"#a50")},u={copyright:[" __ _ _____ _ _ ","| | ___ ___ ___ _ _ ___| | |_ ____ ___ _____|_|___ ___| |","| |__| .'| _| .'| | | -_| | | || -_| _| | | | .'| |","|_____|__,|_| |__,|\\_/|___|_| |_||___|_| |_|_|_|_|_|_|__,|_|","","Copyright (c) 2015 Recca Tsai ",""].join("\n"),production:["",t("**************************************"),t("* Application In Production! *"),t("**************************************"),""].join("\n")},l=function(){var r;return r={},function(e,t,o,_){return r[e]=r[e]||0,t.pause(),n.ajax({url:e,dataType:"json",type:"post",data:{jsonrpc:"2.0",method:o,params:_,id:++r[e]}}).success(function(n){return n.result===!1?t.error(n.error):t.echo(n.result)}).error(function(n,r,e){return t.error(e)}).complete(function(){return t.resume()})}}(),f=function(){var r;return r=function(n){switch(n.toLowerCase()){case"y":case"yes":return!0;default:return!1}},function(e,t,o){var _;return null==t&&(t=""),null==o&&(o=">"),_=n.Deferred(),""!==t&&e.echo(t),e.echo(o),e.push(function(n){_.resolve(r(n)),e.pop()},{prompt:">"}),_.promise()}}(),p=function(n,r){return 0===n.indexOf(r)},c=function(n,r,e,t){return null==e&&(e=function(){}),t||(t=n),r.push(function(n){return e(t,n,r),!1},{prompt:t+">"}),!1},i=function(r,e){var o,_,i;return o=Terminal.endPoints[r.name],i=r.args,_=i.shift()||[],"artisan"===r.name&&"production"===Terminal.environment&&-1===n.inArray("--force",i)&&(p(_,"migrate")===!0&&p(_,"migrate:status")===!1||p(_,"db:seed")===!0)?void f(e,""+u.production,a("Do you really wish to run this command? [y/N] (yes/no)")+" ["+t("no")+"]: ").done(function(n){return n===!0?(i.push("--force"),l(o,e,_,i)):e.echo("\n"+t("Command Cancelled!"))}):void l(o,e,_,i)},n(e.body).terminal(function(r,e){var t;switch(r){case"help":return _.join(" ");case"":break;case"mysql":c(r,e,function(n,r,e){var t;return t=Terminal.endPoints[n],l(t,e,r,[])});break;case"artisan tinker":c(r,e,function(n,r,e){var t;return t=Terminal.endPoints[n],l(t,e,r,[])},"tinker");break;default:t=n.terminal.parseCommand(r.trim()),-1!==n.inArray(t.name,_)?i(t,e):e.error("Command '"+r+"' Not Found!")}},{greetings:u.copyright,onBlur:function(){return!1}})}(jQuery,window,document)}).call(this); \ No newline at end of file diff --git a/public/js/app.js.map b/public/js/app.js.map new file mode 100644 index 0000000..bd22dc9 --- /dev/null +++ b/public/js/app.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["app.coffee"],"names":[],"mappings":"AAAA;EAAG,CAAA,SAAC,CAAD,EAAa,MAAb,EAAqB,QAArB;AACC,QAAA;IAAA,SAAA,GAAY,CAAA,CAAE,yBAAF,CACR,CAAC,IADO,CACF,SADE;IAGZ,CAAC,CAAC,SAAF,CACI;MAAA,OAAA,EACI;QAAA,cAAA,EAAgB,SAAhB;OADJ;KADJ;IAIA,kBAAA,GAAqB,CAAC,gBAAD,EAAmB,OAAnB,EAA4B,QAA5B;IACrB,kBAAA,GAAqB,CAAC,OAAD;IACrB,CAAC,CAAC,IAAF,CAAO,QAAQ,CAAC,SAAhB,EAA2B,SAAC,GAAD,EAAM,GAAN;MACvB,IAAG,CAAC,CAAC,OAAF,CAAU,GAAV,EAAe,kBAAf,CAAA,KAAsC,CAAC,CAA1C;eACI,kBAAkB,CAAC,IAAnB,CAAwB,GAAxB,EADJ;;IADuB,CAA3B;IAIA,kBAAkB,CAAC,IAAnB,CAAA;IAEA,cAAA,GAAiB,SAAC,GAAD,EAAM,KAAN;MACb,GAAA,GAAM,GAAG,CAAC,OAAJ,CAAY,GAAZ,EAAiB,OAAjB,CAAyB,CAAC,OAA1B,CAAkC,GAAlC,EAAuC,OAAvC;aACN,KAAA,GAAM,KAAN,GAAY,IAAZ,GAAgB,GAAhB,GAAoB;IAFP;IAIjB,IAAA,GAAO,SAAC,GAAD;aACH,cAAA,CAAe,GAAf,EAAoB,SAApB;IADG;IAGP,OAAA,GAAU,SAAC,GAAD;aACN,cAAA,CAAe,GAAf,EAAoB,MAApB;IADM;IAGV,SAAA,GACI;MAAA,SAAA,EAAW,CACP,iEADO,EAEP,iEAFO,EAGP,iEAHO,EAIP,kEAJO,EAKP,EALO,EAMP,8DANO,EAOP,EAPO,CAQV,CAAC,IARS,CAQJ,IARI,CAAX;MAWA,UAAA,EAAY,CACR,EADQ,E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AAkB,IAAlB,EAAwB,OAAxB,EAAiC,EAAjC;UAFuB,CAA3B;AADC;AALT,aAUS,gBAVT;UAWQ,WAAA,CAAY,OAAZ,EAAqB,IAArB,EAA2B,SAAC,MAAD,EAAS,OAAT,EAAkB,IAAlB;AACvB,gBAAA;YAAA,QAAA,GAAW,QAAQ,CAAC,SAAU,CAAA,MAAA;mBAC9B,OAAA,CAAQ,QAAR,EAAkB,IAAlB,EAAwB,OAAxB,EAAiC,EAAjC;UAFuB,CAA3B,EAGE,QAHF;AADC;AAVT;UAiBQ,GAAA,GAAM,CAAC,CAAC,QAAQ,CAAC,YAAX,CAAwB,OAAO,CAAC,IAAR,CAAA,CAAxB;UACN,IAAG,CAAC,CAAC,OAAF,CAAU,GAAG,CAAC,IAAd,EAAoB,kBAApB,CAAA,KAA6C,CAAC,CAAjD;YACI,OAAA,CAAQ,GAAR,EAAa,IAAb,EADJ;WAAA,MAAA;YAII,IAAI,CAAC,KAAL,CAAW,WAAA,GAAY,OAAZ,GAAoB,cAA/B,EAJJ;;AAlBR;IADsB,CAA1B,EA0BI;MAAA,SAAA,EAAW,SAAS,CAAC,SAArB;MACA,MAAA,EAAQ,SAAA;eACJ;MADI,CADR;KA1BJ;EAjID,CAAA,CAAH,CAAQ,MAAR,EAAgB,MAAhB,EAAwB,QAAxB;AAAA","file":"app.js","sourcesContent":["do ($ = jQuery, window, document) ->\r\n csrfToken = $ \"meta[name='csrf-token']\"\r\n .attr \"content\"\r\n\r\n $.ajaxSetup\r\n headers:\r\n 'X-CSRF-TOKEN': csrfToken\r\n\r\n shouldSkipCommands = [\"artisan tinker\", \"mysql\", \"tinker\"]\r\n executableCommands = [\"mysql\"]\r\n $.each Terminal.endPoints, (key, url) ->\r\n if $.inArray(key, shouldSkipCommands) is -1\r\n executableCommands.push key\r\n\r\n executableCommands.sort()\r\n\r\n outputFormater = (str, color) ->\r\n str = str.replace(\"[\", \"[\").replace(\"]\", \"]\")\r\n \"[[;#{color};]#{str}]\"\r\n\r\n info = (str) ->\r\n outputFormater str, \"#008400\"\r\n\r\n comment = (str) ->\r\n outputFormater str, \"#a50\"\r\n\r\n greetings =\r\n copyright: [\r\n \" __ _ _____ _ _ \"\r\n \"| | ___ ___ ___ _ _ ___| | |_ ____ ___ _____|_|___ ___| |\"\r\n \"| |__| .'| _| .'| | | -_| | | || -_| _| | | | .'| |\"\r\n \"|_____|__,|_| |__,|\\\\_/|___|_| |_||___|_| |_|_|_|_|_|_|__,|_|\"\r\n \"\"\r\n \"Copyright (c) 2015 Recca Tsai \"\r\n \"\"\r\n ].join \"\\n\"\r\n\r\n\r\n production: [\r\n \"\"\r\n comment(\"**************************************\")\r\n comment(\"* Application In Production! *\")\r\n comment(\"**************************************\")\r\n \"\"\r\n ].join \"\\n\"\r\n\r\n request = do ->\r\n ids = {}\r\n (url, term, method, params) ->\r\n\r\n ids[url] = ids[url] || 0;\r\n term.pause()\r\n $.ajax\r\n url: url,\r\n dataType: 'json'\r\n type: 'post'\r\n data:\r\n jsonrpc: \"2.0\"\r\n method: method\r\n params: params\r\n id: ++ids[url]\r\n .success (response) ->\r\n if response.result is false\r\n term.error response.error\r\n else\r\n term.echo response.result\r\n .error (xhr, type, message) ->\r\n term.error message\r\n .complete ->\r\n term.resume()\r\n\r\n terminalConfirm = do ->\r\n parseBoolean = (result) ->\r\n return switch (result.toLowerCase())\r\n when 'y', 'yes' then true\r\n else false\r\n\r\n (term, message = \"\", prompt = \">\") ->\r\n defer = $.Deferred()\r\n\r\n if message isnt \"\"\r\n term.echo message\r\n term.echo prompt\r\n\r\n term.push (command) ->\r\n defer.resolve parseBoolean(command)\r\n term.pop()\r\n return\r\n ,\r\n prompt: \">\"\r\n defer.promise()\r\n\r\n starts_with = (str, search) ->\r\n return str.indexOf(search) is 0\r\n\r\n interpreter = (command, term, callback =(() ->), prompt) ->\r\n unless prompt\r\n prompt = command\r\n\r\n term.push (command) ->\r\n callback(prompt, command, term)\r\n return false\r\n ,\r\n prompt: \"#{prompt}>\"\r\n\r\n\r\n return false\r\n\r\n execute = (cmd, term) ->\r\n endPoint = Terminal.endPoints[cmd.name]\r\n params = cmd.args\r\n method = params.shift() or []\r\n\r\n if (cmd.name is \"artisan\" and Terminal.environment is \"production\" and $.inArray(\"--force\", params) is -1) and (\r\n (starts_with(method, \"migrate\") is true and starts_with(method, \"migrate:status\") is false) or\r\n starts_with(method, \"db:seed\") is true\r\n )\r\n terminalConfirm term, \"#{greetings.production}\", \"#{info('Do you really wish to run this command? [y/N] (yes/no)')} [#{comment('no')}]: \"\r\n .done (result) ->\r\n if result is true\r\n params.push \"--force\"\r\n request endPoint, term, method, params\r\n else\r\n term.echo \"\\n#{comment('Command Cancelled!')}\"\r\n return\r\n else\r\n request endPoint, term, method, params\r\n return\r\n\r\n $(document.body).terminal (command, term) ->\r\n switch command\r\n when \"help\"\r\n return executableCommands.join \"\\t\"\r\n when \"\"\r\n return\r\n when \"mysql\"\r\n interpreter command, term, (prompt, command, term) ->\r\n endPoint = Terminal.endPoints[prompt]\r\n request endPoint, term, command, []\r\n return\r\n when \"artisan tinker\"\r\n interpreter command, term, (prompt, command, term) ->\r\n endPoint = Terminal.endPoints[prompt]\r\n request endPoint, term, command, []\r\n , \"tinker\"\r\n return\r\n else\r\n cmd = $.terminal.parseCommand command.trim()\r\n if $.inArray(cmd.name, executableCommands) isnt -1\r\n execute cmd, term\r\n return\r\n else\r\n term.error \"Command '#{command}' Not Found!\"\r\n return\r\n ,\r\n greetings: greetings.copyright\r\n onBlur: ->\r\n false\r\n"],"sourceRoot":"/source/"} \ No newline at end of file diff --git a/public/js/plugins.js b/public/js/plugins.js index 047ca7a..cb94e87 100644 --- a/public/js/plugins.js +++ b/public/js/plugins.js @@ -1,5 +1,5 @@ -!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t="length"in e&&e.length,n=ie.type(e);return"function"===n||ie.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function r(e,t,n){if(ie.isFunction(t))return ie.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ie.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(pe.test(t))return ie.filter(t,e,n);t=ie.filter(t,e)}return ie.grep(e,function(e){return ie.inArray(e,t)>=0!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t=we[e]={};return ie.each(e.match(be)||[],function(e,n){t[n]=!0}),t}function a(){he.addEventListener?(he.removeEventListener("DOMContentLoaded",s,!1),e.removeEventListener("load",s,!1)):(he.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(he.addEventListener||"load"===event.type||"complete"===he.readyState)&&(a(),ie.ready())}function l(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(ke,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Ae.test(n)?ie.parseJSON(n):n}catch(i){}ie.data(e,t,n)}else n=void 0}return n}function u(e){var t;for(t in e)if(("data"!==t||!ie.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(ie.acceptData(e)){var i,o,a=ie.expando,s=e.nodeType,l=s?ie.cache:e,u=s?e[a]:e[a]&&a;if(u&&l[u]&&(r||l[u].data)||void 0!==n||"string"!=typeof t)return u||(u=s?e[a]=U.pop()||ie.guid++:a),l[u]||(l[u]=s?{}:{toJSON:ie.noop}),("object"==typeof t||"function"==typeof t)&&(r?l[u]=ie.extend(l[u],t):l[u].data=ie.extend(l[u].data,t)),o=l[u],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[ie.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[ie.camelCase(t)])):i=o,i}}function f(e,t,n){if(ie.acceptData(e)){var r,i,o=e.nodeType,a=o?ie.cache:e,s=o?e[ie.expando]:ie.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){ie.isArray(t)?t=t.concat(ie.map(t,ie.camelCase)):t in r?t=[t]:(t=ie.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!u(r):!ie.isEmptyObject(r))return}(n||(delete a[s].data,u(a[s])))&&(o?ie.cleanData([e],!0):ne.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}function p(){return!0}function d(){return!1}function h(){try{return he.activeElement}catch(e){}}function m(e){var t=Oe.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function g(e,t){var n,r,i=0,o=typeof e.getElementsByTagName!==_e?e.getElementsByTagName(t||"*"):typeof e.querySelectorAll!==_e?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||ie.nodeName(r,t)?o.push(r):ie.merge(o,g(r,t));return void 0===t||t&&ie.nodeName(e,t)?ie.merge([e],o):o}function v(e){Ne.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t){return ie.nodeName(e,"table")&&ie.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function b(e){return e.type=(null!==ie.find.attr(e,"type"))+"/"+e.type,e}function w(e){var t=Qe.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function x(e,t){for(var n,r=0;null!=(n=e[r]);r++)ie._data(n,"globalEval",!t||ie._data(t[r],"globalEval"))}function F(e,t){if(1===t.nodeType&&ie.hasData(e)){var n,r,i,o=ie._data(e),a=ie._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ie.event.add(t,n,s[n][r])}a.data&&(a.data=ie.extend({},a.data))}}function _(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!ne.noCloneEvent&&t[ie.expando]){i=ie._data(t);for(r in i.events)ie.removeEvent(t,r,i.handle);t.removeAttribute(ie.expando)}"script"===n&&t.text!==e.text?(b(t).text=e.text,w(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),ne.html5Clone&&e.innerHTML&&!ie.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ne.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function A(t,n){var r,i=ie(n.createElement(t)).appendTo(n.body),o=e.getDefaultComputedStyle&&(r=e.getDefaultComputedStyle(i[0]))?r.display:ie.css(i[0],"display");return i.detach(),o}function k(e){var t=he,n=Ze[e];return n||(n=A(e,t),"none"!==n&&n||(Ge=(Ge||ie("