mirror of
https://github.com/fzxx/XiangYue.git
synced 2025-11-25 03:15:16 +08:00
4 lines
5.5 KiB
JavaScript
4 lines
5.5 KiB
JavaScript
const CharSets2={"A":["♾️","☯️","⏲️","🐄","🛕","♐️","🚗","😄","🍎","😈"],"B":["❗","😙","☮️","😿","📿","🪑","🫔","🥖","🚭","🛷"],"C":["🍈","😘","🐃","🎧","🚊","🏩","🐔","🍿","⏯️","🔽"],"D":["🦚","🚬","🌭","🎥","🧪","🍊","😸","🗽","⏬","🏊"],"E":["🏨","🍋","⏪","🏺","💓","💳","🤔","🦃","🧕","🚒"],"F":["🦮","🦪","🏤","💷","💶","🚔","🎆","🛸","😊","🕌"],"G":["🛀","🏭","🥯","🐹","📟","💙","🤣","😅","🦁","🤾"],"H":["👦","🎭","🥨","⛹️","🧯","🐦","♍️","🥷","📻","🔯"],"I":["🚣","🪁","🉑","🥕","🌄","🚇","🛴","💴","🍰","🐷"],"J":["🚖","🪃","🦘","🐕","👾","⛪️","💊","🐽","💈","🐟"],"K":["💂","🪔","🪜","🧰","⏫","🤽","🪣","🧙","🏂","🚎"],"L":["🦹","🍔","🪒","⚛️","🌮","🕎","🐠","🥘","🌉","🥪"],"M":["🌆","🛻","🚂","👨","🥟","🦀","🍥","🧷","🎪","🚷"],"N":["🪘","🙂","🚡","🧴","🦈","🐖","🐭","⏱️","🪳","🌽"],"O":["🪂","🐆","🐪","💇","😍","🐮","🚧","🥚","💽","🍡"],"P":["⛺️","🚐","🎡","🍗","♊️","🚅","📡","🤗","🐊","😠"],"Q":["🐬","💯","🐱","👴","🔅","🏦","📲","♨️","🫕","🐳"],"R":["🚋","📷","🔂","🐫","🏬","🙃","⚕️","❤️","😽","🐐"],"S":["◀️","🚛","🏃","🐌","⌚️","👵","🍒","🧇","🌠","😔"],"T":["🦐","🚩","✈️","🚨","🛒","🍬","🥦","🤿","🥫","🚪"],"U":["😛","🐛","🥩","🚈","🚄","👧","🦓","⛲️","🧓","🫐"],"V":["🦒","🚠","🦋","🎇","🚟","🧍","🥅","🍛","🙊","🍣"],"W":["🚦","🍨","🙈","🔡","🔁","😆","♉️","🥐","🔀","🪲"],"X":["💗","📹","⚠️","🔣","🦗","🔰","🔋","🦞","🍟","🦢"],"Y":["🚳","🐋","♓️","💞","☦️","🧎","🥴","🪗","🕋","⏰"],"Z":["📀","💉","😝","☠️","⛔","🌅","🏫","🦖","🚃","🧀"],"a":["🐎","🚴","🏑","🧻","🔤","😪","🎦","ℹ️","🐞","👿"],"b":["🏴","📺","🥞","🪀","🗼","🤧","🦌","🌁","🎯","🤼"],"c":["⛴️","🥔","🚘","😳","💾","🐈","🦉","⚾️","😚","🏁"],"d":["🍦","🍤","👸","💟","🥑","🎼","⏭️","🥱","💀","🦜"],"e":["⏮️","😏","🪝","⛷️","🧖","🎤","⛎","😒","🦽","🛗"],"f":["💺","🦯","🥎","🦧","🔮","🍞","🚯","⛰️","🎿","🤖"],"g":["🚀","😷","♋️","🚝","🕍","🦅","♻️","🎲","⛽️","🏓"],"h":["🎑","💎","🙀","🔠","☪️","🐏","🎳","🌌","⚜️","📞"],"i":["🚓","😴","🐵","🤬","🙉","🎨","😌","🥗","🚵","🌯"],"j":["🏡","🍍","⛩️","⏩","😹","👩","🧟","🥰","🤫","👯"],"k":["🥬","🦇","🤡","♈️","👷","😁","🧂","🥥","🎺","😑"],"l":["🤮","💔","🥓","🎾","🛺","🎹","😡","🫓","💿","💘"],"m":["🐧","🦕","🦸","🧝","🎂","🗿","🧒","🐍","🚢","☸️"],"n":["🏏","📼","🍘","🧛","💝","🥁","♎️","🐴","🛶","🎣"],"o":["🥒","⏹️","🧗","🤐","🤎","😼","🍚","🦼","💡","🗻"],"p":["🧄","🚥","🛌","🫒","🎰","🧅","🍉","🛬","🐗","❣️"],"q":["🐯","👺","🌃","🍖","😻","🍮","🍠","🚱","📛","💆"],"r":["🛝","🪦","⛱️","🔭","🐜","👳","🚿","🔢","🛵","📶"],"s":["🐑","🏥","🍱","🍐","🚕","🥠","🎽","🏐","🦛","🛫"],"t":["🚞","💕","🔦","📠","😇","🐙","🤴","🧺","▶️","☎️"],"u":["🦎","🎢","🏀","🤢","🏸","✡️","👶","🤵","⚽️","🗾"],"v":["⚖️","🚑","🤍","🥶","📸","✝️","😾","🍢","😂","🩺"],"w":["👲","🐅","👻","⏺️","♒️","💸","💲","😜","💖","♌️"],"x":["🐺","🐸","🍲","🐼","🏣","🦑","🧲","🧆","🧘","🚲"],"y":["💱","🚙","🦂","🤭","🐢","😐","🫑","🎱","🏒","😗"],"z":["💒","🥊","💵","🛖","🏈","🚏","🌇","🥋","🏄","🦟"],"0":["😃","🍕","🍅","🍌","🪱","👰","🐓","🚤","🤒","🧜"],"1":["♏️","🐝","🌋","🍳","🤑","🛁","🚌","🤪","🧑","💚"],"2":["🚶","📵","🎷","⚱️","🍫","🚚","🐩","🏉","🎻","🪰"],"3":["🐶","🔌","⚓️","🥧","🥭","🦊","⌨️","🐂","💩","🦏"],"4":["🧽","🦴","♑️","🧩","🏢","🚉","🙄","👽","🪕","🥝"],"5":["🧡","🧁","🧬","🦄","🏪","🍇","🐨","🩸","⏳","🛐"],"6":["🍙","⏸️","⛵️","🐰","🏇","📱","🤸","🤺","🥵","🎸"],"7":["🥍","🩹","🍜","🚍","🧚","🥌","🎠","⛸️","😉","😺"],"8":["🤥","🚽","🍏","🚁","💻","🦆","🐡","👹","🚜","🚸"],"9":["🎬","🔬","🧞","🥏","♟️","💛","🍓","🤕","⌛️","🥮"],"+":["🚆","⚰️","🤯","💜","🎮","🧹","🔆","🧼","🐻","🦍"],"/":["🧫","🍝","🆘","🔼","🚫","❓","💰","🧭","😵","🍭"],"=":["👮","😀","🍑","🔱","😬","🐘","🥙","😋","😶","🍧"]};const MAP=new Map();for(const[b64,arr]of Object.entries(CharSets2)){const code=b64.charCodeAt(0);for(const em of arr)MAP.set(em.codePointAt(0),code);}
|
||
const mappingMode2={Base64ToEmoji(b64){const out=[];for(const ch of b64){const pool=CharSets2[ch];out.push(pool[Math.random()*10|0]);}
|
||
return out.join('');},emojiToBase64(str){const out=[];for(const ch of str){const cp=ch.codePointAt(0);const val=MAP.get(cp);if(val){out.push(String.fromCharCode(val));}}
|
||
return out.join('');},getEmojiLength:em=>{let count=0;for(const _ of em)count++;return count;}}; |