hugo-theme-hello-friend/static/assets/prism.js

8 lines
132 KiB
JavaScript
Raw Permalink Normal View History

2020-09-10 00:04:48 +02:00
!function(n){var a={};function i(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=a,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=3)}([,,,function(F,e,D){(function(e){var t,n,a,d="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},b=function(){var l=/\blang(?:uage)?-([\w-]+)\b/i,t=0,P=d.Prism={manual:d.Prism&&d.Prism.manual,disableWorkerMessageHandler:d.Prism&&d.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof o?new o(e.type,P.util.encode(e.content),e.alias):"Array"===P.util.type(e)?e.map(P.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e,n){var t=P.util.type(e);switch(n=n||{},t){case"Object":if(n[P.util.objId(e)])return n[P.util.objId(e)];var a={};for(var i in n[P.util.objId(e)]=a,e)e.hasOwnProperty(i)&&(a[i]=P.util.clone(e[i],n));return a;case"Array":if(n[P.util.objId(e)])return n[P.util.objId(e)];a=[];return n[P.util.objId(e)]=a,e.forEach(function(e,t){a[t]=P.util.clone(e,n)}),a}return e}},languages:{extend:function(e,t){var n=P.util.clone(P.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(n,e,t,a){var i=(a=a||P.languages)[n],r={};for(var o in i)if(i.hasOwnProperty(o)){if(o==e)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);t.hasOwnProperty(o)||(r[o]=i[o])}var l=a[n];return a[n]=r,P.languages.DFS(P.languages,function(e,t){t===l&&e!=n&&(this[e]=r)}),r},DFS:function(e,t,n,a){for(var i in a=a||{},e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],n||i),"Object"!==P.util.type(e[i])||a[P.util.objId(e[i])]?"Array"!==P.util.type(e[i])||a[P.util.objId(e[i])]||(a[P.util.objId(e[i])]=!0,P.languages.DFS(e[i],t,i,a)):(a[P.util.objId(e[i])]=!0,P.languages.DFS(e[i],t,null,a)))}},plugins:{},highlightAll:function(e,t){P.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};P.hooks.run("before-highlightall",a);for(var i,r=a.elements||e.querySelectorAll(a.selector),o=0;i=r[o++];)P.highlightElement(i,!0===t,a.callback)},highlightElement:function(e,t,n){for(var a,i,r=e;r&&!l.test(r.className);)r=r.parentNode;r&&(a=(r.className.match(l)||[,""])[1].toLowerCase(),i=P.languages[a]),e.className=e.className.replace(l,"").replace(/\s+/g," ")+" language-"+a,e.parentNode&&(r=e.parentNode,/pre/i.test(r.nodeName)&&(r.className=r.className.replace(l,"").replace(/\s+/g," ")+" language-"+a));var o,s={element:e,language:a,grammar:i,code:e.textContent};if(P.hooks.run("before-sanity-check",s),!s.code||!s.grammar)return s.code&&(P.hooks.run("before-highlight",s),s.element.textContent=s.code,P.hooks.run("after-highlight",s)),void P.hooks.run("complete",s);P.hooks.run("before-highlight",s),t&&d.Worker?((o=new Worker(P.filename)).onmessage=function(e){s.highlightedCode=e.data,P.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,P.hooks.run("after-highlight",s),P.hooks.run("complete",s),n&&n.call(s.element)},o.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))):(s.highlightedCode=P.highlight(s.code,s.grammar,s
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var a;a=function(){return a={},i.m=n=[function(e,t){e.exports=function(e){var t,n,a,i="SELECT"===e.nodeName?(e.focus(),e.value):"INPUT"===e.nodeName||"TEXTAREA"===e.nodeName?((t=e.hasAttribute("readonly"))||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),t||e.removeAttribute("readonly"),e.value):(e.hasAttribute("contenteditable")&&e.focus(),n=window.getSelection(),(a=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(a),n.toString());return i}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var a=this.e||(this.e={});return(a[e]||(a[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var a=this;function i(){a.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),a=0,i=n.length;a<i;a++)n[a].fn.apply(n[a].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),a=n[e],i=[];if(a&&t)for(var r=0,o=a.length;r<o;r++)a[r].fn!==t&&a[r].fn._!==t&&i.push(a[r]);return i.length?n[e]=i:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var p=n(3),g=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!p.string(t))throw new TypeError("Second argument must be a String");if(!p.fn(n))throw new TypeError("Third argument must be a Function");if(p.node(e))return c=t,u=n,(d=e).addEventListener(c,u),{destroy:function(){d.removeEventListener(c,u)}};if(p.nodeList(e))return o=e,s=t,l=n,Array.prototype.forEach.call(o,function(e){e.addEventListener(s,l)}),{destroy:function(){Array.prototype.forEach.call(o,function(e){e.removeEventListener(s,l)})}};if(p.string(e))return a=e,i=t,r=n,g(document.body,a,i,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var a,i,r,o,s,l,d,c,u}},function(e,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var o=n(5);function r(e,t,n,a,i){var r=function(t,n,e,a){return function(e){e.delegateTarget=o(e.target,n),e.delegateTarget&&a.call(t,e)}}.apply(this,arguments);return e.addEventListener(n,r,i),{destroy:function(){e.removeEventListener(n,r,i)}}}e.exports=function(e,t,n,a,i){return"function"==typeof e.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return r(e,t,n,a,i)}))}},function(e,t){var n;"undefined"==typeof Element||Element.prototype.matches||((n=Element.prototype).matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector),e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var a=n(0),i=n.n(a),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function s(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),this.resolveOptions(e),this.initSelection()}var l=(function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}(s,[{key:"resolveOptions",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){t