mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-12 09:09:45 +01:00
2 lines
23 KiB
JavaScript
2 lines
23 KiB
JavaScript
|
(self.webpackChunktelegram_t=self.webpackChunktelegram_t||[]).push([[3966],{46291:e=>{!function(){var t;function n(e){for(var t,n,i,r,o=1,s=[].slice.call(arguments),a=0,c=e.length,l="",g=!1,u=!1,d=function(){return s[o++]},h=function(){for(var n="";/\d/.test(e[a]);)n+=e[a++],t=e[a];return n.length>0?parseInt(n):null};a<c;++a)if(t=e[a],g)switch(g=!1,"."==t?(u=!1,t=e[++a]):"0"==t&&"."==e[a+1]?(u=!0,t=e[a+=2]):u=!0,r=h(),t){case"b":l+=parseInt(d(),10).toString(2);break;case"c":l+="string"==typeof(n=d())||n instanceof String?n:String.fromCharCode(parseInt(n,10));break;case"d":l+=parseInt(d(),10);break;case"f":i=String(parseFloat(d()).toFixed(r||6)),l+=u?i:i.replace(/^0/,"");break;case"j":l+=JSON.stringify(d());break;case"o":l+="0"+parseInt(d(),10).toString(8);break;case"s":l+=d();break;case"x":l+="0x"+parseInt(d(),10).toString(16);break;case"X":l+="0x"+parseInt(d(),10).toString(16).toUpperCase();break;default:l+=t}else"%"===t?g=!0:l+=t;return l}(t=e.exports=n).format=n,t.vsprintf=function(e,t){return n.apply(null,[e].concat(t))},"undefined"!=typeof console&&"function"==typeof console.log&&(t.printf=function(){console.log(n.apply(null,arguments))})}()},33390:e=>{var t={exports:{}};function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){var i=e[t];"object"!=typeof i||Object.isFrozen(i)||n(i)})),e}t.exports=n,t.exports.default=n;var i=t.exports;class r{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function o(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function s(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t];return t.forEach((function(e){for(const t in e)n[t]=e[t]})),n}const a=e=>!!e.kind;class c{constructor(e,t){this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=o(e)}openNode(e){if(!a(e))return;let t=e.kind;t=e.sublanguage?`language-${t}`:((e,{prefix:t})=>{if(e.includes(".")){const n=e.split(".");return[`${t}${n.shift()}`,...n.map(((e,t)=>`${e}${"_".repeat(t+1)}`))].join(" ")}return`${t}${e}`})(t,{prefix:this.classPrefix}),this.span(t)}closeNode(e){a(e)&&(this.buffer+="</span>")}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}}class l{constructor(){this.rootNode={children:[]},this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){const t={kind:e,children:[]};this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t),t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{l._collapse(e)})))}}class g extends l{constructor(e){super(),this.options=e}addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())}addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){return new c(this,this.options).value()}finalize(){return!0}}function u(e){return e?"string"==typeof e?e:e.source:null}function d(e){return p("(?=",e,")")}function h(e){return p("(?:",e,")*")}function f(e){return p("(?:",e,")?")}function p(...e){return e.map((e=>u(e))).join("")}function b(...e){const t=function(e){const t=e[e.length-1];return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}(e);return"("+(t.capture?"":"?:")+e.map((e=>u(e))).join("|")+")"}function m(e){return new RegExp(e.toString()+"|").exec("").length-1}const x=/\[(?:[^\\\]]|
|
||
|
//# sourceMappingURL=3966.097d0a2dd03e55cf7c46.js.map
|