/*******************************************************************************
 * @license
 * Copyright (c) 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2011, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*
Copyright (c) 2002 Douglas Crockford  (www.JSLint.com)

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.
*/

/*******************************************************************************
 * @license
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 * 
 * Contributors: IBM Corporation - initial API and implementation
 ******************************************************************************/

/*******************************************************************************
 * @license
 * Copyright (c) 2010, 2012 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials are made 
 * available under the terms of the Eclipse Public License v1.0 
 * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

/*

 Copyright (c) 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2011, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation

 Copyright (c) 2013 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors: IBM Corporation - initial API and implementation

 Copyright (c) 2010, 2012 IBM Corporation and others.
 All rights reserved. This program and the accompanying materials are made 
 available under the terms of the Eclipse Public License v1.0 
 (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
 License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

 Contributors:
 IBM Corporation - initial API and implementation
*/
(function(q,w){typeof define==="function"&&define.amd?define("orion/Deferred",w):typeof exports==="object"?module.exports=w():(q.orion=q.orion||{},q.orion.Deferred=w())})(this,function(){function q(){for(var m;m=F.shift();)m();c=!1}function w(m){F.push(m);c||(c=!0,setTimeout(q,0))}function y(c){return function(){c.apply(void 0,arguments)}}function D(){function c(){for(var f;f=h.shift();){var d=f.deferred,o=b==="fulfilled"?"resolve":"reject";if(typeof f[o]==="function")try{var m=(0,f[o])(l),u=m&&(typeof m===
"object"||typeof m==="function")&&m.then;if(typeof u==="function")if(m===d.promise)d.reject(new TypeError);else{var t=m.cancel;typeof t==="function"?d._protected(F).parentCancel=t.bind(m):delete d._protected(F).parentCancel;u.call(m,y(d.resolve),y(d.reject),y(d.progress))}else d.resolve(m)}catch(w){d.reject(w)}else d[o](l)}}function d(f){delete u.parentCancel;b="rejected";l=f;h.length&&w(c)}function A(f){function t(b){return function(c){p||(p=!0,b(c))}}var p=!1;delete u.parentCancel;try{var q=f&&
(typeof f==="object"||typeof f==="function")&&f.then;if(typeof q==="function")if(f===o)d(new TypeError);else{b="assumed";var y=f&&f.cancel;if(typeof y!=="function"){var B=new D,f=B.promise;try{q(B.resolve,B.reject,B.progress)}catch(z){B.reject(z)}y=f.cancel;q=f.then}l=f;q.call(f,t(A),t(d));u.parentCancel=y.bind(f)}else b="fulfilled",l=f,h.length&&w(c)}catch(S){t(d)(S)}}function t(){var c=u.parentCancel;if(c)delete u.parentCancel,c();else if(!b)c=Error("Cancel"),c.name="Cancel",d(c)}var l,b,h=[],o=
this,u={};Object.defineProperty(this,"_protected",{value:function(b){if(b!==F)throw Error("protected");return u}});this.resolve=function(c){b||A(c);return o};this.reject=function(c){b||d(c);return o};this.progress=function(c){b||h.forEach(function(b){if(b.progress)try{b.progress(c)}catch(h){}});return o.promise};this.cancel=function(){u.parentCancel?setTimeout(t,0):t();return o};this.then=function(f,d,u){f={resolve:f,reject:d,progress:u,deferred:new D};h.push(f);f.deferred._protected(F).parentCancel=
o.promise.cancel.bind(o);(b==="fulfilled"||b==="rejected")&&w(c);return f.deferred.promise};this.promise={then:o.then,cancel:o.cancel}}var F=[],c=!1;D.all=function(c,d){function w(c,f){h||(b[c]=f,--l===0&&o.resolve(b))}function t(b,c){if(!h){if(d)try{w(b,d(c));return}catch(m){c=m}o.reject(c)}}var l=c.length,b=[],h=!1,o=new D;o.then(void 0,function(){h=!0;c.forEach(function(b){b.cancel&&b.cancel()})});l===0?o.resolve(b):c.forEach(function(b,c){b.then(w.bind(void 0,c),t.bind(void 0,c))});return o.promise};
D.when=function(c,d,w,t){var l;if(!(c&&typeof c.then==="function"))l=new D,l.resolve(c),c=l.promise;return c.then(d,w,t)};return D});
(function(q,w){typeof define==="function"&&define.amd?define("orion/plugin",["orion/Deferred"],w):typeof exports==="object"?module.exports=w(require("orion/Deferred")):(q.orion=q.orion||{},q.orion.PluginProvider=w(q.orion.Deferred))})(this,function(q){function w(w,q){this.__objectId=w;this.__methods=q}return function(y){function D(b){o&&(typeof ArrayBuffer==="undefined"&&(b=JSON.stringify(b)),o===self?o.postMessage(b):o.postMessage(b,"*"))}function F(){var c=[];Object.keys(B).forEach(function(b){var h=
B[b];c.push({serviceId:b,names:h.names,methods:h.methods,properties:h.properties})});return{headers:b||{},services:c}}function c(b,c){if(c&&c instanceof XMLHttpRequest){var h,d;try{h=c.status,d=c.statusText}catch(f){h=0,d=""}return{status:h||0,statusText:d}}return c}function m(b){var h=b?JSON.parse(JSON.stringify(b,c)):b;if(b instanceof Error)h.__isError=!0,h.message=h.message||b.message,h.name=h.name||b.name;return h}function d(b){if(!o)return(new q).reject(Error("plugin not connected"));b.id=String(u++);
var c=new q;P[b.id]=c;c.then(null,function(c){h&&c instanceof Error&&c.name==="Cancel"&&z({requestId:b.id,method:"cancel",params:c.message?[c.message]:[]})});var d=Object.prototype.toString;b.params.forEach(function(h,o){if(d.call(h)==="[object Object]"&&!(h instanceof w)){var m,u;for(m in h)d.call(h[m])==="[object Function]"&&(u=u||[],u.push(m));if(u){var t=f++;K[t]=h;m=function(){delete K[t]};c.then(m,m);b.params[o]=new w(t,u)}}});z(b);return c.promise}function A(b,c){b||b===0?z({id:b,result:null,
error:c}):console.log(c)}function t(b,c,h,f){f.forEach(function(b,c){if(b&&typeof b.__objectId!=="undefined"){var h={};b.__methods.forEach(function(c){h[c]=function(){return d({objectId:b.__objectId,method:c,params:Array.prototype.slice.call(arguments)})}});f[c]=h}});var o=typeof b===void 0?null:{id:b,result:null,error:null};try{var u=h.apply(c,f);if(o)u&&typeof u.then==="function"?(p[b]=u,u.then(function(c){delete p[b];o.result=c;z(o)},function(c){if(p[b])delete p[b],o.error=m(c),z(o)},function(){z({responseId:b,
method:"progress",params:Array.prototype.slice.call(arguments)})})):(o.result=u,z(o))}catch(t){if(o)o.error=m(t),z(o)}}function l(b){if(b.source===o){b=typeof b.data!=="string"?b.data:JSON.parse(b.data);try{if(b.method){var c=b.method,h=b.params||[];if("serviceId"in b){var d=B[b.serviceId];d||A(b.id,"service not found");d=d.implementation;c in d?t(b.id,d,d[c],h):A(b.id,"method not found")}else if("objectId"in b){var f=K[b.objectId];f||A(b.id,"object not found");!c in f?t(b.id,f,f[c],h):A(b.id,"method not found")}else if("requestId"in
b){var m=p[b.requestId];m&&c==="cancel"&&m.cancel&&m.cancel.apply(m,h)}else if("responseId"in b){var u=P[b.responseId];u&&c==="progress"&&u.progress&&u.progress.apply(u,h)}else throw Error("Bad method: "+b.method);}else{var l=P[String(b.id)];delete P[String(b.id)];b.error?l.reject(b.error):l.resolve(b.result)}}catch(w){console.log("Plugin._messageHandler "+w)}}}var b=y,h=!1,o=null,u=0,f=0,ua=0,p={},P={},K={},B={},z=D;this.updateHeaders=function(c){if(h)throw Error("Cannot update headers. Plugin Provider is connected");
b=c};this.registerServiceProvider=this.registerService=function(b,c,d){if(h)throw Error("Cannot register service. Plugin Provider is connected");typeof b==="string"?b=[b]:Array.isArray(b)||(b=[]);var f=null,o=[];for(f in c)typeof c[f]==="function"&&o.push(f);B[ua++]={names:b,methods:o,implementation:c,properties:d||{},listeners:{}}};this.connect=function(b,c){if(!h){if(typeof window==="undefined")o=self;else if(window!==window.parent)o=window.parent;else if(window.opener!==null)o=window.opener;else{c&&
c("No valid plugin target");return}addEventListener("message",l,!1);var d={method:"plugin",params:[F()]};D(d);h=!0}b&&b()};this.disconnect=function(){h&&(removeEventListener("message",l),o=null,h=!1)}}});if(!this.JSON)this.JSON={};
(function(){function q(c){return c<10?"0"+c:c}function w(c){F.lastIndex=0;return F.test(c)?'"'+c.replace(F,function(c){var b=d[c];return typeof b==="string"?b:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function y(d,l){var b,h,o,u,f=c,q,p=l[d];p&&typeof p==="object"&&typeof p.toJSON==="function"&&(p=p.toJSON(d));typeof A==="function"&&(p=A.call(l,d,p));switch(typeof p){case "string":return w(p);case "number":return isFinite(p)?String(p):"null";case "boolean":case "null":return String(p);
case "object":if(!p)return"null";c+=m;q=[];if(Object.prototype.toString.apply(p)==="[object Array]"){u=p.length;for(b=0;b<u;b+=1)q[b]=y(b,p)||"null";o=q.length===0?"[]":c?"[\n"+c+q.join(",\n"+c)+"\n"+f+"]":"["+q.join(",")+"]";c=f;return o}if(A&&typeof A==="object"){u=A.length;for(b=0;b<u;b+=1)h=A[b],typeof h==="string"&&(o=y(h,p))&&q.push(w(h)+(c?": ":":")+o)}else for(h in p)Object.hasOwnProperty.call(p,h)&&(o=y(h,p))&&q.push(w(h)+(c?": ":":")+o);o=q.length===0?"{}":c?"{\n"+c+q.join(",\n"+c)+"\n"+
f+"}":"{"+q.join(",")+"}";c=f;return o}}if(typeof Date.prototype.toJSON!=="function")Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+q(this.getUTCMonth()+1)+"-"+q(this.getUTCDate())+"T"+q(this.getUTCHours())+":"+q(this.getUTCMinutes())+":"+q(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var D=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
F=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,c,m,d={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},A;if(typeof JSON.stringify!=="function")JSON.stringify=function(d,l,b){var h;m=c="";if(typeof b==="number")for(h=0;h<b;h+=1)m+=" ";else typeof b==="string"&&(m=b);if((A=l)&&typeof l!=="function"&&(typeof l!=="object"||typeof l.length!=="number"))throw Error("JSON.stringify");return y("",
{"":d})};if(typeof JSON.parse!=="function")JSON.parse=function(c,d){function b(c,h){var f,m,p=c[h];if(p&&typeof p==="object")for(f in p)Object.hasOwnProperty.call(p,f)&&(m=b(p,f),m!==void 0?p[f]=m:delete p[f]);return d.call(c,h,p)}var h,c=String(c);D.lastIndex=0;D.test(c)&&(c=c.replace(D,function(b){return"\\u"+("0000"+b.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return h=eval("("+c+")"),typeof d==="function"?b({"":h},""):h;throw new SyntaxError("JSON.parse");}})();
var JSLINT=function(){function q(){}function w(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function y(a,b){for(var e in b)w(b,e)&&(a[e]=b[e])}function D(){j.safe||(j.rhino&&y(G,ob),j.devel&&y(G,pb),j.browser&&y(G,qb),j.node&&y(G,rb),j.windows&&y(G,sb),j.widget&&y(G,tb))}function F(a,b,e){throw{name:"JSLintError",line:b,character:e,message:a+" ("+Math.floor(b/la.length*100)+"% scanned)."};}function c(i,b,e,c,xa,fa){var h,b=b||a;b.id==="(end)"&&(b=g);h=b.line||0;b=b.from||0;e={id:"(error)",
raw:i,evidence:la[h-1]||"",line:h,character:b,a:e,b:c,c:xa,d:fa};e.reason=i.supplant(e);JSLINT.errors.push(e);j.passfail&&F("Stopping. ",h,b);Ja+=1;Ja>=j.maxerr&&F("Too many errors.",h,b);return e}function m(a,b,e,x,g,fa,h){return c(a,{line:b,from:e},x,g,fa,h)}function d(a,b,e,x,g,h){a=c(a,b,e,x,g,h);F("Stopping, unable to continue.",a.line,a.character)}function A(a,b,e,c,g,h,j){return d(a,{line:b,from:e},c,g,h,j)}function t(i,b){j.safe&&s["(global)"]&&typeof G[i]!=="boolean"?c("ADsafe global: "+
i+".",g):i==="hasOwnProperty"&&c("'hasOwnProperty' is a really bad name.");w(s,i)&&!s["(global)"]&&c(s[i]===!0?"'{a}' was used before it was defined.":"'{a}' is already defined.",a,i);s[i]=b;s["(global)"]?(eb[i]=s,w($,i)&&(c("'{a}' was used before it was defined.",a,i),delete $[i])):H[i]=s}function l(a){for(var a=a||0,b=0,e;b<=a;)(e=ya[b])||(e=ya[b]=V.token()),b+=1;return e}function b(i,b){switch(g.id){case "(number)":a.id==="."&&c("A dot following a number can be confused with a decimal point.",
g);break;case "-":(a.id==="-"||a.id==="--")&&c("Confusing minusses.");break;case "+":(a.id==="+"||a.id==="++")&&c("Confusing plusses.")}if(g.type==="(string)"||g.identifier)Ka=g.value;i&&a.id!==i&&(b?a.id==="(end)"?c("Unmatched '{a}'.",b,b.id):c("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",a,i,b.id,b.line,a.value):(a.type!=="(identifier)"||a.value!==i)&&c("Expected '{a}' and instead saw '{b}'.",a,i,a.value));L=g;for(g=a;;){a=ya.shift()||V.token();if(a.id==="(end)"||a.id===
"(error)")break;if(a.type==="special"){var e=void 0,x=void 0,xa=void 0,h=a.value,f=e=void 0;switch(h){case "*/":d("Unbegun comment.");break;case "/*members":case "/*member":h="/*members";aa||(aa={});x=aa;break;case "/*jslint":j.safe&&c("ADsafe restriction.");x=j;xa=ub;break;case "/*global":j.safe&&c("ADsafe restriction."),x=G}e=V.token();a:for(;;){for(;;){if(e.type==="special"&&e.value==="*/")break a;if(e.id!=="(endline)"&&e.id!==",")break;e=V.token()}e.type!=="(string)"&&e.type!=="(identifier)"&&
h!=="/*members"&&d("Bad option.",e);f=V.token();f.id===":"?(f=V.token(),x===aa&&d("Expected '{a}' and instead saw '{b}'.",e,"*/",":"),e.value==="indent"&&h==="/*jslint"?(e=+f.value,(typeof e!=="number"||!isFinite(e)||e<=0||Math.floor(e)!==e)&&d("Expected a small integer and instead saw '{a}'.",f,f.value),x.white=!0,x.indent=e):e.value==="maxerr"&&h==="/*jslint"?(e=+f.value,(typeof e!=="number"||!isFinite(e)||e<=0||Math.floor(e)!==e)&&d("Expected a small integer and instead saw '{a}'.",f,f.value),
x.maxerr=e):e.value==="maxlen"&&h==="/*jslint"?(e=+f.value,(typeof e!=="number"||!isFinite(e)||e<=0||Math.floor(e)!==e)&&d("Expected a small integer and instead saw '{a}'.",f,f.value),x.maxlen=e):f.value==="true"?x[e.value]=!0:f.value==="false"?x[e.value]=!1:d("Bad option value.",f),e=V.token()):(h==="/*jslint"&&d("Missing option value.",e),x[e.value]=!1,e=f)}xa&&D()}else if(a.id!=="(endline)")break}}function h(i,k){var e;a.id==="(end)"&&d("Unexpected early end of program.",g);b();j.safe&&typeof G[g.value]===
"boolean"&&a.id!=="("&&a.id!=="."&&c("ADsafe violation.",g);if(k)Ka="anonymous",s["(verb)"]=g.value;if(k===!0&&g.fud)e=g.fud();else{if(g.nud)e=g.nud();else if(a.type==="(number)"&&g.id===".")return c("A leading decimal point can be confused with a dot: '.{a}'.",g,a.value),b(),g;else d("Expected an identifier and instead saw '{a}'.",g,g.id);for(;i<a.lbp;)b(),g.led?e=g.led(e):d("Expected an operator and instead saw '{a}'.",g,g.id)}return e}function o(b,k){b=b||g;k=k||a;(j.white||v==="styleproperty"||
v==="style")&&b.character!==k.from&&b.line===k.line&&c("Unexpected space after '{a}'.",k,b.value)}function u(b,c){b=b||g;c=c||a;j.white&&!b.comment&&b.line===c.line&&o(b,c)}function f(b,k){j.white&&(b=b||g,k=k||a,b.line===k.line&&b.character===k.from&&c("Missing space after '{a}'.",a,b.value))}function ua(b,k){b=b||g;k=k||a;!j.laxbreak&&b.line!==k.line?c("Bad line breaking before '{a}'.",k,k.id):j.white&&(b=b||g,k=k||a,b.character===k.from&&c("Missing space after '{a}'.",a,b.value))}function p(b){j.white&&
a.id!=="(end)"&&(b=I+(b||0),a.from!==b&&c("Expected '{a}' to have an indentation at {b} instead at {c}.",a,a.value,b,a.from))}function P(b){b=b||g;b.line!==a.line&&c("Line breaking error '{a}'.",b,b.value)}function K(){g.line!==a.line?j.laxbreak||c("Bad line breaking before '{a}'.",g,a.id):g.character!==a.from&&j.white&&c("Unexpected space after '{a}'.",a,g.value);b(",");f(g,a)}function B(a,b){var e=N[a];if(!e||typeof e!=="object")N[a]=e={id:a,lbp:b,value:a};return e}function z(a){return B(a,0)}function S(a,
b){var e=z(a);e.identifier=e.reserved=!0;e.fud=b;return e}function da(a,b){var e=S(a,b);e.block=!0;return e}function Ia(a){var b=a.id.charAt(0);if(b>="a"&&b<="z"||b>="A"&&b<="Z")a.identifier=a.reserved=!0;return a}function R(a,b){var e=B(a,150);Ia(e);e.nud=typeof b==="function"?b:function(){this.right=h(150);this.arity="unary";if(this.id==="++"||this.id==="--")j.plusplus?c("Unexpected use of '{a}'.",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!==
"["&&c("Bad operand.",this);return this};return e}function va(a,b){var e=z(a);e.type=a;e.nud=b;return e}function E(a,b){var e=va(a,b);e.identifier=e.reserved=!0;return e}function U(a){return E(a,function(){if(this.id==="this"||this.id==="arguments"||this.id==="eval")La&&s["(global)"]?c("Strict violation.",this):j.safe&&c("ADsafe violation.",this);return this})}function M(b,c,e,x){b=B(b,e);Ia(b);b.led=function(b){x||(ua(L,g),f(g,a));return typeof c==="function"?c(b,this):(this.left=b,this.right=h(e),
this)};return b}function Z(b,k){var e=B(b,100);e.led=function(b){ua(L,g);f(g,a);var e=h(100);b&&b.id==="NaN"||e&&e.id==="NaN"?c("Use the isNaN function to compare with NaN.",this):k&&k.apply(this,[b,e]);b.id==="!"&&c("Confusing use of '{a}'.",b,"!");e.id==="!"&&c("Confusing use of '{a}'.",b,"!");this.left=b;this.right=e;return this};return e}function wa(a){return a&&(a.type==="(number)"&&+a.value===0||a.type==="(string)"&&a.value===" "||a.type==="true"||a.type==="false"||a.type==="undefined"||a.type===
"null")}function ea(a){B(a,20).exps=!0;return M(a,function(a,b){var i;b.left=a;G[a.value]===!1&&H[a.value]["(global)"]===!0&&c("Read only.",a);if(j.safe){i=a;do typeof G[i.value]==="boolean"&&c("ADsafe violation.",i),i=i.left;while(i)}if(a){if(a.id==="."||a.id==="[")return(!a.left||a.left.value==="arguments")&&c("Bad assignment.",b),b.right=h(19),b;else if(a.identifier&&!a.reserved)return s[a.value]==="exception"&&c("Do not assign to the exception parameter.",a),b.right=h(19),b;a===N["function"]&&
c("Expected an identifier in an assignment and instead saw a function invocation.",g)}d("Bad assignment.",b)},20)}function ga(a,b,e){a=B(a,e);Ia(a);a.led=typeof b==="function"?b:function(a){j.bitwise&&c("Unexpected use of '{a}'.",this,this.id);this.left=a;this.right=h(e);return this};return a}function ha(b){B(b,20).exps=!0;return M(b,function(b,e){j.bitwise&&c("Unexpected use of '{a}'.",e,e.id);f(L,g);f(g,a);if(b){if(b.id==="."||b.id==="["||b.identifier&&!b.reserved)return h(19),e;b===N["function"]&&
c("Expected an identifier in an assignment, and instead saw a function invocation.",g);return e}d("Bad assignment.",e)},20)}function fb(a){a=B(a,150);a.led=function(a){j.plusplus?c("Unexpected use of '{a}'.",this,this.id):(!a.identifier||a.reserved)&&a.id!=="."&&a.id!=="["&&c("Bad operand.",this);this.left=a;return this};return a}function Ma(){if(a.identifier)return b(),j.safe&&Na[g.value]?c("ADsafe violation: '{a}'.",g,g.value):g.reserved&&!j.es5&&c("Expected an identifier and instead saw '{a}' (a reserved word).",
g,g.id),g.value}function ma(){var b=Ma();if(b)return b;g.id==="function"&&a.id==="("?c("Missing name in function statement."):d("Expected an identifier and instead saw '{a}'.",a,a.value)}function za(b){var k=0,e;if(!(a.id!==";"||Oa))for(;;){e=l(k);if(e.reach)break;if(e.id!=="(endline)"){if(e.id==="function"){c("Inner functions should be listed at the top of the outer function.",e);break}c("Unreachable '{a}' after '{b}'.",e,e.value,b);break}k+=1}}function Pa(i){var k=I,e=H,x=a;if(x.id===";")c("Unnecessary semicolon.",
x),b(";");else{if(x.identifier&&!x.reserved&&l().id===":")b(),b(":"),H=Object.create(e),t(x.value,"label"),a.labelled||c("Label '{a}' on {b} statement.",a,x.value,a.value),Qa.test(x.value+":")&&c("Label '{a}' looks like a javascript url.",x,x.value),a.label=x.value,x=a;i||p();i=h(0,!0);x.block||(!i||!i.exps?c("Expected an assignment or function call and instead saw an expression.",g):i.id==="("&&i.left.id==="new"&&c("Do not use 'new' for side effects."),a.id!==";"?m("Missing semicolon.",g.line,g.from+
g.value.length):(o(g,a),b(";"),f(g,a)));I=k;H=e;return i}}function gb(){return a.value==="use strict"?(b(),b(";"),La=!0):!1}function na(i){var k=[],e;i&&!gb()&&j.strict&&c('Missing "use strict" statement.',a);if(j.adsafe)switch(i){case "script":ia||(a.value!=="ADSAFE"||l(0).id!=="."||l(1).value!=="id"&&l(1).value!=="go")&&d("ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",a);a.value==="ADSAFE"&&l(0).id==="."&&l(1).value==="id"&&(ia&&d("ADsafe violation.",a),b("ADSAFE"),b("."),b("id"),b("("),a.value!==
Q&&d("ADsafe violation: id does not match.",a),b("(string)"),b(")"),b(";"),ia=!0);break;case "lib":if(a.value==="ADSAFE")return b("ADSAFE"),b("."),b("lib"),b("("),b("(string)"),K(),i=h(0),i.id!=="function"&&d("The second argument to lib must be a function.",i),(e=(e=i.funct["(params)"])&&e.join(", "))&&e!=="lib"&&d("Expected '{a}' and instead saw '{b}'.",i,"(lib)","("+e+")"),b(")"),b(";"),k;else d("ADsafe lib violation.")}for(;!a.reach&&a.id!=="(end)";)a.id===";"?(c("Unnecessary semicolon."),b(";")):
k.push(Pa());return k}function T(i){var k,e=oa,x=I,h=H,fa;oa=i;H=Object.create(H);f(g,a);fa=a;if(a.id==="{"){b("{");if(a.id!=="}"||g.line!==a.line){for(I+=j.indent;!i&&a.from>I;)I+=j.indent;i||gb();k=na();I-=j.indent;p()}b("}",fa);I=x}else c("Expected '{a}' and instead saw '{b}'.",a,"{",a.value),Oa=!0,k=[Pa()],Oa=!1;s["(verb)"]=null;H=h;oa=e;return k}function hb(){return this}function Aa(a){aa&&typeof aa[a]!=="boolean"&&c("Unexpected /*member '{a}'.",g,a);typeof ba[a]==="number"?ba[a]+=1:ba[a]=1}
function Ra(a){var b=a.value,a=a.line,e=$[b];typeof e==="function"&&(e=!1);e?e[e.length-1]!==a&&e.push(a):(e=[a],$[b]=e)}function Sa(){if(a.identifier)return b(),!0}function Ba(){a.id==="-"&&(b("-"),o(),P());if(a.type==="(number)")return b("(number)"),!0}function Ta(){if(a.type==="(string)")return b(),!0}function W(){var i,k,e;if(a.identifier)if(e=a.value,e==="rgb"||e==="rgba"){b();b("(");for(i=0;i<3;i+=1)i&&b(","),k=a.value,a.type!=="(number)"||k<0?(c("Expected a positive number and instead saw '{a}'",
a,k),b()):(b(),a.id==="%"?(b("%"),k>100&&c("Expected a percentage and instead saw '{a}'",g,k)):k>255&&c("Expected a small number and instead saw '{a}'",g,k));e==="rgba"&&(b(","),k=+a.value,(a.type!=="(number)"||k<0||k>1)&&c("Expected a number between 0 and 1 and instead saw '{a}'",a,k),b(),a.id==="%"&&(c("Unexpected '%'."),b("%")));b(")");return!0}else{if(vb[a.value]===!0)return b(),!0}else if(a.type==="(color)")return b(),!0;return!1}function C(){a.id==="-"&&(b("-"),o(),P());return a.type==="(number)"?
(b(),a.type!=="(string)"&&ib[a.value]===!0?(o(),b()):+g.value!==0&&c("Expected a linear unit and instead saw '{a}'.",a,a.value),!0):!1}function ja(){if(a.identifier)switch(a.value){case "thin":case "medium":case "thick":return b(),!0}else return C()}function pa(){if(a.identifier){if(a.value==="auto")return b(),!0}else return C()}function ca(){var i,k;if(a.identifier&&a.value==="url"){a=V.range("(",")");k=a.value;i=k.charAt(0);if(i==='"'||i==="'")k.slice(-1)!==i?c("Bad url string."):(k=k.slice(1,-1),
k.indexOf(i)>=0&&c("Bad url string."));k||c("Missing url.");b();j.safe&&jb.test(k)&&d("ADsafe URL violation.");qa.push(k);return!0}return!1}function Ua(c){var k=0,e,g,h,j=0;switch(typeof c){case "function":return c();case "string":return a.identifier&&a.value===c?(b(),!0):!1}for(;;){if(k>=c.length)return!1;h=c[k];k+=1;if(h===!0)break;else typeof h==="number"?(e=h,h=c[k],k+=1):e=1;for(g=!1;e>0;)if(Ua(h))g=!0,e-=1;else break;if(g)return!0}j=k;for(e=[];;){h=!1;for(k=j;k<c.length;k+=1)if(!e[k]&&Ua(Ca[c[k]])){h=
g=!0;e[k]=!0;break}if(!h)return g}}function kb(){for(var i;;){if(a.id==="}"||a.id==="(end)"||O&&a.id===O)break;for(;a.id===";";)c("Misplaced ';'."),b(";");for(i=void 0;a.id==="*"||a.id==="#"||a.value==="_";)j.css||c("Unexpected '{a}'.",a,a.value),b();a.id==="-"?(j.css||c("Unexpected '{a}'.",a,a.value),b("-"),a.identifier||c("Expected a non-standard style attribute and instead saw '{a}'.",a,a.value),b(),i=Va):(a.identifier?w(Ca,a.value)?i=Ca[a.value]:(i=Va,j.css||c("Unrecognized style attribute '{a}'.",
a,a.value)):c("Excepted a style attribute, and instead saw '{a}'.",a,a.value),b());b(":");a.identifier&&a.value==="inherit"?b():Ua(i)||(c("Unexpected token '{a}'.",a,a.value),b());a.id==="!"&&(b("!"),o(),a.identifier&&a.value==="important"?b():c("Expected '{a}' and instead saw '{b}'.",a,"important",a.value));a.id==="}"||a.id===O?c("Missing '{a}'.",a,";"):b(";")}}function Wa(){if(a.identifier)w(Xa,a.value)||c("Expected a tagName, and instead saw {a}.",a,a.value),b();else switch(a.id){case ">":case "+":b();
Wa();break;case ":":b(":");switch(a.value){case "active":case "after":case "before":case "checked":case "disabled":case "empty":case "enabled":case "first-child":case "first-letter":case "first-line":case "first-of-type":case "focus":case "hover":case "last-of-type":case "link":case "only-of-type":case "root":case "target":case "visited":b();break;case "lang":b();b("(");a.identifier||c("Expected a lang code, and instead saw :{a}.",a,a.value);b(")");break;case "nth-child":case "nth-last-child":case "nth-last-of-type":case "nth-of-type":b();
b("(");a:if(a.id==="(number)")b(),a.value==="n"&&a.identifier&&(o(),b(),a.id==="+"&&(o(),b("+"),o(),b("(number)")));else{switch(a.value){case "odd":case "even":if(a.identifier){b();break a}}c("Unexpected token '{a}'.",a,a.value)}b(")");break;case "not":b();b("(");a.id===":"&&l(0).value==="not"&&c("Nested not.");Wa();b(")");break;default:c("Expected a pseudo, and instead saw :{a}.",a,a.value)}break;case "#":b("#");a.identifier||c("Expected an id, and instead saw #{a}.",a,a.value);b();break;case "*":b("*");
break;case ".":b(".");a.identifier||c("Expected a class, and instead saw #.{a}.",a,a.value);b();break;case "[":b("[");a.identifier||c("Expected an attribute, and instead saw [{a}].",a,a.value);b();if(a.id==="="||a.value==="~="||a.value==="$="||a.value==="|="||a.id==="*="||a.id==="^=")b(),a.type!=="(string)"&&c("Expected a string, and instead saw {a}.",a,a.value),b();b("]");break;default:d("Expected a CSS selector, and instead saw {a}.",a,a.value)}}function lb(){for(var i;a.id==="@";)if(i=l(),i.identifier&&
i.value==="import")b("@"),b(),ca()||(c("Expected '{a}' and instead saw '{b}'.",a,"url",a.value),b()),b(";");else break;for(;a.id!=="</"&&a.id!=="(end)";){a:{i=void 0;if(a.id==="{")c("Expected a style pattern, and instead saw '{a}'.",a,a.id);else if(a.id==="@"){b("@");i=a.value;if(a.identifier&&wb[i]===!0){b();break a}c("Expected an at-rule, and instead saw @{a}.",a,i)}for(;;){Wa();if(a.id==="</"||a.id==="{"||a.id==="(end)")break a;a.id===","&&K()}}v="styleproperty";a.id===";"?b(";"):(b("{"),kb(),
v="style",b("}"))}}function Ya(){var c=Ma(!0);if(!c)a.id==="(string)"?(c=a.value,b()):a.id==="(number)"&&(c=a.value.toString(),b());return c}function Da(c){var k,e=H;H=Object.create(e);k=s={"(name)":c||'"'+Ka+'"',"(line)":a.line,"(context)":s,"(breakage)":0,"(loopage)":0,"(scope)":H};g.funct=s;ra.push(s);c&&t(c,"function");var c=s,h;a:{var j,f=a,d=[];b("(");u();if(a.id===")")b(")"),u(L,g),h=void 0;else for(;;)if(j=ma(),d.push(j),t(j,"parameter"),a.id===",")K();else{b(")",f);u(L,g);h=d;break a}}c["(params)"]=
h;T(!1);H=e;s["(last)"]=g.line;s=s["(context)"];return k}function Za(i){var k,e;s["(onevar)"]&&j.onevar?c("Too many var statements."):s["(global)"]||(s["(onevar)"]=!0);for(this.first=[];;){f(g,a);k=ma();s["(global)"]&&G[k]===!1&&c("Redefinition of '{a}'.",g,k);t(k,"unused");if(i)break;e=g;this.first.push(g);if(a.id==="=")f(g,a),b("="),f(g,a),a.id==="undefined"&&c("It is not necessary to initialize '{a}' to 'undefined'.",g,k),l(0).id==="="&&a.identifier&&d("Variable {a} was not declared correctly.",
a,a.value),k=h(0),e.first=k;if(a.id!==",")break;K()}return this}function $a(){function i(){var e={},i=a;b("{");if(a.id!=="}")for(;;){if(a.id==="(end)")d("Missing '}' to match '{' from line {a}.",a,i.line);else if(a.id==="}"){c("Unexpected comma.",g);break}else a.id===","?d("Unexpected comma.",a):a.id!=="(string)"&&c("Expected a string and instead saw {a}.",a,a.value);e[a.value]===!0?c("Duplicate key '{a}'.",a,a.value):a.value==="__proto__"?c("Stupid key '{a}'.",a,a.value):e[a.value]=!0;b();b(":");
$a();if(a.id!==",")break;b(",")}b("}")}function k(){var e=a;b("[");if(a.id!=="]")for(;;){if(a.id==="(end)")d("Missing ']' to match '[' from line {a}.",a,e.line);else if(a.id==="]"){c("Unexpected comma.",g);break}else a.id===","&&d("Unexpected comma.",a);$a();if(a.id!==",")break;b(",")}b("]")}switch(a.id){case "{":i();break;case "[":k();break;case "true":case "false":case "null":case "(number)":case "(string)":b();break;case "-":b("-");g.character!==a.from&&c("Unexpected space after '-'.",g);o(g,a);
b("(number)");break;default:d("Expected a JSON value.",a)}}function mb(a){var b=[],c;for(c in a)w(a,c)&&b.push(c);return b}var Q,ia,sa,Ka,Ea,wb={media:!0,"font-face":!0,page:!0},xb={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},Na={arguments:!0,callee:!0,caller:!0,constructor:!0,eval:!0,prototype:!0,stack:!0,unwatch:!0,valueOf:!0,watch:!0},ub={adsafe:!0,bitwise:!0,browser:!0,cap:!0,css:!0,debug:!0,devel:!0,eqeqeq:!0,es5:!0,evil:!0,forin:!0,fragment:!0,
immed:!0,laxbreak:!0,newcap:!0,node:!0,nomen:!0,on:!0,onevar:!0,passfail:!0,plusplus:!0,regexp:!0,rhino:!0,undef:!0,safe:!0,windows:!0,strict:!0,sub:!0,white:!0,widget:!0},qb={addEventListener:!1,blur:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,defaultStatus:!1,document:!1,event:!1,focus:!1,frames:!1,getComputedStyle:!1,history:!1,Image:!1,length:!1,location:!1,moveBy:!1,moveTo:!1,name:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,
opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,setInterval:!1,setTimeout:!1,status:!1,top:!1,window:!1,XMLHttpRequest:!1},Ca,Va,vb={aliceblue:!0,antiquewhite:!0,aqua:!0,aquamarine:!0,azure:!0,beige:!0,bisque:!0,black:!0,blanchedalmond:!0,blue:!0,blueviolet:!0,brown:!0,burlywood:!0,cadetblue:!0,chartreuse:!0,chocolate:!0,coral:!0,cornflowerblue:!0,cornsilk:!0,crimson:!0,cyan:!0,darkblue:!0,darkcyan:!0,darkgoldenrod:!0,
darkgray:!0,darkgreen:!0,darkkhaki:!0,darkmagenta:!0,darkolivegreen:!0,darkorange:!0,darkorchid:!0,darkred:!0,darksalmon:!0,darkseagreen:!0,darkslateblue:!0,darkslategray:!0,darkturquoise:!0,darkviolet:!0,deeppink:!0,deepskyblue:!0,dimgray:!0,dodgerblue:!0,firebrick:!0,floralwhite:!0,forestgreen:!0,fuchsia:!0,gainsboro:!0,ghostwhite:!0,gold:!0,goldenrod:!0,gray:!0,green:!0,greenyellow:!0,honeydew:!0,hotpink:!0,indianred:!0,indigo:!0,ivory:!0,khaki:!0,lavender:!0,lavenderblush:!0,lawngreen:!0,lemonchiffon:!0,
lightblue:!0,lightcoral:!0,lightcyan:!0,lightgoldenrodyellow:!0,lightgreen:!0,lightpink:!0,lightsalmon:!0,lightseagreen:!0,lightskyblue:!0,lightslategray:!0,lightsteelblue:!0,lightyellow:!0,lime:!0,limegreen:!0,linen:!0,magenta:!0,maroon:!0,mediumaquamarine:!0,mediumblue:!0,mediumorchid:!0,mediumpurple:!0,mediumseagreen:!0,mediumslateblue:!0,mediumspringgreen:!0,mediumturquoise:!0,mediumvioletred:!0,midnightblue:!0,mintcream:!0,mistyrose:!0,moccasin:!0,navajowhite:!0,navy:!0,oldlace:!0,olive:!0,olivedrab:!0,
orange:!0,orangered:!0,orchid:!0,palegoldenrod:!0,palegreen:!0,paleturquoise:!0,palevioletred:!0,papayawhip:!0,peachpuff:!0,peru:!0,pink:!0,plum:!0,powderblue:!0,purple:!0,red:!0,rosybrown:!0,royalblue:!0,saddlebrown:!0,salmon:!0,sandybrown:!0,seagreen:!0,seashell:!0,sienna:!0,silver:!0,skyblue:!0,slateblue:!0,slategray:!0,snow:!0,springgreen:!0,steelblue:!0,tan:!0,teal:!0,thistle:!0,tomato:!0,turquoise:!0,violet:!0,wheat:!0,white:!0,whitesmoke:!0,yellow:!0,yellowgreen:!0},X,ab,ib={"%":!0,cm:!0,em:!0,
ex:!0,"in":!0,mm:!0,pc:!0,pt:!0,px:!0},Fa,pb={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},yb={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"/":"\\/","\\":"\\\\"},s,ta="closure,exception,global,label,outer,unused,var".split(","),ra,eb,Xa={a:{},abbr:{},acronym:{},address:{},applet:{},area:{empty:!0,parent:" map "},article:{},aside:{},audio:{},b:{},base:{empty:!0,parent:" head "},bdo:{},big:{},blockquote:{},body:{parent:" html noframes "},br:{empty:!0},button:{},
canvas:{parent:" body p div th td "},caption:{parent:" table "},center:{},cite:{},code:{},col:{empty:!0,parent:" table colgroup "},colgroup:{parent:" table "},command:{parent:" menu "},datalist:{},dd:{parent:" dl "},del:{},details:{},dialog:{},dfn:{},dir:{},div:{},dl:{},dt:{parent:" dl "},em:{},embed:{},fieldset:{},figure:{},font:{},footer:{},form:{},frame:{empty:!0,parent:" frameset "},frameset:{parent:" html frameset "},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{parent:" html "},header:{},hgroup:{},
html:{parent:"*"},hr:{empty:!0},i:{},iframe:{},img:{empty:!0},input:{empty:!0},ins:{},kbd:{},keygen:{},label:{},legend:{parent:" details fieldset figure "},li:{parent:" dir menu ol ul "},link:{empty:!0,parent:" head "},map:{},mark:{},menu:{},meta:{empty:!0,parent:" head noframes noscript "},meter:{},nav:{},noframes:{parent:" html body "},noscript:{parent:" body head noframes "},object:{},ol:{},optgroup:{parent:" select "},option:{parent:" optgroup select "},output:{},p:{},param:{empty:!0,parent:" applet object "},
pre:{},progress:{},q:{},rp:{},rt:{},ruby:{},samp:{},script:{empty:!0,parent:" body div frame head iframe p pre span "},section:{},select:{},small:{},span:{},source:{},strong:{},style:{parent:" head ",empty:!0},sub:{},sup:{},table:{},tbody:{parent:" table "},td:{parent:" tr "},textarea:{},tfoot:{parent:" table "},th:{parent:" tr "},thead:{parent:" table "},time:{},title:{parent:" head "},tr:{parent:" table tbody thead tfoot "},tt:{},u:{},ul:{},"var":{},video:{}},Ga,$,oa,I,ka,la,ya,ba,aa,rb={Buffer:!1,
clearInterval:!1,clearTimeout:!1,console:!1,exports:!1,global:!1,module:!1,process:!1,require:!1,setInterval:!1,setTimeout:!1,__filename:!1,__dirname:!1},a,Oa,j,G,bb,L,ob={defineClass:!1,deserialize:!1,gc:!1,help:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},H,sb={ActiveXObject:!1,CScript:!1,Debug:!1,Enumerator:!1,System:!1,VBArray:!1,WScript:!1},Ha,J,zb={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,
encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},Ab={E:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,PI:!0,SQRT1_2:!0,SQRT2:!0,MAX_VALUE:!0,MIN_VALUE:!0,NEGATIVE_INFINITY:!0,POSITIVE_INFINITY:!0},La,N={},cb,g,qa,Ja,tb={alert:!0,animator:!0,appleScript:!0,beep:!0,bytesToUIString:!0,Canvas:!0,
chooseColor:!0,chooseFile:!0,chooseFolder:!0,closeWidget:!0,COM:!0,convertPathToHFS:!0,convertPathToPlatform:!0,CustomAnimation:!0,escape:!0,FadeAnimation:!0,filesystem:!0,Flash:!0,focusWidget:!0,form:!0,FormField:!0,Frame:!0,HotKey:!0,Image:!0,include:!0,isApplicationRunning:!0,iTunes:!0,konfabulatorVersion:!0,log:!0,md5:!0,MenuItem:!0,MoveAnimation:!0,openURL:!0,play:!0,Point:!0,popupMenu:!0,preferenceGroups:!0,preferences:!0,print:!0,prompt:!0,random:!0,Rectangle:!0,reloadWidget:!0,ResizeAnimation:!0,
resolvePath:!0,resumeUpdates:!0,RotateAnimation:!0,runCommand:!0,runCommandInBg:!0,saveAs:!0,savePreferences:!0,screen:!0,ScrollBar:!0,showWidgetPreferences:!0,sleep:!0,speak:!0,Style:!0,suppressUpdates:!0,system:!0,tellWidget:!0,Text:!0,TextArea:!0,Timer:!0,unescape:!0,updateNow:!0,URL:!0,Web:!0,widget:!0,Window:!0,XMLDOM:!0,XMLHttpRequest:!0,yahooCheckLogin:!0,yahooLogin:!0,yahooLogout:!0},v,O,db=/@cc|<\/?|script|\]*s\]|<\s*!|&lt/i,Bb=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,
Cb=/^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jslint|members?|global)?|=|\/)?|\*[\/=]?|\+[+=]?|-[\-=]?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/;X=/^\s*(['"=>\/&#]|<(?:\/|\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\-]*|[0-9]+|--)/;var Db=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,Eb=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
Fb=/[>&]|<[\/!]?|--/,Gb=/\*\/|\/\*/,nb=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,Qa=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,jb=/&|\+|\u00AD|\.\.|\/\*|%[^;]|base64|url|expression|data|mailto/i,Hb=/[^a-zA-Z0-9+\-_\/ ]/,Ib=/[\[\]\/\\"'*<>.&:(){}+=#]/,Jb={outer:X,html:X,style:/^\s*([{:#%.=,>+\[\]@()"';]|\*=?|\$=|\|=|\^=|~=|[a-zA-Z_][a-zA-Z0-9_\-]*|[0-9]+|<\/|\/\*)/,styleproperty:/^\s*([@#!"'};:\-%.=,+\[\]()*_]|[a-zA-Z][a-zA-Z0-9._\-]*|\/\*?|\d+(?:\.\d+)?|<\/)/};if(typeof Object.create!==
"function")Object.create=function(a){q.prototype=a;return new q};String.prototype.entityify=function(){return this.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.isAlpha=function(){return this>="a"&&this<="z\uffff"||this>="A"&&this<="Z\uffff"};String.prototype.isDigit=function(){return this>="0"&&this<="9"};String.prototype.supplant=function(a){return this.replace(/\{([^{}]*)\}/g,function(b,c){var g=a[c];return typeof g==="string"||typeof g==="number"?g:b})};String.prototype.name=
function(){return nb.test(this)?this:Db.test(this)?'"'+this.replace(Eb,function(a){var b=yb[a];return b?b:"\\u"+("0000"+a.charCodeAt().toString(16)).slice(-4)})+'"':'"'+this+'"'};var V=function(){function a(){var b;if(f>=la.length)return!1;c=1;d=la[f];f+=1;b=d.search(/ \t/);b>=0&&m("Mixed spaces and tabs.",f,b+1);d=d.replace(/\t/g,cb);b=d.search(Bb);b>=0&&m("Unsafe character.",f,b);j.maxlen&&j.maxlen<d.length&&m("Line too long.",f,d.length);return!0}function b(a,i){var k,d;d=a==="(color)"?{type:a}:
a==="(punctuator)"||a==="(identifier)"&&w(N,i)?N[i]||N["(error)"]:N[a];d=Object.create(d);(a==="(string)"||a==="(range)")&&Qa.test(i)&&m("Script URL.",f,h);if(a==="(identifier)")d.identifier=!0,i==="__iterator__"||i==="__proto__"?A("Reserved name '{a}'.",f,h,i):j.nomen&&(i.charAt(0)==="_"||i.charAt(i.length-1)==="_")&&m("Unexpected {a} in '{b}'.",f,h,"dangling '_'",i);d.value=i;d.line=f;d.character=c;d.from=h;k=d.id;k!=="(endline)"&&(bb=k&&("(,=:[!&|?{};".indexOf(k.charAt(k.length-1))>=0||k==="return"));
return d}var c,h,f,d;return{init:function(b){la=typeof b==="string"?b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n"):b;f=0;a();h=1},range:function(a,i){var g,j="";h=c;for(d.charAt(0)!==a&&A("Expected '{a}' and instead saw '{b}'.",f,c,a,d.charAt(0));;){d=d.slice(1);c+=1;g=d.charAt(0);switch(g){case "":A("Missing '{a}'.",f,c,g);break;case i:return d=d.slice(1),c+=1,b("(range)",j);case O:case "\\":m("Unexpected '{a}'.",f,c,g)}j+=g}},token:function(){function o(a){if(a=a.exec(d))return r=a[0].length,
a=a[1],n=a.charAt(0),d=d.substr(r),h=c+r-a.length,c+=r,a}function u(g){function o(a){var b=parseInt(d.substr(l+1,a),16);l+=a;b>=32&&b<=126&&b!==34&&b!==92&&b!==39&&m("Unnecessary escapement.",f,c);c+=a;n=String.fromCharCode(b)}var n,l,r="";ka&&g!=='"'&&m("Strings must use doublequote.",f,c);if(O===g||v==="scriptstring"&&!O)return b("(punctuator)",g);for(l=0;;){for(;l>=d.length;)l=0,(v!=="html"||!a())&&A("Unclosed string.",f,h);n=d.charAt(l);if(n===g)return c+=1,d=d.substr(l+1),b("(string)",r,g);if(n<
" "){if(n==="\n"||n==="\r")break;m("Control character in string: {a}.",f,c+l,d.slice(0,l))}else if(n===O)m("Bad HTML string",f,c+l);else if(n==="<")j.safe&&v==="html"?m("ADsafe string violation.",f,c+l):d.charAt(l+1)==="/"&&(v||j.safe)?m("Expected '<\\/' and instead saw '</'.",f,c):d.charAt(l+1)==="!"&&(v||j.safe)&&m("Unexpected '<!' in a string.",f,c);else if(n==="\\")if(v==="html")j.safe&&m("ADsafe string violation.",f,c+l);else if(v==="styleproperty")l+=1,c+=1,n=d.charAt(l),n!==g&&m("Escapement in style string.",
f,c+l);else switch(l+=1,c+=1,n=d.charAt(l),n){case O:m("Bad HTML string",f,c+l);break;case "\\":case "'":case '"':case "/":break;case "b":n="\u0008";break;case "f":n="\u000c";break;case "n":n="\n";break;case "r":n="\r";break;case "t":n="\t";break;case "u":o(4);break;case "v":n="\u000b";break;case "x":ka&&m("Avoid \\x-.",f,c);o(2);break;default:m("Bad escapement.",f,c)}r+=n;c+=1;l+=1}}for(var s,n,l,p,r,t;;){if(!d)return b(a()?"(endline)":"(end)","");for(;v==="outer";)if(p=d.search(Fb),p===0)break;
else if(p>0){c+=1;d=d.slice(p);break}else if(!a())return b("(end)","");if(l=o(Jb[v]||Cb)){if(n.isAlpha()||n==="_"||n==="$")return b("(identifier)",l);if(n.isDigit())return v!=="style"&&!isFinite(Number(l))&&m("Bad number '{a}'.",f,c,l),v!=="style"&&v!=="styleproperty"&&d.substr(0,1).isAlpha()&&m("Missing space after '{a}'.",f,c,l),n==="0"&&(p=l.substr(1,1),p.isDigit()?g.id!=="."&&v!=="styleproperty"&&m("Don't use extra leading zeros '{a}'.",f,c,l):ka&&(p==="x"||p==="X")&&m("Avoid 0x-. '{a}'.",f,c,
l)),l.substr(l.length-1)==="."&&m("A trailing decimal point can be confused with a dot '{a}'.",f,c,l),b("(number)",l);switch(l){case '"':case "'":return u(l);case "//":Ha||v&&v!=="script"?m("Unexpected comment.",f,c):v==="script"&&/<\s*\//i.test(d)?m("Unexpected </ in comment.",f,c):(j.safe||v==="script")&&db.test(d)&&m("Dangerous comment.",f,c);d="";g.comment=!0;break;case "/*":(Ha||v&&v!=="script"&&v!=="style"&&v!=="styleproperty")&&m("Unexpected comment.",f,c);for(j.safe&&db.test(d)&&m("ADsafe comment violation.",
f,c);;){p=d.search(Gb);if(p>=0)break;a()?j.safe&&db.test(d)&&m("ADsafe comment violation.",f,c):A("Unclosed comment.",f,c)}c+=p+2;d.substr(p,1)==="/"&&A("Nested comment.",f,c);d=d.substr(p+2);g.comment=!0;break;case "/*members":case "/*member":case "/*jslint":case "/*global":case "*/":return{value:l,type:"special",line:f,character:c,from:h};case "":break;case "/":g.id==="/="&&A("A regular expression literal can be confused with '/='.",f,h);if(bb){for(r=l=p=0;;){s=!0;n=d.charAt(r);r+=1;switch(n){case "":A("Unclosed regular expression.",
f,h);return;case "/":p>0&&m("Unescaped '{a}'.",f,h+r,"/");n=d.substr(0,r-1);for(t={g:!0,i:!0,m:!0};t[d.charAt(r)]===!0;)t[d.charAt(r)]=!1,r+=1;c+=r;d=d.substr(r);t=d.charAt(0);(t==="/"||t==="*")&&A("Confusing regular expression.",f,h);return b("(regexp)",n);case "\\":n=d.charAt(r);n<" "?m("Unexpected control character in regular expression.",f,h+r):n==="<"&&m("Unexpected escaped character '{a}' in regular expression.",f,h+r,n);r+=1;break;case "(":p+=1;s=!1;if(d.charAt(r)==="?")switch(r+=1,d.charAt(r)){case ":":case "=":case "!":r+=
1;break;default:m("Expected '{a}' and instead saw '{b}'.",f,h+r,":",d.charAt(r))}else l+=1;break;case "|":s=!1;break;case ")":p===0?m("Unescaped '{a}'.",f,h+r,")"):p-=1;break;case " ":for(t=1;d.charAt(r)===" ";)r+=1,t+=1;t>1&&m("Spaces are hard to count. Use {{a}}.",f,h+r,t);break;case "[":n=d.charAt(r);n==="^"&&(r+=1,j.regexp&&m("Insecure '{a}'.",f,h+r,n));t=!1;n==="]"&&(m("Empty class.",f,h+r-1),t=!0);a:do switch(n=d.charAt(r),r+=1,n){case "[":case "^":m("Unescaped '{a}'.",f,h+r,n);t=!0;break;case "-":t?
t=!1:(m("Unescaped '{a}'.",f,h+r,"-"),t=!0);break;case "]":t||m("Unescaped '{a}'.",f,h+r-1,"-");break a;case "\\":n=d.charAt(r);n<" "?m("Unexpected control character in regular expression.",f,h+r):n==="<"&&m("Unexpected escaped character '{a}' in regular expression.",f,h+r,n);r+=1;t=!0;break;case "/":m("Unescaped '{a}'.",f,h+r-1,"/");t=!0;break;case "<":v==="script"&&(n=d.charAt(r),(n==="!"||n==="/")&&m("HTML confusion in regular expression '<{a}'.",f,h+r,n));t=!0;break;default:t=!0}while(n);break;
case ".":j.regexp&&m("Insecure '{a}'.",f,h+r,n);break;case "]":case "?":case "{":case "}":case "+":case "*":m("Unescaped '{a}'.",f,h+r,n);break;case "<":v==="script"&&(n=d.charAt(r),(n==="!"||n==="/")&&m("HTML confusion in regular expression '<{a}'.",f,h+r,n))}if(s)switch(d.charAt(r)){case "?":case "+":case "*":r+=1;d.charAt(r)==="?"&&(r+=1);break;case "{":r+=1;n=d.charAt(r);(n<"0"||n>"9")&&m("Expected a number and instead saw '{a}'.",f,h+r,n);r+=1;for(t=+n;;){n=d.charAt(r);if(n<"0"||n>"9")break;
r+=1;t=+n+t*10}s=t;if(n===","&&(r+=1,s=Infinity,n=d.charAt(r),n>="0"&&n<="9")){r+=1;for(s=+n;;){n=d.charAt(r);if(n<"0"||n>"9")break;r+=1;s=+n+s*10}}d.charAt(r)!=="}"?m("Expected '{a}' and instead saw '{b}'.",f,h+r,"}",n):r+=1;d.charAt(r)==="?"&&(r+=1);t>s&&m("'{a}' should not be greater than '{b}'.",f,h+r,t,s)}}n=d.substr(0,r-1);c+=r;d=d.substr(r);return b("(regexp)",n)}return b("(punctuator)",l);case "<\!--":r=f;for(n=c;;){p=d.indexOf("--");if(p>=0)break;p=d.indexOf("<!");p>=0&&A("Nested HTML comment.",
f,c+p);a()||A("Unclosed HTML comment.",r,n)}r=d.indexOf("<!");r>=0&&r<p&&A("Nested HTML comment.",f,c+r);c+=p;d[p+2]!==">"&&A("Expected --\>.",f,c);c+=3;d=d.slice(p+3);break;case "#":if(v==="html"||v==="styleproperty"){for(;;){n=d.charAt(0);if((n<"0"||n>"9")&&(n<"a"||n>"f")&&(n<"A"||n>"F"))break;c+=1;d=d.substr(1);l+=n}l.length!==4&&l.length!==7&&m("Bad hex color '{a}'.",f,h+r,l);return b("(color)",l)}return b("(punctuator)",l);default:if(v==="outer"&&n==="&"){c+=1;for(d=d.substr(1);;){n=d.charAt(0);
c+=1;d=d.substr(1);if(n===";")break;n>="0"&&n<="9"||n>="a"&&n<="z"||n==="#"||A("Bad entity",f,h+r,c)}break}return b("(punctuator)",l)}}else{for(n=l="";d&&d<"!";)d=d.substr(1);if(d)if(v==="html")return l=d.charAt(0),d=d.substr(1),b("(error)",l);else A("Unexpected '{a}'.",f,c,d.substr(0,1))}}}}}();Va=[ca,function(){for(;;)if(a.identifier)switch(a.value.toLowerCase()){case "url":ca();break;case "expression":c("Unexpected expression '{a}'.",a,a.value);b();break;default:b()}else{if(a.id===";"||a.id===
"!"||a.id==="(end)"||a.id==="}")return!0;b()}}];X="none,hidden,dotted,dashed,solid,double,ridge,inset,outset".split(",");ab=["auto","always","avoid","left","right"];Fa=["auto","hidden","scroll","visible"];Ca={background:[!0,"background-attachment","background-color","background-image","background-position","background-repeat"],"background-attachment":["scroll","fixed"],"background-color":["transparent",W],"background-image":["none",ca],"background-position":[2,[C,"top","bottom","left","right","center"]],
"background-repeat":["repeat","repeat-x","repeat-y","no-repeat"],border:[!0,"border-color","border-style","border-width"],"border-bottom":[!0,"border-bottom-color","border-bottom-style","border-bottom-width"],"border-bottom-color":W,"border-bottom-style":X,"border-bottom-width":ja,"border-collapse":["collapse","separate"],"border-color":["transparent",4,W],"border-left":[!0,"border-left-color","border-left-style","border-left-width"],"border-left-color":W,"border-left-style":X,"border-left-width":ja,
"border-right":[!0,"border-right-color","border-right-style","border-right-width"],"border-right-color":W,"border-right-style":X,"border-right-width":ja,"border-spacing":[2,C],"border-style":[4,X],"border-top":[!0,"border-top-color","border-top-style","border-top-width"],"border-top-color":W,"border-top-style":X,"border-top-width":ja,"border-width":[4,ja],bottom:[C,"auto"],"caption-side":["bottom","left","right","top"],clear:["both","left","none","right"],clip:[function(){var i;if(a.identifier&&a.value===
"rect"){b();b("(");for(i=0;i<4;i+=1)if(!C()){c("Expected a number and instead saw '{a}'.",a,a.value);break}b(")");return!0}return!1},"auto"],color:W,content:["open-quote","close-quote","no-open-quote","no-close-quote",Ta,ca,function(){if(a.identifier&&a.value==="counter")return b(),b("("),b(),a.id===","&&(K(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),b(")"),!0;return a.identifier&&a.value==="counters"?(b(),b("("),a.identifier||c("Expected a name and instead saw '{a}'.",
a,a.value),b(),a.id===","&&(K(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),a.id===","&&(K(),a.type!=="(string)"&&c("Expected a string and instead saw '{a}'.",a,a.value),b()),b(")"),!0):!1},function(){return a.identifier&&a.value==="attr"?(b(),b("("),a.identifier||c("Expected a name and instead saw '{a}'.",a,a.value),b(),b(")"),!0):!1}],"counter-increment":[Sa,"none"],"counter-reset":[Sa,"none"],cursor:[ca,"auto","crosshair","default","e-resize","help","move",
"n-resize","ne-resize","nw-resize","pointer","s-resize","se-resize","sw-resize","w-resize","text","wait"],direction:["ltr","rtl"],display:"block,compact,inline,inline-block,inline-table,list-item,marker,none,run-in,table,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),"empty-cells":["show","hide"],"float":["left","none","right"],font:["caption","icon","menu","message-box","small-caption","status-bar",!0,"font-size",
"font-style","font-weight","font-family"],"font-family":function(){for(;a.id!==";";){!Sa()&&!Ta()&&c("Expected a name and instead saw '{a}'.",a,a.value);if(a.id!==",")return!0;K()}},"font-size":["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller",C],"font-size-adjust":["none",Ba],"font-stretch":"normal,wider,narrower,ultra-condensed,extra-condensed,condensed,semi-condensed,semi-expanded,expanded,extra-expanded".split(","),"font-style":["normal","italic","oblique"],
"font-variant":["normal","small-caps"],"font-weight":["normal","bold","bolder","lighter",Ba],height:[C,"auto"],left:[C,"auto"],"letter-spacing":["normal",C],"line-height":["normal",function(){a.id==="-"&&(b("-"),o());return a.type==="(number)"?(b(),a.type!=="(string)"&&ib[a.value]===!0&&(o(),b()),!0):!1}],"list-style":[!0,"list-style-image","list-style-position","list-style-type"],"list-style-image":["none",ca],"list-style-position":["inside","outside"],"list-style-type":"circle,disc,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,katakana,hiragana-iroha,katakana-oroha,none".split(","),
margin:[4,pa],"margin-bottom":pa,"margin-left":pa,"margin-right":pa,"margin-top":pa,"marker-offset":[C,"auto"],"max-height":[C,"none"],"max-width":[C,"none"],"min-height":C,"min-width":C,opacity:Ba,outline:[!0,"outline-color","outline-style","outline-width"],"outline-color":["invert",W],"outline-style":"dashed,dotted,double,groove,inset,none,outset,ridge,solid".split(","),"outline-width":ja,overflow:Fa,"overflow-x":Fa,"overflow-y":Fa,padding:[4,C],"padding-bottom":C,"padding-left":C,"padding-right":C,
"padding-top":C,"page-break-after":ab,"page-break-before":ab,position:["absolute","fixed","relative","static"],quotes:[8,Ta],right:[C,"auto"],"table-layout":["auto","fixed"],"text-align":["center","justify","left","right"],"text-decoration":["none","underline","overline","line-through","blink"],"text-indent":C,"text-shadow":["none",4,[W,C]],"text-transform":["capitalize","uppercase","lowercase","none"],top:[C,"auto"],"unicode-bidi":["normal","embed","bidi-override"],"vertical-align":["baseline","bottom",
"sub","super","top","text-top","middle","text-bottom",C],visibility:["visible","hidden","collapse"],"white-space":"normal,nowrap,pre,pre-line,pre-wrap,inherit".split(","),width:[C,"auto"],"word-spacing":["normal",C],"word-wrap":["break-word","normal"],"z-index":["auto",Ba]};va("(number)",hb);va("(string)",hb);N["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var a=this.value,b=H[a],e;typeof b==="function"?b=void 0:typeof b==="boolean"&&(e=s,s=ra[0],t(a,"var"),b=s,s=e);if(s===
b)switch(s[a]){case "unused":s[a]="var";break;case "label":c("'{a}' is a statement label.",g,a)}else if(s["(global)"])j.undef&&G[a]!=="boolean"&&c("'{a}' is not defined.",g,a),Ra(g);else switch(s[a]){case "closure":case "function":case "var":case "unused":c("'{a}' used out of scope.",g,a);break;case "label":c("'{a}' is a statement label.",g,a);break;case "outer":case "global":break;default:if(b===!0)s[a]=!0;else if(b===null)c("'{a}' is not allowed.",g,a),Ra(g);else if(typeof b!=="object")j.undef?
c("'{a}' is not defined.",g,a):s[a]=!0,Ra(g);else switch(b[a]){case "function":case "var":case "unused":b[a]="closure";s[a]=b["(global)"]?"global":"outer";break;case "closure":case "parameter":s[a]=b["(global)"]?"global":"outer";break;case "label":c("'{a}' is a statement label.",g,a)}}return this},led:function(){d("Expected an operator and instead saw '{a}'.",a,a.value)}};va("(regexp)",function(){return this});z("(endline)");z("(begin)");z("(end)").reach=!0;z("</").reach=!0;z("<!");z("<\!--");z("--\>");
z("(error)").reach=!0;z("}").reach=!0;z(")");z("]");z('"').reach=!0;z("'").reach=!0;z(";");z(":").reach=!0;z(",");z("#");z("@");E("else");E("case").reach=!0;E("catch");E("default").reach=!0;E("finally");U("arguments");U("eval");U("false");U("Infinity");U("NaN");U("null");U("this");U("true");U("undefined");ea("=","assign",20);ea("+=","assignadd",20);ea("-=","assignsub",20);ea("*=","assignmult",20);ea("/=","assigndiv",20).nud=function(){d("A regular expression literal can be confused with '/='.")};
ea("%=","assignmod",20);ha("&=","assignbitand",20);ha("|=","assignbitor",20);ha("^=","assignbitxor",20);ha("<<=","assignshiftleft",20);ha(">>=","assignshiftright",20);ha(">>>=","assignshiftrightunsigned",20);M("?",function(a,c){c.left=a;c.right=h(10);b(":");c["else"]=h(10);return c},30);M("||","or",40);M("&&","and",50);ga("|","bitor",70);ga("^","bitxor",80);ga("&","bitand",90);Z("==",function(a,b){j.eqeqeq?c("Expected '{a}' and instead saw '{b}'.",this,"===","=="):wa(a)?c("Use '{a}' to compare with '{b}'.",
this,"===",a.value):wa(b)&&c("Use '{a}' to compare with '{b}'.",this,"===",b.value);return this});Z("===");Z("!=",function(a,b){j.eqeqeq?c("Expected '{a}' and instead saw '{b}'.",this,"!==","!="):wa(a)?c("Use '{a}' to compare with '{b}'.",this,"!==",a.value):wa(b)&&c("Use '{a}' to compare with '{b}'.",this,"!==",b.value);return this});Z("!==");Z("<");Z(">");Z("<=");Z(">=");ga("<<","shiftleft",120);ga(">>","shiftright",120);ga(">>>","shiftrightunsigned",120);M("in","in",120);M("instanceof","instanceof",
120);M("+",function(a,b){var e=h(130);if(a&&e&&a.id==="(string)"&&e.id==="(string)")return a.value+=e.value,a.character=e.character,Qa.test(a.value)&&c("JavaScript URL.",a),a;b.left=a;b.right=e;return b},130);R("+","num");M("-","sub",130);R("-","neg");M("*","mult",140);M("/","div",140);M("%","mod",140);fb("++","postinc");R("++","preinc");N["++"].exps=!0;fb("--","postdec");R("--","predec");N["--"].exps=!0;R("delete",function(){var b=h(0);(!b||b.id!=="."&&b.id!=="[")&&c("Expected '{a}' and instead saw '{b}'.",
a,".",a.value);this.first=b;return this}).exps=!0;R("~",function(){j.bitwise&&c("Unexpected '{a}'.",this,"~");h(150);return this});R("!",function(){this.right=h(150);this.arity="unary";xb[this.right.id]===!0&&c("Confusing use of '{a}'.",this,"!");return this});R("typeof","typeof");R("new",function(){var i=h(155),k;if(i&&i.id!=="function")if(i.identifier)switch(i["new"]=!0,i.value){case "Object":c("Use the object literal notation {}.",g);break;case "Array":return a.id!=="("?c("Use the array literal notation [].",
g):(b("("),a.id===")"?c("Use the array literal notation [].",g):(k=h(0),i.dimension=k,(k.id==="(number)"&&/[.+\-Ee]/.test(k.value)||k.id==="-"&&!k.right||k.id==="(string)"||k.id==="["||k.id==="{"||k.id==="true"||k.id==="false"||k.id==="null"||k.id==="undefined"||k.id==="Infinity")&&c("Use the array literal notation [].",g),a.id!==")"&&d("Use the array literal notation [].",g)),b(")")),this.first=i,this;case "Number":case "String":case "Boolean":case "Math":case "JSON":c("Do not use {a} as a constructor.",
g,i.value);break;case "Function":j.evil||c("The Function constructor is eval.");break;case "Date":case "RegExp":break;default:i.id!=="function"&&(k=i.value.substr(0,1),j.newcap&&(k<"A"||k>"Z")&&c("A constructor name should start with an uppercase letter.",g))}else i.id!=="."&&i.id!=="["&&i.id!=="("&&c("Bad constructor.",g);else c("Weird construction. Delete 'new'.",this);o(g,a);a.id!=="("&&c("Missing '()' invoking a constructor.");this.first=i;return this});N["new"].exps=!0;M(".",function(i,k){o(L,
g);var e=ma();typeof e==="string"&&Aa(e);k.left=i;k.right=e;!j.evil&&i&&i.value==="document"&&(e==="write"||e==="writeln")?c("document.write can be a form of eval.",i):j.adsafe&&i&&i.value==="ADSAFE"&&(e==="id"||e==="lib"?c("ADsafe violation.",k):e==="go"&&(v!=="script"?c("ADsafe violation.",k):(sa||a.id!=="("||l(0).id!=="(string)"||l(0).value!==Q||l(1).id!==",")&&d("ADsafe violation: go.",k),sa=!0,ia=!1));if(!j.evil&&(e==="eval"||e==="execScript"))c("eval is evil.");else if(j.safe)for(;;){Na[e]===
!0&&c("ADsafe restricted word '{a}'.",g,e);if(typeof G[i.value]!=="boolean"||a.id==="(")break;if(Ab[e]===!0){a.id==="."&&c("ADsafe violation.",k);break}if(a.id!=="."){c("ADsafe violation.",k);break}b(".");g.left=k;g.right=e;k=g;e=ma();typeof e==="string"&&Aa(e)}return k},160,!0);M("(",function(i,d){o(L,g);u();var e=0,f=[];i&&(i.type==="(identifier)"?i.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&i.value!=="Number"&&i.value!=="String"&&i.value!=="Boolean"&&i.value!=="Date"&&(i.value===
"Math"?c("Math is not a function.",i):j.newcap&&c("Missing 'new' prefix when invoking a constructor.",i)):i.id==="."&&j.safe&&i.left.value==="Math"&&i.right==="random"&&c("ADsafe violation.",i));if(a.id!==")")for(;;){f[f.length]=h(10);e+=1;if(a.id!==",")break;K()}b(")");j.immed&&i.id==="function"&&a.id!==")"&&c("Wrap the entire immediate function invocation in parens.",d);u(L,g);typeof i==="object"&&(i.value==="parseInt"&&e===1&&c("Missing radix parameter.",i),j.evil||(i.value==="eval"||i.value===
"Function"||i.value==="execScript"?c("eval is evil.",i):f[0]&&f[0].id==="(string)"&&(i.value==="setTimeout"||i.value==="setInterval")&&c("Implied eval is evil. Pass a function instead of a string.",i)),!i.identifier&&i.id!=="."&&i.id!=="["&&i.id!=="("&&i.id!=="&&"&&i.id!=="||"&&i.id!=="?"&&c("Bad invocation.",i));d.left=i;return d},155,!0).exps=!0;R("(",function(){u();var d=h(0);b(")",this);u(L,g);j.immed&&d.id==="function"&&(a.id==="("?c("Move the invocation into the parens that contain the function.",
a):c("Do not wrap function literals in parens unless they are to be immediately invoked.",this));return d});M("[",function(a,d){u();var e=h(0),f;e&&e.type==="(string)"?(j.safe&&Na[e.value]===!0?c("ADsafe restricted word '{a}'.",d,e.value):!j.evil&&(e.value==="eval"||e.value==="execScript")?c("eval is evil.",d):j.safe&&(e.value.charAt(0)==="_"||e.value.charAt(0)==="-")&&c("ADsafe restricted subscript '{a}'.",d,e.value),Aa(e.value),!j.sub&&nb.test(e.value)&&(f=N[e.value],(!f||!f.reserved)&&c("['{a}'] is better written in dot notation.",
e,e.value))):(!e||e.type!=="(number)"||e.value<0)&&j.safe&&c("ADsafe subscripting.");b("]",d);u(L,g);d.left=a;d.right=e;return d},160,!0);R("[",function(){var d=g.line!==a.line;this.first=[];d&&(I+=j.indent,a.from===I+j.indent&&(I+=j.indent));for(;a.id!=="(end)";){for(;a.id===",";)c("Extra comma."),b(",");if(a.id==="]")break;d&&g.line!==a.line&&p();this.first.push(h(10));if(a.id===","){if(K(),a.id==="]"){c("Extra comma.",g);break}}else break}d&&(I-=j.indent,p());b("]",this);return this},160);(function(i){i.nud=
function(){var i,e,x,m,u={};if(i=g.line!==a.line)I+=j.indent,a.from===I+j.indent&&(I+=j.indent);for(;;){if(a.id==="}")break;i&&p();if(a.value==="get"&&l().id!==":")b("get"),j.es5||d("get/set are ES5 features."),(x=Ya())||d("Missing property name."),m=a,o(g,a),e=Da(x),s["(loopage)"]&&c("Don't make functions within a loop.",m),(e=e["(params)"])&&c("Unexpected parameter '{a}' in get {b} function.",m,e[0],x),o(g,a),b(","),p(),b("set"),m=Ya(),x!==m&&d("Expected {a} and instead saw {b}.",g,x,m),m=a,o(g,
a),e=Da(x),e=e["(params)"],(!e||e.length!==1||e[0]!=="value")&&c("Expected (value) in set {a} function.",m,x);else{x=Ya();if(typeof x!=="string")break;b(":");f(g,a);h(10)}u[x]===!0&&c("Duplicate member '{a}'.",a,x);u[x]=!0;Aa(x);if(a.id===",")K(),a.id===","?c("Extra comma.",g):a.id==="}"&&c("Extra comma.",g);else break}i&&(I-=j.indent,p());b("}",this);return this};i.fud=function(){d("Expected to see a statement and instead saw a block.",g)}})(z("{"));S("var",Za).exps=!0;da("function",function(){oa&&
c("Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function.",g);var b=ma();o(g,a);t(b,"unused");Da(b);a.id==="("&&a.line===g.line&&d("Function statements are not invocable. Wrap the whole function invocation in parens.");return this});R("function",function(){var b=Ma();b?o(g,a):f(g,a);Da(b);s["(loopage)"]&&c("Don't make functions within a loop.");return this});da("if",function(){var d=a;b("(");f(this,d);u();h(20);a.id==="="&&
(c("Expected a conditional expression and instead saw an assignment."),b("="),h(20));b(")",d);u(L,g);T(!0);a.id==="else"&&(f(g,a),b("else"),a.id==="if"||a.id==="switch"?Pa(!0):T(!0));return this});da("try",function(){var i,h;j.adsafe&&c("ADsafe try violation.",this);T(!1);if(a.id==="catch")b("catch"),f(g,a),b("("),h=H,H=Object.create(h),i=a.value,a.type!=="(identifier)"?c("Expected an identifier and instead saw '{a}'.",a,i):t(i,"exception"),b(),b(")"),T(!1),i=!0,H=h;if(a.id==="finally")b("finally"),
T(!1);else return i||d("Expected '{a}' and instead saw '{b}'.",a,"catch",a.value),this});da("while",function(){var d=a;s["(breakage)"]+=1;s["(loopage)"]+=1;b("(");f(this,d);u();h(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),h(20));b(")",d);u(L,g);T(!0);s["(breakage)"]-=1;s["(loopage)"]-=1;return this}).labelled=!0;E("with");da("switch",function(){var i=a,k=!1;s["(breakage)"]+=1;b("(");f(this,i);u();this.condition=h(20);b(")",i);u(L,g);f(g,a);i=a;b("{");
f(g,a);I+=j.indent;for(this.cases=[];;)switch(a.id){case "case":switch(s["(verb)"]){case "break":case "case":case "continue":case "return":case "switch":case "throw":break;default:c("Expected a 'break' statement before 'case'.",g)}p(-j.indent);b("case");this.cases.push(h(20));k=!0;b(":");s["(verb)"]="case";break;case "default":switch(s["(verb)"]){case "break":case "continue":case "return":case "throw":break;default:c("Expected a 'break' statement before 'default'.",g)}p(-j.indent);b("default");k=
!0;b(":");break;case "}":I-=j.indent;p();b("}",i);(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false")&&c("This 'switch' should be an 'if'.",this);s["(breakage)"]-=1;s["(verb)"]=void 0;return;case "(end)":d("Missing '{a}'.",a,"}");return;default:if(k)switch(g.id){case ",":d("Each value should have its own case label.");return;case ":":na();break;default:d("Missing ':' on a case clause.",g)}else d("Expected '{a}' and instead saw '{b}'.",a,"case",a.value)}}).labelled=!0;
S("debugger",function(){j.debug||c("All 'debugger' statements should be removed.");return this}).exps=!0;(function(){var d=S("do",function(){s["(breakage)"]+=1;s["(loopage)"]+=1;this.first=T(!0);b("while");var d=a;f(g,d);b("(");u();h(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),h(20));b(")",d);u(L,g);s["(breakage)"]-=1;s["(loopage)"]-=1;return this});d.labelled=!0;d.exps=!0})();da("for",function(){var i=j.forin,k;k=a;s["(breakage)"]+=1;s["(loopage)"]+=
1;b("(");f(this,k);u();if(l(a.id==="var"?1:0).id==="in"){if(a.id==="var")b("var"),Za(!0);else{switch(s[a.value]){case "unused":s[a.value]="var";break;case "var":break;default:c("Bad for in variable '{a}'.",a,a.value)}b()}b("in");h(20);b(")",k);k=T(!0);!i&&(k.length>1||typeof k[0]!=="object"||k[0].value!=="if")&&c("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this)}else{if(a.id!==";")if(a.id==="var")b("var"),Za();else for(;;){h(0,"for");
if(a.id!==",")break;K()}P(g);b(";");a.id!==";"&&(h(20),a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),b("="),h(20)));P(g);b(";");a.id===";"&&d("Expected '{a}' and instead saw '{b}'.",a,")",";");if(a.id!==")")for(;;){h(0,"for");if(a.id!==",")break;K()}b(")",k);u(L,g);T(!0)}s["(breakage)"]-=1;s["(loopage)"]-=1;return this}).labelled=!0;S("break",function(){var d=a.value;s["(breakage)"]===0&&c("Unexpected '{a}'.",a,this.value);P(this);if(a.id!==";"&&g.line===a.line)s[d]!==
"label"?c("'{a}' is not a statement label.",a,d):H[d]!==s&&c("'{a}' is out of scope.",a,d),this.first=a,b();za("break");return this}).exps=!0;S("continue",function(){var d=a.value;s["(breakage)"]===0&&c("Unexpected '{a}'.",a,this.value);P(this);if(a.id!==";"){if(g.line===a.line)s[d]!=="label"?c("'{a}' is not a statement label.",a,d):H[d]!==s&&c("'{a}' is out of scope.",a,d),this.first=a,b()}else s["(loopage)"]||c("Unexpected '{a}'.",a,this.value);za("continue");return this}).exps=!0;S("return",function(){P(this);
a.id==="(regexp)"&&c("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");if(a.id!==";"&&!a.reach)f(g,a),this.first=h(20);za("return");return this}).exps=!0;S("throw",function(){P(this);f(g,a);this.first=h(20);za("throw");return this}).exps=!0;E("void");E("class");E("const");E("enum");E("export");E("extends");E("import");E("super");E("let");E("yield");E("implements");E("interface");E("package");E("private");E("protected");E("public");E("static");var Y=function(h,k){var e,l;JSLINT.errors=
[];G=Object.create(zb);if(k){e=k.predef;if(e instanceof Array)for(l=0;l<e.length;l+=1)G[e[l]]=!0;if(k.adsafe)k.safe=!0;if(k.safe)k.browser=!1,k.css=!1,k.debug=!1,k.devel=!1,k.eqeqeq=!0,k.evil=!1,k.forin=!1,k.nomen=!0,k.on=!1,k.rhino=!1,k.safe=!0,k.windows=!1,k.strict=!0,k.sub=!1,k.undef=!0,k.widget=!1,G.Date=null,G.eval=null,G.Function=null,G.Object=null,G.ADSAFE=!1,G.lib=!1;j=k}else j={};j.indent=j.indent||4;j.maxerr=j.maxerr||50;Q="";sa=ia=!1;Ea={};if(j.approved)for(l=0;l<j.approved.length;l+=1)Ea[j.approved[l]]=
j.approved[l];else Ea.test="test";cb="";for(l=0;l<j.indent;l+=1)cb+=" ";I=1;H=eb=Object.create(G);s={"(global)":!0,"(name)":"(global)","(scope)":H,"(breakage)":0,"(loopage)":0};ra=[s];Ga={};qa=[];v=Ha=!1;J=null;ba={};aa=null;$={};oa=!1;ya=[];ka=!1;Ja=0;V.init(h);bb=!0;La=!1;L=g=a=N["(begin)"];D();try{b();if(a.value.charAt(0)==="<"){a:{var o,m,u,p,t,n,q,A=j.white,r;v="html";O="";for(J=null;;){switch(a.value){case "<":v="html";b("<");m={};n=a;n.identifier||c("Bad identifier {a}.",n,n.value);p=n.value;
j.cap&&(p=p.toLowerCase());n.name=p;b();if(!J)J=[],e=p,e!=="html"&&!j.fragment&&(e==="div"&&j.adsafe?d("ADSAFE: Use the fragment option."):d("Expected '{a}' and instead saw '{b}'.",g,"html",e)),j.adsafe&&(e==="html"&&d("Currently, ADsafe does not operate on whole HTML documents. It operates on <div> fragments and .js files.",g),j.fragment?e!=="div"&&d("ADsafe violation: Wrap the widget in a div.",g):d("Use the fragment option.",g)),j.browser=!0,D();q=Xa[p];typeof q!=="object"&&d("Unrecognized tag '<{a}>'.",
n,p);u=q.empty;for(n.type=p;;){if(a.id==="/"){b("/");a.id!==">"&&c("Expected '{a}' and instead saw '{b}'.",a,">",a.value);break}if(a.id&&a.id.substr(0,1)===">")break;a.identifier||((a.id==="(end)"||a.id==="(error)")&&d("Missing '>'.",a),c("Bad identifier."));j.white=!0;f(g,a);o=a.value;j.white=A;b();!j.cap&&o!==o.toLowerCase()&&c("Attribute '{a}' not all lower case.",a,o);o=o.toLowerCase();O="";w(m,o)&&c("Attribute '{a}' repeated.",a,o);o.slice(0,2)==="on"?(j.on||c("Avoid HTML event handlers."),v=
"scriptstring",b("="),t=a.id,t!=='"'&&t!=="'"&&d("Missing quote."),O=t,r=j.white,j.white=!1,b(t),na("on"),j.white=r,a.id!==t&&d("Missing close quote on script attribute."),v="html",O="",b(t),q=!1):o==="style"?(v="scriptstring",b("="),t=a.id,t!=='"'&&t!=="'"&&d("Missing quote."),v="styleproperty",O=t,b(t),kb(),v="html",O="",b(t),q=!1):a.id==="="?(b("="),q=a.value,!a.identifier&&a.id!=='"'&&a.id!=="'"&&a.type!=="(string)"&&a.type!=="(number)"&&a.type!=="(color)"&&c("Expected an attribute value and instead saw '{a}'.",
g,o),b()):q=!0;m[o]=q;e=o;l=q;var z=void 0,y=void 0;e==="id"?(z=typeof l==="string"?l.toUpperCase():"",Ga[z]===!0&&c("Duplicate id='{a}'.",a,l),/^[A-Za-z][A-Za-z0-9._:\-]*$/.test(l)?j.adsafe&&(Q?l.slice(0,Q.length)!==Q?c("ADsafe violation: An id must have a '{a}' prefix",a,Q):/^[A-Z]+_[A-Z]+$/.test(l)||c("ADSAFE violation: bad id."):(Q=l,/^[A-Z]+_$/.test(l)||c("ADSAFE violation: bad id."))):c("Bad id: '{a}'.",a,l),y=l.search(Ib),y>=0&&c("Unexpected character '{a}' in {b}.",g,l.charAt(y),e),Ga[z]=
!0):e==="class"||e==="type"||e==="name"?(y=l.search(Hb),y>=0&&c("Unexpected character '{a}' in {b}.",g,l.charAt(y),e),Ga[z]=!0):e==="href"||e==="background"||e==="content"||e==="data"||e.indexOf("src")>=0||e.indexOf("url")>=0?(j.safe&&jb.test(l)&&d("ADsafe URL violation."),qa.push(l)):e==="for"?j.adsafe&&(Q?l.slice(0,Q.length)!==Q?c("ADsafe violation: An id must have a '{a}' prefix",a,Q):/^[A-Z]+_[A-Z]+$/.test(l)||c("ADSAFE violation: bad id."):c("ADSAFE violation: bad id.")):e==="name"&&j.adsafe&&
l.indexOf("_")>=0&&c("ADsafe name violation.")}e=p;l=m;var z=void 0,C=Xa[e],y=void 0;Ha=!1;C||d("Unrecognized tag '<{a}>'.",a,e===e.toLowerCase()?e:e+" (capitalization error)");if(J.length>0)if(e==="html"&&d("Too many <html> tags.",g),y=C.parent)y.indexOf(" "+J[J.length-1].name+" ")<0&&d("A '<{a}>' must be within '<{b}>'.",g,e,y);else if(!j.adsafe&&!j.fragment){z=J.length;do z<=0&&d("A '<{a}>' must be within '<{b}>'.",g,e,"body"),z-=1;while(J[z].name!=="body")}switch(e){case "div":j.adsafe&&J.length===
1&&!Q&&c("ADSAFE violation: missing ID_.");break;case "script":v="script";b(">");I=a.from;l.lang&&c("lang is deprecated.",g);j.adsafe&&J.length!==1&&c("ADsafe script placement violation.",g);l.src?(j.adsafe&&(!ia||!Ea[l.src])&&c("ADsafe unapproved script source.",g),l.type&&c("type is unnecessary.",g)):(sa&&d("ADsafe script violation.",g),na("script"));v="html";b("</");!a.identifier&&a.value!=="script"&&c("Expected '{a}' and instead saw '{b}'.",a,"script",a.value);b();v="outer";break;case "style":v=
"style";b(">");lb();v="html";b("</");!a.identifier&&a.value!=="style"&&c("Expected '{a}' and instead saw '{b}'.",a,"style",a.value);b();v="outer";break;case "input":switch(l.type){case "radio":case "checkbox":case "button":case "reset":case "submit":break;case "text":case "password":case "file":case "hidden":case "image":j.adsafe&&l.autocomplete!=="off"&&c("ADsafe autocomplete violation.");break;default:c("Bad input type.")}break;case "applet":case "body":case "embed":case "frame":case "frameset":case "head":case "iframe":case "noembed":case "noframes":case "object":case "param":j.adsafe&&
c("ADsafe violation: Disallowed tag: "+e)}u||J.push(n);v="outer";b(">");break;case "</":v="html";b("</");a.identifier||c("Bad identifier.");p=a.value;j.cap&&(p=p.toLowerCase());b();J||d("Unexpected '{a}'.",a,"</"+p+">");(n=J.pop())||d("Unexpected '{a}'.",a,"</"+p+">");n.name!==p&&d("Expected '{a}' and instead saw '{b}'.",a,"</"+n.name+">","</"+p+">");a.id!==">"&&d("Missing '{a}'.",a,">");v="outer";b(">");break;case "<!":j.safe&&c("ADsafe HTML violation.");for(v="html";;){b();if(a.id===">"||a.id===
"(end)")break;a.value.indexOf("--")>=0&&c("Unexpected --.");a.value.indexOf("<")>=0&&c("Unexpected <.");a.value.indexOf(">")>=0&&c("Unexpected >.")}v="outer";b(">");break;case "(end)":break a;default:a.id==="(end)"?d("Missing '{a}'.",a,"</"+J[J.length-1].value+">"):b()}if(J&&J.length===0&&(j.adsafe||!j.fragment||a.id==="(end)"))break}a.id!=="(end)"&&d("Unexpected material after the end.")}j.adsafe&&!sa&&c("ADsafe violation: Missing ADSAFE.go.",this)}else switch(a.id){case "{":case "[":ka=j.laxbreak=
!0;$a();break;case "@":case "*":case "#":case ".":case ":":v="style";b();(g.id!=="@"||!a.identifier||a.value!=="charset"||g.line!==1||g.from!==1)&&d('A css file should begin with @charset "UTF-8";');b();a.type!=="(string)"&&a.value!=="UTF-8"&&d('A css file should begin with @charset "UTF-8";');b();b(";");lb();break;default:j.adsafe&&j.fragment&&d("Expected '{a}' and instead saw '{b}'.",a,"<div>",a.value),na("lib")}b("(end)")}catch(B){B&&JSLINT.errors.push({reason:B.message,line:B.line||a.line,character:B.character||
a.from},null)}return JSLINT.errors.length===0};Y.data=function(){var a={functions:[]},b;b=[];var c,d,h,f,g=[];if(Y.errors.length)a.errors=Y.errors;if(ka)a.json=!0;for(f in $)w($,f)&&b.push({name:f,line:$[f]});if(b.length>0)a.implieds=b;if(qa.length>0)a.urls=qa;b=mb(H);if(b.length>0)a.globals=b;for(d=1;d<ra.length;d+=1){c=ra[d];b={};for(h=0;h<ta.length;h+=1)b[ta[h]]=[];for(f in c)w(c,f)&&f.charAt(0)!=="("&&(h=c[f],Object.prototype.toString.apply(b[h])==="[object Array]"&&(b[h].push(f),h==="unused"&&
g.push({name:f,line:c["(line)"],"function":c["(name)"]})));for(h=0;h<ta.length;h+=1)b[ta[h]].length===0&&delete b[ta[h]];b.name=c["(name)"];b.param=c["(params)"];b.line=c["(line)"];b.last=c["(last)"];a.functions.push(b)}if(g.length>0)a.unused=g;for(f in ba)if(typeof ba[f]==="number"){a.member=ba;break}return a};Y.report=function(a){function b(a,c){var d,e,h;if(c){j.push("<div><i>"+a+"</i> ");c=c.sort();for(e=0;e<c.length;e+=1)c[e]!==h&&(h=c[e],j.push((d?", ":"")+h),d=!0);j.push("</div>")}}var c=Y.data(),
d=[],h,f,g;h="";var l,j=[];if(c.errors||c.implieds||c.unused){f=!0;j.push("<div id=errors><i>Error:</i>");if(c.errors)for(g=0;g<c.errors.length;g+=1)if(d=c.errors[g])h=d.evidence||"",j.push("<p>Problem"+(isFinite(d.line)?" at line "+d.line+" character "+d.character:"")+": "+d.reason.entityify()+"</p><p class=evidence>"+(h&&(h.length>80?h.slice(0,77)+"...":h).entityify())+"</p>");if(c.implieds){d=[];for(g=0;g<c.implieds.length;g+=1)d[g]="<code>"+c.implieds[g].name+"</code>&nbsp;<i>"+c.implieds[g].line+
"</i>";j.push("<p><i>Implied global:</i> "+d.join(", ")+"</p>")}if(c.unused){d=[];for(g=0;g<c.unused.length;g+=1)d[g]="<code><u>"+c.unused[g].name+"</u></code>&nbsp;<i>"+c.unused[g].line+"</i> <code>"+c.unused[g]["function"]+"</code>";j.push("<p><i>Unused variable:</i> "+d.join(", ")+"</p>")}c.json&&j.push("<p>JSON: bad.</p>");j.push("</div>")}if(!a){j.push("<br><div id=functions>");c.urls&&b("URLs<br>",c.urls,"<br>");v==="style"?j.push("<p>CSS.</p>"):c.json&&!f?j.push("<p>JSON: good.</p>"):c.globals?
j.push("<div><i>Global</i> "+c.globals.sort().join(", ")+"</div>"):j.push("<div><i>No new global variables introduced.</i></div>");for(g=0;g<c.functions.length;g+=1)a=c.functions[g],j.push("<br><div class=function><i>"+a.line+"-"+a.last+"</i> "+(a.name||"")+"("+(a.param?a.param.join(", "):"")+")</div>"),b("<big><b>Unused</b></big>",a.unused),b("Closure",a.closure),b("Variable",a["var"]),b("Exception",a.exception),b("Outer",a.outer),b("Global",a.global),b("Label",a.label);if(c.member){d=mb(c.member);
if(d.length){d=d.sort();h="<br><pre id=members>/*members ";f=10;for(g=0;g<d.length;g+=1)a=d[g],l=a.name(),f+l.length>72&&(j.push(h+"<br>"),h="    ",f=1),f+=l.length+2,c.member[a]===1&&(l="<i>"+l+"</i>"),g<d.length-1&&(l+=", "),h+=l;j.push(h+"<br>*/</pre>")}j.push("</div>")}}return j.join("")};Y.jslint=Y;Y.edition="2010-04-06";return Y}();define("orion/jslintworker",function(){});
define("orion/objects",[],function(){function q(q){for(var y=1;y<arguments.length;y++){var D=arguments[y],F;for(F in D)Object.prototype.hasOwnProperty.call(D,F)&&(q[F]=D[F])}return q}return{clone:function(w){if(Array.isArray(w))return Array.prototype.slice.call(w);var y=Object.create(Object.getPrototypeOf(w));q(y,w);return y},mixin:q,toArray:function(q){return Array.isArray(q)?q:[q]}}});
define('built-jslintPlugin.js',["orion/plugin","orion/jslintworker","orion/objects"],function(q,w,y){function D(c){JSLINT(c,d);return JSLINT.data()}function F(c){function d(b,h,l){for(var m=c.description,f=0;f<b.length;f++){var q=b[f],p=typeof q==="string"?null:q[1],q=m.indexOf(typeof q==="string"?q:q[0])!==-1;if(l||q)c.severity=h;if(q&&p)c.description=p}}d([["Expected '{'","Statement body should be inside '{ }' braces."]],"warning",!0);d("Missing semicolon;Extra comma;Missing property name;Unmatched ; and instead saw; is not defined;Unclosed string;Stopping, unable to continue".split(";"),
"error");return function(){for(var b=["Dangerous comment"],d=c.description,l=0;l<b.length;l++)if(d.indexOf(b[l])!==-1)return!0;return!1}(c)?null:c}function c(c){if(!A)return{problems:[]};var d=D(c),b=[],h;if(d.errors){var o=d.errors;for(h=0;h<o.length;h++){var m=o[h];if(m){var f=m.character-1,q=f+1;m.evidence&&(f=m.evidence.substring(f).search(/.\b/),f>-1&&(q+=f));m.description=m.reason;m.start=m.character;m.end=q;(m=F(m))&&b.push(m)}}}if(d.functions){var d=d.functions,p;for(h=0;h<d.length;h++)if(o=
d[h],(m=o.unused)&&m.length!==0){p||(p=c.split(/\r?\n/));for(var f=(q=o.name[0]==='"')?o.name.substring(1,o.name.length-1):o.name,w=p[o.line-1],y=0;y<m.length;y++){var B=w.indexOf(f),B=q?w.indexOf("function",B):w.lastIndexOf("function",B);B!==-1&&b.push({reason:"Function declares unused variable '"+m[y]+"'.",line:o.line,character:B+1,end:B+8,severity:"warning"})}}}return{problems:b}}var m={bitwise:!1,eqeqeq:!0,es5:!0,immed:!0,indent:1,maxerr:300,newcap:!0,nomen:!1,onevar:!1,plusplus:!1,regexp:!0,
strict:!1,undef:!0,white:!1},d=m,A=!0,q=new q({name:"Orion JSLint Service",version:"1.0",description:"This plugin provides JSLint functionality for outlining and validating JavaScript code."});q.registerService(["orion.edit.validator","orion.cm.managedservice"],{updated:function(c){if(c&&(typeof c.enabled==="boolean"&&(A=!!c.enabled),typeof c.options==="string"&&(c=c.options,!/^\s*$/.test(c)))){var l={},b=!1;c.split(/,/).forEach(function(c){var d=/\s*(\w+)\s*:\s*(\w+)\s*/.exec(c);d===null?console.log("JSLint ignoring bad option: "+
c):(l[d[1]]=d[2],b=!0)});d={};y.mixin(d,m,l);b&&console.log("JSLint using user-provided options: {"+Object.keys(l).map(function(b){return b+":"+l[b]}).join(",")+"}")}},computeProblems:function(d){return d.getText().then(c)}},{contentType:["application/javascript","text/html"],pid:"jslint.config"});q.registerService("orion.edit.outliner",{computeOutline:function(c,d){return c.getText().then(function(b){var c=d.contentType;if(c==="application/javascript"){for(var c=[],b=D(b).functions,m=0;m<b.length;m++){var q=
b[m],f=q.name;if(f[0]==='"')q.name=f=f.substring(1,f.length-1);f+="("+(q.param?q.param.join(","):"")+")";c.push({label:f,children:null,line:q.line,text:q.name})}return c}else if(c==="text/html"){c=[];for(m=/id=['"]\S*["']/gi;(f=m.exec(b))!==null;)q=f.index,f=f[0],f[0]==="<"?(f="&lt;"+f.substring(1)+"&gt;",q+=1):(q+=4,f=f.substring(4,f.length-1)),c.push({label:f,children:null,start:q,end:q+f.length});return c}})}},{contentType:["application/javascript","text/html"],nameKey:"Flat outline",nls:"orion/editor/nls/messages",
id:"orion.edit.outliner.jslint"});q.registerService("orion.core.setting",{},{settings:[{pid:"jslint.config",name:"JSLint Validator",tags:"validation javascript js jslint".split(" "),category:"validation",properties:[{id:"enabled",name:"Use JSLint to check JavaScript code",defaultValue:!0,type:"boolean"},{id:"options",name:"Options to pass to JSLint (/*jslint ..*/)",type:"string"}]}]});q.connect()});