fix: fix resource

This commit is contained in:
Dillon 2019-08-26 03:04:04 +08:00
parent 4e5882699b
commit 7639927bd5
37 changed files with 86 additions and 1 deletions

1
.gitignore vendored
View file

@ -1,6 +1,5 @@
# Hugo default output directory
public
resources
## OS Files
# Windows

View file

@ -0,0 +1 @@
{"Target":"css/lib/animate/animate.min.min.css","MediaType":"text/css","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"css/lib/aplayer/APlayer.min.min.css","MediaType":"text/css","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"css/lib/fontawesome-free/all.min.min.css","MediaType":"text/css","Data":{}}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"Target":"css/lib/katex/katex.min.min.css","MediaType":"text/css","Data":{}}

View file

@ -0,0 +1,7 @@
jQuery(function($){'use strict';var _Blog=window._Blog||{};_Blog.toggleMobileMenu=function(){$('#menu-toggle').on('click',()=>{$('#menu-toggle').toggleClass('active');$('#mobile-menu').toggleClass('active');});};_Blog.toggleTheme=function(){$('.theme-switch').on('click',()=>{$('body').toggleClass('dark-theme');isDark=!isDark;window.localStorage&&window.localStorage.setItem('theme',isDark?'dark':'light');this.echarts();});};_Blog.changeTitle=function(){var currentTitle=document.title;window.onblur=function(){document.title=currentTitle;};window.onfocus=function(){document.title=currentTitle;};};_Blog.dynamicToTop=function(){const min=300;var $toTop=$('#dynamic-to-top');$(window).scroll(function(){var scrollTop=$(window).scrollTop();if(typeof document.body.style.maxHeight==='undefined'){$toTop.css({'position':'absolute','top':scrollTop+$(window).height()-20,});}
if(scrollTop>min){(function fadeIn(el,display){display=display||"block";if(el.style.display!==display){el.style.opacity=0;el.style.display=display;(function fade(){var val=parseFloat(el.style.opacity);if(!((val+=.1)>1)){el.style.opacity=val;requestAnimationFrame(fade);}})();}})(document.getElementById('dynamic-to-top'));}else{(function fadeOut(el){if(el.style.display!=="none"){el.style.opacity=1;(function fade(){if((el.style.opacity-=.1)<0){el.style.display="none";}else{requestAnimationFrame(fade);}})();}})(document.getElementById('dynamic-to-top'));}});};_Blog.chroma=function(){const blocks=document.querySelectorAll('.highlight > .chroma');for(let i=0;i<blocks.length;i++){const block=blocks[i];const afterHighLight=block.querySelector('pre.chroma > code');const lang=afterHighLight?afterHighLight.className:'';block.className+=' '+lang;}};_Blog.responsiveTable=function(){const tables=document.querySelectorAll('.post-content table');for(let i=0;i<tables.length;i++){const table=tables[i];const wrapper=document.createElement('div');wrapper.className='table-wrapper';table.parentElement.replaceChild(wrapper,table);wrapper.appendChild(table);}};_Blog._refactorToc=function(toc){const oldTocList=toc.children[0];let newTocList=oldTocList;let temp;while(newTocList.children.length===1&&(temp=newTocList.children[0].children[0]).tagName==='UL'){newTocList=temp;}
if(newTocList!==oldTocList)toc.replaceChild(newTocList,oldTocList);};_Blog._linkToc=function(){const links=document.querySelectorAll('#TableOfContents a:first-child');for(let i=0;i<links.length;i++)links[i].className+=' toc-link';for(let num=1;num<=6;num++){const headers=document.querySelectorAll('.post-content>h'+num);for(let i=0;i<headers.length;i++){const header=headers[i];header.innerHTML=`<a href="#${header.id}" class="headerlink anchor"><i class="iconfont icon-link"></i></a>${header.innerHTML}`;}}};_Blog._initToc=function(){const $toc=$('#post-toc');if($toc.length&&$toc.css('display')!=='none'){const SPACING=100;const $footer=$('#post-footer');const minTop=$toc.position().top;;const mainTop=$('main').position().top;const minScrollTop=minTop+mainTop-SPACING;const changeTocState=function(){const scrollTop=$(window).scrollTop();const maxTop=$footer.position().top-$toc.height();const maxScrollTop=maxTop+mainTop-SPACING;const tocState={start:{'position':'absolute','top':minTop,},process:{'position':'fixed','top':SPACING,},end:{'position':'absolute','top':maxTop,}};if(scrollTop<minScrollTop){$toc.css(tocState.start);}else if(scrollTop>maxScrollTop){$toc.css(tocState.end);}else{$toc.css(tocState.process);}};changeTocState();const HEADERFIX=100;const $toclink=$('.toc-link');const $headerlink=$('.headerlink');const $tocLinkLis=$('.post-toc-content li');const activeIndex=function(){const scrollTop=$(window).scrollTop();const headerlinkTop=$.map($headerlink,function(link){return $(link).offset().top;});const headerLinksOffsetForSearch=$.map(headerlinkTop,function(offset){return offset-HEADERFIX;});const searchActiveTocIndex=function(array,target){for(let i=0;i<array.length-1;i++){if(target>array[i]&&target<=array[i+1])return i;}
if(target>array[array.length-1])return array.length-1;return 0;};const activeTocIndex=searchActiveTocIndex(headerLinksOffsetForSearch,scrollTop);$($toclink).removeClass('active');$($tocLinkLis).removeClass('has-active');if(activeTocIndex!==-1){$($toclink[activeTocIndex]).addClass('active');let ancestor=$toclink[activeTocIndex].parentNode;while(ancestor.tagName!=='NAV'){$(ancestor).addClass('has-active');ancestor=ancestor.parentNode.parentNode;}}};activeIndex();if(!this._initTocOnce){$(window).scroll(changeTocState);$(window).scroll(activeIndex);this._initTocOnce=true;}}};_Blog.toc=function(){const tocContainer=document.getElementById('post-toc');if(tocContainer!==null){const toc=document.getElementById('TableOfContents');if(toc===null){tocContainer.parentNode.removeChild(tocContainer);}else{this._refactorToc(toc);this._linkToc();this._initToc();window.addEventListener("resize",function(){this.setTimeout(_Blog._initToc,0);},false);}}};_Blog.echarts=function(){if(window.echartsMap){for(let i=0;i<echartsArr.length;i++){echartsArr[i].dispose();}
echartsArr=[];Object.keys(echartsMap).forEach(function(id){let myChart=echarts.init(document.getElementById(id),window.isDark?'dark':'macarons',{renderer:'svg'});myChart.setOption(echartsMap[id]);echartsArr.push(myChart);});window.addEventListener("resize",function(){this.setTimeout(function(){for(let i=0;i<echartsArr.length;i++){echartsArr[i].resize();}},0);},false);}}
_Blog.countdown=function(){if(window.countdownMap){Object.keys(countdownMap).forEach(function(id){$(`#${id}`).countdown(countdownMap[id]['date'],{elapse:true}).on('update.countdown',function(event){$(this).html(event.strftime(countdownMap[id]['pattern']));});});}};_Blog.typeit=function(){if(window.typeitArr){for(let i=0;i<typeitArr.length;i++){const group=typeitArr[i];(function typeone(i){if(i===group.length-1){new TypeIt(`#${group[i]}`,{strings:document.getElementById(`r${group[i]}`).innerHTML,}).go();return;}
let instance=new TypeIt(`#${group[i]}`,{strings:document.getElementById(`r${group[i]}`).innerHTML,afterComplete:()=>{instance.destroy();typeone(i+1);},}).go();})(0);}}};$(document).ready(function(){_Blog.toggleMobileMenu();_Blog.toggleTheme();_Blog.changeTitle();_Blog.dynamicToTop();_Blog.chroma();_Blog.responsiveTable();_Blog.echarts();_Blog.countdown();_Blog.typeit();_Blog.toc();});});

