WordPress/wp-includes/js/wp-emoji-release.min.js

4 lines
15 KiB
JavaScript
Raw Normal View History

// Source: wp-includes/js/twemoji.min.js
var twemoji=function(){"use strict";function a(a){return document.createTextNode(a)}function b(a,b){return"".concat(b.base,b.size,"/",a,b.ext)}function c(a,b){for(var d,e,f=a.childNodes,g=f.length;g--;)d=f[g],e=d.nodeType,3===e?b.push(d):1!==e||o.test(d.nodeName)||c(d,b);return b}function d(a,b){return l(""===b?a.slice(0,-1):3===a.length&&""===a.charAt(1)?a.charAt(0)+a.charAt(2):a)}function e(b,e){for(var f,g,h,i,j,k,l,o,p,q,r,s,t,u=c(b,[]),v=u.length;v--;){for(f=!1,g=document.createDocumentFragment(),h=u[v],i=h.nodeValue,k=0;j=n.exec(i);){if(l=j.index,l!==k&&g.appendChild(a(i.slice(k,l))),p=j[0],q=j[1],r=j[2],k=l+p.length,""!==r&&(s=e.callback(d(q,r),e,r))){if(o=new Image,e.imgAttr)for(t in e.imgAttr)o.setAttribute(t,e.imgAttr[t]);o.onerror=m.onerror,o.className=e.className,o.setAttribute("draggable","false"),o.alt=p,o.src=s,f=!0,g.appendChild(o)}o||g.appendChild(a(p)),o=null}f&&(k<i.length&&g.appendChild(a(i.slice(k))),h.parentNode.replaceChild(g,h))}return b}function f(a,b){return j(a,function(a,c,e){var f,g,h="";if(""!==e&&(f=b.callback(d(c,e),b,e))){if(b.imgAttr)for(g in b.imgAttr)/draggable|class|alt|src/i.test(g)||(h+=" ".concat(g,'="',b.imgAttr[g],'"'));a="<img ".concat('class="',b.className,'" ','draggable="false" ','alt="',a,'" ','src="',f,'"',h,">")}return a})}function g(a){return"number"==typeof a?a+"x"+a:a}function h(a){var b="string"==typeof a?parseInt(a,16):a;return 65536>b?p(b):(b-=65536,p(55296+(b>>10),56320+(1023&b)))}function i(a,c){return c&&"function"!=typeof c||(c={callback:c}),("string"==typeof a?f:e)(a,{callback:c.callback||b,base:"string"==typeof c.base?c.base:m.base,ext:c.ext||m.ext,size:c.folder||g(c.size||m.size),className:c.className||m.className,imgAttr:c.imgAttr})}function j(a,b){return String(a).replace(n,b)}function k(a){n.lastIndex=0;var b=n.test(a);return n.lastIndex=0,b}function l(a,b){for(var c=[],d=0,e=0,f=0;f<a.length;)d=a.charCodeAt(f++),e?(c.push((65536+(e-55296<<10)+(d-56320)).toString(16)),e=0):d>=55296&&56319>=d?e=d:c.push(d.toString(16));return c.join(b||"-")}var m={base:("https:"===location.protocol?"https:":"http:")+"//twemoji.maxcdn.com/",ext:".png",size:"36x36",className:"emoji",convert:{fromCodePoint:h,toCodePoint:l},onerror:function(){this.parentNode&&this.parentNode.replaceChild(a(this.alt),this)},parse:i,replace:j,test:k},n=/((?:\ud83c\udde8\ud83c\uddf3|\ud83c\uddfa\ud83c\uddf8|\ud83c\uddf7\ud83c\uddfa|\ud83c\uddf0\ud83c\uddf7|\ud83c\uddef\ud83c\uddf5|\ud83c\uddee\ud83c\uddf9|\ud83c\uddec\ud83c\udde7|\ud83c\uddeb\ud83c\uddf7|\ud83c\uddea\ud83c\uddf8|\ud83c\udde9\ud83c\uddea|\u0039\ufe0f?\u20e3|\u0038\ufe0f?\u20e3|\u0037\ufe0f?\u20e3|\u0036\ufe0f?\u20e3|\u0035\ufe0f?\u20e3|\u0034\ufe0f?\u20e3|\u0033\ufe0f?\u20e3|\u0032\ufe0f?\u20e3|\u0031\ufe0f?\u20e3|\u0030\ufe0f?\u20e3|\u0023\ufe0f?\u20e3|\ud83d\udeb3|\ud83d\udeb1|\ud83d\udeb0|\ud83d\udeaf|\ud83d\udeae|\ud83d\udea6|\ud83d\udea3|\ud83d\udea1|\ud83d\udea0|\ud83d\ude9f|\ud83d\ude9e|\ud83d\ude9d|\ud83d\ude9c|\ud83d\ude9b|\ud83d\ude98|\ud83d\ude96|\ud83d\ude94|\ud83d\ude90|\ud83d\ude8e|\ud83d\ude8d|\ud83d\ude8b|\ud83d\ude8a|\ud83d\ude88|\ud83d\ude86|\ud83d\ude82|\ud83d\ude81|\ud83d\ude36|\ud83d\ude34|\ud83d\ude2f|\ud83d\ude2e|\ud83d\ude2c|\ud83d\ude27|\ud83d\ude26|\ud83d\ude1f|\ud83d\ude1b|\ud83d\ude19|\ud83d\ude17|\ud83d\ude15|\ud83d\ude11|\ud83d\ude10|\ud83d\ude0e|\ud83d\ude08|\ud83d\ude07|\ud83d\ude00|\ud83d\udd67|\ud83d\udd66|\ud83d\udd65|\ud83d\udd64|\ud83d\udd63|\ud83d\udd62|\ud83d\udd61|\ud83d\udd60|\ud83d\udd5f|\ud83d\udd5e|\ud83d\udd5d|\ud83d\udd5c|\ud83d\udd2d|\ud83d\udd2c|\ud83d\udd15|\ud83d\udd09|\ud83d\udd08|\ud83d\udd07|\ud83d\udd06|\ud83d\udd05|\ud83d\udd04|\ud83d\udd02|\ud83d\udd01|\ud83d\udd00|\ud83d\udcf5|\ud83d\udcef|\ud83d\udced|\ud83d\udcec|\ud83d\udcb7|\ud83d\udcb6|\ud83d\udcad|\ud83d\udc6d|\ud83d\udc6c|\ud83d\udc65|\ud83d\udc2a|\ud83d\udc16|\ud83d\udc15|\ud83d\udc13|\ud83d\udc10|\ud83d\udc0f|\ud83d\udc0b|\ud83d\udc0a|\ud83d\udc09|\ud83d\udc08|\ud83d\udc07|\ud83d\udc06|\ud83d\udc05|\ud83d\udc04|\ud83d\udc03|\ud83d\udc02|\ud83d\udc01|\ud83d\udc00|\ud83c\udfe4|\ud83c\udfc9|\ud83c\udfc7|\ud8
// Source: wp-includes/js/wp-emoji.min.js
!function(a,b){function c(){function c(){if(!j){if("undefined"==typeof a.twemoji){if(k>600)return;return a.clearTimeout(g),g=a.setTimeout(c,50),void k++}f=a.twemoji,j=!0,h&&new h(function(a){for(var b,c,f,g,h=a.length;h--;){if(b=a[h].addedNodes,c=a[h].removedNodes,f=b.length,1===f&&1===c.length&&3===b[0].nodeType&&"IMG"===c[0].nodeName&&b[0].data===c[0].alt)return;for(;f--;)g=b[f],3===g.nodeType&&(g=g.parentNode),!g||1!==g.nodeType||"ownerSVGElement"in g||g.className&&"string"==typeof g.className&&-1!==g.className.indexOf("wp-exclude-emoji")||d(g.textContent)&&e(g)}}).observe(document.body,{childList:!0,subtree:!0}),e(document.body)}}function d(a){var b=/[\u203C\u2049\u20E3\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2300\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638\u2639\u263A\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692\u2693\u2694\u2696\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753\u2754\u2755\u2757\u2763\u2764\u2795\u2796\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05\u2B06\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]/,c=/[\uDC00-\uDFFF]/;return a?c.test(a)||b.test(a):!1}function e(a,c){return i&&f?(c=c||{},f.parse(a,{base:b.baseUrl,ext:b.ext,className:c.className||"emoji",imgAttr:c.imgAttr,callback:function(a,c){switch(a){case"a9":case"ae":case"2122":case"2194":case"2660":case"2663":case"2665":case"2666":return!1}return b.supports.flag||!b.supports.simple||/^1f1(?:e[6-9a-f]|f[0-9a-f])-1f1(?:e[6-9a-f]|f[0-9a-f])$/.test(a)?"".concat(c.base,a,c.ext):!1}})):a}var f,g,h=a.MutationObserver||a.WebKitMutationObserver||a.MozMutationObserver,i=!1,j=!1,k=0;return b&&(i=!b.supports.simple||!b.supports.flag,b.DOMReady?c():b.readyCallback=c),{replaceEmoji:i,parse:e,test:d}}a.wp=a.wp||{},a.wp.emoji=new c}(window,window._wpemojiSettings);