init project

This commit is contained in:
Kuloud
2023-12-22 21:23:24 +08:00
commit 1fb3d91106
461 changed files with 58770 additions and 0 deletions

View File

@ -0,0 +1,56 @@
/*! URI.js v1.17.1 http://medialize.github.io/URI.js/ */
/* build contains: URI.js */
(function(p,w){"object"===typeof exports?module.exports=w(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],w):p.URI=w(p.punycode,p.IPv6,p.SecondLevelDomains,p)})(this,function(p,w,u,m){function d(a,b){var c=1<=arguments.length,f=2<=arguments.length;if(!(this instanceof d))return c?f?new d(a,b):new d(a):new d;if(void 0===a){if(c)throw new TypeError("undefined is not a valid argument for URI");
a="undefined"!==typeof location?location.href+"":""}this.href(a);return void 0!==b?this.absoluteTo(b):this}function r(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function v(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function h(a){return"Array"===v(a)}function D(a,b){var c={},d,g;if("RegExp"===v(b))c=null;else if(h(b))for(d=0,g=b.length;d<g;d++)c[b[d]]=!0;else c[b]=!0;d=0;for(g=a.length;d<g;d++)if(c&&void 0!==c[a[d]]||!c&&b.test(a[d]))a.splice(d,
1),g--,d--;return a}function z(a,b){var c,d;if(h(b)){c=0;for(d=b.length;c<d;c++)if(!z(a,b[c]))return!1;return!0}var g=v(b);c=0;for(d=a.length;c<d;c++)if("RegExp"===g){if("string"===typeof a[c]&&a[c].match(b))return!0}else if(a[c]===b)return!0;return!1}function E(a,b){if(!h(a)||!h(b)||a.length!==b.length)return!1;a.sort();b.sort();for(var c=0,d=a.length;c<d;c++)if(a[c]!==b[c])return!1;return!0}function A(a){return a.replace(/^\/+|\/+$/g,"")}function G(a){return escape(a)}function B(a){return encodeURIComponent(a).replace(/[!'()*]/g,
G).replace(/\*/g,"%2A")}function x(a){return function(b,c){if(void 0===b)return this._parts[a]||"";this._parts[a]=b||null;this.build(!c);return this}}function F(a,b){return function(c,d){if(void 0===c)return this._parts[a]||"";null!==c&&(c+="",c.charAt(0)===b&&(c=c.substring(1)));this._parts[a]=c;this.build(!d);return this}}var H=m&&m.URI;d.version="1.17.1";var e=d.prototype,q=Object.prototype.hasOwnProperty;d._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,
port:null,path:null,query:null,fragment:null,duplicateQueryParameters:d.duplicateQueryParameters,escapeQuerySpace:d.escapeQuerySpace}};d.duplicateQueryParameters=!1;d.escapeQuerySpace=!0;d.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;d.idn_expression=/[^a-z0-9\.-]/i;d.punycode_expression=/(xn--)/i;d.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;d.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
d.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;d.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};d.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};d.invalid_hostname_characters=
/[^a-zA-Z0-9\.-]/;d.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};d.getDomAttribute=function(a){if(a&&a.nodeName){var b=a.nodeName.toLowerCase();return"input"===b&&"image"!==a.type?void 0:d.domAttributes[b]}};d.encode=B;d.decode=decodeURIComponent;d.iso8859=function(){d.encode=escape;d.decode=unescape};d.unicode=function(){d.encode=B;d.decode=
decodeURIComponent};d.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",",
"%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}};d.encodeQuery=function(a,b){var c=d.encode(a+"");void 0===b&&(b=d.escapeQuerySpace);return b?c.replace(/%20/g,"+"):c};d.decodeQuery=function(a,b){a+="";void 0===b&&(b=d.escapeQuerySpace);try{return d.decode(b?a.replace(/\+/g,
"%20"):a)}catch(c){return a}};var t={encode:"encode",decode:"decode"},y,C=function(a,b){return function(c){try{return d[b](c+"").replace(d.characters[a][b].expression,function(c){return d.characters[a][b].map[c]})}catch(f){return c}}};for(y in t)d[y+"PathSegment"]=C("pathname",t[y]),d[y+"UrnPathSegment"]=C("urnpath",t[y]);t=function(a,b,c){return function(f){var g;g=c?function(a){return d[b](d[c](a))}:d[b];f=(f+"").split(a);for(var e=0,l=f.length;e<l;e++)f[e]=g(f[e]);return f.join(a)}};d.decodePath=
t("/","decodePathSegment");d.decodeUrnPath=t(":","decodeUrnPathSegment");d.recodePath=t("/","encodePathSegment","decode");d.recodeUrnPath=t(":","encodeUrnPathSegment","decode");d.encodeReserved=C("reserved","encode");d.parse=function(a,b){var c;b||(b={});c=a.indexOf("#");-1<c&&(b.fragment=a.substring(c+1)||null,a=a.substring(0,c));c=a.indexOf("?");-1<c&&(b.query=a.substring(c+1)||null,a=a.substring(0,c));"//"===a.substring(0,2)?(b.protocol=null,a=a.substring(2),a=d.parseAuthority(a,b)):(c=a.indexOf(":"),
-1<c&&(b.protocol=a.substring(0,c)||null,b.protocol&&!b.protocol.match(d.protocol_expression)?b.protocol=void 0:"//"===a.substring(c+1,c+3)?(a=a.substring(c+3),a=d.parseAuthority(a,b)):(a=a.substring(c+1),b.urn=!0)));b.path=a;return b};d.parseHost=function(a,b){a=a.replace(/\\/g,"/");var c=a.indexOf("/"),d;-1===c&&(c=a.length);if("["===a.charAt(0))d=a.indexOf("]"),b.hostname=a.substring(1,d)||null,b.port=a.substring(d+2,c)||null,"/"===b.port&&(b.port=null);else{var g=a.indexOf(":");d=a.indexOf("/");
g=a.indexOf(":",g+1);-1!==g&&(-1===d||g<d)?(b.hostname=a.substring(0,c)||null,b.port=null):(d=a.substring(0,c).split(":"),b.hostname=d[0]||null,b.port=d[1]||null)}b.hostname&&"/"!==a.substring(c).charAt(0)&&(c++,a="/"+a);return a.substring(c)||"/"};d.parseAuthority=function(a,b){a=d.parseUserinfo(a,b);return d.parseHost(a,b)};d.parseUserinfo=function(a,b){var c=a.indexOf("/"),f=a.lastIndexOf("@",-1<c?c:a.length-1);-1<f&&(-1===c||f<c)?(c=a.substring(0,f).split(":"),b.username=c[0]?d.decode(c[0]):null,
c.shift(),b.password=c[0]?d.decode(c.join(":")):null,a=a.substring(f+1)):(b.username=null,b.password=null);return a};d.parseQuery=function(a,b){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var c={},f=a.split("&"),g=f.length,e,l,n=0;n<g;n++)if(e=f[n].split("="),l=d.decodeQuery(e.shift(),b),e=e.length?d.decodeQuery(e.join("="),b):null,q.call(c,l)){if("string"===typeof c[l]||null===c[l])c[l]=[c[l]];c[l].push(e)}else c[l]=e;return c};d.build=function(a){var b="";
a.protocol&&(b+=a.protocol+":");a.urn||!b&&!a.hostname||(b+="//");b+=d.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(b+="/"),b+=a.path);"string"===typeof a.query&&a.query&&(b+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(b+="#"+a.fragment);return b};d.buildHost=function(a){var b="";if(a.hostname)b=d.ip6_expression.test(a.hostname)?b+("["+a.hostname+"]"):b+a.hostname;else return"";a.port&&(b+=":"+a.port);return b};d.buildAuthority=
function(a){return d.buildUserinfo(a)+d.buildHost(a)};d.buildUserinfo=function(a){var b="";a.username&&(b+=d.encode(a.username),a.password&&(b+=":"+d.encode(a.password)),b+="@");return b};d.buildQuery=function(a,b,c){var f="",g,e,l,n;for(e in a)if(q.call(a,e)&&e)if(h(a[e]))for(g={},l=0,n=a[e].length;l<n;l++)void 0!==a[e][l]&&void 0===g[a[e][l]+""]&&(f+="&"+d.buildQueryParameter(e,a[e][l],c),!0!==b&&(g[a[e][l]+""]=!0));else void 0!==a[e]&&(f+="&"+d.buildQueryParameter(e,a[e],c));return f.substring(1)};
d.buildQueryParameter=function(a,b,c){return d.encodeQuery(a,c)+(null!==b?"="+d.encodeQuery(b,c):"")};d.addQuery=function(a,b,c){if("object"===typeof b)for(var f in b)q.call(b,f)&&d.addQuery(a,f,b[f]);else if("string"===typeof b)void 0===a[b]?a[b]=c:("string"===typeof a[b]&&(a[b]=[a[b]]),h(c)||(c=[c]),a[b]=(a[b]||[]).concat(c));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};d.removeQuery=function(a,b,c){var f;if(h(b))for(c=0,f=b.length;c<f;c++)a[b[c]]=
void 0;else if("RegExp"===v(b))for(f in a)b.test(f)&&(a[f]=void 0);else if("object"===typeof b)for(f in b)q.call(b,f)&&d.removeQuery(a,f,b[f]);else if("string"===typeof b)void 0!==c?"RegExp"===v(c)?!h(a[b])&&c.test(a[b])?a[b]=void 0:a[b]=D(a[b],c):a[b]!==String(c)||h(c)&&1!==c.length?h(a[b])&&(a[b]=D(a[b],c)):a[b]=void 0:a[b]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");};d.hasQuery=function(a,b,c,f){switch(v(b)){case "String":break;
case "RegExp":for(var e in a)if(q.call(a,e)&&b.test(e)&&(void 0===c||d.hasQuery(a,e,c)))return!0;return!1;case "Object":for(var k in b)if(q.call(b,k)&&!d.hasQuery(a,k,b[k]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter");}switch(v(c)){case "Undefined":return b in a;case "Boolean":return a=!(h(a[b])?!a[b].length:!a[b]),c===a;case "Function":return!!c(a[b],b,a);case "Array":return h(a[b])?(f?z:E)(a[b],c):!1;case "RegExp":return h(a[b])?
f?z(a[b],c):!1:!(!a[b]||!a[b].match(c));case "Number":c=String(c);case "String":return h(a[b])?f?z(a[b],c):!1:a[b]===c;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");}};d.commonPath=function(a,b){var c=Math.min(a.length,b.length),d;for(d=0;d<c;d++)if(a.charAt(d)!==b.charAt(d)){d--;break}if(1>d)return a.charAt(0)===b.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(d)||"/"!==b.charAt(d))d=a.substring(0,d).lastIndexOf("/");
return a.substring(0,d+1)};d.withinString=function(a,b,c){c||(c={});var f=c.start||d.findUri.start,e=c.end||d.findUri.end,k=c.trim||d.findUri.trim,l=/[a-z0-9-]=["']?$/i;for(f.lastIndex=0;;){var n=f.exec(a);if(!n)break;n=n.index;if(c.ignoreHtml){var h=a.slice(Math.max(n-3,0),n);if(h&&l.test(h))continue}var h=n+a.slice(n).search(e),m=a.slice(n,h).replace(k,"");c.ignore&&c.ignore.test(m)||(h=n+m.length,m=b(m,n,h,a),a=a.slice(0,n)+m+a.slice(h),f.lastIndex=n+m.length)}f.lastIndex=0;return a};d.ensureValidHostname=
function(a){if(a.match(d.invalid_hostname_characters)){if(!p)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(p.toASCII(a).match(d.invalid_hostname_characters))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');}};d.noConflict=function(a){if(a)return a={URI:this.noConflict()},m.URITemplate&&"function"===typeof m.URITemplate.noConflict&&(a.URITemplate=m.URITemplate.noConflict()),m.IPv6&&"function"===
typeof m.IPv6.noConflict&&(a.IPv6=m.IPv6.noConflict()),m.SecondLevelDomains&&"function"===typeof m.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=m.SecondLevelDomains.noConflict()),a;m.URI===this&&(m.URI=H);return this};e.build=function(a){if(!0===a)this._deferred_build=!0;else if(void 0===a||this._deferred_build)this._string=d.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new d(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=
x("protocol");e.username=x("username");e.password=x("password");e.hostname=x("hostname");e.port=x("port");e.query=F("query","?");e.fragment=F("fragment","#");e.search=function(a,b){var c=this.query(a,b);return"string"===typeof c&&c.length?"?"+c:c};e.hash=function(a,b){var c=this.fragment(a,b);return"string"===typeof c&&c.length?"#"+c:c};e.pathname=function(a,b){if(void 0===a||!0===a){var c=this._parts.path||(this._parts.hostname?"/":"");return a?(this._parts.urn?d.decodeUrnPath:d.decodePath)(c):c}this._parts.path=
this._parts.urn?a?d.recodeUrnPath(a):"":a?d.recodePath(a):"/";this.build(!b);return this};e.path=e.pathname;e.href=function(a,b){var c;if(void 0===a)return this.toString();this._string="";this._parts=d._parts();var f=a instanceof d,e="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(e=d.getDomAttribute(a),a=a[e]||"",e=!1);!f&&e&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=d.parse(String(a),this._parts);else if(f||e)for(c in f=f?a._parts:
a,f)q.call(this._parts,c)&&(this._parts[c]=f[c]);else throw new TypeError("invalid input");this.build(!b);return this};e.is=function(a){var b=!1,c=!1,f=!1,e=!1,k=!1,l=!1,h=!1,m=!this._parts.urn;this._parts.hostname&&(m=!1,c=d.ip4_expression.test(this._parts.hostname),f=d.ip6_expression.test(this._parts.hostname),b=c||f,k=(e=!b)&&u&&u.has(this._parts.hostname),l=e&&d.idn_expression.test(this._parts.hostname),h=e&&d.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return m;
case "absolute":return!m;case "domain":case "name":return e;case "sld":return k;case "ip":return b;case "ip4":case "ipv4":case "inet4":return c;case "ip6":case "ipv6":case "inet6":return f;case "idn":return l;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return h}return null};var I=e.protocol,J=e.port,K=e.hostname;e.protocol=function(a,b){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(d.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");
return I.call(this,a,b)};e.scheme=e.protocol;e.port=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError('Port "'+a+'" contains characters other than [0-9]');return J.call(this,a,b)};e.hostname=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var c={};if("/"!==d.parseHost(a,c))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');
a=c.hostname}return K.call(this,a,b)};e.origin=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){var c=this.protocol();return this.authority()?(c?c+"://":"")+this.authority():""}c=d(a);this.protocol(c.protocol()).authority(c.authority()).build(!b);return this};e.host=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?d.buildHost(this._parts):"";if("/"!==d.parseHost(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');
this.build(!b);return this};e.authority=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?d.buildAuthority(this._parts):"";if("/"!==d.parseAuthority(a,this._parts))throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-]');this.build(!b);return this};e.userinfo=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var c=d.buildUserinfo(this._parts);return c.substring(0,c.length-
1)}"@"!==a[a.length-1]&&(a+="@");d.parseUserinfo(a,this._parts);this.build(!b);return this};e.resource=function(a,b){var c;if(void 0===a)return this.path()+this.search()+this.hash();c=d.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};e.subdomain=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,
c)||""}c=this._parts.hostname.length-this.domain().length;c=this._parts.hostname.substring(0,c);c=new RegExp("^"+r(c));a&&"."!==a.charAt(a.length-1)&&(a+=".");a&&d.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(c,a);this.build(!b);return this};e.domain=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.match(/\./g);if(c&&2>c.length)return this._parts.hostname;
c=this._parts.hostname.length-this.tld(b).length-1;c=this._parts.hostname.lastIndexOf(".",c-1)+1;return this._parts.hostname.substring(c)||""}if(!a)throw new TypeError("cannot set domain empty");d.ensureValidHostname(a);!this._parts.hostname||this.is("IP")?this._parts.hostname=a:(c=new RegExp(r(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a));this.build(!b);return this};e.tld=function(a,b){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(b=a,a=void 0);
if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var c=this._parts.hostname.lastIndexOf("."),c=this._parts.hostname.substring(c+1);return!0!==b&&u&&u.list[c.toLowerCase()]?u.get(this._parts.hostname)||c:c}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(u&&u.is(a))c=new RegExp(r(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(c,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");
c=new RegExp(r(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(c,a)}else throw new TypeError("cannot set TLD empty");this.build(!b);return this};e.directory=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var c=this._parts.path.length-this.filename().length-1,c=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?d.decodePath(c):c}c=this._parts.path.length-
this.filename().length;c=this._parts.path.substring(0,c);c=new RegExp("^"+r(c));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=d.recodePath(a);this._parts.path=this._parts.path.replace(c,a);this.build(!b);return this};e.filename=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this._parts.path.lastIndexOf("/"),c=this._parts.path.substring(c+1);return a?
d.decodePathSegment(c):c}c=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(c=!0);var f=new RegExp(r(this.filename())+"$");a=d.recodePath(a);this._parts.path=this._parts.path.replace(f,a);c?this.normalizePath(b):this.build(!b);return this};e.suffix=function(a,b){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var c=this.filename(),f=c.lastIndexOf(".");if(-1===f)return"";c=c.substring(f+1);c=/^[a-z0-9%]+$/i.test(c)?
c:"";return a?d.decodePathSegment(c):c}"."===a.charAt(0)&&(a=a.substring(1));if(c=this.suffix())f=a?new RegExp(r(c)+"$"):new RegExp(r("."+c)+"$");else{if(!a)return this;this._parts.path+="."+d.recodePath(a)}f&&(a=d.recodePath(a),this._parts.path=this._parts.path.replace(f,a));this.build(!b);return this};e.segment=function(a,b,c){var d=this._parts.urn?":":"/",e=this.path(),k="/"===e.substring(0,1),e=e.split(d);void 0!==a&&"number"!==typeof a&&(c=b,b=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+
a+'", must be 0-based integer');k&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===b)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(h(b)){e=[];a=0;for(var l=b.length;a<l;a++)if(b[a].length||e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(A(b[a]))}else{if(b||"string"===typeof b)b=A(b),""===e[e.length-1]?e[e.length-1]=b:e.push(b)}else b?e[a]=A(b):e.splice(a,1);k&&e.unshift("");return this.path(e.join(d),c)};e.segmentCoded=function(a,b,c){var e,g;"number"!==
typeof a&&(c=b,b=a,a=void 0);if(void 0===b){a=this.segment(a,b,c);if(h(a))for(e=0,g=a.length;e<g;e++)a[e]=d.decode(a[e]);else a=void 0!==a?d.decode(a):void 0;return a}if(h(b))for(e=0,g=b.length;e<g;e++)b[e]=d.encode(b[e]);else b="string"===typeof b||b instanceof String?d.encode(b):b;return this.segment(a,b,c)};var L=e.query;e.query=function(a,b){if(!0===a)return d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var c=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace),
e=a.call(this,c);this._parts.query=d.buildQuery(e||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!b);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=d.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!b),this):L.call(this,a,b)};e.setQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==b?b:null;else if("object"===
typeof a)for(var g in a)q.call(a,g)&&(e[g]=a[g]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.addQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.addQuery(e,a,void 0===b?null:b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);
"string"!==typeof a&&(c=b);this.build(!c);return this};e.removeQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);d.removeQuery(e,a,b);this._parts.query=d.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(c=b);this.build(!c);return this};e.hasQuery=function(a,b,c){var e=d.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return d.hasQuery(e,a,b,c)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=
e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&
(this.is("IDN")&&p?this._parts.hostname=p.toASCII(this._parts.hostname):this.is("IPv6")&&w&&(this._parts.hostname=w.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&this._parts.port===d.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){var b=this._parts.path;if(!b)return this;if(this._parts.urn)return this._parts.path=
d.recodeUrnPath(this._parts.path),this.build(!a),this;if("/"===this._parts.path)return this;var b=d.recodePath(b),c,e="",g,k;"/"!==b.charAt(0)&&(c=!0,b="/"+b);if("/.."===b.slice(-3)||"/."===b.slice(-2))b+="/";b=b.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");c&&(e=b.substring(1).match(/^(\.\.\/)+/)||"")&&(e=e[0]);for(;;){g=b.search(/\/\.\.(\/|$)/);if(-1===g)break;else if(0===g){b=b.substring(3);continue}k=b.substring(0,g).lastIndexOf("/");-1===k&&(k=g);b=b.substring(0,k)+b.substring(g+
3)}c&&this.is("relative")&&(b=e+b.substring(1));this._parts.path=b;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(d.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=
e.normalizeFragment;e.iso8859=function(){var a=d.encode,b=d.decode;d.encode=escape;d.decode=decodeURIComponent;try{this.normalize()}finally{d.encode=a,d.decode=b}return this};e.unicode=function(){var a=d.encode,b=d.decode;d.encode=B;d.decode=unescape;try{this.normalize()}finally{d.encode=a,d.decode=b}return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize();var b="";a._parts.protocol&&(b+=a._parts.protocol+"://");a._parts.hostname&&(a.is("punycode")&&p?(b+=p.toUnicode(a._parts.hostname),
a._parts.port&&(b+=":"+a._parts.port)):b+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(b+="/");b+=a.path(!0);if(a._parts.query){for(var c="",e=0,g=a._parts.query.split("&"),k=g.length;e<k;e++){var h=(g[e]||"").split("="),c=c+("&"+d.decodeQuery(h[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==h[1]&&(c+="="+d.decodeQuery(h[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}b+="?"+c.substring(1)}return b+=d.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var b=
this.clone(),c=["protocol","username","password","hostname","port"],e,g;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a instanceof d||(a=new d(a));b._parts.protocol||(b._parts.protocol=a._parts.protocol);if(this._parts.hostname)return b;for(e=0;g=c[e];e++)b._parts[g]=a._parts[g];b._parts.path?".."===b._parts.path.substring(-2)&&(b._parts.path+="/"):(b._parts.path=a._parts.path,b._parts.query||(b._parts.query=a._parts.query));"/"!==b.path().charAt(0)&&
(c=(c=a.directory())?c:0===a.path().indexOf("/")?"/":"",b._parts.path=(c?c+"/":"")+b._parts.path,b.normalizePath());b.build();return b};e.relativeTo=function(a){var b=this.clone().normalize(),c,e,g;if(b._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new d(a)).normalize();c=b._parts;e=a._parts;g=b.path();a=a.path();if("/"!==g.charAt(0))throw Error("URI is already relative");if("/"!==a.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");
c.protocol===e.protocol&&(c.protocol=null);if(c.username===e.username&&c.password===e.password&&null===c.protocol&&null===c.username&&null===c.password&&c.hostname===e.hostname&&c.port===e.port)c.hostname=null,c.port=null;else return b.build();if(g===a)return c.path="",b.build();g=d.commonPath(g,a);if(!g)return b.build();e=e.path.substring(g.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path=e+c.path.substring(g.length)||"./";return b.build()};e.equals=function(a){var b=this.clone();a=new d(a);
var c={},e={},g={},k;b.normalize();a.normalize();if(b.toString()===a.toString())return!0;c=b.query();e=a.query();b.query("");a.query("");if(b.toString()!==a.toString()||c.length!==e.length)return!1;c=d.parseQuery(c,this._parts.escapeQuerySpace);e=d.parseQuery(e,this._parts.escapeQuerySpace);for(k in c)if(q.call(c,k)){if(!h(c[k])){if(c[k]!==e[k])return!1}else if(!E(c[k],e[k]))return!1;g[k]=!0}for(k in e)if(q.call(e,k)&&!g[k])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=
!!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return d});

6584
doc/api/static-assets/css/bootstrap.css vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

View File

@ -0,0 +1,99 @@
/*
github.com style (c) Vasily Polovnyov <vast@whiteants.net>
*/
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
color: #333;
background: #f8f8f8;
}
.hljs-comment,
.hljs-quote {
color: #998;
font-style: italic;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-subst {
color: #333;
font-weight: bold;
}
.hljs-number,
.hljs-literal,
.hljs-variable,
.hljs-template-variable,
.hljs-tag .hljs-attr {
color: #008080;
}
.hljs-string,
.hljs-doctag {
color: #d14;
}
.hljs-title,
.hljs-section,
.hljs-selector-id {
color: #900;
font-weight: bold;
}
.hljs-subst {
font-weight: normal;
}
.hljs-type,
.hljs-class .hljs-title {
color: #458;
font-weight: bold;
}
.hljs-tag,
.hljs-name,
.hljs-attribute {
color: #000080;
font-weight: normal;
}
.hljs-regexp,
.hljs-link {
color: #009926;
}
.hljs-symbol,
.hljs-bullet {
color: #990073;
}
.hljs-built_in,
.hljs-builtin-name {
color: #0086b3;
}
.hljs-meta {
color: #999;
font-weight: bold;
}
.hljs-deletion {
background: #fdd;
}
.hljs-addition {
background: #dfd;
}
.hljs-emphasis {
font-style: italic;
}
.hljs-strong {
font-weight: bold;
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="68" height="68" viewBox="0 0 17.992 17.992"><path d="M17.992 8.996A8.996 8.996 0 1 0 0 8.996a8.996 8.996 0 0 0 17.992 0m-2.23 0l-9.895 5.713V3.282l9.896 5.714h2.229z" fill-opacity=".198"/><path d="M15.763 8.996l-9.896 5.713V3.283z" fill="#7d7d7d" fill-opacity=".821"/></svg>

After

Width:  |  Height:  |  Size: 321 B

View File

@ -0,0 +1,19 @@
# highlight.js
Generated from https://highlightjs.org/download/ on 2019-05-16
Included languages:
* bash
* css
* dart
* html, xml
* java
* javascript
* json
* kotlin
* markdown
* objective-c
* shell
* swift
* yaml

View File

@ -0,0 +1,270 @@
function initSideNav() {
var leftNavToggle = document.getElementById('sidenav-left-toggle');
var leftDrawer = document.querySelector('.sidebar-offcanvas-left');
var overlay = document.getElementById('overlay-under-drawer');
function toggleBoth() {
if (leftDrawer) {
leftDrawer.classList.toggle('active');
}
if (overlay) {
overlay.classList.toggle('active');
}
}
if (overlay) {
overlay.addEventListener('click', function(e) {
toggleBoth();
});
}
if (leftNavToggle) {
leftNavToggle.addEventListener('click', function(e) {
toggleBoth();
});
}
}
function saveLeftScroll() {
var leftSidebar = document.getElementById('dartdoc-sidebar-left');
sessionStorage.setItem('dartdoc-sidebar-left-scrollt' + window.location.pathname, leftSidebar.scrollTop);
sessionStorage.setItem('dartdoc-sidebar-left-scrolll' + window.location.pathname, leftSidebar.scrollLeft);
}
function saveMainContentScroll() {
var mainContent = document.getElementById('dartdoc-main-content');
sessionStorage.setItem('dartdoc-main-content-scrollt' + window.location.pathname, mainContent.scrollTop);
sessionStorage.setItem('dartdoc-main-content-scrolll' + window.location.pathname, mainContent.scrollLeft);
}
function saveRightScroll() {
var rightSidebar = document.getElementById('dartdoc-sidebar-right');
sessionStorage.setItem('dartdoc-sidebar-right-scrollt' + window.location.pathname, rightSidebar.scrollTop);
sessionStorage.setItem('dartdoc-sidebar-right-scrolll' + window.location.pathname, rightSidebar.scrollLeft);
}
function restoreScrolls() {
var leftSidebar = document.getElementById('dartdoc-sidebar-left');
var mainContent = document.getElementById('dartdoc-main-content');
var rightSidebar = document.getElementById('dartdoc-sidebar-right');
try {
var leftSidebarX = sessionStorage.getItem('dartdoc-sidebar-left-scrolll' + window.location.pathname);
var leftSidebarY = sessionStorage.getItem('dartdoc-sidebar-left-scrollt' + window.location.pathname);
var mainContentX = sessionStorage.getItem('dartdoc-main-content-scrolll' + window.location.pathname);
var mainContentY = sessionStorage.getItem('dartdoc-main-content-scrollt' + window.location.pathname);
var rightSidebarX = sessionStorage.getItem('dartdoc-sidebar-right-scrolll' + window.location.pathname);
var rightSidebarY = sessionStorage.getItem('dartdoc-sidebar-right-scrollt' + window.location.pathname);
leftSidebar.scrollTo(leftSidebarX, leftSidebarY);
mainContent.scrollTo(mainContentX, mainContentY);
rightSidebar.scrollTo(rightSidebarX, rightSidebarY);
} finally {
// Set visibility to visible after scroll to prevent the brief appearance of the
// panel in the wrong position.
leftSidebar.style.visibility = 'visible';
mainContent.style.visibility = 'visible';
rightSidebar.style.visibility = 'visible';
}
}
function initScrollSave() {
var leftSidebar = document.getElementById('dartdoc-sidebar-left');
var mainContent = document.getElementById('dartdoc-main-content');
var rightSidebar = document.getElementById('dartdoc-sidebar-right');
// For portablility, use two different ways of attaching saveLeftScroll to events.
leftSidebar.onscroll = saveLeftScroll;
leftSidebar.addEventListener("scroll", saveLeftScroll, true);
mainContent.onscroll = saveMainContentScroll;
mainContent.addEventListener("scroll", saveMainContentScroll, true);
rightSidebar.onscroll = saveRightScroll;
rightSidebar.addEventListener("scroll", saveRightScroll, true);
}
function initSearch(name) {
var searchIndex; // the JSON data
var weights = {
'library' : 2,
'class' : 2,
'typedef' : 3,
'method' : 4,
'accessor' : 4,
'operator' : 4,
'property' : 4,
'constructor' : 4
};
var baseHref = '';
if (!$('body').data('using-base-href')) {
// If dartdoc did not add a base-href tag, we will need to add the relative
// path ourselves.
baseHref = $('body').data('base-href');
}
function findMatches(q) {
var allMatches = []; // list of matches
function score(element, num) {
num -= element.overriddenDepth * 10;
var weightFactor = weights[element.type] || 4;
return {e: element, score: (num / weightFactor) >> 0};
}
$.each(searchIndex, function(i, element) {
// TODO: prefer matches in the current library
// TODO: help prefer a named constructor
var lowerName = element.name.toLowerCase();
var lowerQualifiedName = element.qualifiedName.toLowerCase();
var lowerQ = q.toLowerCase();
var previousMatchCount = allMatches.length;
if (element.name === q || element.qualifiedName === q) {
// exact match, maximum score
allMatches.push(score(element, 2000));
} else if (element.name === 'dart:'+q) {
// exact match for a dart: library
allMatches.push(score(element, 2000));
} else if (lowerName === 'dart:'+lowerQ) {
// case-insensitive match for a dart: library
allMatches.push(score(element, 1800));
} else if (lowerName === lowerQ || lowerQualifiedName === lowerQ) {
// case-insensitive exact match
allMatches.push(score(element, 1700));
}
// only care about exact matches if length is 2 or less
// and only continue if we didn't find a match above
if (q.length <= 2 || previousMatchCount < allMatches.length) return;
if (element.name.indexOf(q) === 0 || element.qualifiedName.indexOf(q) === 0) {
// starts with
allMatches.push(score(element, 750));
} else if (lowerName.indexOf(lowerQ) === 0 || lowerQualifiedName.indexOf(lowerQ) === 0) {
// case-insensitive starts with
allMatches.push(score(element, 650));
} else if (element.name.indexOf(q) >= 0 || element.qualifiedName.indexOf(q) >= 0) {
// contains
allMatches.push(score(element, 500));
} else if (lowerName.indexOf(lowerQ) >= 0 || lowerQualifiedName.indexOf(lowerQ) >= 0) {
// case insensitive contains
allMatches.push(score(element, 400));
}
});
allMatches.sort(function(a, b) {
var x = b.score - a.score;
if (x === 0) {
// tie-breaker: shorter name wins
return a.e.name.length - b.e.name.length;
} else {
return x;
}
});
var sortedMatches = [];
for (var i = 0; i < allMatches.length; i++) {
sortedMatches.push(allMatches[i].e);
}
return sortedMatches;
};
function initTypeahead() {
var search = new URI().query(true)["search"];
if (search) {
var matches = findMatches(search);
if (matches.length != 0) {
window.location = matches[0].href;
return;
}
}
$('#' + name).prop('disabled', false);
$('#' + name).prop('placeholder', 'Search API Docs');
$(document).keypress(function(event) {
if (event.which == 47 /* / */) {
event.preventDefault();
$('#' + name).focus();
}
});
$('#' + name + '.typeahead').typeahead({
hint: true,
highlight: true,
minLength: 1
},
{
name: 'elements',
limit: 10,
source: function(q, cb) { cb(findMatches(q)); },
display: function(element) { return element.name; },
templates: {
suggestion: function(match) {
return [
'<div data-href="' + match.href + '">',
match.name,
' ',
match.type.toLowerCase(),
(match.enclosedBy ? [
'<div class="search-from-lib">from ',
match.enclosedBy.name,
'</div>'].join('') : ''),
'</div>'
].join('');
}
}
});
var typeaheadElement = $('#' + name + '.typeahead');
var typeaheadElementParent = typeaheadElement.parent();
var selectedSuggestion;
typeaheadElement.on("keydown", function (e) {
if (e.keyCode === 13) { // Enter
if (selectedSuggestion == null) {
var suggestion = typeaheadElementParent.find(".tt-suggestion.tt-selectable:eq(0)");
if (suggestion.length > 0) {
var href = suggestion.data("href");
if (href != null) {
window.location = baseHref + href;
}
}
}
}
});
typeaheadElement.bind('typeahead:select', function(ev, suggestion) {
selectedSuggestion = suggestion;
window.location = baseHref + suggestion.href;
});
}
var jsonReq = new XMLHttpRequest();
jsonReq.open('GET', baseHref + 'index.json', true);
jsonReq.addEventListener('load', function() {
searchIndex = JSON.parse(jsonReq.responseText);
initTypeahead();
});
jsonReq.addEventListener('error', function() {
$('#' + name).prop('placeholder', 'Error loading search index');
});
jsonReq.send();
}
document.addEventListener("DOMContentLoaded", function() {
// Place this first so that unexpected exceptions in other JavaScript do not block page visibility.
restoreScrolls();
hljs.initHighlightingOnLoad();
initSideNav();
initScrollSave();
initSearch("search-box");
initSearch("search-body");
initSearch("search-sidebar");
});

View File

@ -0,0 +1,992 @@
/* Palette generated by Material Palette - materialpalette.com/blue/cyan */
.dark-primary-color { background: #1976D2; }
.default-primary-color { background: #2196F3; }
.light-primary-color { background: #BBDEFB; }
.text-primary-color { color: #FFFFFF; }
.accent-color { background: #00BCD4; }
.primary-text-color { color: #212121; }
.secondary-text-color { color: #727272; }
.divider-color { border-color: #B6B6B6; }
/* for layout */
html,
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
overflow: hidden;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
body {
display: flex;
flex-direction: column;
-webkit-overflow-scrolling: touch;
}
header {
flex: 0 0 50px;
display: flex;
flex-direction: row;
align-items: center;
padding-left: 30px;
}
header ol {
list-style: none;
margin: 0;
padding: 0;
}
header ol li {
display: inline;
}
header form {
display: flex;
flex: 1;
justify-content: flex-end;
padding-right: 30px;
}
header#header-search-sidebar {
height: 50px;
margin-bottom: 25px;
}
footer {
flex: 0 0 16px;
text-align: center;
padding: 16px 20px;
}
main {
flex: 1;
display: flex;
flex-direction: row;
padding: 20px;
min-height: 0;
}
.sidebar-offcanvas-left {
flex: 0 1 230px;
overflow-y: scroll;
padding: 20px 0 15px 30px;
margin: 5px 20px 0 0;
visibility: hidden; /* shown by Javascript after scroll position restore */
}
::-webkit-scrollbar-button{ display: none; height: 13px; border-radius: 0px; background-color: #AAA; }
::-webkit-scrollbar-button:hover{ background-color: #AAA; }
::-webkit-scrollbar-thumb{ background-color: #CCC; }
::-webkit-scrollbar-thumb:hover{ background-color: #CCC; }
::-webkit-scrollbar{ width: 4px; }
.main-content::-webkit-scrollbar{ width: 8px; }
.main-content {
flex: 1;
overflow-y: scroll;
padding: 10px 20px 0 20px;
visibility: hidden; /* shown by Javascript after scroll position restore */
}
.sidebar-offcanvas-right {
flex: 0 1 12em;
overflow-y: scroll;
padding: 20px 15px 15px 15px;
margin-top: 5px;
margin-right: 20px;
visibility: hidden; /* shown by Javascript after scroll position restore */
}
/* end for layout */
body {
-webkit-text-size-adjust: 100%;
overflow-x: hidden;
font-family: Roboto, sans-serif;
font-size: 16px;
line-height: 1.42857143;
color: #111111;
background-color: #fff;
}
/* some of this is to reset bootstrap */
nav.navbar {
background-color: inherit;
min-height: 50px;
border: 0;
}
@media (max-width: 768px) {
.hidden-xs {
display: none !important;
}
}
@media (min-width: 769px) {
.hidden-l {
display: none !important;
}
}
nav.navbar .row {
padding-top: 8px;
}
nav .container {
white-space: nowrap;
}
header {
background-color: #eeeeee;
box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}
header.header-fixed nav.navbar-fixed-top {
box-shadow: 0 3px 5px rgba(0,0,0,0.1);
}
header.container-fluid {
padding: 0;
}
header .masthead {
padding-top: 64px;
}
header .contents {
padding: 0;
}
@media screen and (max-width:768px) {
header .contents {
padding-left: 15px;
padding-right: 15px;
}
}
a {
text-decoration: none;
}
.body {
margin-top: 90px;
}
section {
margin-bottom: 36px;
}
dl {
margin: 0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: Roboto, sans-serif;
font-weight: 400;
margin-top: 1.5em;
color: #111111;
}
h1.title {
overflow: hidden;
text-overflow: ellipsis;
}
h1 {
font-size: 37px;
margin-top: 0;
margin-bottom: 0.67em;
}
h2 {
font-size: 28px;
}
h5 {
font-size: 16px;
}
.subtitle {
font-size: 17px;
min-height: 1.4em;
}
.title-description .subtitle {
white-space: nowrap;
overflow-x: hidden;
text-overflow: ellipsis;
}
p {
margin-bottom: 1em;
margin-top: 0;
}
a {
color: #0175C2;
}
a:hover {
color: #13B9FD;
}
pre.prettyprint {
font-family: 'Source Code Pro', Menlo, monospace;
color: black;
border-radius: 0;
font-size: 15px;
word-wrap: normal;
line-height: 1.4;
border: 0;
margin: 16px 0 16px 0;
padding: 8px;
}
pre code {
white-space: pre;
word-wrap: initial;
font-size: 100%
}
.fixed {
white-space: pre;
}
pre {
border: 1px solid #ddd;
background-color: #eee;
font-size: 14px;
}
code {
font-family: 'Source Code Pro', Menlo, monospace;
/* overriding bootstrap */
color: inherit;
padding: 0.2em 0.4em;
font-size: 85%;
background-color: rgba(27,31,35,0.05);
border-radius: 3px;
}
@media(max-width: 768px) {
nav .container {
width: 100%
}
h1 {
font-size: 24px;
}
pre {
margin: 16px 0;
}
}
@media (min-width: 768px) {
ul.subnav li {
font-size: 17px;
}
}
header h1 {
font-weight: 400;
margin-bottom: 16px;
}
header a,
header p,
header li {
color: #111111;
}
header a:hover {
color: #0175C2;
}
header h1 .kind {
color: #555;
}
dt {
font-weight: normal;
}
dd {
color: #212121;
margin-bottom: 1em;
margin-left: 0;
}
dd.callable, dd.constant, dd.property {
margin-bottom: 24px;
}
dd p {
overflow-x: hidden;
text-overflow: ellipsis;
margin-bottom: 0;
}
/* Enum values do not have their own pages; their full docs are presented on the
* enum class's page. */
dt.constant + dd p {
margin-bottom: 1em;
}
/* indents wrapped lines */
section.summary dt {
margin-left: 24px;
text-indent: -24px;
}
.dl-horizontal dd {
margin-left: initial;
}
dl.dl-horizontal dt {
font-style: normal;
text-align: left;
color: #727272;
margin-right: 20px;
width: initial;
}
dt .name {
font-weight: 500;
}
dl dt.callable .name {
float: none;
width: auto;
}
.parameter {
white-space: nowrap;
}
.type-parameter {
white-space: nowrap;
}
.multi-line-signature .type-parameter .parameter {
margin-left: 0px;
display: unset;
}
.parameter-list {
display: table-cell;
margin-left: 10px;
list-style-type: none;
}
.signature {
color: #727272;
}
.signature a {
/* 50% mix of default-primary-color and primary-text-color. */
color: #4674a2;
}
.optional {
font-style: italic;
}
.undocumented {
font-style: italic;
}
.is-const {
font-style: italic;
}
.deprecated {
text-decoration: line-through;
}
.category.linked {
font-weight: bold;
opacity: 1;
}
/* Colors for category based on categoryOrder in dartdoc_options.config. */
.category.cp-0 {
background-color: #54b7c4
}
.category.cp-1 {
background-color: #54c47f
}
.category.cp-2 {
background-color: #c4c254
}
.category.cp-3 {
background-color: #c49f54
}
.category.cp-4 {
background-color: #c45465
}
.category.cp-5 {
background-color: #c454c4
}
.category a {
color: white;
}
.category {
padding: 2px 4px;
font-size: 12px;
border-radius: 4px;
background-color: #999;
text-transform: uppercase;
color: white;
opacity: .5;
}
h1 .category {
vertical-align: middle;
}
.feature {
display: inline-block;
background: white;
border: 1px solid #0175c2;
border-radius: 20px;
color: #0175c2;
font-size: 12px;
padding: 1px 6px;
margin: 0 8px 0 0;
}
h1 .feature {
vertical-align: middle;
}
.source-link {
padding: 18px 4px;
vertical-align: middle;
}
.source-link .material-icons {
font-size: 18px;
}
@media (max-width: 768px) {
.source-link {
padding: 7px 2px;
font-size: 10px;
}
}
#external-links {
float: right;
}
.btn-group {
position: relative;
display: inline-flex;
vertical-align: middle;
}
p.firstline {
font-weight: bold;
}
footer {
color: #fff;
background-color: #111111;
width: 100%;
}
footer p {
margin: 0;
}
footer .no-break {
white-space: nowrap;
}
footer .container,
footer .container-fluid {
padding-left: 0;
padding-right: 0;
}
footer a, footer a:hover {
color: #fff;
}
.markdown.desc {
max-width: 700px;
}
.markdown h1 {
font-size: 24px;
margin-bottom: 8px;
}
.markdown h2 {
font-size: 20px;
margin-top: 24px;
margin-bottom: 8px;
}
.markdown h3 {
font-size: 18px;
margin-bottom: 8px;
}
.markdown h4 {
font-size: 16px;
margin-bottom: 0;
}
.markdown li p {
margin: 0;
}
.gt-separated {
list-style: none;
padding: 0;
margin: 0;
}
.gt-separated li {
display: inline-block;
}
.gt-separated li:before {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%23DDDDDD' d='M6.7,4L5.7,4.9L8.8,8l-3.1,3.1L6.7,12l4-4L6.7,4z'/></svg>");
background-position: center;
content: "\00a0";
margin: 0 6px 0 4px;
padding: 0 3px 0 0;
}
.gt-separated.dark li:before {
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path fill='%23727272' d='M6.7,4L5.7,4.9L8.8,8l-3.1,3.1L6.7,12l4-4L6.7,4z'/></svg>");
}
.gt-separated li:first-child:before {
background-image: none;
content: "";
margin: 0;
padding: 0;
}
/* The slug line under a declaration for things like "const", "read-only", etc. */
.features {
font-style: italic;
color: #727272;
}
.multi-line-signature {
font-size: 17px;
color: #727272;
}
.multi-line-signature .parameter {
margin-left: 24px;
display: block;
}
.breadcrumbs {
padding: 0;
margin: 8px 0 8px 0;
white-space: nowrap;
line-height: 1;
}
@media screen and (min-width: 768px) {
nav ol.breadcrumbs {
float: left;
}
}
@media screen and (max-width: 768px) {
.breadcrumbs {
margin: 0 0 24px 0;
overflow-x: hidden;
}
}
.self-crumb {
color: #555;
}
.self-name {
color: #555;
display: none;
}
.annotation-list {
list-style: none;
padding: 0;
display: inline;
}
.comma-separated {
list-style: none;
padding: 0;
display: inline;
}
.comma-separated li {
display: inline;
}
.comma-separated li:after {
content: ", ";
}
.comma-separated li:last-child:after {
content: "";
}
.end-with-period li:last-child:after {
content: ".";
}
.container > section:first-child {
border: 0;
}
.constructor-modifier {
font-style: italic;
}
section.multi-line-signature div.parameters {
margin-left: 24px;
}
/* subnav styles */
ul.subnav {
overflow: auto;
white-space: nowrap;
padding-left: 0;
min-height: 25px;
}
ul.subnav::-webkit-scrollbar {
display: none;
}
ul.subnav li {
display: inline-block;
text-transform: uppercase;
}
ul.subnav li a {
color: #111;
}
ul.subnav li {
margin-right: 24px;
}
ul.subnav li:last-of-type {
margin-right: 0;
}
@media(max-width: 768px) {
ul.subnav li {
margin-right: 16px;
}
}
/* sidebar styles */
.sidebar ol {
list-style: none;
line-height: 22px;
margin-top: 0;
margin-bottom: 0;
padding: 0 0 15px 0;
}
.sidebar h5 a,
.sidebar h5 a:hover {
color: #727272;
}
.sidebar h5,
.sidebar ol li {
text-overflow: ellipsis;
overflow: hidden;
padding: 3px 0;
}
.sidebar h5 {
color: #727272;
font-size: 18px;
margin: 0 0 25px 0;
padding-top: 0;
}
.sidebar ol li.section-title {
font-size: 18px;
font-weight: normal;
text-transform: uppercase;
padding-top: 25px;
}
.sidebar ol li.section-subtitle a {
color: inherit;
}
.sidebar ol li.section-subtitle {
font-weight: 400;
text-transform: uppercase;
}
.sidebar ol li.section-subitem {
margin-left: 12px;
}
.sidebar ol li:first-child {
padding-top: 0;
margin-top: 0;
}
button {
padding: 0;
}
#sidenav-left-toggle {
display: none;
vertical-align: text-bottom;
padding: 0;
}
/* left-nav disappears, and can transition in from the left */
@media screen and (max-width:768px) {
#sidenav-left-toggle {
display: inline;
background: no-repeat url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23111' d='M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z'/></svg>");
background-position: center;
width: 24px;
height: 24px;
border: none;
margin-right: 24px;
}
#overlay-under-drawer.active {
opacity: 0.4;
height: 100%;
z-index: 1999;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: black;
display: block;
}
.sidebar-offcanvas-left {
left: -100%;
position: fixed;
-webkit-transition:all .25s ease-out;
-o-transition:all .25s ease-out;
transition:all .25s ease-out;
z-index: 2000;
top: 0;
width: 280px; /* works all the way down to an iphone 4 */
height: 90%;
background-color: white;
overflow-y: scroll; /* TODO: how to hide scroll bars? */
padding: 10px;
margin: 10px 10px;
box-shadow: 5px 5px 5px 5px #444444;
visibility: hidden; /* shown by Javascript after scroll position restore */
}
ol#sidebar-nav {
font-size: 18px;
white-space: pre-line;
}
.sidebar-offcanvas-left.active {
left: 0; /* this animates our drawer into the page */
}
.self-name {
display: inline-block;
}
}
.sidebar-offcanvas-left h5 {
margin-bottom: 10px;
}
.sidebar-offcanvas-left h5:last-of-type {
border: 0;
margin-bottom: 25px;
}
/* the right nav disappears out of view when the window shrinks */
@media screen and (max-width: 992px) {
.sidebar-offcanvas-right {
display: none;
}
}
#overlay-under-drawer {
display: none;
}
/* find-as-you-type search box */
/* override bootstrap defaults */
.form-control {
border-radius: 0;
border: 0;
}
@media screen and (max-width: 768px) {
form.search {
display: none;
}
}
.typeahead,
.tt-query,
.tt-hint {
width: 200px;
height: 20px;
padding: 2px 7px 1px 7px;
line-height: 20px;
outline: none;
}
.typeahead {
background-color: #fff;
border-radius: 2px;
}
.tt-query {
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.tt-hint {
color: #999
}
.navbar-right .tt-menu {
right:0;
left: inherit !important;
width: 422px;
max-height: 250px;
overflow-y: scroll;
}
.tt-menu {
font-size: 14px;
margin: 0;
padding: 8px 0;
background-color: #fff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,.2);
-moz-box-shadow: 0 5px 10px rgba(0,0,0,.2);
box-shadow: 0 5px 10px rgba(0,0,0,.2);
}
.tt-suggestion {
padding: 3px 20px;
color: #212121;
}
.tt-suggestion:hover {
cursor: pointer;
color: #fff;
background-color: #0097cf;
}
.tt-suggestion:hover .search-from-lib {
color: #ddd;
}
.tt-suggestion.tt-cursor {
color: #fff;
background-color: #0097cf;
}
.tt-suggestion.tt-cursor .search-from-lib {
color: #ddd;
}
.tt-suggestion p {
margin: 0;
}
.search-from-lib {
font-style: italic;
color: gray;
}
#search-box {
background-color: #ffffff;
}
.search-body {
border: 1px solid #7f7f7f;
max-width: 400px;
box-shadow: 3px 3px 5px rgba(0,0,0,0.1);
}
section#setter {
border-top: 1px solid #ddd;
padding-top: 36px;
}
li.inherited a {
opacity: 0.65;
font-style: italic;
}
#instance-methods dt.inherited .name,
#instance-properties dt.inherited .name,
#operators dt.inherited .name {
font-weight: 300;
font-style: italic;
}
#instance-methods dt.inherited .signature,
#instance-properties dt.inherited .signature,
#operators dt.inherited .signature {
font-weight: 300;
}
@media print {
.subnav, .sidebar {
display:none;
}
a[href]:after {
content:"" !important;
}
}

File diff suppressed because one or more lines are too long