View file

@ -0,0 +1 @@
{"Target":"js/blog.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"js/lib/aplayer/APlayer.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"js/lib/echarts/echarts.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1,2 @@
(function(root,factory){if(typeof define==='function'&&define.amd){define(['exports','echarts'],factory);}else if(typeof exports==='object'&&typeof exports.nodeName!=='string'){factory(exports,require('echarts'));}else{factory({},root.echarts);}}(this,function(exports,echarts){var log=function(msg){if(typeof console!=='undefined'){console&&console.error&&console.error(msg);}};if(!echarts){log('ECharts is not Loaded');return;}
var colorPalette=['#2ec7c9','#b6a2de','#5ab1ef','#ffb980','#d87a80','#8d98b3','#e5cf0d','#97b552','#95706d','#dc69aa','#07a2a4','#9a7fd1','#588dd5','#f5994e','#c05050','#59678c','#c9ab00','#7eb00a','#6f5553','#c14089'];var theme={color:colorPalette,title:{textStyle:{fontWeight:'normal',color:'#008acd'}},visualMap:{itemWidth:15,color:['#5ab1ef','#e0ffff']},toolbox:{iconStyle:{normal:{borderColor:colorPalette[0]}}},tooltip:{backgroundColor:'rgba(50,50,50,0.5)',axisPointer:{type:'line',lineStyle:{color:'#008acd'},crossStyle:{color:'#008acd'},shadowStyle:{color:'rgba(200,200,200,0.2)'}}},dataZoom:{dataBackgroundColor:'#efefff',fillerColor:'rgba(182,162,222,0.2)',handleColor:'#008acd'},grid:{borderColor:'#eee'},categoryAxis:{axisLine:{lineStyle:{color:'#008acd'}},splitLine:{lineStyle:{color:['#eee']}}},valueAxis:{axisLine:{lineStyle:{color:'#008acd'}},splitArea:{show:true,areaStyle:{color:['rgba(250,250,250,0.1)','rgba(200,200,200,0.1)']}},splitLine:{lineStyle:{color:['#eee']}}},timeline:{lineStyle:{color:'#008acd'},controlStyle:{normal:{color:'#008acd'},emphasis:{color:'#008acd'}},symbol:'emptyCircle',symbolSize:3},line:{smooth:true,symbol:'emptyCircle',symbolSize:3},candlestick:{itemStyle:{normal:{color:'#d87a80',color0:'#2ec7c9',lineStyle:{color:'#d87a80',color0:'#2ec7c9'}}}},scatter:{symbol:'circle',symbolSize:4},map:{label:{normal:{textStyle:{color:'#d87a80'}}},itemStyle:{normal:{borderColor:'#eee',areaColor:'#ddd'},emphasis:{areaColor:'#fe994e'}}},graph:{color:colorPalette},gauge:{axisLine:{lineStyle:{color:[[0.2,'#2ec7c9'],[0.8,'#5ab1ef'],[1,'#d87a80']],width:10}},axisTick:{splitNumber:10,length:15,lineStyle:{color:'auto'}},splitLine:{length:22,lineStyle:{color:'auto'}},pointer:{width:5}}};echarts.registerTheme('macarons',theme);}));

View file

@ -0,0 +1 @@
{"Target":"js/lib/echarts/macarons.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1,21 @@
/*!
* The Final Countdown for jQuery v2.2.0 (http://hilios.github.io/jQuery.countdown/)
* Copyright (c) 2016 Edson Hilios
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){"use strict";function b(a){if(a instanceof Date)return a;if(String(a).match(g))return String(a).match(/^[0-9]*$/)&&(a=Number(a)),String(a).match(/\-/)&&(a=String(a).replace(/\-/g,"/")),new Date(a);throw new Error("Couldn't cast `"+a+"` to a date object.")}function c(a){var b=a.toString().replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");return new RegExp(b)}function d(a){return function(b){var d=b.match(/%(-|!)?[A-Z]{1}(:[^;]+;)?/gi);if(d)for(var f=0,g=d.length;f<g;++f){var h=d[f].match(/%(-|!)?([a-zA-Z]{1})(:[^;]+;)?/),j=c(h[0]),k=h[1]||"",l=h[3]||"",m=null;h=h[2],i.hasOwnProperty(h)&&(m=i[h],m=Number(a[m])),null!==m&&("!"===k&&(m=e(l,m)),""===k&&m<10&&(m="0"+m.toString()),b=b.replace(j,m.toString()))}return b=b.replace(/%%/,"%")}}function e(a,b){var c="s",d="";return a&&(a=a.replace(/(:|;|\s)/gi,"").split(/\,/),1===a.length?c=a[0]:(d=a[0],c=a[1])),Math.abs(b)>1?c:d}var f=[],g=[],h={precision:100,elapse:!1,defer:!1};g.push(/^[0-9]*$/.source),g.push(/([0-9]{1,2}\/){2}[0-9]{4}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g.push(/[0-9]{4}([\/\-][0-9]{1,2}){2}( [0-9]{1,2}(:[0-9]{2}){2})?/.source),g=new RegExp(g.join("|"));var i={Y:"years",m:"months",n:"daysToMonth",d:"daysToWeek",w:"weeks",W:"weeksToMonth",H:"hours",M:"minutes",S:"seconds",D:"totalDays",I:"totalHours",N:"totalMinutes",T:"totalSeconds"},j=function(b,c,d){this.el=b,this.$el=a(b),this.interval=null,this.offset={},this.options=a.extend({},h),this.instanceNumber=f.length,f.push(this),this.$el.data("countdown-instance",this.instanceNumber),d&&("function"==typeof d?(this.$el.on("update.countdown",d),this.$el.on("stoped.countdown",d),this.$el.on("finish.countdown",d)):this.options=a.extend({},h,d)),this.setFinalDate(c),this.options.defer===!1&&this.start()};a.extend(j.prototype,{start:function(){null!==this.interval&&clearInterval(this.interval);var a=this;this.update(),this.interval=setInterval(function(){a.update.call(a)},this.options.precision)},stop:function(){clearInterval(this.interval),this.interval=null,this.dispatchEvent("stoped")},toggle:function(){this.interval?this.stop():this.start()},pause:function(){this.stop()},resume:function(){this.start()},remove:function(){this.stop.call(this),f[this.instanceNumber]=null,delete this.$el.data().countdownInstance},setFinalDate:function(a){this.finalDate=b(a)},update:function(){if(0===this.$el.closest("html").length)return void this.remove();var b,c=void 0!==a._data(this.el,"events"),d=new Date;b=this.finalDate.getTime()-d.getTime(),b=Math.ceil(b/1e3),b=!this.options.elapse&&b<0?0:Math.abs(b),this.totalSecsLeft!==b&&c&&(this.totalSecsLeft=b,this.elapsed=d>=this.finalDate,this.offset={seconds:this.totalSecsLeft%60,minutes:Math.floor(this.totalSecsLeft/60)%60,hours:Math.floor(this.totalSecsLeft/60/60)%24,days:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToWeek:Math.floor(this.totalSecsLeft/60/60/24)%7,daysToMonth:Math.floor(this.totalSecsLeft/60/60/24%30.4368),weeks:Math.floor(this.totalSecsLeft/60/60/24/7),weeksToMonth:Math.floor(this.totalSecsLeft/60/60/24/7)%4,months:Math.floor(this.totalSecsLeft/60/60/24/30.4368),years:Math.abs(this.finalDate.getFullYear()-d.getFullYear()),totalDays:Math.floor(this.totalSecsLeft/60/60/24),totalHours:Math.floor(this.totalSecsLeft/60/60),totalMinutes:Math.floor(this.totalSecsLeft/60),totalSeconds:this.totalSecsLeft},this.options.elapse||0!==this.totalSecsLeft?this.dispatchEvent("update"):(this.stop(),this.dispatchEvent("finish")))},dispatchEvent:function(b){var c=a.Event(b+".countdown");c.finalDate=this.finalDate,c.elapsed=this.elapsed,c.offset=a.extend({},this.offset),c.strftime=d(this.offset),this.$el.trigger(c)}}),a.fn.countdown=function(){var b=Array.prototype.slice.call(arguments,0);return this.each(function(){var c=a(this).data("countdown-instance");if(void 0!==c){var d=f[c],e=b[0];j.prototype.hasOwnProperty(e)?d[e].apply(d,b.slice(1)):null===String(e).match(/^[$A-Z_][0-9A-Z_$]*$/i)?(d.setFinalDate.call(d,e),d.start()):a.error("Method %s does not exist on jQuery.countdown".replace(/\%s/gi,e))}else new j(this,b[0],b[1])})}});

View file

@ -0,0 +1 @@
{"Target":"js/lib/jquery-countdown/jquery.countdown.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"js/lib/jquery/jquery.slim.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("katex")):"function"==typeof define&&define.amd?define(["katex"],t):"object"==typeof exports?exports.renderMathInElement=t(require("katex")):e.renderMathInElement=t(e.katex)}("undefined"!=typeof self?self:this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(t,r){t.exports=e},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r.n(n),a=function(e,t,r){for(var n=r,o=0,a=e.length;n<t.length;){var i=t[n];if(o<=0&&t.slice(n,n+a)===e)return n;"\\"===i?n++:"{"===i?o++:"}"===i&&o--,n++}return-1},i=function(e,t,r,n){for(var o=[],i=0;i<e.length;i++)if("text"===e[i].type){var l=e[i].data,d=!0,s=0,f=void 0;for(-1!==(f=l.indexOf(t))&&(s=f,o.push({type:"text",data:l.slice(0,s)}),d=!1);;){if(d){if(-1===(f=l.indexOf(t,s)))break;o.push({type:"text",data:l.slice(s,f)}),s=f}else{if(-1===(f=a(r,l,s+t.length)))break;o.push({type:"math",data:l.slice(s+t.length,f),rawData:l.slice(s,f+r.length),display:n}),s=f+r.length}d=!d}o.push({type:"text",data:l.slice(s)})}else o.push(e[i]);return o},l=function(e,t){for(var r=function(e,t){for(var r=[{type:"text",data:e}],n=0;n<t.length;n++){var o=t[n];r=i(r,o.left,o.right,o.display||!1)}return r}(e,t.delimiters),n=document.createDocumentFragment(),a=0;a<r.length;a++)if("text"===r[a].type)n.appendChild(document.createTextNode(r[a].data));else{var l=document.createElement("span"),d=r[a].data;t.displayMode=r[a].display;try{t.preProcess&&(d=t.preProcess(d)),o.a.render(d,l,t)}catch(e){if(!(e instanceof o.a.ParseError))throw e;t.errorCallback("KaTeX auto-render: Failed to parse `"+r[a].data+"` with ",e),n.appendChild(document.createTextNode(r[a].rawData));continue}n.appendChild(l)}return n};t.default=function(e,t){if(!e)throw new Error("No element provided to render");var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);r.delimiters=r.delimiters||[{left:"$$",right:"$$",display:!0},{left:"\\(",right:"\\)",display:!1},{left:"\\[",right:"\\]",display:!0}],r.ignoredTags=r.ignoredTags||["script","noscript","style","textarea","pre","code"],r.ignoredClasses=r.ignoredClasses||[],r.errorCallback=r.errorCallback||console.error,r.macros=r.macros||{},function e(t,r){for(var n=0;n<t.childNodes.length;n++){var o=t.childNodes[n];if(3===o.nodeType){var a=l(o.textContent,r);n+=a.childNodes.length-1,t.replaceChild(a,o)}else 1===o.nodeType&&function(){var t=" "+o.className+" ";-1===r.ignoredTags.indexOf(o.nodeName.toLowerCase())&&r.ignoredClasses.every(function(e){return-1===t.indexOf(" "+e+" ")})&&e(o,r)}()}}(e,r)}}]).default});

View file

@ -0,0 +1 @@
{"Target":"js/lib/katex/auto-render.min.min.js","MediaType":"application/javascript","Data":{}}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"Target":"js/lib/katex/katex.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"js/lib/lazysizes/lazysizes.min.min.js","MediaType":"application/javascript","Data":{}}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"Target":"js/lib/mermaid/mermaid.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
"use strict";function _objectSpread(a){for(var b=1;b<arguments.length;b++){var c=null==arguments[b]?{}:arguments[b],d=Object.keys(c);"function"==typeof Object.getOwnPropertySymbols&&(d=d.concat(Object.getOwnPropertySymbols(c).filter(function(a){return Object.getOwnPropertyDescriptor(c,a).enumerable}))),d.forEach(function(b){_defineProperty(a,b,c[b])})}return a}function _defineProperty(a,b,c){return b in a?Object.defineProperty(a,b,{value:c,enumerable:!0,configurable:!0,writable:!0}):a[b]=c,a}class MetingJSElement extends HTMLElement{connectedCallback(){window.APlayer&&window.fetch&&(this._init(),this._parse())}disconnectedCallback(){this.lock||this.aplayer.destroy()}_camelize(a){return a.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,b)=>b.toUpperCase())}_init(){let a={};for(let b=0;b<this.attributes.length;b+=1)a[this._camelize(this.attributes[b].name)]=this.attributes[b].value;let b=["server","type","id","api","auth","auto","lock","name","title","artist","author","url","cover","pic","lyric","lrc"];this.meta={};for(var c=0;c<b.length;c++){let d=b[c];this.meta[d]=a[d],delete a[d]}this.config=a,this.api=this.meta.api||window.meting_api||"https://api.i-meto.com/meting/api?server=:server&type=:type&id=:id&r=:r",this.meta.auto&&this._parse_link()}_parse_link(){let a=[["music.163.com.*song.*id=(\\d+)","netease","song"],["music.163.com.*album.*id=(\\d+)","netease","album"],["music.163.com.*artist.*id=(\\d+)","netease","artist"],["music.163.com.*playlist.*id=(\\d+)","netease","playlist"],["music.163.com.*discover/toplist.*id=(\\d+)","netease","playlist"],["y.qq.com.*song/(\\w+).html","tencent","song"],["y.qq.com.*album/(\\w+).html","tencent","album"],["y.qq.com.*singer/(\\w+).html","tencent","artist"],["y.qq.com.*playsquare/(\\w+).html","tencent","playlist"],["y.qq.com.*playlist/(\\w+).html","tencent","playlist"],["xiami.com.*song/(\\w+)","xiami","song"],["xiami.com.*album/(\\w+)","xiami","album"],["xiami.com.*artist/(\\w+)","xiami","artist"],["xiami.com.*collect/(\\w+)","xiami","playlist"]];for(var b=0;b<a.length;b++){let c=a[b],d=new RegExp(c[0]),e=d.exec(this.meta.auto);if(null!==e)return this.meta.server=c[1],this.meta.type=c[2],void(this.meta.id=e[1])}}_parse(){if(this.meta.url){let a={name:this.meta.name||this.meta.title||"Audio name",artist:this.meta.artist||this.meta.author||"Audio artist",url:this.meta.url,cover:this.meta.cover||this.meta.pic,lrc:this.meta.lrc||this.meta.lyric||"",type:this.meta.type||"auto"};return a.lrc||(this.meta.lrcType=0),this.innerText&&(a.lrc=this.innerText,this.meta.lrcType=2),void this._loadPlayer([a])}let a=this.api.replace(":server",this.meta.server).replace(":type",this.meta.type).replace(":id",this.meta.id).replace(":auth",this.meta.auth).replace(":r",Math.random());fetch(a).then(a=>a.json()).then(a=>this._loadPlayer(a))}_loadPlayer(a){let b={audio:a,mutex:!0,lrcType:this.meta.lrcType||3,storageName:"metingjs"};if(a.length){let a=_objectSpread({},b,this.config);for(let b in a)("true"===a[b]||"false"===a[b])&&(a[b]="true"===a[b]);let c=document.createElement("div");a.container=c,this.appendChild(c),this.aplayer=new APlayer(a)}}}console.log("\n %c MetingJS v2.0.1 %c https://github.com/metowolf/MetingJS \n","color: #fadfa3; background: #030307; padding:5px 0;","background: #fadfa3; padding:5px 0;"),window.customElements&&!window.customElements.get("meting-js")&&(window.MetingJSElement=MetingJSElement,window.customElements.define("meting-js",MetingJSElement));

View file

@ -0,0 +1 @@
{"Target":"js/lib/meting/Meting.min.min.js","MediaType":"application/javascript","Data":{}}

View file

@ -0,0 +1 @@
{"Target":"js/lib/smooth-scroll/smooth-scroll.polyfills.min.min.js","MediaType":"application/javascript","Data":{}}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"Target":"js/lib/typeit/typeit.min.min.js","MediaType":"application/javascript","Data":{}}

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
{"Target":"css/style.min.css","MediaType":"text/css","Data":{}}