Created
September 9, 2016 08:14
-
-
Save cafe4it/32e9026721a4a9e3428865742f4469f6 to your computer and use it in GitHub Desktop.
cssParser.min.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ParseURL(a){var b={};b.protocol="",b.user="",b.password="",b.host="",b.port="",b.path="",b.query="";for(var c="PROTOCOL",d=0,e=!1;d<a.length;)if("PROTOCOL"==c)":"==a.charAt(d)?(c="AFTER_PROTOCOL",d++):"/"==a.charAt(d)&&0==b.protocol.length()?c=PATH:b.protocol+=a.charAt(d++);else if("AFTER_PROTOCOL"==c){if("/"!=a.charAt(d))throw new ParseException("Protocol shell be separated with 2 slashes");e?(e=!1,c="USER"):e=!0,d++}else"USER"==c?"/"==a.charAt(d)?(b.host=b.user,b.user="",c="PATH"):"?"==a.charAt(d)?(b.host=b.user,b.user="",c="QUERY",d++):":"==a.charAt(d)?(c="PASSWORD",d++):"@"==a.charAt(d)?(c="HOST",d++):b.user+=a.charAt(d++):"PASSWORD"==c?"/"==a.charAt(d)?(b.host=b.user,b.port=b.password,b.user="",b.password="",c="PATH"):"?"==a.charAt(d)?(b.host=b.user,b.port=b.password,b.user="",b.password="",c="QUERY",d++):"@"==a.charAt(d)?(c="HOST",d++):b.password+=a.charAt(d++):"HOST"==c?"/"==a.charAt(d)?c="PATH":":"==a.charAt(d)?(c="PORT",d++):"?"==a.charAt(d)?(c="QUERY",d++):b.host+=a.charAt(d++):"PORT"==c?"/"==a.charAt(d)?c="PATH":"?"==a.charAt(d)?(c="QUERY",d++):b.port+=a.charAt(d++):"PATH"==c?"?"==a.charAt(d)?(c="QUERY",d++):b.path+=a.charAt(d++):"QUERY"==c&&(b.query+=a.charAt(d++));if("PROTOCOL"==c)b.host=b.protocol,b.protocol="http";else{if("AFTER_PROTOCOL"==c)throw new ParseException("Invalid url");"USER"==c?(b.host=b.user,b.user=""):"PASSWORD"==c&&(b.host=b.user,b.port=b.password,b.user="",b.password="")}return b}function ParseException(a){this.description=a}function CountLF(a){var b=a.match(/\n/g);return b?b.length+1:1}function DisposablePartialParsing(a,b){var c=new CSSParser;return c._init(),c.mPreserveWS=!1,c.mPreserveComments=!1,c.mPreservedTokens=[],c.mScanner.init(a),c[b]()}function FilterLinearGradient(a,b){var c=DisposablePartialParsing(a,"parseBackgroundImages");if(!c)return null;var d=c[0];if(!d.value)return null;var e="",f="position"in d.value?d.value.position.toLowerCase():"",g="angle"in d.value?d.value.angle.toLowerCase():"";if("webkit20110101"==b){var h=!1;if(e="-webkit-gradient(linear, ",g){var i=g.match(/^([0-9\-\.\\+]+)([a-z]*)/),g=parseFloat(i[1]),j=i[2];switch(j){case"grad":g=90*g/100;break;case"rad":g=180*g/Math.PI}for(;g<0;)g+=360;for(;g>=360;)g-=360}var k=[],l=[];if(""!=f)if("center"==f&&(f="center center"),k=f.split(" "),""==g&&0!=g){switch(k[0]){case"left":l.push("right");break;case"center":l.push("center");break;case"right":l.push("left");break;default:var i=k[0].match(/^([0-9\-\.\\+]+)([a-z]*)/),m=parseFloat(i[0]),j=i[1];"%"==j?l.push(100-m+"%"):h=!0}if(!h)switch(k[1]){case"top":l.push("bottom");break;case"center":l.push("center");break;case"bottom":l.push("top");break;default:var i=k[1].match(/^([0-9\-\.\\+]+)([a-z]*)/),m=parseFloat(i[0]),j=i[1];"%"==j?l.push(100-m+"%"):h=!0}}else switch(g){case 0:l.push("right"),l.push(k[1]);break;case 90:l.push(k[0]),l.push("top");break;case 180:l.push("left"),l.push(k[1]);break;case 270:l.push(k[0]),l.push("bottom");break;default:h=!0}else switch(""==g&&(g=270),g){case 0:k=["left","center"],l=["right","center"];break;case 90:k=["center","bottom"],l=["center","top"];break;case 180:k=["right","center"],l=["left","center"];break;case 270:k=["center","top"],l=["center","bottom"];break;default:h=!0}if(h)return"";e+=k.join(" ")+", "+l.join(" "),d.value.stops[0].position||(d.value.stops[0].position="0%"),d.value.stops[d.value.stops.length-1].position||(d.value.stops[d.value.stops.length-1].position="100%");for(var n=0,o=0;o<d.value.stops.length&&!h;o++){var p=d.value.stops[o];if(p.position){if(p.position.indexOf("%")==-1){h=!0;break}}else{for(var q=o+1;q<d.value.stops.length&&!d.value.stops[q].position;)q++;for(var r=parseFloat(d.value.stops[q].position)-n,s=o;s<q;s++)d.value.stops[s].position=n+r*(s-o+1)/(q-o+1)+"%"}n=parseFloat(p.position),e+=", color-stop("+parseFloat(n)/100+", "+p.color+")"}if(h)return""}else{e=(d.value.isRepeating?"repeating-":"")+"linear-gradient(",(g||f)&&(e+=(g?g:f)+", ");for(var o=0;o<d.value.stops.length;o++){var p=d.value.stops[o];e+=p.color+(p.position?" "+p.position:"")+(o!=d.value.stops.length-1?", ":"")}}switch(e+=")",b){case"webkit":e="-webkit-"+e;break;case"gecko1.9.2":e="-moz-"+e;break;case"presto":e="-o-"+e;break;case"trident":e="-ms-"+e}return e}function FilterRadialGradient(a,b){var c=DisposablePartialParsing(a,"parseBackgroundImages");if(!c)return null;var d=c[0];if(!d.value)return null;if("webkit20110101"==b)return null;var e=(d.value.isRepeating?"repeating-":"")+"radial-gradient(",f="shape"in d.value?d.value.shape:"",g="extent"in d.value?d.value.extent:"",h="";switch(d.value.positions.length){case 1:h=d.value.positions[0]+" "+d.value.positions[0];break;case 2:h=d.value.positions[0]+" "+d.value.positions[1]}var i=d.value.at;e+=(i?i+", ":"")+(f||g||i?(f?f+" ":"")+(g?g+" ":"")+(h?h+" ":"")+", ":"");for(var j=0;j<d.value.stops.length;j++){var k=d.value.stops[j];e+=k.color+(k.position?" "+k.position:"")+(j!=d.value.stops.length-1?", ":"")}switch(e+=")",b){case"webkit":e="-webkit-"+e;break;case"gecko1.9.2":e="-moz-"+e;break;case"presto":e="-o-"+e;break;case"trident":e="-ms-"+e}return e}function CSSScanner(a){this.init(a)}function CSSParser(a){this.mToken=null,this.mLookAhead=null,this.mScanner=new CSSScanner(a),this.mPreserveWS=!0,this.mPreserveComments=!0,this.mPreservedTokens=[],this.mError=null}function jscsspToken(a,b,c){this.type=a,this.value=b,this.unit=c}function jscsspCharsetRule(){this.type=kJscsspCHARSET_RULE,this.encoding=null,this.parsedCssText=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspComment(){this.type=kJscsspCOMMENT,this.parsedCssText=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspDeclaration(){this.type=kJscsspSTYLE_DECLARATION,this.property=null,this.values=[],this.valueText=null,this.priority=null,this.parsedCssText=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspErrorRule(a){this.error=a?a:"INVALID",this.type=kJscsspUNKNOWN_RULE,this.parsedCssText=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspFontFaceRule(){this.type=kJscsspFONT_FACE_RULE,this.parsedCssText=null,this.descriptors=[],this.parentStyleSheet=null,this.parentRule=null}function jscsspImportRule(){this.type=kJscsspIMPORT_RULE,this.parsedCssText=null,this.href=null,this.media=[],this.parentStyleSheet=null,this.parentRule=null}function jscsspKeyframeRule(){this.type=kJscsspKEYFRAME_RULE,this.parsedCssText=null,this.declarations=[],this.keyText=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspKeyframesRule(){this.type=kJscsspKEYFRAMES_RULE,this.parsedCssText=null,this.cssRules=[],this.name=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspMediaRule(){this.type=kJscsspMEDIA_RULE,this.parsedCssText=null,this.cssRules=[],this.media=[],this.parentStyleSheet=null,this.parentRule=null}function jscsspNamespaceRule(){this.type=kJscsspNAMESPACE_RULE,this.parsedCssText=null,this.prefix=null,this.url=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspPageRule(){this.type=kJscsspPAGE_RULE,this.parsedCssText=null,this.pageSelector=null,this.declarations=[],this.parentStyleSheet=null,this.parentRule=null}function jscsspStyleRule(){this.type=kJscsspSTYLE_RULE,this.parsedCssText=null,this.declarations=[],this.mSelectorText=null,this.parentStyleSheet=null,this.parentRule=null}function jscsspStylesheet(){this.cssRules=[],this.variables={}}function jscsspVariable(a,b){this.value="",this.type=a,this.name=null,this.parentRule=null,this.parentStyleSheet=b}function jscsspVariablesRule(){this.type=kJscsspVARIABLES_RULE,this.parsedCssText=null,this.declarations=[],this.parentStyleSheet=null,this.parentRule=null,this.media=null}function jscsspWhitespace(){this.type=kJscsspWHITE_SPACE,this.parsedCssText=null,this.parentStyleSheet=null,this.parentRule=null}var kCHARSET_RULE_MISSING_SEMICOLON="Missing semicolon at the end of @charset rule",kCHARSET_RULE_CHARSET_IS_STRING="The charset in the @charset rule should be a string",kCHARSET_RULE_MISSING_WS="Missing mandatory whitespace after @charset",kIMPORT_RULE_MISSING_URL="Missing URL in @import rule",kURL_EOF="Unexpected end of stylesheet",kURL_WS_INSIDE="Multiple tokens inside a url() notation",kVARIABLES_RULE_POSITION="@variables rule invalid at this position in the stylesheet",kIMPORT_RULE_POSITION="@import rule invalid at this position in the stylesheet",kNAMESPACE_RULE_POSITION="@namespace rule invalid at this position in the stylesheet",kCHARSET_RULE_CHARSET_SOF="@charset rule invalid at this position in the stylesheet",kUNKNOWN_AT_RULE="Unknow @-rule",kCSS_VENDOR_VALUES={"-moz-box":{webkit:"-webkit-box",presto:"",trident:"",generic:"box"},"-moz-inline-box":{webkit:"-webkit-inline-box",presto:"",trident:"",generic:"inline-box"},"-moz-initial":{webkit:"",presto:"",trident:"",generic:"initial"},flex:{webkit:"-webkit-flex",presto:"",trident:"",generic:""},"inline-flex":{webkit:"-webkit-inline-flex",presto:"",trident:"",generic:""},"linear-gradient":{webkit20110101:FilterLinearGradient,webkit:FilterLinearGradient,presto:FilterLinearGradient,trident:FilterLinearGradient,"gecko1.9.2":FilterLinearGradient},"repeating-linear-gradient":{webkit20110101:FilterLinearGradient,webkit:FilterLinearGradient,presto:FilterLinearGradient,trident:FilterLinearGradient,"gecko1.9.2":FilterLinearGradient},"radial-gradient":{webkit20110101:FilterRadialGradient,webkit:FilterRadialGradient,presto:FilterRadialGradient,trident:FilterRadialGradient,"gecko1.9.2":FilterRadialGradient},"repeating-radial-gradient":{webkit20110101:FilterRadialGradient,webkit:FilterRadialGradient,presto:FilterRadialGradient,trident:FilterRadialGradient,"gecko1.9.2":FilterRadialGradient}},kCSS_PREFIXED_VALUE=[{gecko:"-moz-box",webkit:"-moz-box",presto:"",trident:"",generic:"box"}],kCSS_VENDOR_PREFIXES={lastUpdate:1374677405,properties:[{gecko:"",webkit:"",presto:"",trident:"-ms-accelerator",status:"P"},{gecko:"",webkit:"",presto:"-wap-accesskey",trident:"",status:""},{gecko:"",webkit:"-webkit-align-content",presto:"",trident:"",status:""},{gecko:"align-items",webkit:"-webkit-align-items",presto:"",trident:"",status:""},{gecko:"align-self",webkit:"-webkit-align-self",presto:"",trident:"",status:""},{gecko:"animation",webkit:"-webkit-animation",presto:"",trident:"animation",status:"WD"},{gecko:"animation-delay",webkit:"-webkit-animation-delay",presto:"",trident:"animation-delay",status:"WD"},{gecko:"animation-direction",webkit:"-webkit-animation-direction",presto:"",trident:"animation-direction",status:"WD"},{gecko:"animation-duration",webkit:"-webkit-animation-duration",presto:"",trident:"animation-duration",status:"WD"},{gecko:"animation-fill-mode",webkit:"-webkit-animation-fill-mode",presto:"",trident:"animation-fill-mode",status:"ED"},{gecko:"animation-iteration-count",webkit:"-webkit-animation-iteration-count",presto:"",trident:"animation-iteration-count",status:"WD"},{gecko:"animation-name",webkit:"-webkit-animation-name",presto:"",trident:"animation-name",status:"WD"},{gecko:"animation-play-state",webkit:"-webkit-animation-play-state",presto:"",trident:"animation-play-state",status:"WD"},{gecko:"animation-timing-function",webkit:"-webkit-animation-timing-function",presto:"",trident:"animation-timing-function",status:"WD"},{gecko:"",webkit:"-webkit-app-region",presto:"",trident:"",status:""},{gecko:"-moz-appearance",webkit:"-webkit-appearance",presto:"",trident:"",status:"CR"},{gecko:"",webkit:"-webkit-aspect-ratio",presto:"",trident:"",status:""},{gecko:"backface-visibility",webkit:"-webkit-backface-visibility",presto:"",trident:"backface-visibility",status:"WD"},{gecko:"",webkit:"-webkit-background-blend-mode",presto:"",trident:"",status:""},{gecko:"background-clip",webkit:"-webkit-background-clip",presto:"background-clip",trident:"background-clip",status:"WD"},{gecko:"",webkit:"-webkit-background-composite",presto:"",trident:"",status:""},{gecko:"-moz-background-inline-policy",webkit:"",presto:"",trident:"",status:"P"},{gecko:"background-origin",webkit:"-webkit-background-origin",presto:"background-origin",trident:"background-origin",status:"WD"},{gecko:"",webkit:"background-position-x",presto:"",trident:"-ms-background-position-x",status:""},{gecko:"",webkit:"background-position-y",presto:"",trident:"-ms-background-position-y",status:""},{gecko:"background-size",webkit:"-webkit-background-size",presto:"background-size",trident:"background-size",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-behavior",status:""},{gecko:"-moz-binding",webkit:"",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-blend-mode",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-block-progression",status:""},{gecko:"",webkit:"-webkit-border-after",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-after-color",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-after-style",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-after-width",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-before",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-before-color",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-before-style",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-before-width",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-bottom-colors",webkit:"",presto:"",trident:"",status:"P"},{gecko:"border-bottom-left-radius",webkit:"-webkit-border-bottom-left-radius",presto:"border-bottom-left-radius",trident:"border-bottom-left-radius",status:"WD"},{gecko:"border-bottom-right-radius",webkit:"-webkit-border-bottom-right-radius",presto:"border-bottom-right-radius",trident:"border-bottom-right-radius",status:"WD"},{gecko:"-moz-border-end",webkit:"-webkit-border-end",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-end-color",webkit:"-webkit-border-end-color",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-end-style",webkit:"-webkit-border-end-style",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-end-width",webkit:"-webkit-border-end-width",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-border-fit",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-border-horizontal-spacing",presto:"",trident:"",status:""},{gecko:"border-image",webkit:"-webkit-border-image",presto:"-o-border-image",trident:"",status:"WD"},{gecko:"-moz-border-left-colors",webkit:"",presto:"",trident:"",status:"P"},{gecko:"border-radius",webkit:"-webkit-border-radius",presto:"border-radius",trident:"border-radius",status:"WD"},{gecko:"-moz-border-right-colors",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-border-start",webkit:"-webkit-border-start",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-start-color",webkit:"-webkit-border-start-color",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-start-style",webkit:"-webkit-border-start-style",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-start-width",webkit:"-webkit-border-start-width",presto:"",trident:"",status:"ED"},{gecko:"-moz-border-top-colors",webkit:"",presto:"",trident:"",status:"P"},{gecko:"border-top-left-radius",webkit:"-webkit-border-top-left-radius",presto:"border-top-left-radius",trident:"border-top-left-radius",status:"WD"},{gecko:"border-top-right-radius",webkit:"-webkit-border-top-right-radius",presto:"border-top-right-radius",trident:"border-top-right-radius",status:"WD"},{gecko:"",webkit:"-webkit-border-vertical-spacing",presto:"",trident:"",status:""},{gecko:"-moz-box-align",webkit:"-webkit-box-align",presto:"",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-box-decoration-break",presto:"box-decoration-break",trident:"",status:"WD"},{gecko:"-moz-box-direction",webkit:"-webkit-box-direction",presto:"",trident:"",status:"WD"},{gecko:"-moz-box-flex",webkit:"-webkit-box-flex",presto:"",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-box-flex-group",presto:"",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-box-lines",presto:"",trident:"",status:"WD"},{gecko:"-moz-box-ordinal-group",webkit:"-webkit-box-ordinal-group",presto:"",trident:"",status:"WD"},{gecko:"-moz-box-orient",webkit:"-webkit-box-orient",presto:"",trident:"",status:"WD"},{gecko:"-moz-box-pack",webkit:"-webkit-box-pack",presto:"",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-box-reflect",presto:"",trident:"",status:""},{gecko:"box-shadow",webkit:"-webkit-box-shadow",presto:"box-shadow",trident:"box-shadow",status:"WD"},{gecko:"-moz-box-sizing",webkit:"-webkit-box-sizing",presto:"box-sizing",trident:"box-sizing",status:"CR"},{gecko:"caption-side",webkit:"-epub-caption-side",presto:"caption-side",trident:"caption-side",status:""},{gecko:"clip-path",webkit:"-webkit-clip-path",presto:"clip-path",trident:"",status:""},{gecko:"",webkit:"-webkit-color-correction",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-column-axis",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-column-break-after",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-column-break-before",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-column-break-inside",presto:"",trident:"",status:""},{gecko:"-moz-column-count",webkit:"-webkit-column-count",presto:"column-count",trident:"column-count",status:"CR"},{gecko:"-moz-column-fill",webkit:"",presto:"column-fill",trident:"column-fill",status:"CR"},{gecko:"-moz-column-gap",webkit:"-webkit-column-gap",presto:"column-gap",trident:"column-gap",status:"CR"},{gecko:"",webkit:"-webkit-column-progression",presto:"",trident:"",status:""},{gecko:"-moz-column-rule",webkit:"-webkit-column-rule",presto:"column-rule",trident:"column-rule",status:"CR"},{gecko:"-moz-column-rule-color",webkit:"-webkit-column-rule-color",presto:"column-rule-color",trident:"column-rule-color",status:"CR"},{gecko:"-moz-column-rule-style",webkit:"-webkit-column-rule-style",presto:"column-rule-style",trident:"column-rule-style",status:"CR"},{gecko:"-moz-column-rule-width",webkit:"-webkit-column-rule-width",presto:"column-rule-width",trident:"column-rule-width",status:"CR"},{gecko:"",webkit:"-webkit-column-span",presto:"column-span",trident:"column-span",status:"CR"},{gecko:"-moz-column-width",webkit:"-webkit-column-width",presto:"column-width",trident:"column-width",status:"CR"},{gecko:"-moz-columns",webkit:"-webkit-columns",presto:"columns",trident:"columns",status:"CR"},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-chaining",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-limit",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-limit-max",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-limit-min",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-snap",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-snap-points",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zoom-snap-type",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-content-zooming",status:""},{gecko:"",webkit:"-webkit-cursor-visibility",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-dashboard-region",presto:"-apple-dashboard-region",trident:"",status:""},{gecko:"",webkit:"",presto:"-o-device-pixel-ratio",trident:"",status:""},{gecko:"filter",webkit:"-webkit-filter",presto:"filter",trident:"-ms-filter",status:""},{gecko:"flex",webkit:"-webkit-flex",presto:"",trident:"-ms-flex",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-flex-align",status:""},{gecko:"flex-basis",webkit:"-webkit-flex-basis",presto:"",trident:"",status:""},{gecko:"flex-direction",webkit:"-webkit-flex-direction",presto:"",trident:"-ms-flex-direction",status:""},{gecko:"",webkit:"-webkit-flex-flow",presto:"",trident:"",status:""},{gecko:"flex-grow",webkit:"-webkit-flex-grow",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-flex-order",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-flex-pack",status:""},{gecko:"flex-shrink",webkit:"-webkit-flex-shrink",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-flex-wrap",presto:"",trident:"-ms-flex-wrap",status:""},{gecko:"-moz-float-edge",webkit:"",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-flow-from",presto:"",trident:"-ms-flow-from",status:""},{gecko:"",webkit:"-webkit-flow-into",presto:"",trident:"-ms-flow-into",status:""},{gecko:"",webkit:"",presto:"-o-focus-opacity",trident:"",status:""},{gecko:"-moz-font-feature-settings",webkit:"-webkit-font-feature-settings",presto:"",trident:"font-feature-settings",status:""},{gecko:"font-kerning",webkit:"-webkit-font-kerning",presto:"",trident:"",status:""},{gecko:"-moz-font-language-override",webkit:"",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-font-size-delta",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-font-smoothing",presto:"",trident:"",status:""},{gecko:"font-variant-ligatures",webkit:"-webkit-font-variant-ligatures",presto:"",trident:"",status:""},{gecko:"-moz-force-broken-image-icon",webkit:"",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-after",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-auto-columns",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-auto-flow",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-auto-rows",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-before",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-column",presto:"",trident:"-ms-grid-column",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-grid-column-align",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-grid-column-span",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-grid-columns",status:"WD"},{gecko:"",webkit:"-webkit-grid-definition-columns",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-definition-rows",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-end",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-grid-row",presto:"",trident:"-ms-grid-row",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-grid-row-align",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-grid-row-span",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-grid-rows",status:"WD"},{gecko:"",webkit:"-webkit-grid-start",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-high-contrast-adjust",status:""},{gecko:"",webkit:"-webkit-highlight",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-hyphenate-character",presto:"",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-hyphenate-limit-after",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-hyphenate-limit-before",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-hyphenate-limit-chars",status:""},{gecko:"",webkit:"-webkit-hyphenate-limit-lines",presto:"",trident:"-ms-hyphenate-limit-lines",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-hyphenate-limit-zone",status:""},{gecko:"-moz-hyphens",webkit:"-epub-hyphens",presto:"",trident:"-ms-hyphens",status:"WD"},{gecko:"-moz-image-region",webkit:"",presto:"",trident:"",status:"P"},{gecko:"ime-mode",webkit:"",presto:"",trident:"-ms-ime-mode",status:""},{gecko:"",webkit:"",presto:"-wap-input-format",trident:"",status:""},{gecko:"",webkit:"",presto:"-wap-input-required",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-interpolation-mode",status:""},{gecko:"",webkit:"",presto:"-xv-interpret-as",trident:"",status:""},{gecko:"justify-content",webkit:"-webkit-justify-content",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-layout-flow",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-layout-grid",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-layout-grid-char",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-layout-grid-line",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-layout-grid-mode",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-layout-grid-type",status:""},{gecko:"",webkit:"-webkit-line-align",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-line-box-contain",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-line-break",presto:"",trident:"line-break",status:""},{gecko:"",webkit:"-webkit-line-clamp",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-line-grid",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-line-snap",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"-o-link",trident:"",status:""},{gecko:"",webkit:"",presto:"-o-link-source",trident:"",status:""},{gecko:"",webkit:"-webkit-locale",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-logical-height",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-logical-width",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-margin-after",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-margin-after-collapse",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-margin-before",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-margin-before-collapse",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-margin-bottom-collapse",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-margin-collapse",presto:"",trident:"",status:""},{gecko:"-moz-margin-end",webkit:"-webkit-margin-end",presto:"",trident:"",status:"ED"},{gecko:"-moz-margin-start",webkit:"-webkit-margin-start",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-margin-top-collapse",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-marquee",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"-wap-marquee-dir",trident:"",status:""},{gecko:"",webkit:"-webkit-marquee-direction",presto:"",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-marquee-increment",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"-wap-marquee-loop",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-marquee-repetition",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-marquee-speed",presto:"-wap-marquee-speed",trident:"",status:"WD"},{gecko:"",webkit:"-webkit-marquee-style",presto:"-wap-marquee-style",trident:"",status:"WD"},{gecko:"mask",webkit:"-webkit-mask",presto:"mask",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-box-image",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-box-image-outset",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-box-image-repeat",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-box-image-slice",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-box-image-source",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-box-image-width",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-clip",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-composite",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-image",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-origin",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-position",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-position-x",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-position-y",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-repeat",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-repeat-x",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-repeat-y",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-mask-size",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-max-logical-height",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-max-logical-width",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-min-logical-height",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-min-logical-width",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"",presto:"-o-mini-fold",trident:"",status:""},{gecko:"",webkit:"-webkit-nbsp-mode",presto:"",trident:"",status:"P"},{gecko:"",webkit:"",presto:"-o-object-fit",trident:"",status:"ED"},{gecko:"",webkit:"",presto:"-o-object-position",trident:"",status:"ED"},{gecko:"opacity",webkit:"-webkit-opacity",presto:"opacity",trident:"opacity",status:"WD"},{gecko:"order",webkit:"-webkit-order",presto:"",trident:"",status:""},{gecko:"-moz-orient",webkit:"",presto:"",trident:"",status:""},{gecko:"-moz-outline-radius",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-outline-radius-bottomleft",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-outline-radius-bottomright",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-outline-radius-topleft",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-outline-radius-topright",webkit:"",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-overflow-scrolling",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-overflow-style",status:"CR"},{gecko:"overflow-x",webkit:"overflow-x",presto:"overflow-x",trident:"-ms-overflow-x",status:"WD"},{gecko:"overflow-y",webkit:"overflow-y",presto:"overflow-y",trident:"-ms-overflow-y",status:"WD"},{gecko:"",webkit:"-webkit-padding-after",presto:"",trident:"",status:"ED"},{gecko:"",webkit:"-webkit-padding-before",presto:"",trident:"",status:"ED"},{gecko:"-moz-padding-end",webkit:"-webkit-padding-end",presto:"",trident:"",status:"ED"},{gecko:"-moz-padding-start",webkit:"-webkit-padding-start",presto:"",trident:"",status:"ED"},{gecko:"perspective",webkit:"-webkit-perspective",presto:"",trident:"perspective",status:"WD"},{gecko:"perspective-origin",webkit:"-webkit-perspective-origin",presto:"",trident:"perspective-origin",status:"WD"},{gecko:"",webkit:"-webkit-perspective-origin-x",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-perspective-origin-y",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-phonemes",trident:"",status:""},{gecko:"",webkit:"-webkit-print-color-adjust",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-progress-appearance",status:""},{gecko:"",webkit:"-webkit-region-break-after",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-region-break-before",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-region-break-inside",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-region-fragment",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-rtl-ordering",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-ruby-position",presto:"",trident:"ruby-position",status:"CR"},{gecko:"-moz-script-level",webkit:"",presto:"",trident:"",status:""},{gecko:"-moz-script-min-size",webkit:"",presto:"",trident:"",status:""},{gecko:"-moz-script-size-multiplier",webkit:"",presto:"",trident:"",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-chaining",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-limit",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-limit-x-max",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-limit-x-min",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-limit-y-max",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-limit-y-min",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-rails",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-snap-points-x",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-snap-points-y",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-snap-type",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-snap-x",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-snap-y",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-scroll-translation",status:""},{gecko:"",webkit:"",presto:"scrollbar-arrow-color",trident:"-ms-scrollbar-arrow-color",status:"P"},{gecko:"",webkit:"",presto:"scrollbar-base-color",trident:"-ms-scrollbar-base-color",status:"P"},{gecko:"",webkit:"",presto:"scrollbar-darkshadow-color",trident:"-ms-scrollbar-darkshadow-color",status:"P"},{gecko:"",webkit:"",presto:"scrollbar-face-color",trident:"-ms-scrollbar-face-color",status:"P"},{gecko:"",webkit:"",presto:"scrollbar-highlight-color",trident:"-ms-scrollbar-highlight-color",status:"P"},{gecko:"",webkit:"", | |
presto:"scrollbar-shadow-color",trident:"-ms-scrollbar-shadow-color",status:"P"},{gecko:"",webkit:"",presto:"scrollbar-track-color",trident:"-ms-scrollbar-track-color",status:"P"},{gecko:"",webkit:"-webkit-shape-inside",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-shape-margin",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-shape-outside",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-shape-padding",presto:"",trident:"",status:""},{gecko:"-moz-stack-sizing",webkit:"",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-svg-shadow",presto:"",trident:"",status:""},{gecko:"-moz-tab-size",webkit:"tab-size",presto:"-o-tab-size",trident:"",status:""},{gecko:"",webkit:"",presto:"-o-table-baseline",trident:"",status:""},{gecko:"",webkit:"-webkit-tap-highlight-color",presto:"",trident:"",status:"P"},{gecko:"-moz-text-align-last",webkit:"-webkit-text-align-last",presto:"",trident:"-ms-text-align-last",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-text-autospace",status:"WD"},{gecko:"-moz-text-blink",webkit:"",presto:"",trident:"",status:""},{gecko:"",webkit:"-epub-text-combine",presto:"",trident:"",status:""},{gecko:"-moz-text-decoration-color",webkit:"-webkit-text-decoration-color",presto:"",trident:"",status:""},{gecko:"-moz-text-decoration-line",webkit:"-webkit-text-decoration-line",presto:"",trident:"",status:""},{gecko:"-moz-text-decoration-style",webkit:"-webkit-text-decoration-style",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-text-decorations-in-effect",presto:"",trident:"",status:""},{gecko:"",webkit:"-epub-text-emphasis",presto:"",trident:"",status:""},{gecko:"",webkit:"-epub-text-emphasis-color",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-text-emphasis-position",presto:"",trident:"",status:""},{gecko:"",webkit:"-epub-text-emphasis-style",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-text-fill-color",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-text-justify",presto:"",trident:"-ms-text-justify",status:"WD"},{gecko:"",webkit:"",presto:"",trident:"-ms-text-kashida-space",status:"P"},{gecko:"",webkit:"-epub-text-orientation",presto:"",trident:"",status:""},{gecko:"text-overflow",webkit:"text-overflow",presto:"text-overflow",trident:"-ms-text-overflow",status:"WD"},{gecko:"",webkit:"-webkit-text-security",presto:"",trident:"",status:"P"},{gecko:"-moz-text-size-adjust",webkit:"",presto:"",trident:"",status:""},{gecko:"",webkit:"-webkit-text-stroke",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-text-stroke-color",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-text-stroke-width",presto:"",trident:"",status:"P"},{gecko:"text-transform",webkit:"-epub-text-transform",presto:"text-transform",trident:"text-transform",status:""},{gecko:"",webkit:"-webkit-text-underline-position",presto:"",trident:"-ms-text-underline-position",status:"P"},{gecko:"",webkit:"",presto:"",trident:"-ms-touch-action",status:""},{gecko:"",webkit:"-webkit-touch-callout",presto:"",trident:"",status:"P"},{gecko:"-moz-transform",webkit:"-webkit-transform",presto:"-o-transform",trident:"transform",status:"WD"},{gecko:"transform-origin",webkit:"-webkit-transform-origin",presto:"-o-transform-origin",trident:"transform-origin",status:"WD"},{gecko:"",webkit:"-webkit-transform-origin-x",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-transform-origin-y",presto:"",trident:"",status:"P"},{gecko:"",webkit:"-webkit-transform-origin-z",presto:"",trident:"",status:"P"},{gecko:"transform-style",webkit:"-webkit-transform-style",presto:"",trident:"transform-style",status:"WD"},{gecko:"transition",webkit:"-webkit-transition",presto:"-o-transition",trident:"transition",status:"WD"},{gecko:"transition-delay",webkit:"-webkit-transition-delay",presto:"-o-transition-delay",trident:"transition-delay",status:"WD"},{gecko:"transition-duration",webkit:"-webkit-transition-duration",presto:"-o-transition-duration",trident:"transition-duration",status:"WD"},{gecko:"transition-property",webkit:"-webkit-transition-property",presto:"-o-transition-property",trident:"transition-property",status:"WD"},{gecko:"transition-timing-function",webkit:"-webkit-transition-timing-function",presto:"-o-transition-timing-function",trident:"transition-timing-function",status:"WD"},{gecko:"",webkit:"-webkit-user-drag",presto:"",trident:"",status:"P"},{gecko:"-moz-user-focus",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-user-input",webkit:"",presto:"",trident:"",status:"P"},{gecko:"-moz-user-modify",webkit:"-webkit-user-modify",presto:"",trident:"",status:"P"},{gecko:"-moz-user-select",webkit:"-webkit-user-select",presto:"",trident:"-ms-user-select",status:"P"},{gecko:"",webkit:"",presto:"-xv-voice-balance",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-voice-duration",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-voice-pitch",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-voice-pitch-range",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-voice-rate",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-voice-stress",trident:"",status:""},{gecko:"",webkit:"",presto:"-xv-voice-volume",trident:"",status:""},{gecko:"-moz-window-shadow",webkit:"",presto:"",trident:"",status:"P"},{gecko:"word-break",webkit:"-epub-word-break",presto:"",trident:"-ms-word-break",status:"WD"},{gecko:"word-wrap",webkit:"word-wrap",presto:"word-wrap",trident:"-ms-word-wrap",status:"WD"},{gecko:"",webkit:"-webkit-wrap-flow",presto:"",trident:"-ms-wrap-flow",status:""},{gecko:"",webkit:"",presto:"",trident:"-ms-wrap-margin",status:""},{gecko:"",webkit:"-webkit-wrap-through",presto:"",trident:"-ms-wrap-through",status:""},{gecko:"writing-mode",webkit:"-epub-writing-mode",presto:"writing-mode",trident:"-ms-writing-mode",status:"ED"},{gecko:"",webkit:"zoom",presto:"",trident:"-ms-zoom",status:""}]},PrefixHelper={mVENDOR_PREFIXES:null,kEXPORTS_FOR_GECKO:!0,kEXPORTS_FOR_WEBKIT:!0,kEXPORTS_FOR_PRESTO:!0,kEXPORTS_FOR_TRIDENT:!0,cleanPrefixes:function(){this.mVENDOR_PREFIXES=null},prefixesForProperty:function(a){if(!this.mVENDOR_PREFIXES){this.mVENDOR_PREFIXES={};for(var b=0;b<kCSS_VENDOR_PREFIXES.properties.length;b++){var c=kCSS_VENDOR_PREFIXES.properties[b];if(c.gecko&&(c.webkit||c.presto||c.trident)){var d={};this.kEXPORTS_FOR_GECKO&&(d[c.gecko]=!0),this.kEXPORTS_FOR_WEBKIT&&c.webkit&&(d[c.webkit]=!0),this.kEXPORTS_FOR_PRESTO&&c.presto&&(d[c.presto]=!0),this.kEXPORTS_FOR_TRIDENT&&c.trident&&(d[c.trident]=!0),this.mVENDOR_PREFIXES[c.gecko]=[];for(var e in d)this.mVENDOR_PREFIXES[c.gecko].push(e)}}}return a in this.mVENDOR_PREFIXES?this.mVENDOR_PREFIXES[a].sort():null}},CSS_ESCAPE="\\",IS_HEX_DIGIT=1,START_IDENT=2,IS_IDENT=4,IS_WHITESPACE=8,W=IS_WHITESPACE,I=IS_IDENT,S=START_IDENT,SI=IS_IDENT|START_IDENT,XI=IS_IDENT|IS_HEX_DIGIT,XSI=IS_IDENT|START_IDENT|IS_HEX_DIGIT;CSSScanner.prototype={kLexTable:[0,0,0,0,0,0,0,0,0,W,W,0,W,W,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,W,0,0,0,0,0,0,0,0,0,0,0,0,I,0,0,XI,XI,XI,XI,XI,XI,XI,XI,XI,XI,0,0,0,0,0,0,0,XSI,XSI,XSI,XSI,XSI,XSI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,0,S,0,0,SI,0,XSI,XSI,XSI,XSI,XSI,XSI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI,SI],kHexValues:{0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,b:11,c:12,d:13,e:14,f:15},mString:"",mPos:0,mPreservedPos:[],init:function(a){this.mString=a,this.mPos=0,this.mPreservedPos=[]},getCurrentPos:function(){return this.mPos},getAlreadyScanned:function(){return this.mString.substr(0,this.mPos)},preserveState:function(){this.mPreservedPos.push(this.mPos)},restoreState:function(){this.mPreservedPos.length&&(this.mPos=this.mPreservedPos.pop())},forgetState:function(){this.mPreservedPos.length&&this.mPreservedPos.pop()},read:function(){return this.mPos<this.mString.length?this.mString.charAt(this.mPos++):-1},peek:function(){return this.mPos<this.mString.length?this.mString.charAt(this.mPos):-1},isHexDigit:function(a){var b=a.charCodeAt(0);return b<256&&0!=(this.kLexTable[b]&IS_HEX_DIGIT)},isIdentStart:function(a){var b=a.charCodeAt(0);return b>=256||0!=(this.kLexTable[b]&START_IDENT)},startsWithIdent:function(a,b){a.charCodeAt(0);return this.isIdentStart(a)||"-"==a&&this.isIdentStart(b)},isIdent:function(a){var b=a.charCodeAt(0);return b>=256||0!=(this.kLexTable[b]&IS_IDENT)},pushback:function(){this.mPos--},nextHexValue:function(){var a=this.read();if(a==-1||!this.isHexDigit(a))return new jscsspToken(jscsspToken.NULL_TYPE,null);var b=a;for(a=this.read();a!=-1&&this.isHexDigit(a);)b+=a,a=this.read();return a!=-1&&this.pushback(),new jscsspToken(jscsspToken.HEX_TYPE,b)},gatherEscape:function(){var a=this.peek();if(a==-1)return"";if(this.isHexDigit(a)){for(var b=0,c=0;c<6;c++){if(a=this.read(),!this.isHexDigit(a)){if(this.isHexDigit(a)||this.isWhiteSpace(a))break;this.pushback();break}b=16*b+this.kHexValues[a.toLowerCase()]}return 6==c&&(a=this.peek(),this.isWhiteSpace(a)&&this.read()),String.fromCharCode(b)}return a=this.read(),"\n"!=a?a:""},gatherIdent:function(a){var b="";for(b+=a==CSS_ESCAPE?this.gatherEscape():a,a=this.read();a!=-1&&(this.isIdent(a)||a==CSS_ESCAPE);)b+=a==CSS_ESCAPE?this.gatherEscape():a,a=this.read();return a!=-1&&this.pushback(),b},parseIdent:function(a){var b=this.gatherIdent(a),c=this.peek();return"("==c?(b+=this.read(),new jscsspToken(jscsspToken.FUNCTION_TYPE,b)):new jscsspToken(jscsspToken.IDENT_TYPE,b)},isDigit:function(a){return a>="0"&&a<="9"},parseComment:function(a){for(var b=a;(a=this.read())!=-1;)if(b+=a,"*"==a){if(a=this.read(),a==-1)break;if("/"==a){b+=a;break}this.pushback()}return new jscsspToken(jscsspToken.COMMENT_TYPE,b)},parseNumber:function(a){for(var b=a,c=!1;(a=this.read())!=-1;)if("."==a){if(c)break;b+=a,c=!0}else{if(!this.isDigit(a))break;b+=a}if(a!=-1&&this.startsWithIdent(a,this.peek())){var d=this.gatherIdent(a);return b+=d,new jscsspToken(jscsspToken.DIMENSION_TYPE,b,d)}return"%"==a?(b+="%",new jscsspToken(jscsspToken.PERCENTAGE_TYPE,b)):(a!=-1&&this.pushback(),new jscsspToken(jscsspToken.NUMBER_TYPE,b))},parseString:function(a){for(var e,b=a,c=a;(e=this.read())!=-1;){if(e==a&&c!=CSS_ESCAPE){b+=e;break}if(e==CSS_ESCAPE){if(e=this.peek(),e==-1)break;"\n"==e||"\r"==e||"\f"==e?(d=e,e=this.read(),"\r"==d&&(e=this.peek(),"\n"==e&&(e=this.read()))):(b+=this.gatherEscape(),e=this.peek())}else{if("\n"==e||"\r"==e||"\f"==e)break;b+=e}c=e}return new jscsspToken(jscsspToken.STRING_TYPE,b)},isWhiteSpace:function(a){var b=a.charCodeAt(0);return b<256&&0!=(this.kLexTable[b]&IS_WHITESPACE)},eatWhiteSpace:function(a){for(var b=a;(a=this.read())!=-1&&this.isWhiteSpace(a);)b+=a;return a!=-1&&this.pushback(),b},parseAtKeyword:function(a){return new jscsspToken(jscsspToken.ATRULE_TYPE,this.gatherIdent(a))},nextToken:function(){var a=this.read();if(a==-1)return new jscsspToken(jscsspToken.NULL_TYPE,null);if(this.startsWithIdent(a,this.peek()))return this.parseIdent(a);if("@"==a){var b=this.read();if(b!=-1){var c=this.peek();if(this.pushback(),this.startsWithIdent(b,c))return this.parseAtKeyword(a)}}if("."==a||"+"==a||"-"==a){var b=this.peek();if(this.isDigit(b))return this.parseNumber(a);if("."==b&&"."!=a){firstChar=this.read();var d=this.peek();if(this.pushback(),this.isDigit(d))return this.parseNumber(a)}}if(this.isDigit(a))return this.parseNumber(a);if("'"==a||'"'==a)return this.parseString(a);if(this.isWhiteSpace(a)){var e=this.eatWhiteSpace(a);return new jscsspToken(jscsspToken.WHITESPACE_TYPE,e)}if("|"==a||"~"==a||"^"==a||"$"==a||"*"==a){var b=this.read();if("="==b)switch(a){case"~":return new jscsspToken(jscsspToken.INCLUDES_TYPE,"~=");case"|":return new jscsspToken(jscsspToken.DASHMATCH_TYPE,"|=");case"^":return new jscsspToken(jscsspToken.BEGINSMATCH_TYPE,"^=");case"$":return new jscsspToken(jscsspToken.ENDSMATCH_TYPE,"$=");case"*":return new jscsspToken(jscsspToken.CONTAINSMATCH_TYPE,"*=")}else b!=-1&&this.pushback()}return"/"==a&&"*"==this.peek()?this.parseComment(a):new jscsspToken(jscsspToken.SYMBOL_TYPE,a)}},CSSParser.prototype.parseBackgroundImages=function(){for(var a=[],b=this.getToken(!0,!0);b.isNotNull();){if(b.isFunction("url(")){b=this.getToken(!0,!0);var c=this.parseURL(b);a.push({type:"image",value:"url("+c}),b=this.getToken(!0,!0)}else if(b.isFunction("linear-gradient(")||b.isFunction("radial-gradient(")||b.isFunction("repeating-linear-gradient(")||b.isFunction("repeating-radial-gradient(")){this.ungetToken();var d=this.parseGradient();if(!d)return null;a.push({type:d.isRadial?"radial-gradient":"linear-gradient",value:d}),b=this.getToken(!0,!0)}else{if(!(b.isIdent("none")||b.isIdent("inherit")||b.isIdent("initial")))return null;a.push({type:b.value}),b=this.getToken(!0,!0)}if(b.isSymbol(",")&&(b=this.getToken(!0,!0),!b.isNotNull()))return null}return a},CSSParser.prototype.parseBackgroundShorthand=function(a,b,c){for(var d={left:!0,right:!0},e={top:!0,bottom:!0},f={left:!0,right:!0,top:!0,bottom:!0,center:!0},g=null,h=null,i=null,j=null,k=null;;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(g||h||i||j||k||!a.isIdent(this.kINHERIT))if(i||!a.isIdent("scroll")&&!a.isIdent("fixed")){if(!k&&(a.isIdent()&&a.value in f||a.isDimension()||a.isNumber("0")||a.isPercentage()))if(k=a.value,a=this.getToken(!0,!0),a.isDimension()||a.isNumber("0")||a.isPercentage())k+=" "+a.value;else if(a.isIdent()&&a.value in f){if(k in d&&a.value in d||k in e&&a.value in e)return"";k+=" "+a.value}else this.ungetToken(),k+=" center";else if(!h&&(a.isIdent("repeat")||a.isIdent("repeat-x")||a.isIdent("repeat-y")||a.isIdent("no-repeat")))h=a.value;else if(j||!a.isFunction("url(")&&!a.isIdent("none"))if(!j&&(a.isFunction("linear-gradient(")||a.isFunction("radial-gradient(")||a.isFunction("repeating-linear-gradient(")||a.isFunction("repeating-radial-gradient("))){this.ungetToken();var m=this.parseGradient();if(!m)return"";j=this.serializeGradient(m)}else{var n=this.parseColor(a);if(g||!n)return"";g=n}else if(j=a.value,a.isFunction("url(")){a=this.getToken(!0,!0);var l=this.parseURL(a);if(!l)return"";j+=l}}else i=a.value;else g=this.kINHERIT,h=this.kINHERIT,i=this.kINHERIT,j=this.kINHERIT,k=this.kINHERIT;a=this.getToken(!0,!0)}return this.forgetState(),g=g?g:"transparent",j=j?j:"none",h=h?h:"repeat",i=i?i:"scroll",k=k?k:"top left",b.push(this._createJscsspDeclarationFromValue("background-color",g)),b.push(this._createJscsspDeclarationFromValue("background-image",j)),b.push(this._createJscsspDeclarationFromValue("background-repeat",h)),b.push(this._createJscsspDeclarationFromValue("background-attachment",i)),b.push(this._createJscsspDeclarationFromValue("background-position",k)),g+" "+j+" "+h+" "+i+" "+k},CSSParser.prototype.parseBorderColorShorthand=function(a,b,c){for(var d=null,e=null,f=null,g=null,h=[];;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(!h.length&&a.isIdent(this.kINHERIT)){h.push(a.value),a=this.getToken(!0,!0);break}var i=this.parseColor(a);if(!i)return"";h.push(i),a=this.getToken(!0,!0)}var j=h.length;switch(j){case 1:d=h[0],e=d,f=d,g=d;break;case 2:d=h[0],e=d,f=h[1],g=f;break;case 3:d=h[0],f=h[1],g=f,e=h[2];break;case 4:d=h[0],g=h[1],e=h[2],f=h[3];break;default:return""}return this.forgetState(),b.push(this._createJscsspDeclarationFromValue("border-top-color",d)),b.push(this._createJscsspDeclarationFromValue("border-right-color",g)),b.push(this._createJscsspDeclarationFromValue("border-bottom-color",e)),b.push(this._createJscsspDeclarationFromValue("border-left-color",f)),d+" "+g+" "+e+" "+f},CSSParser.prototype.parseBorderEdgeOrOutlineShorthand=function(a,b,c,d){function i(a,b,c,d,e,f){b.push(a._createJscsspDeclarationFromValue(c+"-width",d)),b.push(a._createJscsspDeclarationFromValue(c+"-style",e)),b.push(a._createJscsspDeclarationFromValue(c+"-color",f))}for(var e=null,f=null,g=null;;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(e||f||g||!a.isIdent(this.kINHERIT))if(!e&&(a.isDimension()||a.isIdent()&&a.value in this.kBORDER_WIDTH_NAMES||a.isNumber("0")))e=a.value;else if(!f&&a.isIdent()&&a.value in this.kBORDER_STYLE_NAMES)f=a.value;else{var h="outline"==d&&a.isIdent("invert")?"invert":this.parseColor(a);if(g||!h)return"";g=h}else e=this.kINHERIT,f=this.kINHERIT,g=this.kINHERIT;a=this.getToken(!0,!0)}return this.forgetState(),e=e?e:"medium",f=f?f:"none",g=g?g:"-moz-initial","border"==d?(i(this,b,"border-top",e,f,g),i(this,b,"border-right",e,f,g),i(this,b,"border-bottom",e,f,g),i(this,b,"border-left",e,f,g)):i(this,b,d,e,f,g),e+" "+f+" "+g},CSSParser.prototype.parseBorderImage=function(){var a={url:"",offsets:[],widths:[],sizes:[]},b=this.getToken(!0,!0);if(!b.isFunction("url("))return null;b=this.getToken(!0,!0);var c=this.parseURL(b);if(!c)return null;if(a.url=c.substr(0,c.length-1).trim(),('"'==a.url[0]&&'"'==a.url[a.url.length-1]||"'"==a.url[0]&&"'"==a.url[a.url.length-1])&&(a.url=a.url.substr(1,a.url.length-2)),b=this.getToken(!0,!0),!b.isNumber()&&!b.isPercentage())return null;a.offsets.push(b.value);var d;for(d=0;d<3&&(b=this.getToken(!0,!0),b.isNumber()||b.isPercentage());d++)a.offsets.push(b.value);if(3==d&&(b=this.getToken(!0,!0)),b.isSymbol("/")){if(b=this.getToken(!0,!0),!(b.isDimension()||b.isNumber("0")||b.isIdent()&&b.value in this.kBORDER_WIDTH_NAMES))return null;a.widths.push(b.value);for(var d=0;d<3&&(b=this.getToken(!0,!0),b.isDimension()||b.isNumber("0")||b.isIdent()&&b.value in this.kBORDER_WIDTH_NAMES);d++)a.widths.push(b.value);3==d&&(b=this.getToken(!0,!0))}for(var d=0;d<2;d++){if(!(b.isIdent("stretch")||b.isIdent("repeat")||b.isIdent("round")))return b.isNotNull()?null:a;a.sizes.push(b.value),b=this.getToken(!0,!0)}return b.isNotNull()?null:a},CSSParser.prototype.parseBorderStyleShorthand=function(a,b,c){for(var d=null,e=null,f=null,g=null,h=[];;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(!h.length&&a.isIdent(this.kINHERIT))h.push(a.value);else{if(!(a.isIdent()&&a.value in this.kBORDER_STYLE_NAMES))return"";h.push(a.value)}a=this.getToken(!0,!0)}var i=h.length;switch(i){case 1:d=h[0],e=d,f=d,g=d;break;case 2:d=h[0],e=d,f=h[1],g=f;break;case 3:d=h[0],f=h[1],g=f,e=h[2];break;case 4:d=h[0],g=h[1],e=h[2],f=h[3];break;default:return""}return this.forgetState(),b.push(this._createJscsspDeclarationFromValue("border-top-style",d)),b.push(this._createJscsspDeclarationFromValue("border-right-style",g)),b.push(this._createJscsspDeclarationFromValue("border-bottom-style",e)),b.push(this._createJscsspDeclarationFromValue("border-left-style",f)),d+" "+g+" "+e+" "+f},CSSParser.prototype.parseBorderWidthShorthand=function(a,b,c){for(var d=null,e=null,f=null,g=null,h=[];;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(!h.length&&a.isIdent(this.kINHERIT))h.push(a.value);else{if(!(a.isDimension()||a.isNumber("0")||a.isIdent()&&a.value in this.kBORDER_WIDTH_NAMES))return"";h.push(a.value)}a=this.getToken(!0,!0)}var i=h.length;switch(i){case 1:d=h[0],e=d,f=d,g=d;break;case 2:d=h[0],e=d,f=h[1],g=f;break;case 3:d=h[0],f=h[1],g=f,e=h[2];break;case 4:d=h[0],g=h[1],e=h[2],f=h[3];break;default:return""}return this.forgetState(),b.push(this._createJscsspDeclarationFromValue("border-top-width",d)),b.push(this._createJscsspDeclarationFromValue("border-right-width",g)),b.push(this._createJscsspDeclarationFromValue("border-bottom-width",e)),b.push(this._createJscsspDeclarationFromValue("border-left-width",f)),d+" "+g+" "+e+" "+f},CSSParser.prototype.parseBoxShadows=function(){for(var a=[],b=this.getToken(!0,!0),c="",d="0px",e="0px",f="0px",g="0px",h=!1;b.isNotNull();)if(b.isIdent("none"))a.push({none:!0}),b=this.getToken(!0,!0);else{if(b.isIdent("inset")&&(h=!0,b=this.getToken(!0,!0)),!(b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")))return[];var e=b.value;if(b=this.getToken(!0,!0),!h&&b.isIdent("inset")&&(h=!0,b=this.getToken(!0,!0)),!(b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")))return[];var f=b.value;if(b=this.getToken(!0,!0),!h&&b.isIdent("inset")&&(h=!0,b=this.getToken(!0,!0)),b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")){var d=b.value;b=this.getToken(!0,!0)}if(!h&&b.isIdent("inset")&&(h=!0,b=this.getToken(!0,!0)),b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")){var g=b.value;b=this.getToken(!0,!0)}if(!h&&b.isIdent("inset")&&(h=!0,b=this.getToken(!0,!0)),b.isFunction("rgb(")||b.isFunction("rgba(")||b.isFunction("hsl(")||b.isFunction("hsla(")||b.isSymbol("#")||b.isIdent()){var c=this.parseColor(b);b=this.getToken(!0,!0)}if(!h&&b.isIdent("inset")&&(h=!0,b=this.getToken(!0,!0)),a.push({none:!1,color:c,offsetX:e,offsetY:f,blurRadius:d,spreadRadius:g,inset:h}),!b.isSymbol(","))return b.isNotNull()?[]:a;h=!1,c="",d="0px",g="0px",e="0px",f="0px",b=this.getToken(!0,!0)}return a},CSSParser.prototype.parseCharsetRule=function(a){var b=this.getToken(!1,!1);if(b.isAtRule("@charset")&&"@charset"==b.value){var c=b.value;if(b=this.getToken(!1,!1),c+=b.value,b.isWhiteSpace(" "))if(b=this.getToken(!1,!1),c+=b.value,b.isString()){var d=b.value;if(b=this.getToken(!1,!1),c+=b.value,b.isSymbol(";")){var e=new jscsspCharsetRule;return e.encoding=d,e.parsedCssText=c,e.parentStyleSheet=a,a.cssRules.push(e),!0}this.reportError(kCHARSET_RULE_MISSING_SEMICOLON)}else this.reportError(kCHARSET_RULE_CHARSET_IS_STRING);else this.reportError(kCHARSET_RULE_MISSING_WS)}return this.addUnknownAtRule(a,c),!1},CSSParser.prototype.parseColor=function(a){var b="";if(a.isFunction("rgb(")||a.isFunction("rgba(")){b=a.value;var c=a.isFunction("rgba(");if(a=this.getToken(!0,!0),!a.isNumber()&&!a.isPercentage())return"";if(b+=a.value,a=this.getToken(!0,!0),!a.isSymbol(","))return"";if(b+=", ",a=this.getToken(!0,!0),!a.isNumber()&&!a.isPercentage())return"";if(b+=a.value,a=this.getToken(!0,!0),!a.isSymbol(","))return"";if(b+=", ",a=this.getToken(!0,!0),!a.isNumber()&&!a.isPercentage())return"";if(b+=a.value,c){if(a=this.getToken(!0,!0),!a.isSymbol(","))return"";if(b+=", ",a=this.getToken(!0,!0),!a.isNumber())return"";b+=a.value}if(a=this.getToken(!0,!0),!a.isSymbol(")"))return"";b+=a.value}else if(a.isFunction("hsl(")||a.isFunction("hsla(")){b=a.value;var d=a.isFunction("hsla(");if(a=this.getToken(!0,!0),!a.isNumber())return"";if(b+=a.value,a=this.getToken(!0,!0),!a.isSymbol(","))return"";if(b+=", ",a=this.getToken(!0,!0),!a.isPercentage())return"";if(b+=a.value,a=this.getToken(!0,!0),!a.isSymbol(","))return"";if(b+=", ",a=this.getToken(!0,!0),!a.isPercentage())return"";if(b+=a.value,d){if(a=this.getToken(!0,!0),!a.isSymbol(","))return"";if(b+=", ",a=this.getToken(!0,!0),!a.isNumber())return"";b+=a.value}if(a=this.getToken(!0,!0),!a.isSymbol(")"))return"";b+=a.value}else if(a.isIdent()&&a.value in this.kCOLOR_NAMES)b=a.value;else if(a.isSymbol("#")){if(a=this.getHexValue(),!a.isHex())return"";var e=a.value.length;if(3!=e&&6!=e)return"";if(a.value.match(/[a-fA-F0-9]/g).length!=e)return"";b="#"+a.value}return b},CSSParser.prototype.parseCueShorthand=function(a,b,c){for(var d="",e="",f=[],f=[];;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(!f.length&&a.isIdent(this.kINHERIT))f.push(a.value);else if(a.isIdent("none"))f.push(a.value);else{if(!a.isFunction("url("))return"";a=this.getToken(!0,!0);var g=this.parseURL(a);if(!g)return"";f.push("url("+g)}a=this.getToken(!0,!0)}var h=f.length;switch(h){case 1:d=f[0],e=d;break;case 2:d=f[0],e=f[1];break;default:return""}return this.forgetState(),aDecl.push(this._createJscsspDeclarationFromValue("cue-before",d)),aDecl.push(this._createJscsspDeclarationFromValue("cue-after",e)),d+" "+e},CSSParser.prototype.parseDeclaration=function(a,b,c,d,e){this.preserveState();var f=[];if(a.isIdent()){var g=a.value.toLowerCase(),h=this.getToken(!0,!0);if(h.isSymbol(":")){var h=this.getToken(!0,!0),i="",j=[];if(d)switch(g){case"background":i=this.parseBackgroundShorthand(h,j,c);break;case"margin":case"padding":i=this.parseMarginOrPaddingShorthand(h,j,c,g);break;case"border-color":i=this.parseBorderColorShorthand(h,j,c);break;case"border-style":i=this.parseBorderStyleShorthand(h,j,c);break;case"border-width":i=this.parseBorderWidthShorthand(h,j,c);break;case"border-top":case"border-right":case"border-bottom":case"border-left":case"border":case"outline":i=this.parseBorderEdgeOrOutlineShorthand(h,j,c,g);break;case"cue":i=this.parseCueShorthand(h,j,c);break;case"pause":i=this.parsePauseShorthand(h,j,c);break;case"font":i=this.parseFontShorthand(h,j,c);break;case"list-style":i=this.parseListStyleShorthand(h,j,c);break;default:i=this.parseDefaultPropertyValue(h,j,c,g,e)}else i=this.parseDefaultPropertyValue(h,j,c,g,e);if(h=this.currentToken(),i){var k=!1;if(h.isSymbol("!")){if(h=this.getToken(!0,!0),!h.isIdent("important"))return"";if(k=!0,h=this.getToken(!0,!0),!h.isSymbol(";")&&!h.isSymbol("}"))return"";h.isSymbol("}")&&this.ungetToken()}else if(h.isNotNull()&&!h.isSymbol(";")&&!h.isSymbol("}"))return"";for(var l=0;l<j.length;l++)j[l].priority=k,b.push(j[l]);return g+": "+i+";"}}}else if(a.isComment()){if(this.mPreserveComments){this.forgetState();var m=new jscsspComment;m.parsedCssText=a.value,b.push(m)}return a.value}this.restoreState();var n=a.value;f=[];for(var h=this.getToken(!1,!1);h.isNotNull();){if(n+=h.value,(h.isSymbol(";")||h.isSymbol("}"))&&!f.length){h.isSymbol("}")&&this.ungetToken();break}if(h.isSymbol("{")||h.isSymbol("(")||h.isSymbol("[")||h.isFunction())f.push(h.isFunction()?"(":h.value);else if((h.isSymbol("}")||h.isSymbol(")")||h.isSymbol("]"))&&f.length){var o=f[f.length-1];(h.isSymbol("}")&&"{"==o||h.isSymbol(")")&&"("==o||h.isSymbol("]")&&"["==o)&&f.pop()}h=this.getToken(!1,!1)}return""},CSSParser.prototype.reportError=function(a){this.mError=a},CSSParser.prototype.consumeError=function(){var a=this.mError;return this.mError=null,a},CSSParser.prototype._init=function(){this.mToken=null,this.mLookAhead=null},CSSParser.prototype.kINHERIT="inherit",CSSParser.prototype.kBORDER_WIDTH_NAMES={thin:!0,medium:!0,thick:!0},CSSParser.prototype.kBORDER_STYLE_NAMES={none:!0,hidden:!0,dotted:!0,dashed:!0,solid:!0,double:!0,groove:!0,ridge:!0,inset:!0,outset:!0},CSSParser.prototype.kCOLOR_NAMES={transparent:!0,black:!0,silver:!0,gray:!0,white:!0,maroon:!0,red:!0,purple:!0,fuchsia:!0,green:!0,lime:!0,olive:!0,yellow:!0,navy:!0,blue:!0,teal:!0,aqua:!0,aliceblue:!0,antiquewhite:!0,aquamarine:!0,azure:!0,beige:!0,bisque:!0,blanchedalmond:!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,darkgrey:!0,darkkhaki:!0,darkmagenta:!0,darkolivegreen:!0,darkorange:!0,darkorchid:!0,darkred:!0,darksalmon:!0,darkseagreen:!0,darkslateblue:!0,darkslategray:!0,darkslategrey:!0,darkturquoise:!0,darkviolet:!0,deeppink:!0,deepskyblue:!0,dimgray:!0,dimgrey:!0,dodgerblue:!0,firebrick:!0,floralwhite:!0,forestgreen:!0,gainsboro:!0,ghostwhite:!0,gold:!0,goldenrod:!0,greenyellow:!0,grey:!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,lightgray:!0,lightgreen:!0,lightgrey:!0,lightpink:!0,lightsalmon:!0,lightseagreen:!0,lightskyblue:!0,lightslategray:!0,lightslategrey:!0,lightsteelblue:!0,lightyellow:!0,limegreen:!0,linen:!0,magenta:!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,oldlace:!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,rosybrown:!0,royalblue:!0,saddlebrown:!0,salmon:!0,sandybrown:!0,seagreen:!0,seashell:!0,sienna:!0,skyblue:!0,slateblue:!0,slategray:!0,slategrey:!0,snow:!0,springgreen:!0,steelblue:!0,tan:!0,thistle:!0,tomato:!0,turquoise:!0,violet:!0,wheat:!0,whitesmoke:!0,yellowgreen:!0,activeborder:!0,activecaption:!0,appworkspace:!0,background:!0,buttonface:!0,buttonhighlight:!0,buttonshadow:!0,buttontext:!0,captiontext:!0,graytext:!0,highlight:!0,highlighttext:!0,inactiveborder:!0,inactivecaption:!0,inactivecaptiontext:!0,infobackground:!0,infotext:!0,menu:!0,menutext:!0,scrollbar:!0,threeddarkshadow:!0,threedface:!0,threedhighlight:!0,threedlightshadow:!0,threedshadow:!0,window:!0,windowframe:!0,windowtext:!0},CSSParser.prototype.kLIST_STYLE_TYPE_NAMES={decimal:!0,"decimal-leading-zero":!0,"lower-roman":!0,"upper-roman":!0,georgian:!0,armenian:!0,"lower-latin":!0,"lower-alpha":!0,"upper-latin":!0,"upper-alpha":!0,"lower-greek":!0,disc:!0,circle:!0,square:!0,none:!0,box:!0,check:!0,diamond:!0,hyphen:!0,"lower-armenian":!0,"cjk-ideographic":!0,"ethiopic-numeric":!0,hebrew:!0,"japanese-formal":!0,"japanese-informal":!0,"simp-chinese-formal":!0,"simp-chinese-informal":!0,syriac:!0,tamil:!0,"trad-chinese-formal":!0,"trad-chinese-informal":!0,"upper-armenian":!0,"arabic-indic":!0,binary:!0,bengali:!0,cambodian:!0,khmer:!0,devanagari:!0,gujarati:!0,gurmukhi:!0,kannada:!0,"lower-hexadecimal":!0,lao:!0,malayalam:!0,mongolian:!0,myanmar:!0,octal:!0,oriya:!0,persian:!0,urdu:!0,telugu:!0,tibetan:!0,"upper-hexadecimal":!0,afar:!0,"ethiopic-halehame-aa-et":!0,"ethiopic-halehame-am-et":!0,"amharic-abegede":!0,"ehiopic-abegede-am-et":!0,"cjk-earthly-branch":!0,"cjk-heavenly-stem":!0,ethiopic:!0,"ethiopic-abegede":!0,"ethiopic-abegede-gez":!0,"hangul-consonant":!0,hangul:!0,"hiragana-iroha":!0,hiragana:!0,"katakana-iroha":!0,katakana:!0,"lower-norwegian":!0,oromo:!0,"ethiopic-halehame-om-et":!0,sidama:!0,"ethiopic-halehame-sid-et":!0,somali:!0,"ethiopic-halehame-so-et":!0,tigre:!0,"ethiopic-halehame-tig":!0,"tigrinya-er-abegede":!0,"ethiopic-abegede-ti-er":!0,"tigrinya-et":!0,"ethiopic-halehame-ti-et":!0,"upper-greek":!0,asterisks:!0,footnotes:!0,"circled-decimal":!0,"circled-lower-latin":!0,"circled-upper-latin":!0,"dotted-decimal":!0,"double-circled-decimal":!0,"filled-circled-decimal":!0,"parenthesised-decimal":!0,"parenthesised-lower-latin":!0},CSSParser.prototype.parseFontFaceRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value,e=!1,f=[];this.preserveState();var g=this.getToken(!0,!0);if(g.isNotNull()&&g.isSymbol("{")){d+=" "+g.value;for(var g=this.getToken(!0,!1);;){if(g.isSymbol("}")){d+="}",e=!0;break}var h=this.parseDeclaration(g,f,!1,!1,b);d+=(h&&f.length?" ":"")+h,g=this.getToken(!0,!1)}}if(e){this.forgetState();var i=new jscsspFontFaceRule;return i.currentLine=c,i.parsedCssText=d,i.descriptors=f,i.parentStyleSheet=b,b.cssRules.push(i),!0}return this.restoreState(),!1},CSSParser.prototype.parseFontShorthand=function(a,b,c){for(var d={italic:!0, | |
oblique:!0},e={"small-caps":!0},f={bold:!0,bolder:!0,lighter:!0,100:!0,200:!0,300:!0,400:!0,500:!0,600:!0,700:!0,800:!0,900:!0},g={"xx-small":!0,"x-small":!0,small:!0,medium:!0,large:!0,"x-large":!0,"xx-large":!0,larger:!0,smaller:!0},h={caption:!0,icon:!0,menu:!0,"message-box":!0,"small-caption":!0,"status-bar":!0},i={serif:!0,"sans-serif":!0,cursive:!0,fantasy:!0,monospace:!0},j=null,k=null,l=null,m=null,n=null,o="",p=null,q=[],r=0;;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(j||k||l||m||n||o||p||!a.isIdent(this.kINHERIT)){if(!p&&a.isIdent()&&a.value in h){p=a.value;break}if(!j&&a.isIdent()&&a.value in d)j=a.value;else if(!k&&a.isIdent()&&a.value in e)k=a.value;else if(!l&&(a.isIdent()||a.isNumber())&&a.value in f)l=a.value;else if(!m&&(a.isIdent()&&a.value in g||a.isDimension()||a.isPercentage())){if(m=a.value,a=this.getToken(!1,!1),a.isSymbol("/")){if(a=this.getToken(!1,!1),n||!(a.isDimension()||a.isNumber()||a.isPercentage()))return"";n=a.value}else if(!a.isWhiteSpace())continue}else if(a.isIdent("normal")){if(r++,r>3)return""}else{if(o||!a.isString()&&!a.isIdent())return"";for(var s=!1;;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){this.ungetToken();break}if(a.isIdent()&&a.value in i){var t=new jscsspVariable(kJscsspPRIMITIVE_VALUE,null);t.value=a.value,q.push(t),o+=a.value;break}if(a.isString()||a.isIdent()){var t=new jscsspVariable(kJscsspPRIMITIVE_VALUE,null);t.value=a.value,q.push(t),o+=a.value,s=!1}else{if(s||!a.isSymbol(","))return"";o+=", ",s=!0}a=this.getToken(!0,!0)}}}else j=this.kINHERIT,k=this.kINHERIT,l=this.kINHERIT,m=this.kINHERIT,n=this.kINHERIT,o=this.kINHERIT,p=this.kINHERIT;a=this.getToken(!0,!0)}return this.forgetState(),p?(b.push(this._createJscsspDeclarationFromValue("font",p)),p):(j=j?j:"normal",k=k?k:"normal",l=l?l:"normal",m=m?m:"medium",n=n?n:"normal",o=o?o:"-moz-initial",b.push(this._createJscsspDeclarationFromValue("font-style",j)),b.push(this._createJscsspDeclarationFromValue("font-variant",k)),b.push(this._createJscsspDeclarationFromValue("font-weight",l)),b.push(this._createJscsspDeclarationFromValue("font-size",m)),b.push(this._createJscsspDeclarationFromValue("line-height",n)),b.push(this._createJscsspDeclarationFromValuesArray("font-family",q,o)),j+" "+k+" "+l+" "+m+"/"+n+" "+o)},CSSParser.prototype.parseFunctionArgument=function(a){var b="";if(a.isString())b+=a.value,a=this.getToken(!0,!0);else for(var c=1;;){if(!a.isNotNull())return"";if((a.isFunction()||a.isSymbol("("))&&c++,a.isSymbol(")")&&(c--,!c))break;b+=a.value,a=this.getToken(!1,!1)}return a.isSymbol(")")?b+")":""},CSSParser.prototype.parseColorStop=function(a){var b=this.parseColor(a),c="";return b?(a=this.getToken(!0,!0),a.isLength()&&(c=a.value,a=this.getToken(!0,!0)),{color:b,position:c}):null},CSSParser.prototype.parseGradient=function(){var a={left:!0,right:!0},b={top:!0,bottom:!0},c={left:!0,right:!0,top:!0,bottom:!0,center:!0},e={isRepeating:!1},f=this.getToken(!0,!0);if(f.isNotNull()&&(f.isFunction("linear-gradient(")||f.isFunction("radial-gradient(")||f.isFunction("repeating-linear-gradient(")||f.isFunction("repeating-radial-gradient("))){(f.isFunction("radial-gradient(")||f.isFunction("repeating-radial-gradient("))&&(e.isRadial=!0),(f.isFunction("repeating-linear-gradient(")||f.isFunction("repeating-radial-gradient("))&&(e.isRepeating=!0),f=this.getToken(!0,!0);var g=!1,h=!1;if(f.isAngle()){if(e.angle=f.value,h=!0,f=this.getToken(!0,!0),!f.isSymbol(","))return null;f=this.getToken(!0,!0)}else if(f.isIdent("to")){if(g=!0,f=this.getToken(!0,!0),!(f.isIdent("top")||f.isIdent("bottom")||f.isIdent("left")||f.isIdent("right")))return null;if(e.position=f.value,f=this.getToken(!0,!0),("top"!=e.position&&"bottom"!=e.position||!f.isIdent("left")&&!f.isIdent("right"))&&("left"!=e.position&&"right"!=e.position||!f.isIdent("top")&&!f.isIdent("bottom"))||(e.position+=" "+f.value,f=this.getToken(!0,!0)),!f.isSymbol(","))return null;f=this.getToken(!0,!0)}else if(e.isRadial){for(e.shape="",e.extent="",e.positions=[],e.at="";!f.isIdent("at")&&!f.isSymbol(",");)if(e.shape||!f.isIdent("circle")&&!f.isIdent("ellipse"))if(!e.extent&&(f.isIdent("closest-corner")||f.isIdent("closes-side")||f.isIdent("farthest-corner")||f.isIdent("farthest-corner")))e.extent=f.value,f=this.getToken(!0,!0);else{if(!(e.positions.length<2&&f.isLength()))break;e.positions.push(f.value),f=this.getToken(!0,!0)}else e.shape=f.value,f=this.getToken(!0,!0);if((1!=e.positions.length||e.extent||"circle"!=e.shape&&e.shape)&&(2!=e.positions.length||e.extent||"ellipse"!=e.shape&&e.shape)&&(e.positions.length||!e.extent)&&(e.positions.length||e.extent))return null;if(f.isIdent("at")){if(f=this.getToken(!0,!0),!(f.isIdent()&&f.value in c||f.isDimension()||f.isNumber("0")||f.isPercentage()))return null;if(e.at=f.value,f=this.getToken(!0,!0),f.isDimension()||f.isNumber("0")||f.isPercentage())e.at+=" "+f.value;else if(f.isIdent()&&f.value in c){if(e.at in a&&f.value in a||e.at in b&&f.value in b)return"";e.at+=" "+f.value}else this.ungetToken(),e.at+=" center";f=this.getToken(!0,!0)}if(e.shape||e.extent||e.positions.length||e.at){if(!f.isSymbol(","))return null;f=this.getToken(!0,!0)}}var i=this.parseColorStop(f);if(!i)return null;if(f=this.currentToken(),!f.isSymbol(","))return null;f=this.getToken(!0,!0);var j=this.parseColorStop(f);if(!j)return null;for(f=this.currentToken(),f.isSymbol(",")&&(f=this.getToken(!0,!0)),e.stops=[i,j];!f.isSymbol(")");){var k=this.parseColorStop(f);if(!k)return null;if(f=this.currentToken(),!f.isSymbol(")")&&!f.isSymbol(","))return null;f.isSymbol(",")&&(f=this.getToken(!0,!0)),e.stops.push(k)}return e}return null},CSSParser.prototype.serializeGradient=function(a){var b=a.isRadial?a.isRepeating?"repeating-radial-gradient(":"radial-gradient(":a.isRepeating?"repeating-linear-gradient(":"linear-gradient(";(a.angle||a.position)&&(b+=(a.angle?a.angle:"")+(a.position?"to "+a.position:"")+", "),a.isRadial&&(b+=(a.shape?a.shape+" ":"")+(a.extent?a.extent+" ":"")+(a.positions.length?a.positions.join(" ")+" ":"")+(a.at?"at "+a.at+" ":"")+(a.shape||a.extent||a.positions.length||a.at?", ":""));for(var c=0;c<a.stops.length;c++){var d=a.stops[c];b+=d.color+(d.position?" "+d.position:""),c!=a.stops.length-1&&(b+=", ")}return b+=")"},CSSParser.prototype.parseImportRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value;this.preserveState();var e=this.getToken(!0,!0),f=[],g="";if(e.isString())g=e.value,d+=" "+g;else if(e.isFunction("url(")){e=this.getToken(!0,!0);var h=this.parseURL(e);h&&(g="url("+h,d+=" "+g)}else this.reportError(kIMPORT_RULE_MISSING_URL);if(g){for(e=this.getToken(!0,!0);e.isIdent()&&(d+=" "+e.value,f.push(e.value),e=this.getToken(!0,!0));){if(!e.isSymbol(",")){if(e.isSymbol(";"))break;break}d+=",",e=this.getToken(!0,!0)}if(f.length||f.push("all"),e.isSymbol(";")){d+=";",this.forgetState();var i=new jscsspImportRule;return i.currentLine=c,i.parsedCssText=d,i.href=g,i.media=f,i.parentStyleSheet=b,b.cssRules.push(i),!0}}return this.restoreState(),this.addUnknownAtRule(b,"@import"),!1},CSSParser.prototype.parseKeyframesRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value,e=!1,f=new jscsspKeyframesRule;f.currentLine=c,this.preserveState();for(var g=this.getToken(!0,!0),h=!1;g.isNotNull();){if(!g.isIdent()){if(g.isSymbol("{")){h||(g.type=jscsspToken.NULL_TYPE);break}g.type=jscsspToken.NULL_TYPE;break}if(h=!0,d+=" "+g.value,f.name=g.value,g=this.getToken(!0,!0),!g.isSymbol("{")){g.type=jscsspToken.NULL_TYPE;break}this.ungetToken(),g=this.getToken(!0,!0)}if(g.isSymbol("{")&&f.name)for(d+=" { ",g=this.getToken(!0,!1);g.isNotNull();){if(g.isComment()&&this.mPreserveComments){d+=" "+g.value;var i=new jscsspComment;i.parsedCssText=g.value,f.cssRules.push(i)}else{if(g.isSymbol("}")){e=!0;break}var j=this.parseKeyframeRule(g,f,!0);j&&(d+=j)}g=this.getToken(!0,!1)}return e?(this.forgetState(),f.currentLine=c,f.parsedCssText=d,b.cssRules.push(f),!0):(this.restoreState(),!1)},CSSParser.prototype.parseKeyframeRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned());this.preserveState();for(var d=a,e="";d.isNotNull();){if(!d.isIdent()&&!d.isPercentage()){e="";break}if(d.isIdent()&&!d.isIdent("from")&&!d.isIdent("to")){e="";break}if(e+=d.value,d=this.getToken(!0,!0),d.isSymbol("{")){this.ungetToken();break}if(!d.isSymbol(",")){e="";break}e+=", ",d=this.getToken(!0,!0)}var f=!1,g=[];if(e){var h=e;if(d=this.getToken(!0,!0),d.isSymbol("{"))for(h+=" { ",d=this.getToken(!0,!1);;){if(!d.isNotNull()){f=!0;break}if(d.isSymbol("}")){h+="}",f=!0;break}var i=this.parseDeclaration(d,g,!0,!0,b);h+=(i&&g.length?" ":"")+i,d=this.getToken(!0,!1)}}if(f){var j=new jscsspKeyframeRule;return j.currentLine=c,j.parsedCssText=h,j.declarations=g,j.keyText=e,j.parentRule=b,b.cssRules.push(j),h}return this.restoreState(),h=this.currentToken().value,this.addUnknownAtRule(b,h),""},CSSParser.prototype.parseListStyleShorthand=function(a,b,c){for(var d={inside:!0,outside:!0},e=null,f=null,g=null;;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(e||f||g||!a.isIdent(this.kINHERIT)){if(!e&&a.isIdent()&&a.value in this.kLIST_STYLE_TYPE_NAMES)e=a.value;else if(!f&&a.isIdent()&&a.value in d)f=a.value;else if(!g&&a.isFunction("url")){a=this.getToken(!0,!0);var h=this.parseURL(a);if(!h)return"";g="url("+h}else if(!a.isIdent("none"))return""}else e=this.kINHERIT,f=this.kINHERIT,g=this.kINHERIT;a=this.getToken(!0,!0)}return this.forgetState(),e=e?e:"none",g=g?g:"none",f=f?f:"outside",b.push(this._createJscsspDeclarationFromValue("list-style-type",e)),b.push(this._createJscsspDeclarationFromValue("list-style-position",f)),b.push(this._createJscsspDeclarationFromValue("list-style-image",g)),e+" "+f+" "+g},CSSParser.prototype.parse=function(a,b,c){if(!a)return null;this.mPreserveWS=b,this.mPreserveComments=c,this.mPreservedTokens=[],this.mScanner.init(a);var d=new jscsspStylesheet,e=this.getToken(!1,!1);if(!e.isNotNull())return d;e.isAtRule("@charset")&&(this.ungetToken(),this.parseCharsetRule(d),e=this.getToken(!1,!1));for(var f=!1,g=!1,h=!1;;){if(!e.isNotNull())break;if(e.isWhiteSpace())b&&this.addWhitespace(d,e.value);else if(e.isComment())this.mPreserveComments&&this.addComment(d,e.value);else if(e.isAtRule())e.isAtRule("@variables")?g||f?(this.reportError(kVARIABLES_RULE_POSITION),this.addUnknownAtRule(d,e.value)):this.parseVariablesRule(e,d):e.isAtRule("@import")?f||h?(this.reportError(kIMPORT_RULE_POSITION),this.addUnknownAtRule(d,e.value)):g=this.parseImportRule(e,d):e.isAtRule("@namespace")?f?(this.reportError(kNAMESPACE_RULE_POSITION),this.addUnknownAtRule(d,e.value)):h=this.parseNamespaceRule(e,d):e.isAtRule("@font-face")?this.parseFontFaceRule(e,d)?f=!0:this.addUnknownAtRule(d,e.value):e.isAtRule("@page")?this.parsePageRule(e,d)?f=!0:this.addUnknownAtRule(d,e.value):e.isAtRule("@media")?this.parseMediaRule(e,d)?f=!0:this.addUnknownAtRule(d,e.value):e.isAtRule("@keyframes")?this.parseKeyframesRule(e,d)||this.addUnknownAtRule(d,e.value):e.isAtRule("@charset")?(this.reportError(kCHARSET_RULE_CHARSET_SOF),this.addUnknownAtRule(d,e.value)):(this.reportError(kUNKNOWN_AT_RULE),this.addUnknownAtRule(d,e.value));else{var i=this.parseStyleRule(e,d,!1);i&&(f=!0)}e=this.getToken(!1)}return d},CSSParser.prototype.parseMarginOrPaddingShorthand=function(a,b,c,d){for(var e=null,f=null,g=null,h=null,i=[];;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(!i.length&&a.isIdent(this.kINHERIT)){i.push(a.value),a=this.getToken(!0,!0);break}if(!(a.isDimension()||a.isNumber("0")||a.isPercentage()||a.isIdent("auto")))return"";i.push(a.value),a=this.getToken(!0,!0)}var j=i.length;switch(j){case 1:e=i[0],f=e,g=e,h=e;break;case 2:e=i[0],f=e,g=i[1],h=g;break;case 3:e=i[0],g=i[1],h=g,f=i[2];break;case 4:e=i[0],h=i[1],f=i[2],g=i[3];break;default:return""}return this.forgetState(),b.push(this._createJscsspDeclarationFromValue(d+"-top",e)),b.push(this._createJscsspDeclarationFromValue(d+"-right",h)),b.push(this._createJscsspDeclarationFromValue(d+"-bottom",f)),b.push(this._createJscsspDeclarationFromValue(d+"-left",g)),e+" "+h+" "+f+" "+g},CSSParser.prototype.parseMediaQuery=function(){var a={width:!0,"min-width":!0,"max-width":!0,height:!0,"min-height":!0,"max-height":!0,"device-width":!0,"min-device-width":!0,"max-device-width":!0,"device-height":!0,"min-device-height":!0,"max-device-height":!0,orientation:!0,"aspect-ratio":!0,"min-aspect-ratio":!0,"max-aspect-ratio":!0,"device-aspect-ratio":!0,"min-device-aspect-ratio":!0,"max-device-aspect-ratio":!0,color:!0,"min-color":!0,"max-color":!0,"color-index":!0,"min-color-index":!0,"max-color-index":!0,monochrome:!0,"min-monochrome":!0,"max-monochrome":!0,resolution:!0,"min-resolution":!0,"max-resolution":!0,scan:!0,grid:!0},b={cssText:"",amplifier:"",medium:"",constraints:[]},c=this.getToken(!0,!0);if(c.isIdent("all")||c.isIdent("aural")||c.isIdent("braille")||c.isIdent("handheld")||c.isIdent("print")||c.isIdent("projection")||c.isIdent("screen")||c.isIdent("tty")||c.isIdent("tv"))b.medium=c.value,b.cssText+=c.value,c=this.getToken(!0,!0);else if(c.isIdent("not")||c.isIdent("only")){if(b.amplifier=c.value.toLowerCase(),b.cssText+=c.value.toLowerCase(),c=this.getToken(!0,!0),!(c.isIdent("all")||c.isIdent("aural")||c.isIdent("braille")||c.isIdent("handheld")||c.isIdent("print")||c.isIdent("projection")||c.isIdent("screen")||c.isIdent("tty")||c.isIdent("tv")))return null;b.cssText+=" "+c.value,b.medium=c.value,c=this.getToken(!0,!0)}if(b.medium){if(!c.isNotNull())return b;if(c.isIdent("and"))b.cssText+=" and",c=this.getToken(!0,!0);else if(!c.isSymbol("{"))return null}for(;c.isSymbol("(");){if(c=this.getToken(!0,!0),!(c.isIdent()&&c.value in a))return null;var d=c.value;if(c=this.getToken(!0,!0),c.isSymbol(":")){c=this.getToken(!0,!0);for(var e=[];!c.isSymbol(")");)e.push(c.value),c=this.getToken(!0,!0);if(!c.isSymbol(")"))return null;if(b.constraints.push({constraint:d,value:e}),b.cssText+=" ("+d+": "+e.join(" ")+")",c=this.getToken(!0,!0),!c.isNotNull())return b;if(c.isIdent("and"))b.cssText+=" and",c=this.getToken(!0,!0);else if(!c.isSymbol("{"))return null}else{if(!c.isSymbol(")"))return null;if(b.constraints.push({constraint:d,value:null}),b.cssText+=" ("+d+")",c=this.getToken(!0,!0),!c.isNotNull())return b;if(!c.isIdent("and"))return null;b.cssText+=" and",c=this.getToken(!0,!0)}}return b},CSSParser.prototype.parseMediaRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value,e=!1,f=new jscsspMediaRule;f.currentLine=c,this.preserveState();for(var g=this.getToken(!0,!0),h=!1;g.isNotNull();){this.ungetToken();var i=this.parseMediaQuery();if(g=this.currentToken(),i){if(h=!0,d+=" "+i.cssText,f.media.push(i.cssText),!g.isSymbol(",")){if(g.isSymbol("{"))break;g.type=jscsspToken.NULL_TYPE;break}d+=","}else{if(g.isSymbol("{"))break;if(h){g.type=jscsspToken.NULL_TYPE;break}}g=this.getToken(!0,!0)}if(g.isSymbol("{")&&f.media.length)for(d+=" { ",g=this.getToken(!0,!1);g.isNotNull();){if(g.isComment()){if(this.mPreserveComments){d+=" "+g.value;var j=new jscsspComment;j.parsedCssText=g.value,f.cssRules.push(j)}}else{if(g.isSymbol("}")){e=!0;break}var k=this.parseStyleRule(g,f,!0);k&&(d+=k)}g=this.getToken(!0,!1)}return e?(this.forgetState(),f.parsedCssText=d,b.cssRules.push(f),!0):(this.restoreState(),!1)},CSSParser.prototype.parseNamespaceRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value;this.preserveState();var f=this.getToken(!0,!0);if(f.isNotNull()){var g="",h="";if(f.isIdent()&&(g=f.value,d+=" "+g,f=this.getToken(!0,!0)),f){var i=!1;if(f.isString())i=!0,h=f.value,d+=" "+h;else if(f.isFunction("url(")){f=this.getToken(!0,!0);var j=this.parseURL(f);j&&(h+="url("+j,i=!0,d+=" "+j)}}if(i&&(f=this.getToken(!0,!0),f.isSymbol(";"))){d+=";",this.forgetState();var k=new jscsspNamespaceRule;return k.currentLine=c,k.parsedCssText=d,k.prefix=g,k.url=h,k.parentStyleSheet=b,b.cssRules.push(k),!0}}return this.restoreState(),this.addUnknownAtRule(b,"@namespace"),!1},CSSParser.prototype.parsePageRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value,e=!1,f=[];this.preserveState();var g=this.getToken(!0,!0),h="";if((g.isSymbol(":")||g.isIdent())&&(g.isSymbol(":")&&(h=":",g=this.getToken(!1,!1)),g.isIdent()&&(h+=g.value,d+=" "+h,g=this.getToken(!0,!0))),g.isNotNull()&&g.isSymbol("{")){d+=" "+g.value;for(var g=this.getToken(!0,!1);;){if(g.isSymbol("}")){d+="}",e=!0;break}var i=this.parseDeclaration(g,f,!0,!0,b);d+=(i&&f.length?" ":"")+i,g=this.getToken(!0,!1)}}if(e){this.forgetState();var j=new jscsspPageRule;return j.currentLine=c,j.parsedCssText=d,j.pageSelector=h,j.declarations=f,j.parentStyleSheet=b,b.cssRules.push(j),!0}return this.restoreState(),!1},CSSParser.prototype.parsePauseShorthand=function(a,b,c){for(var d="",e="",f=[],f=[];;){if(!a.isNotNull())break;if(a.isSymbol(";")||c&&a.isSymbol("!")||a.isSymbol("}")){a.isSymbol("}")&&this.ungetToken();break}if(!f.length&&a.isIdent(this.kINHERIT))f.push(a.value);else{if(!(a.isDimensionOfUnit("ms")||a.isDimensionOfUnit("s")||a.isPercentage()||a.isNumber("0")))return"";f.push(a.value)}a=this.getToken(!0,!0)}var g=f.length;switch(g){case 1:d=f[0],e=d;break;case 2:d=f[0],e=f[1];break;default:return""}return this.forgetState(),aDecl.push(this._createJscsspDeclarationFromValue("pause-before",d)),aDecl.push(this._createJscsspDeclarationFromValue("pause-after",e)),d+" "+e},CSSParser.prototype.parseDefaultPropertyValue=function(a,b,c,d,e){for(var f="",g=[],i=[];a.isNotNull();){if((a.isSymbol(";")||a.isSymbol("}")||a.isSymbol("!"))&&!g.length){a.isSymbol("}")&&this.ungetToken();break}if(a.isIdent(this.kINHERIT)){if(i.length)return"";f=this.kINHERIT;var j=new jscsspVariable(kJscsspINHERIT_VALUE,e);i.push(j),a=this.getToken(!0,!0);break}if(a.isSymbol("{")||a.isSymbol("(")||a.isSymbol("["))g.push(a.value);else if((a.isSymbol("}")||a.isSymbol("]"))&&g.length){var k=g[g.length-1];(a.isSymbol("}")&&"{"==k||a.isSymbol(")")&&"("==k||a.isSymbol("]")&&"["==k)&&g.pop()}if(a.isFunction())if(a.isFunction("var(")){if(a=this.getToken(!0,!0),!a.isIdent())return"";var l=a.value;if(a=this.getToken(!0,!0),!a.isSymbol(")"))return"";var j=new jscsspVariable(kJscsspVARIABLE_VALUE,e);f+="var("+l+")",j.name=l,i.push(j)}else{var m=a.value;a=this.getToken(!1,!0);var n=this.parseFunctionArgument(a);if(!n)return"";f+=m+n;var j=new jscsspVariable(kJscsspPRIMITIVE_VALUE,e);j.value=m+n,i.push(j)}else if(a.isSymbol("#")){var o=this.parseColor(a);if(!o)return"";f+=o;var j=new jscsspVariable(kJscsspPRIMITIVE_VALUE,e);j.value=o,i.push(j)}else if(a.isWhiteSpace()||a.isSymbol(","))f+=a.value;else{var j=new jscsspVariable(kJscsspPRIMITIVE_VALUE,e);j.value=a.value,i.push(j),f+=a.value}a=this.getToken(!1,!0)}return i.length&&f?(this.forgetState(),b.push(this._createJscsspDeclarationFromValuesArray(d,i,f)),f):""},CSSParser.prototype.parseSelector=function(a,b){for(var c="",d={a:0,b:0,c:0,d:0},e=!0,f=a,g=!1,h=!1;;){if(!f.isNotNull())return b?{selector:c,specificity:d}:"";if(!b&&f.isSymbol("{")){g=!h,g&&this.ungetToken();break}if(f.isSymbol(","))c+=f.value,e=!0,h=!1,f=this.getToken(!1,!0);else if(h||!(f.isWhiteSpace()||f.isSymbol(">")||f.isSymbol("+")||f.isSymbol("~"))){var j=this.parseSimpleSelector(f,e,!0);if(!j)break;c+=j.selector,d.b+=j.specificity.b,d.c+=j.specificity.c,d.d+=j.specificity.d,e=!1,h=!1,f=this.getToken(!1,!0)}else{if(f.isWhiteSpace()){c+=" ";var i=this.lookAhead(!0,!0);if(!i.isNotNull())return b?{selector:c,specificity:d}:"";(i.isSymbol(">")||i.isSymbol("+")||i.isSymbol("~"))&&(f=this.getToken(!0,!0),c+=f.value+" ",h=!0)}else c+=f.value,h=!0;e=!0,f=this.getToken(!0,!0)}}return g?{selector:c,specificity:d}:""},CSSParser.prototype.isPseudoElement=function(a){switch(a){case"first-letter":case"first-line":case"before":case"after":case"marker":return!0}return!1},CSSParser.prototype.parseSimpleSelector=function(a,b,c){var d="",e={a:0,b:0,c:0,d:0};if(b&&(a.isSymbol("*")||a.isSymbol("|")||a.isIdent())){if(a.isSymbol("*")||a.isIdent()){d+=a.value;var f=a.isIdent();if(a=this.getToken(!1,!0),a.isSymbol("|")){if(d+=a.value,a=this.getToken(!1,!0),!a.isIdent()&&!a.isSymbol("*"))return null;d+=a.value,a.isIdent()&&e.d++}else this.ungetToken(),f&&e.d++}else if(a.isSymbol("|")){if(d+=a.value,a=this.getToken(!1,!0),!a.isIdent()&&!a.isSymbol("*"))return null;d+=a.value,a.isIdent()&&e.d++}}else if(a.isSymbol(".")||a.isSymbol("#")){var g=a.isSymbol(".");if(d+=a.value,a=this.getToken(!1,!0),!a.isIdent())return null;d+=a.value,g?e.c++:e.b++}else if(a.isSymbol(":"))if(d+=a.value,a=this.getToken(!1,!0),a.isSymbol(":")&&(d+=a.value,a=this.getToken(!1,!0)),a.isIdent())d+=a.value,this.isPseudoElement(a.value)?e.d++:e.c++;else{if(!a.isFunction())return null;if(d+=a.value,a.isFunction(":not(")){if(!c)return null;a=this.getToken(!0,!0);var h=this.parseSimpleSelector(a,b,!1);if(!h)return null;if(d+=h.selector,a=this.getToken(!0,!0),!a.isSymbol(")"))return null;d+=")",e.c++}else{for(;;){if(a=this.getToken(!1,!0),a.isSymbol(")")){d+=")";break}d+=a.value}e.c++}}else if(a.isSymbol("[")){if(d+="[",a=this.getToken(!0,!0),a.isIdent()||a.isSymbol("*")){d+=a.value;var i=this.getToken(!0,!0);if(i.isSymbol("|")){if(d+="|",a=this.getToken(!0,!0),!a.isIdent())return null;d+=a.value}else this.ungetToken()}else{if(!a.isSymbol("|"))return null;if(d+="|",a=this.getToken(!0,!0),!a.isIdent())return null;d+=a.value}if(a=this.getToken(!0,!0),a.isIncludes()||a.isDashmatch()||a.isBeginsmatch()||a.isEndsmatch()||a.isContainsmatch()||a.isSymbol("=")){if(d+=a.value,a=this.getToken(!0,!0),!a.isString()&&!a.isIdent())return null;if(d+=a.value,a=this.getToken(!0,!0),!a.isSymbol("]"))return null;d+=a.value,e.c++}else{if(!a.isSymbol("]"))return null;d+=a.value,e.c++}}else if(a.isWhiteSpace()){var j=this.lookAhead(!0,!0);if(j.isSymbol("{"))return""}return d?{selector:d,specificity:e}:null},CSSParser.prototype.trim11=function(a){a=a.replace(/^\s+/,"");for(var b=a.length-1;b>=0;b--)if(/\S/.test(a.charAt(b))){a=a.substring(0,b+1);break}return a},CSSParser.prototype.parseStyleRule=function(a,b,c){var d=CountLF(this.mScanner.getAlreadyScanned());this.preserveState();var e=this.parseSelector(a,!1),f=!1,g=[];if(e){e=this.trim11(e.selector);var h=e,i=this.getToken(!0,!0);if(i.isSymbol("{")){h+=" { ";for(var i=this.getToken(!0,!1);;){if(!i.isNotNull()){f=!0;break}if(i.isSymbol("}")){h+="}",f=!0;break}var j=this.parseDeclaration(i,g,!0,!0,b);h+=(j&&g.length?" ":"")+j,i=this.getToken(!0,!1)}}}if(f){var k=new jscsspStyleRule;return k.currentLine=d,k.parsedCssText=h,k.declarations=g,k.mSelectorText=e,c?k.parentRule=b:k.parentStyleSheet=b,b.cssRules.push(k),h}return this.restoreState(),h=this.currentToken().value,this.addUnknownAtRule(b,h),""},CSSParser.prototype.parseTextShadows=function(){for(var a=[],b=this.getToken(!0,!0),c="",d="0px",e="0px",f="0px";b.isNotNull();)if(b.isIdent("none"))a.push({none:!0}),b=this.getToken(!0,!0);else{if(b.isFunction("rgb(")||b.isFunction("rgba(")||b.isFunction("hsl(")||b.isFunction("hsla(")||b.isSymbol("#")||b.isIdent()){var c=this.parseColor(b);b=this.getToken(!0,!0)}if(!(b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")))return[];var e=b.value;if(b=this.getToken(!0,!0),!(b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")))return[];var f=b.value;if(b=this.getToken(!0,!0),b.isPercentage()||b.isDimensionOfUnit("cm")||b.isDimensionOfUnit("mm")||b.isDimensionOfUnit("in")||b.isDimensionOfUnit("pc")||b.isDimensionOfUnit("px")||b.isDimensionOfUnit("em")||b.isDimensionOfUnit("ex")||b.isDimensionOfUnit("pt")){var d=b.value;b=this.getToken(!0,!0)}if(!c&&(b.isFunction("rgb(")||b.isFunction("rgba(")||b.isFunction("hsl(")||b.isFunction("hsla(")||b.isSymbol("#")||b.isIdent())){var c=this.parseColor(b);b=this.getToken(!0,!0)}if(a.push({none:!1,color:c,offsetX:e,offsetY:f,blurRadius:d}),!b.isSymbol(","))return b.isNotNull()?[]:a;c="",d="0px",e="0px",f="0px",b=this.getToken(!0,!0)}return a},CSSParser.prototype.currentToken=function(){return this.mToken},CSSParser.prototype.getHexValue=function(){return this.mToken=this.mScanner.nextHexValue(),this.mToken},CSSParser.prototype.getToken=function(a,b){if(this.mLookAhead)return this.mToken=this.mLookAhead,this.mLookAhead=null,this.mToken;for(this.mToken=this.mScanner.nextToken();this.mToken&&(a&&this.mToken.isWhiteSpace()||b&&this.mToken.isComment());)this.mToken=this.mScanner.nextToken();return this.mToken},CSSParser.prototype.lookAhead=function(a,b){var c=this.mToken;this.mScanner.preserveState();var d=this.getToken(a,b);return this.mScanner.restoreState(),this.mToken=c,d},CSSParser.prototype.ungetToken=function(){this.mLookAhead=this.mToken},CSSParser.prototype.addWhitespace=function(a,b){var c=new jscsspWhitespace;c.parsedCssText=b,c.parentStyleSheet=a,a.cssRules.push(c)},CSSParser.prototype.addComment=function(a,b){var c=new jscsspComment;c.parsedCssText=b,c.parentStyleSheet=a,a.cssRules.push(c)},CSSParser.prototype._createJscsspDeclaration=function(a,b){var c=new jscsspDeclaration;return c.property=a,c.value=this.trim11(b),c.parsedCssText=a+": "+b+";",c},CSSParser.prototype._createJscsspDeclarationFromValue=function(a,b){var c=new jscsspDeclaration;c.property=a;var d=new jscsspVariable(kJscsspPRIMITIVE_VALUE,null);return d.value=b,c.values=[d],c.valueText=b,c.parsedCssText=a+": "+b+";",c},CSSParser.prototype._createJscsspDeclarationFromValuesArray=function(a,b,c){var d=new jscsspDeclaration;return d.property=a,d.values=b,d.valueText=c,d.parsedCssText=a+": "+c+";",d},CSSParser.prototype.preserveState=function(){this.mPreservedTokens.push(this.currentToken()),this.mScanner.preserveState()},CSSParser.prototype.restoreState=function(){this.mPreservedTokens.length&&(this.mScanner.restoreState(),this.mToken=this.mPreservedTokens.pop())},CSSParser.prototype.forgetState=function(){this.mPreservedTokens.length&&(this.mScanner.forgetState(),this.mPreservedTokens.pop())},CSSParser.prototype.addUnknownAtRule=function(a,b){for(var c=CountLF(this.mScanner.getAlreadyScanned()),d=[],e=this.getToken(!1,!1);e.isNotNull()&&(b+=e.value,!e.isSymbol(";")||d.length);){if(e.isSymbol("{")||e.isSymbol("(")||e.isSymbol("[")||"function"==e.type)d.push(e.isFunction()?"(":e.value);else if((e.isSymbol("}")||e.isSymbol(")")||e.isSymbol("]"))&&d.length){var f=d[d.length-1];if((e.isSymbol("}")&&"{"==f||e.isSymbol(")")&&"("==f||e.isSymbol("]")&&"["==f)&&(d.pop(),!d.length&&e.isSymbol("}")))break}e=this.getToken(!1,!1)}this.addUnknownRule(a,b,c)},CSSParser.prototype.addUnknownRule=function(a,b,c){var d=this.consumeError(),e=new jscsspErrorRule(d);e.currentLine=c,e.parsedCssText=b,e.parentStyleSheet=a,a.cssRules.push(e)},CSSParser.prototype.parseURL=function(a){var b="";if(a.isString())b+=a.value,a=this.getToken(!0,!0);else for(;;){if(!a.isNotNull())return this.reportError(kURL_EOF),"";if(a.isWhiteSpace()&&(nextToken=this.lookAhead(!0,!0),!nextToken.isSymbol(")"))){this.reportError(kURL_WS_INSIDE),a=this.currentToken();break}if(a.isSymbol(")"))break;b+=a.value,a=this.getToken(!1,!1)}return a.isSymbol(")")?b+")":""},CSSParser.prototype.parseVariablesRule=function(a,b){var c=CountLF(this.mScanner.getAlreadyScanned()),d=a.value,e=[],f=!1;this.preserveState(),a=this.getToken(!0,!0);for(var g=[],h=!1;a.isNotNull();){if(a.isIdent())if(h=!0,d+=" "+a.value,g.push(a.value),a=this.getToken(!0,!0),a.isSymbol(","))d+=",";else{if(!a.isSymbol("{")){a.type=jscsspToken.NULL_TYPE;break}this.ungetToken()}else{if(a.isSymbol("{"))break;if(h){a.type=jscsspToken.NULL_TYPE;break}}a=this.getToken(!0,!0)}if(a.isSymbol("{"))for(d+=" {",a=this.getToken(!0,!0);;){if(!a.isNotNull()){f=!0;break}if(a.isSymbol("}")){d+="}",f=!0;break}var i=this.parseDeclaration(a,e,!0,!1,b);d+=(i&&e.length?" ":"")+i,a=this.getToken(!0,!1)}if(f){this.forgetState();var j=new jscsspVariablesRule;return j.currentLine=c,j.parsedCssText=d,j.declarations=e,j.media=g,j.parentStyleSheet=b,b.cssRules.push(j),!0}return this.restoreState(),!1},jscsspToken.NULL_TYPE=0,jscsspToken.WHITESPACE_TYPE=1,jscsspToken.STRING_TYPE=2,jscsspToken.COMMENT_TYPE=3,jscsspToken.NUMBER_TYPE=4,jscsspToken.IDENT_TYPE=5,jscsspToken.FUNCTION_TYPE=6,jscsspToken.ATRULE_TYPE=7,jscsspToken.INCLUDES_TYPE=8,jscsspToken.DASHMATCH_TYPE=9,jscsspToken.BEGINSMATCH_TYPE=10,jscsspToken.ENDSMATCH_TYPE=11,jscsspToken.CONTAINSMATCH_TYPE=12,jscsspToken.SYMBOL_TYPE=13,jscsspToken.DIMENSION_TYPE=14,jscsspToken.PERCENTAGE_TYPE=15,jscsspToken.HEX_TYPE=16,jscsspToken.prototype={isNotNull:function(){return this.type},_isOfType:function(a,b){return this.type==a&&(!b||this.value.toLowerCase()==b)},isWhiteSpace:function(a){return this._isOfType(jscsspToken.WHITESPACE_TYPE,a)},isString:function(){return this._isOfType(jscsspToken.STRING_TYPE)},isComment:function(){return this._isOfType(jscsspToken.COMMENT_TYPE)},isNumber:function(a){return this._isOfType(jscsspToken.NUMBER_TYPE,a)},isIdent:function(a){return this._isOfType(jscsspToken.IDENT_TYPE,a)},isFunction:function(a){return this._isOfType(jscsspToken.FUNCTION_TYPE,a)},isAtRule:function(a){return this._isOfType(jscsspToken.ATRULE_TYPE,a)},isIncludes:function(){return this._isOfType(jscsspToken.INCLUDES_TYPE)},isDashmatch:function(){return this._isOfType(jscsspToken.DASHMATCH_TYPE)},isBeginsmatch:function(){return this._isOfType(jscsspToken.BEGINSMATCH_TYPE)},isEndsmatch:function(){return this._isOfType(jscsspToken.ENDSMATCH_TYPE)},isContainsmatch:function(){return this._isOfType(jscsspToken.CONTAINSMATCH_TYPE)},isSymbol:function(a){return this._isOfType(jscsspToken.SYMBOL_TYPE,a)},isDimension:function(){return this._isOfType(jscsspToken.DIMENSION_TYPE)},isPercentage:function(){return this._isOfType(jscsspToken.PERCENTAGE_TYPE)},isHex:function(){return this._isOfType(jscsspToken.HEX_TYPE)},isDimensionOfUnit:function(a){return this.isDimension()&&this.unit==a},isLength:function(){return this.isPercentage()||this.isDimensionOfUnit("cm")||this.isDimensionOfUnit("mm")||this.isDimensionOfUnit("in")||this.isDimensionOfUnit("pc")||this.isDimensionOfUnit("px")||this.isDimensionOfUnit("em")||this.isDimensionOfUnit("ex")||this.isDimensionOfUnit("pt")},isAngle:function(){return this.isDimensionOfUnit("deg")||this.isDimensionOfUnit("rad")||this.isDimensionOfUnit("grad")}},jscsspCharsetRule.prototype={cssText:function(){return"@charset "+this.encoding+";"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a);if(c.parseCharsetRule(b)){var d=b.cssRules[0];return this.encoding=d.encoding,void(this.parsedCssText=d.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspComment.prototype={cssText:function(){return this.parsedCssText},setCssText:function(a){var b=new CSSParser(a),c=b.getToken(!0,!1);if(!c.isComment())throw DOMException.SYNTAX_ERR;this.parsedCssText=c.value}},jscsspDeclaration.prototype={kCOMMA_SEPARATED:{cursor:!0,"font-family":!0,"voice-family":!0,"background-image":!0},kUNMODIFIED_COMMA_SEPARATED_PROPERTIES:{"text-shadow":!0,"box-shadow":!0,"-moz-transition":!0,"-moz-transition-property":!0,"-moz-transition-duration":!0,"-moz-transition-timing-function":!0,"-moz-transition-delay":!0,src:!0,"-moz-font-feature-settings":!0},cssText:function(){var a=PrefixHelper.prefixesForProperty(this.property),b="";if(this.property in this.kUNMODIFIED_COMMA_SEPARATED_PROPERTIES){if(a){b="";for(var c=0;c<a.length;c++){var d=a[c];b+=(c?gTABS:"")+d+": ",b+=this.valueText+(this.priority?" !important":"")+";",b+=a.length>1&&c!=a.length-1?"\n":""}return b}return this.property+": "+this.valueText+(this.priority?" !important":"")+";"}if(a){b="";for(var c=0;c<a.length;c++){var d=a[c];b+=(c?gTABS:"")+d+": "; | |
for(var e=(d in this.kCOMMA_SEPARATED?", ":" "),f=0;f<this.values.length;f++){if(null==this.values[f].cssText())return null;b+=(f?e:"")+this.values[f].cssText()}b+=(this.priority?" !important":"")+";"+(a.length>1&&c!=a.length-1?"\n":"")}return b}for(var e=(this.property in this.kCOMMA_SEPARATED?", ":" "),g={webkit:!1,presto:!1,trident:!1,"gecko1.9.2":!1,generic:!1},f=0;f<this.values.length;f++){var h=this.values[f].cssText();if(null==h)return null;var i=h.indexOf("("),j=h;if(i!=-1&&(j=h.substr(0,i)),j in kCSS_VENDOR_VALUES)for(var k in kCSS_VENDOR_VALUES[j])g[k]=g[k]||""!=kCSS_VENDOR_VALUES[j][k]}for(var k in g)if(g[k]){for(var l="\n"+gTABS+this.property+": ",f=0;f<this.values.length;f++){var h=this.values[f].cssText();if(null==h)return null;var i=h.indexOf("("),j=h;if(i!=-1&&(j=h.substr(0,i)),j in kCSS_VENDOR_VALUES&&(functor=kCSS_VENDOR_VALUES[j][k],functor&&(h="string"==typeof functor?functor:functor(h,k),!h))){l=null;break}l+=(f?e:"")+h}b+=l?l+";":"\n"+gTABS+"/* Impossible to translate property "+this.property+" for "+k+" */"}b+="\n"+gTABS+this.property+": ";for(var f=0;f<this.values.length;f++){var h=this.values[f].cssText();null!=h&&(b+=(f?e:"")+h)}return b+=(this.priority?" !important":"")+";"},setCssText:function(a){var b=[],c=new CSSParser(a),d=c.getToken(!0,!0);if(c.parseDeclaration(d,b,!0,!0,null)&&b.length&&b[0].type==kJscsspSTYLE_DECLARATION){var e=b.cssRules[0];return this.property=e.property,this.value=e.value,this.priority=e.priority,void(this.parsedCssText=newRule.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspErrorRule.prototype={cssText:function(){return this.parsedCssText}},jscsspFontFaceRule.prototype={cssText:function(){var a=gTABS+"@font-face {\n",b=gTABS;gTABS+=" ";for(var c=0;c<this.descriptors.length;c++)a+=gTABS+this.descriptors[c].cssText()+"\n";return gTABS=b,a+gTABS+"}"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@font-face")&&c.parseFontFaceRule(d,b)){var e=b.cssRules[0];return this.descriptors=e.descriptors,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspImportRule.prototype={cssText:function(){var a=this.media.join(", ");return"@import "+this.href+(a&&"all"!=a?a+" ":"")+";"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@import")&&c.parseImportRule(d,b)){var e=b.cssRules[0];return this.href=e.href,this.media=e.media,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspKeyframeRule.prototype={cssText:function(){var a=this.keyText+" {\n",b=gTABS;gTABS+=" ";for(var c=0;c<this.declarations.length;c++){var d=this.declarations[c].cssText();d&&(a+=gTABS+this.declarations[c].cssText()+"\n")}return gTABS=b,a+gTABS+"}"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(!d.isNotNull()&&c.parseKeyframeRule(d,b,!1)){var e=b.cssRules[0];return this.keyText=e.keyText,this.declarations=e.declarations,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspKeyframesRule.prototype={cssText:function(){for(var a="",b=["moz","webkit","ms","o",""],c=0;c<b.length;c++){a+=gTABS+"@"+(b[c]?"-"+b[c]+"-":"")+"keyframes "+this.name+" {\n";var d=gTABS;gTABS+=" ";for(var e=0;e<this.cssRules.length;e++)a+=gTABS+this.cssRules[e].cssText()+"\n";gTABS=d,a+=gTABS+"}\n\n"}return a},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@-mozkeyframes")&&c.parseKeyframesRule(d,b)){var e=b.cssRules[0];return this.cssRules=e.cssRules,this.name=e.name,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspMediaRule.prototype={cssText:function(){var a=gTABS+"@media "+this.media.join(", ")+" {\n",b=gTABS;gTABS+=" ";for(var c=0;c<this.cssRules.length;c++)a+=this.cssRules[c].cssText()+"\n";return gTABS=b,a+gTABS+"}"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@media")&&c.parseMediaRule(d,b)){var e=b.cssRules[0];return this.cssRules=e.cssRules,this.media=e.media,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspNamespaceRule.prototype={cssText:function(){return"@namespace "+(this.prefix?this.prefix+" ":"")+this.url+";"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@namespace")&&c.parseNamespaceRule(d,b)){var e=b.cssRules[0];return this.url=e.url,this.prefix=e.prefix,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspPageRule.prototype={cssText:function(){var a=gTABS+"@page "+(this.pageSelector?this.pageSelector+" ":"")+"{\n",b=gTABS;gTABS+=" ";for(var c=0;c<this.declarations.length;c++)a+=gTABS+this.declarations[c].cssText()+"\n";return gTABS=b,a+gTABS+"}"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@page")&&c.parsePageRule(d,b)){var e=b.cssRules[0];return this.pageSelector=e.pageSelector,this.declarations=e.declarations,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspStyleRule.prototype={cssText:function(){var a=gTABS+this.mSelectorText+" {",b=gTABS;gTABS+=" ";for(var c=0;c<this.declarations.length;c++){var d=this.declarations[c].cssText();d&&(a+=gTABS+this.declarations[c].cssText())}return gTABS=b,a+"\n"+gTABS+"}"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(!d.isNotNull()&&c.parseStyleRule(d,b,!1)){var e=b.cssRules[0];return this.mSelectorText=e.mSelectorText,this.declarations=e.declarations,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR},selectorText:function(){return this.mSelectorText},setSelectorText:function(a){var b=new CSSParser(a),c=b.getToken(!0,!0);if(!c.isNotNull()){var d=b.parseSelector(c,!0);if(d)return void(this.mSelectorText=d.selector)}throw DOMException.SYNTAX_ERR}},jscsspStylesheet.prototype={insertRule:function(a,b){try{this.cssRules.splice(b,1,a)}catch(a){}},deleteRule:function(a){try{this.cssRules.splice(a)}catch(a){}},cssText:function(){for(var a="",b=0;b<this.cssRules.length;b++)a+=this.cssRules[b].cssText()+"\n\n";return a}};var kJscsspINHERIT_VALUE=0,kJscsspPRIMITIVE_VALUE=1,kJscsspVARIABLE_VALUE=4;jscsspVariable.prototype={cssText:function(){return this.type==kJscsspVARIABLE_VALUE?this.resolveVariable(this.name,this.parentRule,this.parentStyleSheet):this.value},setCssText:function(a){if(this.type==kJscsspVARIABLE_VALUE)throw DOMException.SYNTAX_ERR;this.value=a},resolveVariable:function(a,b,c){return"var("+a+")"}},jscsspVariablesRule.prototype={cssText:function(){var a=gTABS+"@variables "+(this.media.length?this.media.join(", ")+" ":"")+"{\n",b=gTABS;gTABS+=" ";for(var c=0;c<this.declarations.length;c++)a+=gTABS+this.declarations[c].cssText()+"\n";return gTABS=b,a+gTABS+"}"},setCssText:function(a){var b={cssRules:[]},c=new CSSParser(a),d=c.getToken(!0,!0);if(d.isAtRule("@variables")&&c.parseVariablesRule(d,b)){var e=b.cssRules[0];return this.declarations=e.declarations,void(this.parsedCssText=e.parsedCssText)}throw DOMException.SYNTAX_ERR}},jscsspWhitespace.prototype={cssText:function(){return this.parsedCssText}};var kJscsspUNKNOWN_RULE=0,kJscsspSTYLE_RULE=1,kJscsspCHARSET_RULE=2,kJscsspIMPORT_RULE=3,kJscsspMEDIA_RULE=4,kJscsspFONT_FACE_RULE=5,kJscsspPAGE_RULE=6,kJscsspKEYFRAMES_RULE=7,kJscsspKEYFRAME_RULE=8,kJscsspNAMESPACE_RULE=100,kJscsspCOMMENT=101,kJscsspWHITE_SPACE=102,kJscsspVARIABLES_RULE=200,kJscsspSTYLE_DECLARATION=1e3,gTABS=""; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment