-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhtml5lib.js
1 lines (1 loc) · 12.5 KB
/
html5lib.js
1
var Module=typeof pyodide._module!=="undefined"?pyodide._module:{};Module.checkABI(1);if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0;Module.finishedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){var loadPackage=function(metadata){var PACKAGE_PATH;if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}var PACKAGE_NAME="html5lib.data";var REMOTE_PACKAGE_BASE="html5lib.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata.remote_package_size;var PACKAGE_UUID=metadata.package_uuid;function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"]("Downloading data... ("+loaded+"/"+total+")")}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}},handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","lib",true,true);Module["FS_createPath"]("/lib","python3.7",true,true);Module["FS_createPath"]("/lib/python3.7","site-packages",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","html5lib-1.0.1-py3.7.egg-info",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages","html5lib",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treebuilders",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","filters",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treewalkers",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","treeadapters",true,true);Module["FS_createPath"]("/lib/python3.7/site-packages/html5lib","_trie",true,true);function DataRequest(start,end,audio){this.start=start;this.end=end;this.audio=audio}DataRequest.prototype={requests:{},open:function(mode,name){this.name=name;this.requests[name]=this;Module["addRunDependency"]("fp "+this.name)},send:function(){},onload:function(){var byteArray=this.byteArray.subarray(this.start,this.end);this.finish(byteArray)},finish:function(byteArray){var that=this;Module["FS_createPreloadedFile"](this.name,null,byteArray,true,true,function(){Module["removeRunDependency"]("fp "+that.name)},function(){if(that.audio){Module["removeRunDependency"]("fp "+that.name)}else{err("Preloading file "+that.name+" failed")}},false,true);this.requests[this.name]=null}};function processPackageData(arrayBuffer){Module.finishedDataFileDownloads++;assert(arrayBuffer,"Loading data file failed.");assert(arrayBuffer instanceof ArrayBuffer,"bad input to processPackageData");var byteArray=new Uint8Array(arrayBuffer);var curr;var compressedData={data:null,cachedOffset:233740,cachedIndexes:[-1,-1],cachedChunks:[null,null],offsets:[0,841,1344,1687,2826,3916,5270,6488,7872,9059,10424,11800,12849,13922,15189,16231,17592,18746,19873,21046,22281,23302,24274,25415,26245,27386,28328,29371,30338,31654,32775,33835,34993,35964,36934,37800,38371,39059,39927,40589,41233,41858,42379,42902,43515,44146,44596,45328,46185,47142,47812,48419,49122,50130,50931,51448,52020,52669,53272,54091,54635,55141,55664,56197,56692,57266,58427,59672,60998,62322,63739,65264,66789,67716,68775,69715,70449,71265,71973,72671,73344,74157,74744,75584,76656,77741,78851,79913,80803,81786,82665,83542,84448,85343,86283,87207,88144,88987,89911,90856,91788,92676,93614,94522,95434,96345,97123,98007,98948,99900,100846,101715,102616,103539,104402,105743,106972,108200,109309,110332,111104,112096,113225,114316,115379,116061,116605,117350,118199,119056,120076,120980,121773,122582,123720,124694,125726,126632,127409,128128,128993,129883,130708,131554,132457,133256,134233,135147,136077,136838,137721,138732,139679,140481,141369,142211,143039,143840,144825,145591,146574,147361,148311,149205,150008,150805,151702,152425,153364,154402,155210,156091,156774,157630,158919,160158,161335,162532,163546,164458,165232,166305,167734,168933,170073,171156,172237,173328,174386,175353,176505,177518,178444,179355,180273,181206,182143,183477,184328,185265,186292,187112,188184,189301,190733,191871,192762,193749,194720,195512,196660,197416,198439,199381,200183,200957,201628,202715,203761,204568,205020,205537,206303,207023,207767,208541,209533,210558,211360,212575,213612,214796,216022,216938,217886,218687,219922,220762,221847,222888,223794,224916,226144,227306,228301,229336,230362,231537,232530,233533],sizes:[841,503,343,1139,1090,1354,1218,1384,1187,1365,1376,1049,1073,1267,1042,1361,1154,1127,1173,1235,1021,972,1141,830,1141,942,1043,967,1316,1121,1060,1158,971,970,866,571,688,868,662,644,625,521,523,613,631,450,732,857,957,670,607,703,1008,801,517,572,649,603,819,544,506,523,533,495,574,1161,1245,1326,1324,1417,1525,1525,927,1059,940,734,816,708,698,673,813,587,840,1072,1085,1110,1062,890,983,879,877,906,895,940,924,937,843,924,945,932,888,938,908,912,911,778,884,941,952,946,869,901,923,863,1341,1229,1228,1109,1023,772,992,1129,1091,1063,682,544,745,849,857,1020,904,793,809,1138,974,1032,906,777,719,865,890,825,846,903,799,977,914,930,761,883,1011,947,802,888,842,828,801,985,766,983,787,950,894,803,797,897,723,939,1038,808,881,683,856,1289,1239,1177,1197,1014,912,774,1073,1429,1199,1140,1083,1081,1091,1058,967,1152,1013,926,911,918,933,937,1334,851,937,1027,820,1072,1117,1432,1138,891,987,971,792,1148,756,1023,942,802,774,671,1087,1046,807,452,517,766,720,744,774,992,1025,802,1215,1037,1184,1226,916,948,801,1235,840,1085,1041,906,1122,1228,1162,995,1035,1026,1175,993,1003,207],successes:[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]};compressedData.data=byteArray;assert(typeof Module.LZ4==="object","LZ4 not present - was your app build with -s LZ4=1 ?");Module.LZ4.loadPackage({metadata:metadata,compressedData:compressedData});Module["removeRunDependency"]("datafile_html5lib.data")}Module["addRunDependency"]("datafile_html5lib.data");if(!Module.preloadResults)Module.preloadResults={};Module.preloadResults[PACKAGE_NAME]={fromCache:false};if(fetched){processPackageData(fetched);fetched=null}else{fetchedCallback=processPackageData}}if(Module["calledRun"]){runWithFS()}else{if(!Module["preRun"])Module["preRun"]=[];Module["preRun"].push(runWithFS)}};loadPackage({files:[{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/SOURCES.txt",start:0,end:6411,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/PKG-INFO",start:6411,end:25180,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/dependency_links.txt",start:25180,end:25181,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/top_level.txt",start:25181,end:25190,audio:0},{filename:"/lib/python3.7/site-packages/html5lib-1.0.1-py3.7.egg-info/requires.txt",start:25190,end:25461,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_inputstream.py",start:25461,end:57960,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_tokenizer.py",start:57960,end:134528,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_ihatexml.py",start:134528,end:151233,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/constants.py",start:151233,end:234751,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/__init__.py",start:234751,end:235896,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/html5parser.py",start:235896,end:354847,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/serializer.py",start:354847,end:370593,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_utils.py",start:370593,end:374596,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/base.py",start:374596,end:389163,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/etree.py",start:389163,end:401915,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/etree_lxml.py",start:401915,end:416037,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/__init__.py",start:416037,end:419629,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treebuilders/dom.py",start:419629,end:428464,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/lint.py",start:428464,end:432095,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/optionaltags.py",start:432095,end:442683,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/inject_meta_charset.py",start:442683,end:445628,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/base.py",start:445628,end:445914,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/alphabeticalattributes.py",start:445914,end:446833,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/sanitizer.py",start:446833,end:473069,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/whitespace.py",start:473069,end:474283,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/filters/__init__.py",start:474283,end:474283,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/base.py",start:474283,end:481759,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/etree.py",start:481759,end:486297,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/genshi.py",start:486297,end:488606,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/etree_lxml.py",start:488606,end:494903,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/__init__.py",start:494903,end:500617,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treewalkers/dom.py",start:500617,end:502030,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/sax.py",start:502030,end:503806,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/genshi.py",start:503806,end:505521,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/treeadapters/__init__.py",start:505521,end:506171,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/datrie.py",start:506171,end:507337,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/py.py",start:507337,end:509100,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/__init__.py",start:509100,end:509389,audio:0},{filename:"/lib/python3.7/site-packages/html5lib/_trie/_base.py",start:509389,end:510319,audio:0}],remote_package_size:237836,package_uuid:"1e858e95-69d3-4735-97be-1487a57b92bc"})})();