-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.min.js
1 lines (1 loc) · 7.01 KB
/
index.min.js
1
"use strict";function isBrowser(){return("object"!=typeof process||"function"!=typeof require)&&"function"!=typeof importScripts&&("object"==typeof window||void 0)}const binaryExtensions=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"],textExtensions=["Dockerfile","Makefile","Rakefile","ada","adb","ads","applescript","as","ascx","asm","asmx","asp","aspx","atom","bas","bash","bashrc","bat","bbcolors","bdsgroup","bdsproj","bib","bowerrc","c","cbl","cc","cfc","cfg","cfm","cfml","cgi","clj","cls","cmake","cmd","cnf","cob","coffee","coffeekup","conf","cpp","cpt","cpy","crt","cs","csh","cson","csr","css","csslintrc","csv","ctl","curlrc","cxx","dart","dfm","diff","dockerignore","dof","dpk","dproj","dtd","eco","editorconfig","ejs","el","emacs","eml","ent","erb","erl","eslintignore","eslintrc","ex","exs","f","f03","f77","f90","f95","fish","for","fpp","frm","ftn","gemrc","gitattributes","gitconfig","gitignore","gitkeep","gitmodules","go","gpp","gradle","groovy","groupproj","grunit","gtmpl","gvimrc","h","haml","hbs","hgignore","hh","hpp","hrl","hs","hta","htaccess","htc","htm","html","htpasswd","hxx","iced","inc","ini","ino","int","irbrc","itcl","itermcolors","itk","jade","java","jhtm","jhtml","js","jscsrc","jshintignore","jshintrc","json","json5","jsonld","jsp","jspx","jsx","ksh","less","lhs","lisp","log","ls","lsp","lua","m","mak","map","markdown","master","md","mdown","mdwn","mdx","metadata","mht","mhtml","mjs","mk","mkd","mkdn","mkdown","ml","mli","mm","mxml","nfm","nfo","njk","noon","npmignore","npmrc","nvmrc","ops","pas","pasm","patch","pbxproj","pch","pem","pg","php","php3","php4","php5","phpt","phtml","pir","pl","pm","pmc","pod","pot","properties","props","pt","pug","py","r","rake","rb","rdoc","rdoc_options","resx","rhtml","rjs","rlib","rmd","ron","rs","rss","rst","rtf","rvmrc","rxml","s","sass","scala","scm","scss","seestyle","sh","shtml","sls","spec","sql","sqlite","ss","sss","st","strings","sty","styl","stylus","sub","sublime-build","sublime-commands","sublime-completions","sublime-keymap","sublime-macro","sublime-menu","sublime-project","sublime-settings","sublime-workspace","sv","svc","svg","t","tcl","tcsh","terminal","tex","text","textile","tg","tmLanguage","tmTheme","tmpl","toml","tpl","ts","tsv","tsx","tt","tt2","ttml","txt","v","vb","vbs","vh","vhd","vhdl","vim","viminfo","vimrc","vue","webapp","wxml","wxss","x-php","xaml","xht","xhtml","xml","xs","xsd","xsl","xslt","yaml","yml","zsh","zshrc"],scriptInjectionExtensions=["html","php","php2","php3","phpt","phtml","phar","do","svg","action","cgi","asp","ashx","cshtml","js","xml","php7","asmx","jsp","cgi","htm","cer","aspx ","php4","php5","odt","sh","bat"],compressedFileExtensions=["7z","aar","ace","arj","apk","arc","ark","br","bz","bz2","cab","chm","deb","dmg","ear","egg","epub","gz","jar","lha","lrz","lz","lz4","lzh","lzma","lzo","lzop","mar","par2","pea","pet","pkg","rar","rpm","rz","s7z","shar","sit","sitx","tbz","tbz2","tgz","tlz","txz","tzo","war","whl","xpi","xz","z","zip","zipx","zoo","zpaq","zst"];function isBinaryExtension(t){return!!detect(t,binaryExtensions)}function isTextExtension(t){return!!detect(t,textExtensions)}function iscompressedFileExtensions(t){return!!detect(t,compressedFileExtensions)}function isExtension(t,s){if(s&&"string"==typeof s)return!!detect(t,[s]);throw Error("Please provide a valid string for type check")}function detect(t,s){t=t.split(".");return!(!s.includes(t[t.length-1])&&!s.includes(t[t.length-2]))}function isBinary(t,s){t=isText(t,s);return null==t?null:(getEncoding(s),!t)}function isText(t,s){if(t)for(const e of t.split(".").reverse()){if(-1!==textExtensions.indexOf(e))return!0;if(-1!==binaryExtensions.indexOf(e))return!1}return s?"utf8"===getEncoding(s):null}function getEncoding(s,t){if(!s)return null;var e="utf8",i="binary",r=t?.chunkLength??24;let n=t?.chunkBegin??0;if(null==t?.chunkBegin){let t=getEncoding(s,{chunkLength:r,chunkBegin:n});return t===e&&(n=Math.max(0,Math.floor(s.length/2)-r),(t=getEncoding(s,{chunkLength:r,chunkBegin:n}))===e)&&(n=Math.max(0,s.length-r),t=getEncoding(s,{chunkLength:r,chunkBegin:n})),t}if(-1===(n=getChunkBegin(s,n)))return i;t=getChunkEnd(s,Math.min(s.length,n r));if(t>s.length)return i;var p=s.toString(e,n,t);for(let t=0;t<p.length; t){var o=p.charCodeAt(t);if(65533===o||o<=8)return i}return e}function getChunkBegin(t,s){var e;return 0===s?0:isLaterByteOfUtf8(t[s])?0<=(e=s-3)&&isFirstByteOf4ByteChar(t[e])||0<=(e=s-2)&&(isFirstByteOf4ByteChar(t[e])||isFirstByteOf3ByteChar(t[e]))||0<=(e=s-1)&&(isFirstByteOf4ByteChar(t[e])||isFirstByteOf3ByteChar(t[e])||isFirstByteOf2ByteChar(t[e]))?e:-1:s}function getChunkEnd(t,s){if(s!==t.length){var e=s-3;if(0<=e&&isFirstByteOf4ByteChar(t[e]))return s 1;if(0<=(e=s-2)){if(isFirstByteOf4ByteChar(t[e]))return s 2;if(isFirstByteOf3ByteChar(t[e]))return s 1}if(0<=(e=s-1)){if(isFirstByteOf4ByteChar(t[e]))return s 3;if(isFirstByteOf3ByteChar(t[e]))return s 2;if(isFirstByteOf2ByteChar(t[e]))return s 1}}return s}function isFirstByteOf4ByteChar(t){return t>>3==30}function isFirstByteOf3ByteChar(t){return t>>4==14}function isFirstByteOf2ByteChar(t){return t>>5==6}function isLaterByteOfUtf8(t){return t>>6==2}if(!isBrowser()){const L={isText:isText,isBinary:isBinary,detect:detect,isExtension:isExtension,isTextExtension:isTextExtension,isBinaryExtension:isBinaryExtension,binaryExtensions:binaryExtensions,textExtensions:textExtensions,scriptInjectionExtensions:scriptInjectionExtensions,compressedFileExtensions:compressedFileExtensions,iscompressedFileExtensions:iscompressedFileExtensions};module.exports=L,module.exports.default=L}