diff --git a/spaces/1doemePnordwo/upscale/README.md b/spaces/1doemePnordwo/upscale/README.md
deleted file mode 100644
index f20bf57b8796bd879e46f2126d7be6a057aaa2c8..0000000000000000000000000000000000000000
--- a/spaces/1doemePnordwo/upscale/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
----
-title: UPSCALE
-emoji: 📷
-colorFrom: blue
-colorTo: pink
-sdk: gradio
-sdk_version: 3.35.2
-app_file: app.py
-pinned: false
-license: apache-2.0
-duplicated_from: cvsys/upscale
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
diff --git a/spaces/1gistliPinn/ChatGPT4/Examples/CRACK X-Force 2019.zip.md b/spaces/1gistliPinn/ChatGPT4/Examples/CRACK X-Force 2019.zip.md
deleted file mode 100644
index 6283ce1672ba583474083542bba398b3a02d6c07..0000000000000000000000000000000000000000
--- a/spaces/1gistliPinn/ChatGPT4/Examples/CRACK X-Force 2019.zip.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
CRACK X-Force 2019.zip
Download Zip ☑ https://imgfil.com/2uy17d
-
-Listen to Xforce Keygen PowerMill 2019 64 Bit Download and 164 more episodes by FBX 2018 32bit Activation Code Zip. File, free! ... 2009 64Â ... 4d29de3e1b
-
-
-
diff --git a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Android TV 12 ISO Everything You Need to Know Before You Download.md b/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Android TV 12 ISO Everything You Need to Know Before You Download.md
deleted file mode 100644
index 237e4fdf147f7db2544be38e58491b73782f72b5..0000000000000000000000000000000000000000
--- a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Android TV 12 ISO Everything You Need to Know Before You Download.md
+++ /dev/null
@@ -1,147 +0,0 @@
-
-How to Download Android TV 12 ISO and Why You Should Try It
-Android TV is a smart TV platform that runs on the Android operating system. It allows you to access a variety of apps, games, and streaming services on your TV. Android TV also supports Google Assistant, Chromecast, and other Google features.
-Android TV 12 is the latest version of the platform, based on the Android 12 codebase. It brings a lot of new features and improvements to enhance your TV experience. In this article, we will show you how to download Android TV 12 ISO and why you should try it.
-download android tv 12 iso
Download File >>> https://urlin.us/2uSUgP
- Android TV 12 Features
-Android TV 12 comes with several exciting new features and enhancements. Here are some of the highlights:
- Native 4K Rendering
-Android TV has always supported 4K content, but the user interface was rendered in 1080p. With Android TV 12, you can now enjoy a crisp and clear UI in native 4K resolution, if your device supports it. This will make the text, icons, and animations look sharper and smoother on your screen.
- Refresh Rate Switching
-Android TV 12 also supports dynamic refresh rate switching, which means it can automatically adjust the refresh rate of your display to match the content you are watching. This will reduce motion judder and improve the smoothness of the video playback. You can enable this feature in the Display & Sound settings.
- Privacy Indicators and Toggles
-If your Android TV has a camera or a microphone, you might be concerned about your privacy. Android TV 12 addresses this issue by adding privacy indicators and toggles. Whenever an app uses your camera or microphone, you will see a bright green icon on the top corner of your screen. You can also block the access to these sensors for all apps from the settings menu.
- Quick Connect for Wi-Fi
-Setting up your Wi-Fi connection on your Android TV can be a hassle, especially if you have a long or complex password. Android TV 12 makes this process easier with Quick Connect. This feature allows you to scan a QR code on your screen with your phone and enter the password there. This way, you don't have to use the remote to type in the password.
- Tweaked Design and Animations
-Android TV 12 also brings some minor changes to the design and animations of the UI. The home screen now has a more refined look with background blurs and smoother transitions. The settings menu also has a new layout with larger icons and text. The boot animation has also been updated with a new logo and colors.
-How to download android tv 12 iso for ADT-3 Developer Kit
-Download android tv 12 iso with 4K UI support and dynamic refresh rate
-Android tv 12 iso download link and installation guide
-Download android tv 12 iso for Treble-compliant devices
-Android tv 12 iso features and benefits
-Where to download android tv 12 iso for free
-Download android tv 12 iso with improved HDR and surround sound support
-Android tv 12 iso system requirements and compatibility
-Download android tv 12 iso with Android 12-style UI and background blurs
-Android tv 12 iso review and feedback
-Download android tv 12 iso with Google Play support and updates
-Android tv 12 iso vs Android TV 11 comparison
-Download android tv 12 iso with enhanced security and privacy features
-Android tv 12 iso troubleshooting and tips
-Download android tv 12 iso with new remote control app and voice assistant
-Android tv 12 iso best apps and games
-Download android tv 12 iso with faster performance and smoother animations
-Android tv 12 iso customization and settings
-Download android tv 12 iso with built-in Chromecast and Google TV integration
-Android tv 12 iso FAQs and answers
-Download android tv 12 iso with support for external storage and USB devices
-Android tv 12 iso developer options and tools
-Download android tv 12 iso with new accessibility features and options
-Android tv 12 iso keyboard and mouse support
-Download android tv 12 iso with multi-user and guest mode support
-Android tv 12 iso parental controls and restrictions
-Download android tv 12 iso with new notification panel and quick settings
-Android tv 12 iso network and connectivity options
-Download android tv 12 iso with new media player and audio effects
-Android tv 12 iso backup and restore options
-Download android tv 12 iso with new wallpapers and themes
-Android tv 12 iso screen mirroring and casting options
-Download android tv 12 iso with new widgets and shortcuts
-Android tv 12 iso sleep mode and power saving options
-Download android tv 12 iso with new sound modes and profiles
-Android tv 12 iso Bluetooth and wireless options
-Download android tv 12 iso with new languages and locales support
-Android tv 12 iso date and time options
-Download android tv 12 iso with new gesture navigation and touch controls
-Android tv 12 iso display calibration and adjustment options
- Android TV 12 Compatibility
-Before you download Android TV 12 ISO, you need to make sure that your device is compatible with it. Here are some things to consider:
- Supported Devices
-Android TV 12 is currently only available for developers who have an ADT-3 developer device. This is a dongle that runs on Android TV and it from the Google Store. If you have a different device, such as a smart TV, a set-top box, or a streaming stick, you will have to wait for the official release of Android TV 12, which is expected later this year.
How to Check Your Device Compatibility
-If you are not sure whether your device is compatible with Android TV 12, you can check it by following these steps:
-
-- Go to the Settings menu on your Android TV.
-- Select Device Preferences.
-- Select About.
-- Look for the Build number and check if it starts with RVC or SVP. If it does, your device is compatible with Android TV 12. If it starts with QTS or QSR, your device is not compatible.
-
- Android TV 12 Installation
-If you have an ADT-3 developer device and you want to install Android TV 12 on it, you have two options: using the Android Flash Tool or using the system image. Here are the steps for each method:
- Requirements
-Before you proceed with the installation, you need to have the following requirements:
-
-- A computer running Windows, Mac OS, or Linux.
-- A USB cable to connect your ADT-3 device to your computer.
-- A stable internet connection.
-- A backup of your data on your ADT-3 device, as the installation will erase everything on it.
-
- Using Android Flash Tool
-The Android Flash Tool is a web-based tool that allows you to flash Android TV 12 on your ADT-3 device without downloading any files. Here are the steps to use it:
-
-- Go to the Android Flash Tool website on your computer.
-- Allow the website to access your USB devices.
-- Connect your ADT-3 device to your computer using the USB cable.
-- Select your device from the list and click Add Device.
-- Select the Android TV 12 build from the list and click Install.
-- Follow the instructions on the screen and wait for the installation to complete.
-- Disconnect your ADT-3 device from your computer and reboot it.
-
- Using System Image
-The system image is a file that contains the Android TV 12 software for your ADT-3 device. You can download it from the Android Developers website and flash it manually using a command-line tool. Here are the steps to use it:
-
-- Download the system image file for your ADT-3 device from the Android Developers website and unzip it on your computer.
-- Install the Android SDK Platform-Tools on your computer and add them to your PATH environment variable.
-- Enable Developer Options and USB Debugging on your ADT-3 device. To do this, go to Settings > Device Preferences > About > Build and tap it seven times. Then go back to Settings > Device Preferences > Developer Options and turn on USB Debugging.
-- Connect your ADT-3 device to your computer using the USB cable.
-- Open a terminal or command prompt window on your computer and navigate to the folder where you unzipped the system image file.
-- Type
adb reboot bootloader
and press Enter. This will reboot your ADT-3 device into bootloader mode.
-- Type
fastboot devices
and press Enter. This will show you a list of connected devices. Make sure your ADT-3 device is listed.
-- Type
flash-all.bat
(for Windows) or ./flash-all.sh
(for Mac OS or Linux) and press Enter. This will flash Android TV 12 on your ADT-3 device.
-- Wait for the flashing process to finish and disconnect your ADT-3 device from your computer.
-- Reboot your ADT-3 device and enjoy Android TV 12.
-
- Conclusion
-Android TV 12 is a major update for the smart TV platform that brings many new features and improvements. If you have an ADT-3 developer device, you can download Android TV 12 ISO and install it using either the Android Flash Tool or the system image. If you have a different device, you will have to wait for the official release of Android TV 12, which is expected later this year. We hope this article helped you learn how to download Android TV 12 ISO and why you should try it. If you have any questions or feedback, please let us know in the comments below.
- FAQs
-What is the difference between Android TV and Google TV?
-Android TV and Google TV are both smart TV platforms that run on the Android operating system. However, Google TV is a newer version that has a different user interface and features. Google TV is more personalized and integrated with Google services, such as Google Photos, YouTube, and Google Assistant. Google TV also supports a wider range of apps and devices than Android TV.
- How can I update my Android TV to Android 12?
-If you have a compatible device, you can update your Android TV to Android 12 by following these steps:
-
-- Go to the Settings menu on your Android TV.
-- Select Device Preferences.
-- Select System Update.
-- Check for updates and download the latest version of Android 12.
-- Install the update and reboot your device.
-
- How can I enable 4K UI on my Android TV?
-If you have a 4K-capable device and display, you can enable 4K UI on your Android TV by following these steps:
-
-- Go to the Settings menu on your Android TV.
-- Select Device Preferences.
-- Select Display & Sound.
-- Select Resolution.
-- Select 4K (2160p).
-
- How can I block the camera and microphone on my Android TV?
-If you want to block the access to the camera and microphone on your Android TV, you can do so by following these steps:
-
-- Go to the Settings menu on your Android TV.
-- Select Device Preferences.
-- Select Privacy.
-- Select Camera or Microphone.
-- Turn off the toggle for Allow apps to access your camera or microphone.
-
- How can I use Quick Connect to set up my Wi-Fi on my Android TV?
-If you want to use Quick Connect to set up your Wi-Fi on your Android TV, you need to have a phone with the Google Home app installed. Then, you can follow these steps:
-
-- Go to the Settings menu on your Android TV.
-- Select Network & Internet.
-- Select Add network.
-- Select Quick Connect.
-- Scan the QR code on your screen with your phone using the Google Home app.
-- Enter your Wi-Fi password on your phone and tap Connect.
-
197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Brawlhalla for Mac How to Download and Play the Free-to-Play Platform Fighter.md b/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Brawlhalla for Mac How to Download and Play the Free-to-Play Platform Fighter.md
deleted file mode 100644
index e802184e37318d6e0d5b4390f629c8b550dcb003..0000000000000000000000000000000000000000
--- a/spaces/1pelhydcardo/ChatGPT-prompt-generator/assets/Brawlhalla for Mac How to Download and Play the Free-to-Play Platform Fighter.md
+++ /dev/null
@@ -1,109 +0,0 @@
-
-How to Download and Play Brawlhalla on Mac
-If you are looking for a fun and exciting fighting game that you can play on your Mac, you might want to check out Brawlhalla. Brawlhalla is a free 2D platform fighting game that supports up to 8 players online or local, with full cross-play for PC, PS5, PS4, Xbox Series X|S, Xbox One, Nintendo Switch, iOS, and Android. In this article, we will tell you what Brawlhalla is, how to download it on your Mac, and some tips and tricks to improve your gameplay.
- What is Brawlhalla?
-Brawlhalla is a game developed by Blue Mammoth Games and published by Ubisoft. It was released in 2017 and has since gained a huge fan base of over 100 million players. Brawlhalla is inspired by the likes of Super Smash Bros. and features cartoonish graphics and simple controls. Here are some of the main features of Brawlhalla:
-brawlhalla download mac
Download File » https://urlin.us/2uT2dl
- A free 2D platform fighting game with cross-play support
-Brawlhalla is completely free to play and does not have any pay-to-win elements. You can unlock all the characters (called Legends) by playing the game or buying them with in-game currency (called Gold). You can also buy cosmetic items (called Skins) with real money or another in-game currency (called Mammoth Coins). Brawlhalla also supports cross-play across all platforms, meaning you can play with your friends no matter what device they use.
- Features over 50 unique characters and weapons
-Brawlhalla has a diverse roster of over 50 Legends, each with their own stats, abilities, and personalities. You can choose from historical warriors, mythical creatures, original characters, and even crossover characters from other franchises like Lara Croft, Shovel Knight, The Walking Dead, Ben 10, Steven Universe, WWE, Hellboy, Adventure Time, Rayman, and more. Each Legend has two weapons that they can use in combat, ranging from swords, axes, hammers, bows, guns, spears, gauntlets, scythes, katars, cannons, orbs, greatswords, rocket lances, blasters, daggers, and more. You can switch between your weapons by picking them up from the stage or throwing them at your opponents.
- Offers various game modes and events
-Brawlhalla has a variety of game modes that you can enjoy solo or with others. You can play casual free-for-alls or team battles with up to 8 players online or local. You can also play ranked matches to climb the ladder and earn rewards. You can also invite your friends to a private room or join custom games created by other players. Brawlhalla also has weekly rotations of different game modes like Strikeout, Bubble Tag, Kung Foot, Snowbrawl, Bombsketball, Morph, Horde Mode, and more. Additionally, Brawlhalla hosts seasonal events that offer exclusive skins, colors, avatars, and other items.
- How to Download Brawlhalla on Mac
-If you want to play Brawlhalla on your Mac, you need to meet the following requirements:
- Requirements for Mac OS
-
-- OS: 10.7 or higher
-- Memory: 1 GB RAM
-- Storage: 400 MB available space
-- Network: Broadband Internet connection
-- Graphics: Intel HD Graphics 4000 or higher
-
-If your Mac meets these requirements, you can download Brawlhalla through Steam, which is a digital distribution platform for games and software. Here are the steps to download Brawlhalla through Steam:
- Steps to download Brawlhalla through Steam
-
-- Go to the Steam website and click on the "Install Steam" button. This will download the Steam installer on your Mac.
-- Open the Steam installer and follow the instructions to install Steam on your Mac.
-- Launch Steam and log in with your Steam account. If you don't have a Steam account, you can create one for free.
-- In the Steam app, go to the "Store" tab and search for "Brawlhalla" in the search bar.
-- Click on the "Brawlhalla" game and then click on the "Play Game" button. This will add Brawlhalla to your Steam library and start downloading it on your Mac.
-- Once the download is complete, you can launch Brawlhalla from your Steam library and start playing.
-
- Alternative ways to play Brawlhalla on Mac
-If you don't want to use Steam or if your Mac does not meet the requirements, you can still play Brawlhalla on your Mac using other methods. Here are some alternative ways to play Brawlhalla on Mac:
-brawlhalla mac os 64bit free download
-brawlhalla cross-play platform fighter mac
-brawlhalla epic games store mac download
-brawlhalla mac steam download guide
-brawlhalla mac system requirements and specs
-brawlhalla mac controller support and settings
-brawlhalla mac keyboard and mouse tips
-brawlhalla mac gameplay and review
-brawlhalla mac online multiplayer modes
-brawlhalla mac offline single player modes
-brawlhalla mac custom game rooms and maps
-brawlhalla mac ranked matches and leaderboards
-brawlhalla mac tournaments and events
-brawlhalla mac patch notes and updates
-brawlhalla mac news and announcements
-brawlhalla mac skins and cosmetics
-brawlhalla mac legends and weapons
-brawlhalla mac combos and techniques
-brawlhalla mac tips and tricks for beginners
-brawlhalla mac advanced strategies and guides
-brawlhalla mac best legends and tier list
-brawlhalla mac best weapons and loadouts
-brawlhalla mac best game modes and settings
-brawlhalla mac best custom maps and mods
-brawlhalla mac best skins and cosmetics to buy
-brawlhalla mac free gold and mammoth coins
-brawlhalla mac free codes and giveaways
-brawlhalla mac free crossover events and collaborations
-brawlhalla mac free battle pass and rewards
-brawlhalla mac free community colors and avatars
-brawlhalla mac how to unlock all legends
-brawlhalla mac how to level up fast
-brawlhalla mac how to improve your skills
-brawlhalla mac how to win more matches
-brawlhalla mac how to play with friends online
-brawlhalla mac how to join a clan or create one
-brawlhalla mac how to report a bug or issue
-brawlhalla mac how to contact support or feedback
-brawlhalla mac how to stream or record your gameplay
-brawlhalla mac how to watch replays or highlights
-brawlhalla mac comparison with other fighting games
-brawlhalla mac history and development story
-brawlhalla mac fun facts and trivia
-brawlhalla mac fan art and memes
-brawlhalla mac fan fiction and lore
-brawlhalla mac fan videos and podcasts
-
-- You can use a cloud gaming service like NVIDIA GeForce Now or Shadow that allows you to stream games from a remote server to your Mac. You will need a stable internet connection and a subscription fee for these services.
-- You can use a virtual machine software like Parallels Desktop or VMware Fusion that allows you to run Windows on your Mac. You will need a Windows license and enough disk space and memory for these software.
-- You can use a dual-boot system that allows you to switch between Mac OS and Windows on your Mac. You will need a Windows license and a separate partition for Windows on your Mac.
-
- Tips and Tricks for Brawlhalla
-Brawlhalla is a game that requires skill, strategy, and practice to master. Here are some tips and tricks that can help you improve your gameplay and have more fun in Brawlhalla:
- Improve your movement, recovery, and dodging skills
-Movement is one of the most important aspects of Brawlhalla, as it determines how you position yourself, attack, defend, and survive. You should learn how to use your jumps, dashes, fast falls, wall jumps, gravity cancels, chase dodges, and recovery moves effectively. You should also learn how to dodge your opponent's attacks and punish them accordingly. You can use different types of dodges like spot dodge, directional dodge, speed dodge, and chain dodge depending on the situation.
- Experiment with different characters and weapons
-Brawlhalla has a lot of variety in terms of characters and weapons, so you should try them all out and find out which ones suit your playstyle and preference. You should also learn the strengths, weaknesses, combos, strings, signatures, and matchups of each character and weapon. You can use the Brawlhalla Wiki or Brawlmance to get more information about the game's mechanics and statistics.
- Practice in training mode and watch pro players
-Brawlhalla has a training mode that allows you to practice your skills against a dummy or a bot. You can customize the settings of the training mode to suit your needs. You can also watch pro players stream or upload videos of their gameplay on platforms like Twitch or YouTube. You can learn from their strategies, techniques, tips, and mistakes.
- Conclusion
-Brawlhalla is a fun and exciting fighting game that you can play on your Mac for free. You can download it through Steam or use other methods if you prefer. You can also improve your gameplay by following some tips and tricks that we have shared in this article. We hope you enjoy playing Brawlhalla on your Mac and have a blast with your friends online or offline.
- FAQs
-Here are some frequently asked questions about Brawlhalla and their answers:
- Is Brawlhalla free?
-Yes, Brawlhalla is free to play and does not have any pay-to-win elements. You can unlock all the characters by playing the game or buying them with in-game currency. You can also buy cosmetic items with real money or another in-game currency.
- Is Brawlhalla cross-platform?
-Yes, Brawlhalla supports cross-play across all platforms, including PC, PS5, PS4, Xbox Series X|S, Xbox One, Nintendo Switch, iOS, and Android. You can play with your friends no matter what device they use.
- How many players can play Brawlhalla?
-Brawlhalla supports up to 8 players online or local in various game modes. You can play casual free-for-alls or team battles, ranked matches, custom games, or weekly rotations of different game modes.
- How do I change my controls in Brawlhalla?
-You can change your controls in Brawlhalla by going to the "Settings" menu and then the "Controls" tab. You can customize your keyboard or controller settings to your liking. You can also change your mouse sensitivity and aim assist options.
- How do I get better at Brawlhalla?
-You can get better at Brawlhalla by practicing your movement, recovery, and dodging skills, experimenting with different characters and weapons, practicing in training mode and watching pro players, and learning from your mistakes and feedback.
197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Download Naija Ludo Pro APK and Play the Classic Dice and Race Game with Friends.md b/spaces/1phancelerku/anime-remove-background/Download Naija Ludo Pro APK and Play the Classic Dice and Race Game with Friends.md
deleted file mode 100644
index a7ff8cfaca1cfc08b2abeea2f426c5122b3effc7..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Download Naija Ludo Pro APK and Play the Classic Dice and Race Game with Friends.md
+++ /dev/null
@@ -1,128 +0,0 @@
-
-Naija Ludo Pro APK: A Fun and Exciting Board Game for Everyone
-Do you love playing board games with your friends and family? Do you want to experience a classic dice and race game with a Nigerian twist? If yes, then you should try naija ludo pro apk, a professional board game that is made for professionals.
-naija ludo pro apk
Download Zip ✦✦✦ https://jinyurl.com/2uNObE
-Naija ludo pro apk is an android game that you can download from APKCombo or Google Play Store. It is based on the popular board game Ludo, which originated from India and became famous around the world. Naija ludo pro apk has many features that make it more fun and challenging than other ludo games. Some of these features are:
-
-- More boards added: you can choose among three colourful boards.
-- Online multiplayer: you can play with any of your friends or family members anywhere in the world from the comfort of your home.
-- Visual hand added: you can see your opponent's hand and plan your moves accordingly.
-- Difficulty level added: you can choose from easy, normal, hard, and advanced levels depending on your skill and preference.
-- Speed control added: you can control how fast a piece moves.
-- Barrier and safe-house options: you can enable or disable these features to make the game more interesting.
-- Dice options: you can choose to play with one die or two dice.
-- Capture options: you can decide to remove a piece when it captures an opponent's piece or not.
-- Play again options: you can decide to play again when you capture an opponent's piece irrespective of the outcome.
-
-All these features are accessible through options. You can also adjust the sound, music, vibration, and language settings according to your liking. Naija ludo pro apk is a game that will keep you entertained for hours.
- History of Ludo Game
-Ludo is a game that has a long and rich history. It is believed that it evolved from an ancient Indian game called Pachisi, which was created in the sixth century CE. The earliest evidence of this game's evolution in India is the depiction of boards on the caves of Ellora, a UNESCO World Heritage Site in Maharashtra. The original version of Pachisi was also described in the Indian epic Mahabharata, in which Shakuni used cursed dice to beat the Pandavas, leading to a series of events that resulted in the Kurukshetra War.
-naija ludo pro game download
-naija ludo pro online multiplayer
-naija ludo pro apk free download
-naija ludo pro app for android
-naija ludo pro latest version
-naija ludo pro board game
-naija ludo pro dice and race
-naija ludo pro mod apk
-naija ludo pro review
-naija ludo pro features
-naija ludo pro gameplay
-naija ludo pro price
-naija ludo pro tips and tricks
-naija ludo pro hack
-naija ludo pro cheats
-naija ludo pro settings
-naija ludo pro rules
-naija ludo pro strategy
-naija ludo pro how to play
-naija ludo pro best board
-naija ludo pro difficulty level
-naija ludo pro speed control
-naija ludo pro barrier option
-naija ludo pro safe-house option
-naija ludo pro one die or two dice option
-naija ludo pro remove piece option
-naija ludo pro play again option
-naija ludo pro supported languages
-naija ludo pro content rating
-naija ludo pro apk size
-naija ludo pro developer
-naija ludo pro category
-naija ludo pro google play id
-naija ludo pro installs
-naija ludo pro update date
-naija ludo pro trailer video
-naija ludo pro screenshots
-naija ludo pro ratings and reviews
-naija ludo pro similar games
-naija ludo pro alternatives
-naija ludo pro vs classic Ludo
-naija Ludo Pro Bluetooth multiplayer
-NAIJA LUDO PRO visual hand
-NAIJA LUDO PRO piece capture
-NAIJA LUDO PRO net energy gain
-NAIJA LUDO PRO mini sun
-NAIJA LUDO PRO 100 million degrees
-NAIJA LUDO PRO holy grail experiment
-NAIJA LUDO PRO Korea Institute of Fusion Energy
-Pachisi was modified by different cultures and regions over time, giving rise to various versions of the game. Some of these versions are Chaupar, Chausar, Chopad, Chatush Pada,
Rules of Ludo Game
-Ludo is a game that can be played by two to four players, without partnerships. The objective of the game is to race your four tokens from start to finish according to the rolls of a single die. The game has some basic rules that you need to follow in order to play it properly. Here are the rules of ludo game:
-
-- Each player chooses a colour and places their four tokens in their home base, which is one of the large corner areas of the board in their colour.
-- The players take turns rolling the die and moving their tokens. The player who rolls the highest number goes first, and then the turn passes clockwise.
-- To enter a token into play from its home base, a player must roll a 6. If the player has no tokens in play and does not roll a 6, the turn passes to the next player.
-- Once a player has one or more tokens in play, they can move any token the number of squares indicated by the die. A token can only move forward along the main track, which is the path of squares not part of any player's home column.
-- If a player rolls a 6, they get another turn. They can either move the same token or a different token. A player can roll up to three consecutive 6s in a row. If they roll a fourth 6, they must return one of their tokens to their home base and lose their turn.
-- A player can capture an opponent's token by landing on the same square as it, unless the square is part of the opponent's home column or is marked with a star. The captured token is returned to its home base and must start over.
-- A player cannot land on a square that already has one of their own tokens, unless they are moving along their home column.
-- A player can form a block by placing two or more of their tokens on the same square. A block cannot be captured or passed by any opponent's token.
-- To move a token into its finishing square, which is at the centre of the board, a player must roll the exact number required to end on that square. The finishing square can only hold one token of each colour.
-- The first player to move all four of their tokens into their finishing square wins the game.
-
- Benefits of Playing Ludo Game
-Ludo is not only a fun and exciting board game, but also a beneficial one for your health and well-being. Playing ludo can improve your brain function, give you pleasure and relieve stress, lower your blood pressure and boost your immunity, and more. Here are some of the benefits of playing ludo game:
-
-- Ludo improves brain function and cognitive skills. Ludo is a game that requires strategy, tactics, counting, probability, and decision making. These skills help stimulate your brain cells and enhance your mental abilities. Playing ludo can also improve your memory, concentration, and problem-solving skills.
-- Ludo gives pleasure and relieves stress. Ludo is a game that brings joy and laughter to you and your friends or family. It is a great way to have fun and relax after a long day. Playing ludo can also release endorphins, which are natural chemicals that make you feel happy and reduce pain. Ludo can also help you cope with anxiety, depression, and loneliness.
-- Ludo lowers blood pressure and boosts immunity. Ludo is a game that reduces stress and tension, which are major causes of high blood pressure and heart problems. Playing ludo can also lower your cortisol levels, which are hormones that weaken your immune system and make you more prone to infections and diseases. Ludo can also increase your blood circulation and oxygen supply to your organs.
-
Tips and Tricks for Playing Ludo Game
-Ludo is a game that requires both luck and skill. You need to roll the dice well, but you also need to use your brain to make the best moves. Here are some tips and tricks for playing ludo game that can help you win more often:
-
-- Strategize your moves: One of the most important tips to win a game of ludo is to think ahead of the opponent. You can do this by predicting their next moves and preventing their tokens from landing on yours. This step is important as not predicting or analyzing the opponent’s playstyle might end you going back to the home base.
-- Play with all your tokens: Do not focus on only one token and neglect the others. Try to move all your tokens out of your base as soon as possible and spread them across the board. This way, you can have more options to choose from and avoid being blocked or captured by the opponent.
-- Park the token at the start and capture: A smart trick to play ludo is to park one of your tokens at the start square of your home column and wait for an opportunity to capture an opponent’s token. This way, you can secure your position and also earn an extra turn.
-- Utilize the safe boxes: The safe boxes are the squares marked with a star on the board. They are located at the corners of each arm and at the centre of the board. These boxes are safe from being captured by any opponent, so use them wisely to protect your tokens or to plan your next move.
-- Know your opponent: Another tip to win ludo is to observe and learn from your opponent’s behaviour and patterns. You can notice their strengths and weaknesses, their preferences and tendencies, their habits and mistakes. By knowing your opponent, you can anticipate their actions and counter them effectively.
-- Dice value division: A clever trick to play ludo is to divide the value of the dice by two and use it for two different tokens. For example, if you roll a 6, you can move one token 3 squares and another token 3 squares. This way, you can optimize your moves and cover more ground.
-- Rule of 7: A simple rule to remember when playing ludo is that the sum of the opposite sides of a die is always 7. For example, if you roll a 1, the opposite side will be a 6. If you roll a 2, the opposite side will be a 5. This rule can help you predict what number you might get next and plan accordingly.
-- Remember your tokens’ positions: A common mistake that players make in ludo is forgetting where their tokens are on the board. This can lead to missing opportunities or making blunders. To avoid this, try to keep track of your tokens’ positions and movements in your mind or on a paper.
-- Home > Kill: A golden rule to follow when playing ludo is to always prioritize killing an opponent’s token over moving your own token closer to home. This way, you can eliminate their chances of winning and also gain an extra turn.
-- Hone your skills: The best way to improve your ludo game is to practice regularly and learn from your experiences. You can play with different opponents, try different strategies, and experiment with different settings. The more you play, the more you will learn and master the game.
-- Choose your format based on risk: Zupee offers four different formats of ludo games: Ludo Turbo, Ludo Supreme, Ludo Ninja, and Ludo Classic. Each format has its own rules, time limit, scoring system, and prize pool. Depending on your risk appetite and skill level, you can choose the format that suits you best.
-
- Conclusion
-Ludo is a game that has been enjoyed by millions of people for centuries. It is a game that combines luck and skill, fun and challenge, joy and laughter. It is a game that can be played by anyone, anywhere, anytime.
-Naija ludo pro apk is a game that takes ludo to the next level. It is a game that offers more features, more options, more boards, more levels, more fun. It is a game that lets you play with your friends or family online or offline.
-If you are looking for a professional board game that is made for professionals, then naija ludo pro apk is the game for you. Download it today from APKCombo or Google Play Store and enjoy the game of ludo like never before.
- FAQs
-Here are some of the frequently asked questions about naija ludo pro apk:
-
-- Where can I download naija ludo pro apk?
-You can download naija ludo pro apk from APKCombo or Google Play Store. These are the official and trusted sources for downloading the game. You can also scan the QR code on the game's website to download it directly to your device.
-- Is naija ludo pro apk safe and secure?
-Yes, naija ludo pro apk is safe and secure to use. It does not contain any viruses, malware, or spyware that can harm your device or data. It also does not require any unnecessary permissions or access to your personal information. It is a game that respects your privacy and security.
-- Can I play naija ludo pro apk online with other players?
-Yes, you can play naija ludo pro apk online with other players from around the world. You can either join a random match or create a private room and invite your friends or family to join. You can also chat with your opponents and send them emojis during the game.
-- Can I customize the board and pieces in naija ludo pro apk?
-Yes, you can customize the board and pieces in naija ludo pro apk according to your preference. You can choose among three different boards: classic, modern, and Nigerian. You can also choose among four different sets of pieces: standard, premium, deluxe, and royal. You can also change the colour of your pieces if you want.
-- What are the differences between naija ludo pro apk and other ludo games?
-Naija ludo pro apk is a game that has many differences from other ludo games. Some of these differences are:
-
-- Naija ludo pro apk has more features and options than other ludo games. You can control the speed, difficulty, dice, capture, play again, barrier, and safe-house options in the game.
-- Naija ludo pro apk has more boards and pieces than other ludo games. You can choose among three colourful boards and four sets of pieces in the game.
-- Naija ludo pro apk has a visual hand feature that lets you see your opponent's hand and plan your moves accordingly.
-- Naija ludo pro apk has a Nigerian theme that gives it a unique flavour and style.
-
197e85843d
-
-
\ No newline at end of file
diff --git a/spaces/1phancelerku/anime-remove-background/Download Treasure of Montezuma 4 and Experience the Ultimate Match-3 Adventure.md b/spaces/1phancelerku/anime-remove-background/Download Treasure of Montezuma 4 and Experience the Ultimate Match-3 Adventure.md
deleted file mode 100644
index e0bd5d42b961c7ea52fdd4166917e0424afec66b..0000000000000000000000000000000000000000
--- a/spaces/1phancelerku/anime-remove-background/Download Treasure of Montezuma 4 and Experience the Ultimate Match-3 Adventure.md
+++ /dev/null
@@ -1,122 +0,0 @@
-
-How to Download Treasure of Montezuma 4 and Enjoy a Thrilling Puzzle Adventure
-If you are looking for a new and exciting puzzle game to play, you should definitely check out Treasure of Montezuma 4. This is the fourth installment of the popular series that has captivated millions of players around the world. In this article, we will tell you what Treasure of Montezuma 4 is, why you should download it, and how to do it from different platforms. Read on and get ready to embark on an amazing journey through the ancient Aztec civilization.
-download treasure of montezuma 4
Download — https://jinyurl.com/2uNMkr
- What is Treasure of Montezuma 4?
-Treasure of Montezuma 4 is a tile-matching puzzle game that combines elements of adventure, mystery, and magic. You play as Anna, an archaeologist who travels to an Aztec ruin to uncover an ancient secret. Along the way, you will encounter various challenges and surprises that will keep you hooked for hours.
-A brief introduction to the game and its features
-The game has three modes: Story Mode, Quest Mode, and Puzzle Mode. In Story Mode, you will follow Anna's story as she explores the ruin and faces an epic boss battle. In Quest Mode, you will complete different tasks and earn rewards. In Puzzle Mode, you will solve tricky puzzles with limited moves.
-The game also has 98 levels in Story Mode and 69 levels in Quest Mode, each with different goals and obstacles. You will need to match three or more tiles of the same color to clear them from the board and create powerful combos. You will also collect crystals and coins that you can use to upgrade your character and build your own Ziggurat.
-download treasure of montezuma 4 full version
-download treasure of montezuma 4 for pc
-download treasure of montezuma 4 free online
-download treasure of montezuma 4 apk
-download treasure of montezuma 4 mod
-download treasure of montezuma 4 crack
-download treasure of montezuma 4 game
-download treasure of montezuma 4 android
-download treasure of montezuma 4 ios
-download treasure of montezuma 4 mac
-download treasure of montezuma 4 windows 10
-download treasure of montezuma 4 steam
-download treasure of montezuma 4 torrent
-download treasure of montezuma 4 cheats
-download treasure of montezuma 4 tips
-download treasure of montezuma 4 walkthrough
-download treasure of montezuma 4 guide
-download treasure of montezuma 4 review
-download treasure of montezuma 4 gameplay
-download treasure of montezuma 4 trailer
-download treasure of montezuma 4 latest version
-download treasure of montezuma 4 update
-download treasure of montezuma 4 patch
-download treasure of montezuma 4 serial key
-download treasure of montezuma 4 license key
-download treasure of montezuma 4 activation key
-download treasure of montezuma 4 registration key
-download treasure of montezuma 4 product key
-download treasure of montezuma 4 cd key
-download treasure of montezuma 4 keygen
-download treasure of montezuma 4 generator
-download treasure of montezuma 4 hack
-download treasure of montezuma 4 unlimited lives
-download treasure of montezuma 4 unlimited coins
-download treasure of montezuma 4 unlimited gems
-download treasure of montezuma 4 unlimited boosters
-download treasure of montezuma 4 unlimited time
-download treasure of montezuma 4 no ads
-download treasure of montezuma 4 premium
-download treasure of montezuma 4 pro
-download treasure of montezuma 4 deluxe
-download treasure of montezuma 4 gold edition
-download treasure of montezuma 4 collector's edition
-download treasure of montezuma 4 special edition
-download treasure of montezuma 4 ultimate edition
-how to download treasure of montezuma 4
-where to download treasure of montezuma 4
-why to download treasure of montezuma 4
-Moreover, the game features seven powerful totems and eight unique bonuses that will help you in your quest. The totems are ancient gods that have special abilities, such as creating explosions, swapping tiles, or freezing time. The bonuses are items that you can activate during the game, such as hammers, bombs, or lightning bolts.
-The game also has stunning graphics and sound effects that create an immersive atmosphere. You will enjoy the colorful animations, the realistic backgrounds, and the authentic music. You will also learn interesting facts about the Aztec culture and history as you play.
- Why should you download Treasure of Montezuma 4?
-Treasure of Montezuma 4 is not just another puzzle game. It is a game that offers many benefits for players of all ages and preferences. Here are some of them:
-The benefits of playing the game, such as fun, challenge, and learning
-Fun: How the game offers a variety of modes, levels, and special effects
-One of the main reasons to download Treasure of Montezuma 4 is that it is fun. The game offers a variety of modes, levels, and special effects that make it entertaining and engaging. You will never get bored with this game because there is always something new and exciting to discover. Whether you want to follow Anna's story, complete quests, or solve puzzles , you will find something that suits your mood and taste.
-Challenge: How the game tests your skills, strategy, and speed
-Another reason to download Treasure of Montezuma 4 is that it is challenging. The game tests your skills, strategy, and speed in different ways. You will need to think fast and act faster to clear the board and achieve the goals. You will also need to plan ahead and use the totems and bonuses wisely to overcome the obstacles. The game has different difficulty levels, from easy to hard, so you can adjust the challenge according to your preference and ability.
-Learning: How the game teaches you about the Aztec culture and history
-A third reason to download Treasure of Montezuma 4 is that it is educational. The game teaches you about the Aztec culture and history in a fun and interactive way. You will learn about the Aztec gods, symbols, rituals, and architecture as you play. You will also discover the secrets of the Ziggurat, a massive pyramid that was built by the Aztecs to honor their gods. The game has a built-in encyclopedia that provides more information and facts about the topics covered in the game.
- How to download Treasure of Montezuma 4?
-Now that you know what Treasure of Montezuma 4 is and why you should download it, you might be wondering how to do it. Well, the good news is that downloading Treasure of Montezuma 4 is easy and convenient. You can download the game from different platforms, such as Steam, PlayStation, and GameHouse. Here are the steps to do it from each platform:
-The steps to download the game from different platforms, such as Steam, PlayStation, and GameHouse
-Steam: How to buy the game for a discounted price and install it on your PC
-If you want to download Treasure of Montezuma 4 from Steam, you will need to have a Steam account and a compatible PC. You can create a Steam account for free by visiting https://store.steampowered.com/join/. Once you have an account, you can buy the game for a discounted price of $2.99 (regular price $9.99) by visiting https://store.steampowered.com/app/347400/The_Treasures_of_Montezuma_4/. After you buy the game, you can install it on your PC by following these steps:
-
-- Open Steam and log in with your account.
-- Go to Library and find Treasure of Montezuma 4 in your list of games.
-- Click on Install and choose a location for the game files.
-- Wait for the installation to finish and click on Play.
-
-Congratulations! You have successfully downloaded Treasure of Montezuma 4 from Steam. Enjoy!
-PlayStation: How to purchase the game from the PlayStation Store and play it on your PS4 or PS5
-If you want to download Treasure of Montezuma 4 from PlayStation, you will need to have a PlayStation account and a PS4 or PS5 console. You can create a PlayStation account for free by visiting https://www.playstation.com/en-us/support/account/create-account/. Once you have an account, you can purchase the game for $9.99 by visiting https://store.playstation.com/en-us/product/UP4151-CUSA01975_00-TREASUREMONTEZUM. After you purchase the game, you can download it on your PS4 or PS5 by following these steps:
-
-- Turn on your PS4 or PS5 and log in with your account.
-- Go to Library and find Treasure of Montezuma 4 in your list of games.
-- Select Download and wait for the download to finish.
-- Select Start to launch the game.
-
-Congratulations! You have successfully downloaded Treasure of Montezuma 4 from PlayStation. Enjoy!
-GameHouse: How to sign up for a free trial and access thousands of games, including Treasure of Montezuma 4
-If you want to download Treasure of Montezuma 4 from GameHouse, you will need to sign up for a free trial and access thousands of games, including Treasure of Montezuma 4. GameHouse is a website that offers unlimited access to over 2,500 games for a monthly fee of $10.99. However, you can try it for free for 14 days by visiting https://www.gamehouse.com/. Once you sign up for a free trial, you can download Treasure of Montezuma 4 by following these steps:
-
-- Open GameHouse and log in with your account.
-- Go to Puzzle Games and find Treasure of Montezuma 4 in the list of games.
-- Select Play Now and wait for the game to load.
-- Select Full Screen to enjoy the game in full screen mode.
-
-Congratulations! You have successfully downloaded Treasure of Montezuma 4 from GameHouse. Enjoy!
- Conclusion
-Treasure of Montezuma 4 is a fantastic puzzle game that will keep you entertained and challenged for hours. It has three modes, 98 levels, seven totems, eight bonuses, and stunning graphics and sound effects. It also teaches you about the Aztec culture and history in a fun and interactive way. You can download the game from Steam, PlayStation, or GameHouse, depending on your preference and device. Don't miss this opportunity to experience a thrilling puzzle adventure. Download Treasure of Montezuma 4 today and discover the secrets of the Ziggurat!
- FAQs
-Here are some frequently asked questions about Treasure of Montezuma 4:
-
-- What are the system requirements for Treasure of Montezuma 4?
-The system requirements for Treasure of Montezuma 4 are as follows:
-
-Platform | Minimum Requirements |
-Steam | OS: Windows XP/Vista/7/8/10 CPU: 1.5 GHz RAM: 256 MB Disk Space: 500 MB DirectX: 9.0 or higher |
-PlayStation | PS4 or PS5 console Internet connection PlayStation account Disk Space: 1 GB |
-GameHouse | OS: Windows 7/8/10 CPU: 1.6 GHz RAM: 512 MB Disk Space: 500 MB DirectX: 9.0 or higher Internet connection GameHouse account |
-
- - How long does it take to finish Treasure of Montezuma 4?
-The time it takes to finish Treasure of Montezuma 4 depends on your skill level and play style. However, on average, it takes about 10 hours to complete Story Mode, 5 hours to complete Quest Mode, and 2 hours to complete Puzzle Mode.
- - Can I play Treasure of Montezuma 4 offline?
-You can play Treasure of Montezuma 4 offline if you download it from Steam or PlayStation. However, you will need an internet connection to activate the game and access some features, such as achievements and leaderboards. If you download it from GameHouse, you will need an internet connection to play the game.
- - Is Treasure of Montezuma 4 suitable for children?
-Treasure of Montezuma 4 is suitable for children aged 7 and above. The game has a rating of E (Everyone) by the ESRB and a rating of PEGI 3 by the PEGI. The game does not contain any violence, blood, gore, or sexual content. However, some parents may find some aspects of the game inappropriate for younger children, such as the depiction of Aztec gods and rituals.
- - Is there a sequel to Treasure of Montezuma 4?
-Treasure of Montezuma 4 is the latest installment of the series as of June 2023. There is no official announcement about a sequel yet. However, you can check out the previous games in the series, such as Treasure of Montezuma, Treasure of Montezuma 2, and Treasure of Montezuma 3.
-
401be4b1e0
-
-
\ No newline at end of file
diff --git a/spaces/AI-Zero-to-Hero/02-H5-AR-VR-IOT/style.css b/spaces/AI-Zero-to-Hero/02-H5-AR-VR-IOT/style.css
deleted file mode 100644
index 114adf441e9032febb46bc056b2a8bb651075f0d..0000000000000000000000000000000000000000
--- a/spaces/AI-Zero-to-Hero/02-H5-AR-VR-IOT/style.css
+++ /dev/null
@@ -1,28 +0,0 @@
-body {
- padding: 2rem;
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
-}
-
-h1 {
- font-size: 16px;
- margin-top: 0;
-}
-
-p {
- color: rgb(107, 114, 128);
- font-size: 15px;
- margin-bottom: 10px;
- margin-top: 5px;
-}
-
-.card {
- max-width: 620px;
- margin: 0 auto;
- padding: 16px;
- border: 1px solid lightgray;
- border-radius: 16px;
-}
-
-.card p:last-child {
- margin-bottom: 0;
-}
diff --git a/spaces/AIFILMS/generate_human_motion/pyrender/pyrender/viewer.py b/spaces/AIFILMS/generate_human_motion/pyrender/pyrender/viewer.py
deleted file mode 100644
index d2326c38205c6eaddb4f567e3b088329187af258..0000000000000000000000000000000000000000
--- a/spaces/AIFILMS/generate_human_motion/pyrender/pyrender/viewer.py
+++ /dev/null
@@ -1,1160 +0,0 @@
-"""A pyglet-based interactive 3D scene viewer.
-"""
-import copy
-import os
-import sys
-from threading import Thread, RLock
-import time
-
-import imageio
-import numpy as np
-import OpenGL
-import trimesh
-
-try:
- from Tkinter import Tk, tkFileDialog as filedialog
-except Exception:
- try:
- from tkinter import Tk, filedialog as filedialog
- except Exception:
- pass
-
-from .constants import (TARGET_OPEN_GL_MAJOR, TARGET_OPEN_GL_MINOR,
- MIN_OPEN_GL_MAJOR, MIN_OPEN_GL_MINOR,
- TEXT_PADDING, DEFAULT_SCENE_SCALE,
- DEFAULT_Z_FAR, DEFAULT_Z_NEAR, RenderFlags, TextAlign)
-from .light import DirectionalLight
-from .node import Node
-from .camera import PerspectiveCamera, OrthographicCamera, IntrinsicsCamera
-from .trackball import Trackball
-from .renderer import Renderer
-from .mesh import Mesh
-
-import pyglet
-from pyglet import clock
-pyglet.options['shadow_window'] = False
-
-
-class Viewer(pyglet.window.Window):
- """An interactive viewer for 3D scenes.
-
- The viewer's camera is separate from the scene's, but will take on
- the parameters of the scene's main view camera and start in the same pose.
- If the scene does not have a camera, a suitable default will be provided.
-
- Parameters
- ----------
- scene : :class:`Scene`
- The scene to visualize.
- viewport_size : (2,) int
- The width and height of the initial viewing window.
- render_flags : dict
- A set of flags for rendering the scene. Described in the note below.
- viewer_flags : dict
- A set of flags for controlling the viewer's behavior.
- Described in the note below.
- registered_keys : dict
- A map from ASCII key characters to tuples containing:
-
- - A function to be called whenever the key is pressed,
- whose first argument will be the viewer itself.
- - (Optionally) A list of additional positional arguments
- to be passed to the function.
- - (Optionally) A dict of keyword arguments to be passed
- to the function.
-
- kwargs : dict
- Any keyword arguments left over will be interpreted as belonging to
- either the :attr:`.Viewer.render_flags` or :attr:`.Viewer.viewer_flags`
- dictionaries. Those flag sets will be updated appropriately.
-
- Note
- ----
- The basic commands for moving about the scene are given as follows:
-
- - **Rotating about the scene**: Hold the left mouse button and
- drag the cursor.
- - **Rotating about the view axis**: Hold ``CTRL`` and the left mouse
- button and drag the cursor.
- - **Panning**:
-
- - Hold SHIFT, then hold the left mouse button and drag the cursor, or
- - Hold the middle mouse button and drag the cursor.
-
- - **Zooming**:
-
- - Scroll the mouse wheel, or
- - Hold the right mouse button and drag the cursor.
-
- Other keyboard commands are as follows:
-
- - ``a``: Toggles rotational animation mode.
- - ``c``: Toggles backface culling.
- - ``f``: Toggles fullscreen mode.
- - ``h``: Toggles shadow rendering.
- - ``i``: Toggles axis display mode
- (no axes, world axis, mesh axes, all axes).
- - ``l``: Toggles lighting mode
- (scene lighting, Raymond lighting, or direct lighting).
- - ``m``: Toggles face normal visualization.
- - ``n``: Toggles vertex normal visualization.
- - ``o``: Toggles orthographic mode.
- - ``q``: Quits the viewer.
- - ``r``: Starts recording a GIF, and pressing again stops recording
- and opens a file dialog.
- - ``s``: Opens a file dialog to save the current view as an image.
- - ``w``: Toggles wireframe mode
- (scene default, flip wireframes, all wireframe, or all solid).
- - ``z``: Resets the camera to the initial view.
-
- Note
- ----
- The valid keys for ``render_flags`` are as follows:
-
- - ``flip_wireframe``: `bool`, If `True`, all objects will have their
- wireframe modes flipped from what their material indicates.
- Defaults to `False`.
- - ``all_wireframe``: `bool`, If `True`, all objects will be rendered
- in wireframe mode. Defaults to `False`.
- - ``all_solid``: `bool`, If `True`, all objects will be rendered in
- solid mode. Defaults to `False`.
- - ``shadows``: `bool`, If `True`, shadows will be rendered.
- Defaults to `False`.
- - ``vertex_normals``: `bool`, If `True`, vertex normals will be
- rendered as blue lines. Defaults to `False`.
- - ``face_normals``: `bool`, If `True`, face normals will be rendered as
- blue lines. Defaults to `False`.
- - ``cull_faces``: `bool`, If `True`, backfaces will be culled.
- Defaults to `True`.
- - ``point_size`` : float, The point size in pixels. Defaults to 1px.
-
- Note
- ----
- The valid keys for ``viewer_flags`` are as follows:
-
- - ``rotate``: `bool`, If `True`, the scene's camera will rotate
- about an axis. Defaults to `False`.
- - ``rotate_rate``: `float`, The rate of rotation in radians per second.
- Defaults to `PI / 3.0`.
- - ``rotate_axis``: `(3,) float`, The axis in world coordinates to rotate
- about. Defaults to ``[0,0,1]``.
- - ``view_center``: `(3,) float`, The position to rotate the scene about.
- Defaults to the scene's centroid.
- - ``use_raymond_lighting``: `bool`, If `True`, an additional set of three
- directional lights that move with the camera will be added to the scene.
- Defaults to `False`.
- - ``use_direct_lighting``: `bool`, If `True`, an additional directional
- light that moves with the camera and points out of it will be added to
- the scene. Defaults to `False`.
- - ``lighting_intensity``: `float`, The overall intensity of the
- viewer's additional lights (when they're in use). Defaults to 3.0.
- - ``use_perspective_cam``: `bool`, If `True`, a perspective camera will
- be used. Otherwise, an orthographic camera is used. Defaults to `True`.
- - ``save_directory``: `str`, A directory to open the file dialogs in.
- Defaults to `None`.
- - ``window_title``: `str`, A title for the viewer's application window.
- Defaults to `"Scene Viewer"`.
- - ``refresh_rate``: `float`, A refresh rate for rendering, in Hertz.
- Defaults to `30.0`.
- - ``fullscreen``: `bool`, Whether to make viewer fullscreen.
- Defaults to `False`.
- - ``show_world_axis``: `bool`, Whether to show the world axis.
- Defaults to `False`.
- - ``show_mesh_axes``: `bool`, Whether to show the individual mesh axes.
- Defaults to `False`.
- - ``caption``: `list of dict`, Text caption(s) to display on the viewer.
- Defaults to `None`.
-
- Note
- ----
- Animation can be accomplished by running the viewer with ``run_in_thread``
- enabled. Then, just run a loop in your main thread, updating the scene as
- needed. Before updating the scene, be sure to acquire the
- :attr:`.Viewer.render_lock`, and release it when your update is done.
- """
-
- def __init__(self, scene, viewport_size=None,
- render_flags=None, viewer_flags=None,
- registered_keys=None, run_in_thread=False,
- auto_start=True,
- **kwargs):
-
- #######################################################################
- # Save attributes and flags
- #######################################################################
- if viewport_size is None:
- viewport_size = (640, 480)
- self._scene = scene
- self._viewport_size = viewport_size
- self._render_lock = RLock()
- self._is_active = False
- self._should_close = False
- self._run_in_thread = run_in_thread
- self._auto_start = auto_start
-
- self._default_render_flags = {
- 'flip_wireframe': False,
- 'all_wireframe': False,
- 'all_solid': False,
- 'shadows': False,
- 'vertex_normals': False,
- 'face_normals': False,
- 'cull_faces': True,
- 'point_size': 1.0,
- }
- self._default_viewer_flags = {
- 'mouse_pressed': False,
- 'rotate': False,
- 'rotate_rate': np.pi / 3.0,
- 'rotate_axis': np.array([0.0, 0.0, 1.0]),
- 'view_center': None,
- 'record': False,
- 'use_raymond_lighting': False,
- 'use_direct_lighting': False,
- 'lighting_intensity': 3.0,
- 'use_perspective_cam': True,
- 'save_directory': None,
- 'window_title': 'Scene Viewer',
- 'refresh_rate': 30.0,
- 'fullscreen': False,
- 'show_world_axis': False,
- 'show_mesh_axes': False,
- 'caption': None
- }
- self._render_flags = self._default_render_flags.copy()
- self._viewer_flags = self._default_viewer_flags.copy()
- self._viewer_flags['rotate_axis'] = (
- self._default_viewer_flags['rotate_axis'].copy()
- )
-
- if render_flags is not None:
- self._render_flags.update(render_flags)
- if viewer_flags is not None:
- self._viewer_flags.update(viewer_flags)
-
- for key in kwargs:
- if key in self.render_flags:
- self._render_flags[key] = kwargs[key]
- elif key in self.viewer_flags:
- self._viewer_flags[key] = kwargs[key]
-
- # TODO MAC OS BUG FOR SHADOWS
- if sys.platform == 'darwin':
- self._render_flags['shadows'] = False
-
- self._registered_keys = {}
- if registered_keys is not None:
- self._registered_keys = {
- ord(k.lower()): registered_keys[k] for k in registered_keys
- }
-
- #######################################################################
- # Save internal settings
- #######################################################################
-
- # Set up caption stuff
- self._message_text = None
- self._ticks_till_fade = 2.0 / 3.0 * self.viewer_flags['refresh_rate']
- self._message_opac = 1.0 + self._ticks_till_fade
-
- # Set up raymond lights and direct lights
- self._raymond_lights = self._create_raymond_lights()
- self._direct_light = self._create_direct_light()
-
- # Set up axes
- self._axes = {}
- self._axis_mesh = Mesh.from_trimesh(
- trimesh.creation.axis(origin_size=0.1, axis_radius=0.05,
- axis_length=1.0), smooth=False)
- if self.viewer_flags['show_world_axis']:
- self._set_axes(world=self.viewer_flags['show_world_axis'],
- mesh=self.viewer_flags['show_mesh_axes'])
-
- #######################################################################
- # Set up camera node
- #######################################################################
- self._camera_node = None
- self._prior_main_camera_node = None
- self._default_camera_pose = None
- self._default_persp_cam = None
- self._default_orth_cam = None
- self._trackball = None
- self._saved_frames = []
-
- # Extract main camera from scene and set up our mirrored copy
- znear = None
- zfar = None
- if scene.main_camera_node is not None:
- n = scene.main_camera_node
- camera = copy.copy(n.camera)
- if isinstance(camera, (PerspectiveCamera, IntrinsicsCamera)):
- self._default_persp_cam = camera
- znear = camera.znear
- zfar = camera.zfar
- elif isinstance(camera, OrthographicCamera):
- self._default_orth_cam = camera
- znear = camera.znear
- zfar = camera.zfar
- self._default_camera_pose = scene.get_pose(scene.main_camera_node)
- self._prior_main_camera_node = n
-
- # Set defaults as needed
- if zfar is None:
- zfar = max(scene.scale * 10.0, DEFAULT_Z_FAR)
- if znear is None or znear == 0:
- if scene.scale == 0:
- znear = DEFAULT_Z_NEAR
- else:
- znear = min(scene.scale / 10.0, DEFAULT_Z_NEAR)
-
- if self._default_persp_cam is None:
- self._default_persp_cam = PerspectiveCamera(
- yfov=np.pi / 3.0, znear=znear, zfar=zfar
- )
- if self._default_orth_cam is None:
- xmag = ymag = scene.scale
- if scene.scale == 0:
- xmag = ymag = 1.0
- self._default_orth_cam = OrthographicCamera(
- xmag=xmag, ymag=ymag,
- znear=znear,
- zfar=zfar
- )
- if self._default_camera_pose is None:
- self._default_camera_pose = self._compute_initial_camera_pose()
-
- # Pick camera
- if self.viewer_flags['use_perspective_cam']:
- camera = self._default_persp_cam
- else:
- camera = self._default_orth_cam
-
- self._camera_node = Node(
- matrix=self._default_camera_pose, camera=camera
- )
- scene.add_node(self._camera_node)
- scene.main_camera_node = self._camera_node
- self._reset_view()
-
- #######################################################################
- # Initialize OpenGL context and renderer
- #######################################################################
- self._renderer = Renderer(
- self._viewport_size[0], self._viewport_size[1],
- self.render_flags['point_size']
- )
- self._is_active = True
-
- if self.run_in_thread:
- self._thread = Thread(target=self._init_and_start_app)
- self._thread.start()
- else:
- if auto_start:
- self._init_and_start_app()
-
- def start(self):
- self._init_and_start_app()
-
- @property
- def scene(self):
- """:class:`.Scene` : The scene being visualized.
- """
- return self._scene
-
- @property
- def viewport_size(self):
- """(2,) int : The width and height of the viewing window.
- """
- return self._viewport_size
-
- @property
- def render_lock(self):
- """:class:`threading.RLock` : If acquired, prevents the viewer from
- rendering until released.
-
- Run :meth:`.Viewer.render_lock.acquire` before making updates to
- the scene in a different thread, and run
- :meth:`.Viewer.render_lock.release` once you're done to let the viewer
- continue.
- """
- return self._render_lock
-
- @property
- def is_active(self):
- """bool : `True` if the viewer is active, or `False` if it has
- been closed.
- """
- return self._is_active
-
- @property
- def run_in_thread(self):
- """bool : Whether the viewer was run in a separate thread.
- """
- return self._run_in_thread
-
- @property
- def render_flags(self):
- """dict : Flags for controlling the renderer's behavior.
-
- - ``flip_wireframe``: `bool`, If `True`, all objects will have their
- wireframe modes flipped from what their material indicates.
- Defaults to `False`.
- - ``all_wireframe``: `bool`, If `True`, all objects will be rendered
- in wireframe mode. Defaults to `False`.
- - ``all_solid``: `bool`, If `True`, all objects will be rendered in
- solid mode. Defaults to `False`.
- - ``shadows``: `bool`, If `True`, shadows will be rendered.
- Defaults to `False`.
- - ``vertex_normals``: `bool`, If `True`, vertex normals will be
- rendered as blue lines. Defaults to `False`.
- - ``face_normals``: `bool`, If `True`, face normals will be rendered as
- blue lines. Defaults to `False`.
- - ``cull_faces``: `bool`, If `True`, backfaces will be culled.
- Defaults to `True`.
- - ``point_size`` : float, The point size in pixels. Defaults to 1px.
-
- """
- return self._render_flags
-
- @render_flags.setter
- def render_flags(self, value):
- self._render_flags = value
-
- @property
- def viewer_flags(self):
- """dict : Flags for controlling the viewer's behavior.
-
- The valid keys for ``viewer_flags`` are as follows:
-
- - ``rotate``: `bool`, If `True`, the scene's camera will rotate
- about an axis. Defaults to `False`.
- - ``rotate_rate``: `float`, The rate of rotation in radians per second.
- Defaults to `PI / 3.0`.
- - ``rotate_axis``: `(3,) float`, The axis in world coordinates to
- rotate about. Defaults to ``[0,0,1]``.
- - ``view_center``: `(3,) float`, The position to rotate the scene
- about. Defaults to the scene's centroid.
- - ``use_raymond_lighting``: `bool`, If `True`, an additional set of
- three directional lights that move with the camera will be added to
- the scene. Defaults to `False`.
- - ``use_direct_lighting``: `bool`, If `True`, an additional directional
- light that moves with the camera and points out of it will be
- added to the scene. Defaults to `False`.
- - ``lighting_intensity``: `float`, The overall intensity of the
- viewer's additional lights (when they're in use). Defaults to 3.0.
- - ``use_perspective_cam``: `bool`, If `True`, a perspective camera will
- be used. Otherwise, an orthographic camera is used. Defaults to
- `True`.
- - ``save_directory``: `str`, A directory to open the file dialogs in.
- Defaults to `None`.
- - ``window_title``: `str`, A title for the viewer's application window.
- Defaults to `"Scene Viewer"`.
- - ``refresh_rate``: `float`, A refresh rate for rendering, in Hertz.
- Defaults to `30.0`.
- - ``fullscreen``: `bool`, Whether to make viewer fullscreen.
- Defaults to `False`.
- - ``show_world_axis``: `bool`, Whether to show the world axis.
- Defaults to `False`.
- - ``show_mesh_axes``: `bool`, Whether to show the individual mesh axes.
- Defaults to `False`.
- - ``caption``: `list of dict`, Text caption(s) to display on
- the viewer. Defaults to `None`.
-
- """
- return self._viewer_flags
-
- @viewer_flags.setter
- def viewer_flags(self, value):
- self._viewer_flags = value
-
- @property
- def registered_keys(self):
- """dict : Map from ASCII key character to a handler function.
-
- This is a map from ASCII key characters to tuples containing:
-
- - A function to be called whenever the key is pressed,
- whose first argument will be the viewer itself.
- - (Optionally) A list of additional positional arguments
- to be passed to the function.
- - (Optionally) A dict of keyword arguments to be passed
- to the function.
-
- """
- return self._registered_keys
-
- @registered_keys.setter
- def registered_keys(self, value):
- self._registered_keys = value
-
- def close_external(self):
- """Close the viewer from another thread.
-
- This function will wait for the actual close, so you immediately
- manipulate the scene afterwards.
- """
- self._should_close = True
- while self.is_active:
- time.sleep(1.0 / self.viewer_flags['refresh_rate'])
-
- def save_gif(self, filename=None):
- """Save the stored GIF frames to a file.
-
- To use this asynchronously, run the viewer with the ``record``
- flag and the ``run_in_thread`` flags set.
- Kill the viewer after your desired time with
- :meth:`.Viewer.close_external`, and then call :meth:`.Viewer.save_gif`.
-
- Parameters
- ----------
- filename : str
- The file to save the GIF to. If not specified,
- a file dialog will be opened to ask the user where
- to save the GIF file.
- """
- if filename is None:
- filename = self._get_save_filename(['gif', 'all'])
- if filename is not None:
- self.viewer_flags['save_directory'] = os.path.dirname(filename)
- imageio.mimwrite(filename, self._saved_frames,
- fps=self.viewer_flags['refresh_rate'],
- palettesize=128, subrectangles=True)
- self._saved_frames = []
-
- def on_close(self):
- """Exit the event loop when the window is closed.
- """
- # Remove our camera and restore the prior one
- if self._camera_node is not None:
- self.scene.remove_node(self._camera_node)
- if self._prior_main_camera_node is not None:
- self.scene.main_camera_node = self._prior_main_camera_node
-
- # Delete any lighting nodes that we've attached
- if self.viewer_flags['use_raymond_lighting']:
- for n in self._raymond_lights:
- if self.scene.has_node(n):
- self.scene.remove_node(n)
- if self.viewer_flags['use_direct_lighting']:
- if self.scene.has_node(self._direct_light):
- self.scene.remove_node(self._direct_light)
-
- # Delete any axis nodes that we've attached
- self._remove_axes()
-
- # Delete renderer
- if self._renderer is not None:
- self._renderer.delete()
- self._renderer = None
-
- # Force clean-up of OpenGL context data
- try:
- OpenGL.contextdata.cleanupContext()
- self.close()
- except Exception:
- pass
- finally:
- self._is_active = False
- super(Viewer, self).on_close()
- pyglet.app.exit()
-
- def on_draw(self):
- """Redraw the scene into the viewing window.
- """
- if self._renderer is None:
- return
-
- if self.run_in_thread or not self._auto_start:
- self.render_lock.acquire()
-
- # Make OpenGL context current
- self.switch_to()
-
- # Render the scene
- self.clear()
- self._render()
-
- if self._message_text is not None:
- self._renderer.render_text(
- self._message_text,
- self.viewport_size[0] - TEXT_PADDING,
- TEXT_PADDING,
- font_pt=20,
- color=np.array([0.1, 0.7, 0.2,
- np.clip(self._message_opac, 0.0, 1.0)]),
- align=TextAlign.BOTTOM_RIGHT
- )
-
- if self.viewer_flags['caption'] is not None:
- for caption in self.viewer_flags['caption']:
- xpos, ypos = self._location_to_x_y(caption['location'])
- self._renderer.render_text(
- caption['text'],
- xpos,
- ypos,
- font_name=caption['font_name'],
- font_pt=caption['font_pt'],
- color=caption['color'],
- scale=caption['scale'],
- align=caption['location']
- )
-
- if self.run_in_thread or not self._auto_start:
- self.render_lock.release()
-
- def on_resize(self, width, height):
- """Resize the camera and trackball when the window is resized.
- """
- if self._renderer is None:
- return
-
- self._viewport_size = (width, height)
- self._trackball.resize(self._viewport_size)
- self._renderer.viewport_width = self._viewport_size[0]
- self._renderer.viewport_height = self._viewport_size[1]
- self.on_draw()
-
- def on_mouse_press(self, x, y, buttons, modifiers):
- """Record an initial mouse press.
- """
- self._trackball.set_state(Trackball.STATE_ROTATE)
- if (buttons == pyglet.window.mouse.LEFT):
- ctrl = (modifiers & pyglet.window.key.MOD_CTRL)
- shift = (modifiers & pyglet.window.key.MOD_SHIFT)
- if (ctrl and shift):
- self._trackball.set_state(Trackball.STATE_ZOOM)
- elif ctrl:
- self._trackball.set_state(Trackball.STATE_ROLL)
- elif shift:
- self._trackball.set_state(Trackball.STATE_PAN)
- elif (buttons == pyglet.window.mouse.MIDDLE):
- self._trackball.set_state(Trackball.STATE_PAN)
- elif (buttons == pyglet.window.mouse.RIGHT):
- self._trackball.set_state(Trackball.STATE_ZOOM)
-
- self._trackball.down(np.array([x, y]))
-
- # Stop animating while using the mouse
- self.viewer_flags['mouse_pressed'] = True
-
- def on_mouse_drag(self, x, y, dx, dy, buttons, modifiers):
- """Record a mouse drag.
- """
- self._trackball.drag(np.array([x, y]))
-
- def on_mouse_release(self, x, y, button, modifiers):
- """Record a mouse release.
- """
- self.viewer_flags['mouse_pressed'] = False
-
- def on_mouse_scroll(self, x, y, dx, dy):
- """Record a mouse scroll.
- """
- if self.viewer_flags['use_perspective_cam']:
- self._trackball.scroll(dy)
- else:
- spfc = 0.95
- spbc = 1.0 / 0.95
- sf = 1.0
- if dy > 0:
- sf = spfc * dy
- elif dy < 0:
- sf = - spbc * dy
-
- c = self._camera_node.camera
- xmag = max(c.xmag * sf, 1e-8)
- ymag = max(c.ymag * sf, 1e-8 * c.ymag / c.xmag)
- c.xmag = xmag
- c.ymag = ymag
-
- def on_key_press(self, symbol, modifiers):
- """Record a key press.
- """
- # First, check for registered key callbacks
- if symbol in self.registered_keys:
- tup = self.registered_keys[symbol]
- callback = None
- args = []
- kwargs = {}
- if not isinstance(tup, (list, tuple, np.ndarray)):
- callback = tup
- else:
- callback = tup[0]
- if len(tup) == 2:
- args = tup[1]
- if len(tup) == 3:
- kwargs = tup[2]
- callback(self, *args, **kwargs)
- return
-
- # Otherwise, use default key functions
-
- # A causes the frame to rotate
- self._message_text = None
- if symbol == pyglet.window.key.A:
- self.viewer_flags['rotate'] = not self.viewer_flags['rotate']
- if self.viewer_flags['rotate']:
- self._message_text = 'Rotation On'
- else:
- self._message_text = 'Rotation Off'
-
- # C toggles backface culling
- elif symbol == pyglet.window.key.C:
- self.render_flags['cull_faces'] = (
- not self.render_flags['cull_faces']
- )
- if self.render_flags['cull_faces']:
- self._message_text = 'Cull Faces On'
- else:
- self._message_text = 'Cull Faces Off'
-
- # F toggles face normals
- elif symbol == pyglet.window.key.F:
- self.viewer_flags['fullscreen'] = (
- not self.viewer_flags['fullscreen']
- )
- self.set_fullscreen(self.viewer_flags['fullscreen'])
- self.activate()
- if self.viewer_flags['fullscreen']:
- self._message_text = 'Fullscreen On'
- else:
- self._message_text = 'Fullscreen Off'
-
- # S toggles shadows
- elif symbol == pyglet.window.key.H and sys.platform != 'darwin':
- self.render_flags['shadows'] = not self.render_flags['shadows']
- if self.render_flags['shadows']:
- self._message_text = 'Shadows On'
- else:
- self._message_text = 'Shadows Off'
-
- elif symbol == pyglet.window.key.I:
- if (self.viewer_flags['show_world_axis'] and not
- self.viewer_flags['show_mesh_axes']):
- self.viewer_flags['show_world_axis'] = False
- self.viewer_flags['show_mesh_axes'] = True
- self._set_axes(False, True)
- self._message_text = 'Mesh Axes On'
- elif (not self.viewer_flags['show_world_axis'] and
- self.viewer_flags['show_mesh_axes']):
- self.viewer_flags['show_world_axis'] = True
- self.viewer_flags['show_mesh_axes'] = True
- self._set_axes(True, True)
- self._message_text = 'All Axes On'
- elif (self.viewer_flags['show_world_axis'] and
- self.viewer_flags['show_mesh_axes']):
- self.viewer_flags['show_world_axis'] = False
- self.viewer_flags['show_mesh_axes'] = False
- self._set_axes(False, False)
- self._message_text = 'All Axes Off'
- else:
- self.viewer_flags['show_world_axis'] = True
- self.viewer_flags['show_mesh_axes'] = False
- self._set_axes(True, False)
- self._message_text = 'World Axis On'
-
- # L toggles the lighting mode
- elif symbol == pyglet.window.key.L:
- if self.viewer_flags['use_raymond_lighting']:
- self.viewer_flags['use_raymond_lighting'] = False
- self.viewer_flags['use_direct_lighting'] = True
- self._message_text = 'Direct Lighting'
- elif self.viewer_flags['use_direct_lighting']:
- self.viewer_flags['use_raymond_lighting'] = False
- self.viewer_flags['use_direct_lighting'] = False
- self._message_text = 'Default Lighting'
- else:
- self.viewer_flags['use_raymond_lighting'] = True
- self.viewer_flags['use_direct_lighting'] = False
- self._message_text = 'Raymond Lighting'
-
- # M toggles face normals
- elif symbol == pyglet.window.key.M:
- self.render_flags['face_normals'] = (
- not self.render_flags['face_normals']
- )
- if self.render_flags['face_normals']:
- self._message_text = 'Face Normals On'
- else:
- self._message_text = 'Face Normals Off'
-
- # N toggles vertex normals
- elif symbol == pyglet.window.key.N:
- self.render_flags['vertex_normals'] = (
- not self.render_flags['vertex_normals']
- )
- if self.render_flags['vertex_normals']:
- self._message_text = 'Vert Normals On'
- else:
- self._message_text = 'Vert Normals Off'
-
- # O toggles orthographic camera mode
- elif symbol == pyglet.window.key.O:
- self.viewer_flags['use_perspective_cam'] = (
- not self.viewer_flags['use_perspective_cam']
- )
- if self.viewer_flags['use_perspective_cam']:
- camera = self._default_persp_cam
- self._message_text = 'Perspective View'
- else:
- camera = self._default_orth_cam
- self._message_text = 'Orthographic View'
-
- cam_pose = self._camera_node.matrix.copy()
- cam_node = Node(matrix=cam_pose, camera=camera)
- self.scene.remove_node(self._camera_node)
- self.scene.add_node(cam_node)
- self.scene.main_camera_node = cam_node
- self._camera_node = cam_node
-
- # Q quits the viewer
- elif symbol == pyglet.window.key.Q:
- self.on_close()
-
- # R starts recording frames
- elif symbol == pyglet.window.key.R:
- if self.viewer_flags['record']:
- self.save_gif()
- self.set_caption(self.viewer_flags['window_title'])
- else:
- self.set_caption(
- '{} (RECORDING)'.format(self.viewer_flags['window_title'])
- )
- self.viewer_flags['record'] = not self.viewer_flags['record']
-
- # S saves the current frame as an image
- elif symbol == pyglet.window.key.S:
- self._save_image()
-
- # W toggles through wireframe modes
- elif symbol == pyglet.window.key.W:
- if self.render_flags['flip_wireframe']:
- self.render_flags['flip_wireframe'] = False
- self.render_flags['all_wireframe'] = True
- self.render_flags['all_solid'] = False
- self._message_text = 'All Wireframe'
- elif self.render_flags['all_wireframe']:
- self.render_flags['flip_wireframe'] = False
- self.render_flags['all_wireframe'] = False
- self.render_flags['all_solid'] = True
- self._message_text = 'All Solid'
- elif self.render_flags['all_solid']:
- self.render_flags['flip_wireframe'] = False
- self.render_flags['all_wireframe'] = False
- self.render_flags['all_solid'] = False
- self._message_text = 'Default Wireframe'
- else:
- self.render_flags['flip_wireframe'] = True
- self.render_flags['all_wireframe'] = False
- self.render_flags['all_solid'] = False
- self._message_text = 'Flip Wireframe'
-
- # Z resets the camera viewpoint
- elif symbol == pyglet.window.key.Z:
- self._reset_view()
-
- if self._message_text is not None:
- self._message_opac = 1.0 + self._ticks_till_fade
-
- @staticmethod
- def _time_event(dt, self):
- """The timer callback.
- """
- # Don't run old dead events after we've already closed
- if not self._is_active:
- return
-
- if self.viewer_flags['record']:
- self._record()
- if (self.viewer_flags['rotate'] and not
- self.viewer_flags['mouse_pressed']):
- self._rotate()
-
- # Manage message opacity
- if self._message_text is not None:
- if self._message_opac > 1.0:
- self._message_opac -= 1.0
- else:
- self._message_opac *= 0.90
- if self._message_opac < 0.05:
- self._message_opac = 1.0 + self._ticks_till_fade
- self._message_text = None
-
- if self._should_close:
- self.on_close()
- else:
- self.on_draw()
-
- def _reset_view(self):
- """Reset the view to a good initial state.
-
- The view is initially along the positive x-axis at a
- sufficient distance from the scene.
- """
- scale = self.scene.scale
- if scale == 0.0:
- scale = DEFAULT_SCENE_SCALE
- centroid = self.scene.centroid
-
- if self.viewer_flags['view_center'] is not None:
- centroid = self.viewer_flags['view_center']
-
- self._camera_node.matrix = self._default_camera_pose
- self._trackball = Trackball(
- self._default_camera_pose, self.viewport_size, scale, centroid
- )
-
- def _get_save_filename(self, file_exts):
- file_types = {
- 'png': ('png files', '*.png'),
- 'jpg': ('jpeg files', '*.jpg'),
- 'gif': ('gif files', '*.gif'),
- 'all': ('all files', '*'),
- }
- filetypes = [file_types[x] for x in file_exts]
- try:
- root = Tk()
- save_dir = self.viewer_flags['save_directory']
- if save_dir is None:
- save_dir = os.getcwd()
- filename = filedialog.asksaveasfilename(
- initialdir=save_dir, title='Select file save location',
- filetypes=filetypes
- )
- except Exception:
- return None
-
- root.destroy()
- if filename == ():
- return None
- return filename
-
- def _save_image(self):
- filename = self._get_save_filename(['png', 'jpg', 'gif', 'all'])
- if filename is not None:
- self.viewer_flags['save_directory'] = os.path.dirname(filename)
- imageio.imwrite(filename, self._renderer.read_color_buf())
-
- def _record(self):
- """Save another frame for the GIF.
- """
- data = self._renderer.read_color_buf()
- if not np.all(data == 0.0):
- self._saved_frames.append(data)
-
- def _rotate(self):
- """Animate the scene by rotating the camera.
- """
- az = (self.viewer_flags['rotate_rate'] /
- self.viewer_flags['refresh_rate'])
- self._trackball.rotate(az, self.viewer_flags['rotate_axis'])
-
- def _render(self):
- """Render the scene into the framebuffer and flip.
- """
- scene = self.scene
- self._camera_node.matrix = self._trackball.pose.copy()
-
- # Set lighting
- vli = self.viewer_flags['lighting_intensity']
- if self.viewer_flags['use_raymond_lighting']:
- for n in self._raymond_lights:
- n.light.intensity = vli / 3.0
- if not self.scene.has_node(n):
- scene.add_node(n, parent_node=self._camera_node)
- else:
- self._direct_light.light.intensity = vli
- for n in self._raymond_lights:
- if self.scene.has_node(n):
- self.scene.remove_node(n)
-
- if self.viewer_flags['use_direct_lighting']:
- if not self.scene.has_node(self._direct_light):
- scene.add_node(
- self._direct_light, parent_node=self._camera_node
- )
- elif self.scene.has_node(self._direct_light):
- self.scene.remove_node(self._direct_light)
-
- flags = RenderFlags.NONE
- if self.render_flags['flip_wireframe']:
- flags |= RenderFlags.FLIP_WIREFRAME
- elif self.render_flags['all_wireframe']:
- flags |= RenderFlags.ALL_WIREFRAME
- elif self.render_flags['all_solid']:
- flags |= RenderFlags.ALL_SOLID
-
- if self.render_flags['shadows']:
- flags |= RenderFlags.SHADOWS_DIRECTIONAL | RenderFlags.SHADOWS_SPOT
- if self.render_flags['vertex_normals']:
- flags |= RenderFlags.VERTEX_NORMALS
- if self.render_flags['face_normals']:
- flags |= RenderFlags.FACE_NORMALS
- if not self.render_flags['cull_faces']:
- flags |= RenderFlags.SKIP_CULL_FACES
-
- self._renderer.render(self.scene, flags)
-
- def _init_and_start_app(self):
- # Try multiple configs starting with target OpenGL version
- # and multisampling and removing these options if exception
- # Note: multisampling not available on all hardware
- from pyglet.gl import Config
- confs = [Config(sample_buffers=1, samples=4,
- depth_size=24,
- double_buffer=True,
- major_version=TARGET_OPEN_GL_MAJOR,
- minor_version=TARGET_OPEN_GL_MINOR),
- Config(depth_size=24,
- double_buffer=True,
- major_version=TARGET_OPEN_GL_MAJOR,
- minor_version=TARGET_OPEN_GL_MINOR),
- Config(sample_buffers=1, samples=4,
- depth_size=24,
- double_buffer=True,
- major_version=MIN_OPEN_GL_MAJOR,
- minor_version=MIN_OPEN_GL_MINOR),
- Config(depth_size=24,
- double_buffer=True,
- major_version=MIN_OPEN_GL_MAJOR,
- minor_version=MIN_OPEN_GL_MINOR)]
- for conf in confs:
- try:
- super(Viewer, self).__init__(config=conf, resizable=True,
- width=self._viewport_size[0],
- height=self._viewport_size[1])
- break
- except pyglet.window.NoSuchConfigException:
- pass
-
- if not self.context:
- raise ValueError('Unable to initialize an OpenGL 3+ context')
- clock.schedule_interval(
- Viewer._time_event, 1.0 / self.viewer_flags['refresh_rate'], self
- )
- self.switch_to()
- self.set_caption(self.viewer_flags['window_title'])
- pyglet.app.run()
-
- def _compute_initial_camera_pose(self):
- centroid = self.scene.centroid
- if self.viewer_flags['view_center'] is not None:
- centroid = self.viewer_flags['view_center']
- scale = self.scene.scale
- if scale == 0.0:
- scale = DEFAULT_SCENE_SCALE
-
- s2 = 1.0 / np.sqrt(2.0)
- cp = np.eye(4)
- cp[:3,:3] = np.array([
- [0.0, -s2, s2],
- [1.0, 0.0, 0.0],
- [0.0, s2, s2]
- ])
- hfov = np.pi / 6.0
- dist = scale / (2.0 * np.tan(hfov))
- cp[:3,3] = dist * np.array([1.0, 0.0, 1.0]) + centroid
-
- return cp
-
- def _create_raymond_lights(self):
- thetas = np.pi * np.array([1.0 / 6.0, 1.0 / 6.0, 1.0 / 6.0])
- phis = np.pi * np.array([0.0, 2.0 / 3.0, 4.0 / 3.0])
-
- nodes = []
-
- for phi, theta in zip(phis, thetas):
- xp = np.sin(theta) * np.cos(phi)
- yp = np.sin(theta) * np.sin(phi)
- zp = np.cos(theta)
-
- z = np.array([xp, yp, zp])
- z = z / np.linalg.norm(z)
- x = np.array([-z[1], z[0], 0.0])
- if np.linalg.norm(x) == 0:
- x = np.array([1.0, 0.0, 0.0])
- x = x / np.linalg.norm(x)
- y = np.cross(z, x)
-
- matrix = np.eye(4)
- matrix[:3,:3] = np.c_[x,y,z]
- nodes.append(Node(
- light=DirectionalLight(color=np.ones(3), intensity=1.0),
- matrix=matrix
- ))
-
- return nodes
-
- def _create_direct_light(self):
- light = DirectionalLight(color=np.ones(3), intensity=1.0)
- n = Node(light=light, matrix=np.eye(4))
- return n
-
- def _set_axes(self, world, mesh):
- scale = self.scene.scale
- if world:
- if 'scene' not in self._axes:
- n = Node(mesh=self._axis_mesh, scale=np.ones(3) * scale * 0.3)
- self.scene.add_node(n)
- self._axes['scene'] = n
- else:
- if 'scene' in self._axes:
- self.scene.remove_node(self._axes['scene'])
- self._axes.pop('scene')
-
- if mesh:
- old_nodes = []
- existing_axes = set([self._axes[k] for k in self._axes])
- for node in self.scene.mesh_nodes:
- if node not in existing_axes:
- old_nodes.append(node)
-
- for node in old_nodes:
- if node in self._axes:
- continue
- n = Node(
- mesh=self._axis_mesh,
- scale=np.ones(3) * node.mesh.scale * 0.5
- )
- self.scene.add_node(n, parent_node=node)
- self._axes[node] = n
- else:
- to_remove = set()
- for main_node in self._axes:
- if main_node in self.scene.mesh_nodes:
- self.scene.remove_node(self._axes[main_node])
- to_remove.add(main_node)
- for main_node in to_remove:
- self._axes.pop(main_node)
-
- def _remove_axes(self):
- for main_node in self._axes:
- axis_node = self._axes[main_node]
- self.scene.remove_node(axis_node)
- self._axes = {}
-
- def _location_to_x_y(self, location):
- if location == TextAlign.CENTER:
- return (self.viewport_size[0] / 2.0, self.viewport_size[1] / 2.0)
- elif location == TextAlign.CENTER_LEFT:
- return (TEXT_PADDING, self.viewport_size[1] / 2.0)
- elif location == TextAlign.CENTER_RIGHT:
- return (self.viewport_size[0] - TEXT_PADDING,
- self.viewport_size[1] / 2.0)
- elif location == TextAlign.BOTTOM_LEFT:
- return (TEXT_PADDING, TEXT_PADDING)
- elif location == TextAlign.BOTTOM_RIGHT:
- return (self.viewport_size[0] - TEXT_PADDING, TEXT_PADDING)
- elif location == TextAlign.BOTTOM_CENTER:
- return (self.viewport_size[0] / 2.0, TEXT_PADDING)
- elif location == TextAlign.TOP_LEFT:
- return (TEXT_PADDING, self.viewport_size[1] - TEXT_PADDING)
- elif location == TextAlign.TOP_RIGHT:
- return (self.viewport_size[0] - TEXT_PADDING,
- self.viewport_size[1] - TEXT_PADDING)
- elif location == TextAlign.TOP_CENTER:
- return (self.viewport_size[0] / 2.0,
- self.viewport_size[1] - TEXT_PADDING)
-
-
-__all__ = ['Viewer']
diff --git a/spaces/AIGC-Audio/AudioGPT/text_to_speech/modules/vocoder/hifigan/stft_loss.py b/spaces/AIGC-Audio/AudioGPT/text_to_speech/modules/vocoder/hifigan/stft_loss.py
deleted file mode 100644
index e47447455341e5725d6f82ded66dc08b5d2b1cc5..0000000000000000000000000000000000000000
--- a/spaces/AIGC-Audio/AudioGPT/text_to_speech/modules/vocoder/hifigan/stft_loss.py
+++ /dev/null
@@ -1,136 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright 2019 Tomoki Hayashi
-# MIT License (https://opensource.org/licenses/MIT)
-
-"""STFT-based Loss modules."""
-
-import torch
-import torch.nn.functional as F
-
-
-def stft(x, fft_size, hop_size, win_length, window):
- """Perform STFT and convert to magnitude spectrogram.
- Args:
- x (Tensor): Input signal tensor (B, T).
- fft_size (int): FFT size.
- hop_size (int): Hop size.
- win_length (int): Window length.
- window (str): Window function type.
- Returns:
- Tensor: Magnitude spectrogram (B, #frames, fft_size // 2 + 1).
- """
- x_stft = torch.stft(x, fft_size, hop_size, win_length, window)
- real = x_stft[..., 0]
- imag = x_stft[..., 1]
-
- # NOTE(kan-bayashi): clamp is needed to avoid nan or inf
- return torch.sqrt(torch.clamp(real ** 2 + imag ** 2, min=1e-7)).transpose(2, 1)
-
-
-class SpectralConvergengeLoss(torch.nn.Module):
- """Spectral convergence loss module."""
-
- def __init__(self):
- """Initilize spectral convergence loss module."""
- super(SpectralConvergengeLoss, self).__init__()
-
- def forward(self, x_mag, y_mag):
- """Calculate forward propagation.
- Args:
- x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
- y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).
- Returns:
- Tensor: Spectral convergence loss value.
- """
- return torch.norm(y_mag - x_mag, p="fro") / torch.norm(y_mag, p="fro")
-
-
-class LogSTFTMagnitudeLoss(torch.nn.Module):
- """Log STFT magnitude loss module."""
-
- def __init__(self):
- """Initilize los STFT magnitude loss module."""
- super(LogSTFTMagnitudeLoss, self).__init__()
-
- def forward(self, x_mag, y_mag):
- """Calculate forward propagation.
- Args:
- x_mag (Tensor): Magnitude spectrogram of predicted signal (B, #frames, #freq_bins).
- y_mag (Tensor): Magnitude spectrogram of groundtruth signal (B, #frames, #freq_bins).
- Returns:
- Tensor: Log STFT magnitude loss value.
- """
- return F.l1_loss(torch.log(y_mag), torch.log(x_mag))
-
-
-class STFTLoss(torch.nn.Module):
- """STFT loss module."""
-
- def __init__(self, fft_size=1024, shift_size=120, win_length=600, window="hann_window"):
- """Initialize STFT loss module."""
- super(STFTLoss, self).__init__()
- self.fft_size = fft_size
- self.shift_size = shift_size
- self.win_length = win_length
- self.window = getattr(torch, window)(win_length)
- self.spectral_convergenge_loss = SpectralConvergengeLoss()
- self.log_stft_magnitude_loss = LogSTFTMagnitudeLoss()
-
- def forward(self, x, y):
- """Calculate forward propagation.
- Args:
- x (Tensor): Predicted signal (B, T).
- y (Tensor): Groundtruth signal (B, T).
- Returns:
- Tensor: Spectral convergence loss value.
- Tensor: Log STFT magnitude loss value.
- """
- x_mag = stft(x, self.fft_size, self.shift_size, self.win_length, self.window.to(x.get_device()))
- y_mag = stft(y, self.fft_size, self.shift_size, self.win_length, self.window.to(x.get_device()))
- sc_loss = self.spectral_convergenge_loss(x_mag, y_mag)
- mag_loss = self.log_stft_magnitude_loss(x_mag, y_mag)
-
- return sc_loss, mag_loss
-
-
-class MultiResolutionSTFTLoss(torch.nn.Module):
- """Multi resolution STFT loss module."""
-
- def __init__(self,
- fft_sizes=[1024, 2048, 512],
- hop_sizes=[120, 240, 50],
- win_lengths=[600, 1200, 240],
- window="hann_window"):
- """Initialize Multi resolution STFT loss module.
- Args:
- fft_sizes (list): List of FFT sizes.
- hop_sizes (list): List of hop sizes.
- win_lengths (list): List of window lengths.
- window (str): Window function type.
- """
- super(MultiResolutionSTFTLoss, self).__init__()
- assert len(fft_sizes) == len(hop_sizes) == len(win_lengths)
- self.stft_losses = torch.nn.ModuleList()
- for fs, ss, wl in zip(fft_sizes, hop_sizes, win_lengths):
- self.stft_losses += [STFTLoss(fs, ss, wl, window)]
-
- def forward(self, x, y):
- """Calculate forward propagation.
- Args:
- x (Tensor): Predicted signal (B, T).
- y (Tensor): Groundtruth signal (B, T).
- Returns:
- Tensor: Multi resolution spectral convergence loss value.
- Tensor: Multi resolution log STFT magnitude loss value.
- """
- sc_loss = 0.0
- mag_loss = 0.0
- for f in self.stft_losses:
- sc_l, mag_l = f(x, y)
- sc_loss += sc_l
- mag_loss += mag_l
- sc_loss /= len(self.stft_losses)
- mag_loss /= len(self.stft_losses)
-
- return sc_loss, mag_loss
\ No newline at end of file
diff --git a/spaces/AIWaves/Debate/src/agents/__init__.py b/spaces/AIWaves/Debate/src/agents/__init__.py
deleted file mode 100644
index 69b468b54240b0a357eac1ba7573971cf65b412c..0000000000000000000000000000000000000000
--- a/spaces/AIWaves/Debate/src/agents/__init__.py
+++ /dev/null
@@ -1,4 +0,0 @@
-from .evolve import *
-from .SOP import *
-from .State import *
-from .utils import *
\ No newline at end of file
diff --git a/spaces/Abhaykoul/HelpingAI-t2/README.md b/spaces/Abhaykoul/HelpingAI-t2/README.md
deleted file mode 100644
index 1f10f08cb9cbceae47bae18ecbd2887d92104033..0000000000000000000000000000000000000000
--- a/spaces/Abhaykoul/HelpingAI-t2/README.md
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: HelpingAI T2
-emoji: ⚡
-colorFrom: green
-colorTo: blue
-sdk: gradio
-sdk_version: 3.50.2
-app_file: app.py
-pinned: false
----
-
-Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
diff --git a/spaces/AchyuthGamer/OpenGPT/g4f/Provider/helper.py b/spaces/AchyuthGamer/OpenGPT/g4f/Provider/helper.py
deleted file mode 100644
index 5a9a93293ae3fb3ff11c8dcbd6fa2c68bd2f3bb7..0000000000000000000000000000000000000000
--- a/spaces/AchyuthGamer/OpenGPT/g4f/Provider/helper.py
+++ /dev/null
@@ -1,77 +0,0 @@
-from __future__ import annotations
-
-import asyncio
-import sys
-from asyncio import AbstractEventLoop
-from os import path
-from typing import Dict, List
-import browser_cookie3
-
-# Change event loop policy on windows
-if sys.platform == 'win32':
- if isinstance(
- asyncio.get_event_loop_policy(), asyncio.WindowsProactorEventLoopPolicy
- ):
- asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
-
-# Local Cookie Storage
-_cookies: Dict[str, Dict[str, str]] = {}
-
-# If event loop is already running, handle nested event loops
-# If "nest_asyncio" is installed, patch the event loop.
-def get_event_loop() -> AbstractEventLoop:
- try:
- asyncio.get_running_loop()
- except RuntimeError:
- try:
- return asyncio.get_event_loop()
- except RuntimeError:
- asyncio.set_event_loop(asyncio.new_event_loop())
- return asyncio.get_event_loop()
- try:
- event_loop = asyncio.get_event_loop()
- if not hasattr(event_loop.__class__, "_nest_patched"):
- import nest_asyncio
- nest_asyncio.apply(event_loop)
- return event_loop
- except ImportError:
- raise RuntimeError(
- 'Use "create_async" instead of "create" function in a running event loop. Or install the "nest_asyncio" package.'
- )
-
-
-# Load cookies for a domain from all supported browsers.
-# Cache the results in the "_cookies" variable.
-def get_cookies(cookie_domain: str) -> Dict[str, str]:
- if cookie_domain not in _cookies:
- _cookies[cookie_domain] = {}
- try:
- for cookie in browser_cookie3.load(cookie_domain):
- _cookies[cookie_domain][cookie.name] = cookie.value
- except:
- pass
- return _cookies[cookie_domain]
-
-
-def format_prompt(messages: List[Dict[str, str]], add_special_tokens=False) -> str:
- if add_special_tokens or len(messages) > 1:
- formatted = "\n".join(
- [
- "%s: %s" % ((message["role"]).capitalize(), message["content"])
- for message in messages
- ]
- )
- return f"{formatted}\nAssistant:"
- else:
- return messages[0]["content"]
-
-
-def get_browser(user_data_dir: str = None):
- from undetected_chromedriver import Chrome
- from platformdirs import user_config_dir
-
- if not user_data_dir:
- user_data_dir = user_config_dir("g4f")
- user_data_dir = path.join(user_data_dir, "Default")
-
- return Chrome(user_data_dir=user_data_dir)
\ No newline at end of file
diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/rotate-plugin.d.ts b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/rotate-plugin.d.ts
deleted file mode 100644
index 609db44d262e411679d95ad1db5aa29db93ef05d..0000000000000000000000000000000000000000
--- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/plugins/rotate-plugin.d.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import Rotate from './rotate';
-
-export default class RotatePlugin extends Phaser.Plugins.BasePlugin {
- add(
- gameObject: Phaser.GameObjects.GameObject,
- config?: Rotate.IConfig
- ): Rotate;
-
-}
\ No newline at end of file
diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/bejeweled/Bejeweled.js b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/bejeweled/Bejeweled.js
deleted file mode 100644
index 84758f7f7909b7d70c4c655d0379ae413df511c4..0000000000000000000000000000000000000000
--- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/bejeweled/Bejeweled.js
+++ /dev/null
@@ -1,82 +0,0 @@
-import ComponentBase from '../../plugins/utils/componentbase/ComponentBase.js';
-import MainState from './states/MainState.js';
-import Board from './board/Board.js';
-import Input from './input/Input.js';
-import WaitEvents from '../../plugins/waitevents.js';
-import InputMethods from './methods/InputMethods.js';
-import BoardMethods from './methods/BoardMethods.js';
-import WaitEventMethods from './methods/WaitEventMethods.js';
-import DataManagerMethods from '../../plugins/utils/data/DataManagerMethods.js';
-
-
-const GetValue = Phaser.Utils.Objects.GetValue;
-
-class Bejeweled extends ComponentBase {
- constructor(scene, config) {
- super(scene, config);
- // this.scene
-
- var rexBoardKey = GetValue(config, 'rexBoard', 'rexBoard');
- this.rexBoard = scene[rexBoardKey];
-
- this.board = new Board(this, config);
-
- var defaultInput = GetValue(config, 'input', true);
- if (defaultInput) {
- this.input = new Input(this, config);
- } else {
- this.input = undefined;
- }
-
- this.waitEvents = new WaitEvents();
-
- this.mainState = new MainState(this, config);
-
- this.boot();
- }
-
- boot() {
- this.scene.events.once('shutdown', this.destroy, this);
- }
-
- shutdown(fromScene) {
- super.shutdown(fromScene);
-
- if (this.input) {
- this.input.destroy();
- }
- this.board.destroy();
- this.mainState.destroy();
- this.waitEvents.destroy();
-
- this.destroyDataManager();
-
- this.board = undefined;
- this.mainState = undefined;
- this.input = undefined;
- this.waitEvents = undefined;
-
- return this;
- }
-
- destroy(fromScene) {
- this.emit('destroy');
- super.destroy(fromScene);
- return this;
- }
-
- start() {
- this.mainState.goto('START');
- return this;
- }
-}
-
-Object.assign(
- Bejeweled.prototype,
- InputMethods,
- BoardMethods,
- WaitEventMethods,
- DataManagerMethods
-);
-
-export default Bejeweled;
\ No newline at end of file
diff --git a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/inputtext/InputText.d.ts b/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/inputtext/InputText.d.ts
deleted file mode 100644
index 0312cf859572c6636998ad00a7a48a04d6505bb3..0000000000000000000000000000000000000000
--- a/spaces/AgentVerse/agentVerse/ui/src/phaser3-rex-plugins/templates/ui/inputtext/InputText.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import InputText from '../../../plugins/inputtext';
-export default InputText;
\ No newline at end of file
diff --git a/spaces/AkitoP/umamusume_bert_vits2/text/symbols.py b/spaces/AkitoP/umamusume_bert_vits2/text/symbols.py
deleted file mode 100644
index 6151147fd5c61037d5c11797bb2f585694c598a6..0000000000000000000000000000000000000000
--- a/spaces/AkitoP/umamusume_bert_vits2/text/symbols.py
+++ /dev/null
@@ -1,188 +0,0 @@
-punctuation = ["!", "?", "…", ",", ".", "'", "-"]
-pu_symbols = punctuation + ["SP", "UNK"]
-pad = "_"
-
-# chinese
-zh_symbols = [
- "E",
- "En",
- "a",
- "ai",
- "an",
- "ang",
- "ao",
- "b",
- "c",
- "ch",
- "d",
- "e",
- "ei",
- "en",
- "eng",
- "er",
- "f",
- "g",
- "h",
- "i",
- "i0",
- "ia",
- "ian",
- "iang",
- "iao",
- "ie",
- "in",
- "ing",
- "iong",
- "ir",
- "iu",
- "j",
- "k",
- "l",
- "m",
- "n",
- "o",
- "ong",
- "ou",
- "p",
- "q",
- "r",
- "s",
- "sh",
- "t",
- "u",
- "ua",
- "uai",
- "uan",
- "uang",
- "ui",
- "un",
- "uo",
- "v",
- "van",
- "ve",
- "vn",
- "w",
- "x",
- "y",
- "z",
- "zh",
- "AA",
- "EE",
- "OO",
-]
-num_zh_tones = 6
-
-# japanese
-ja_symbols = [
- "N",
- "a",
- "a:",
- "b",
- "by",
- "ch",
- "d",
- "dy",
- "e",
- "e:",
- "f",
- "g",
- "gy",
- "h",
- "hy",
- "i",
- "i:",
- "j",
- "k",
- "ky",
- "m",
- "my",
- "n",
- "ny",
- "o",
- "o:",
- "p",
- "py",
- "q",
- "r",
- "ry",
- "s",
- "sh",
- "t",
- "ts",
- "ty",
- "u",
- "u:",
- "w",
- "y",
- "z",
- "zy",
- # ":"
-]
-num_ja_tones = 1
-
-# English
-en_symbols = [
- "aa",
- "ae",
- "ah",
- "ao",
- "aw",
- "ay",
- "b",
- "ch",
- "d",
- "dh",
- "eh",
- "er",
- "ey",
- "f",
- "g",
- "hh",
- "ih",
- "iy",
- "jh",
- "k",
- "l",
- "m",
- "n",
- "ng",
- "ow",
- "oy",
- "p",
- "r",
- "s",
- "sh",
- "t",
- "th",
- "uh",
- "uw",
- "V",
- "w",
- "y",
- "z",
- "zh",
-]
-num_en_tones = 4
-
-# combine all symbols
-normal_symbols = sorted(set(zh_symbols + ja_symbols + en_symbols))
-symbols = [pad] + normal_symbols + pu_symbols
-sil_phonemes_ids = [symbols.index(i) for i in pu_symbols]
-
-# combine all tones
-num_tones = num_zh_tones + num_ja_tones + num_en_tones
-
-# language maps
-language_id_map = {"ZH": 0, "JP": 1, "EN": 2}
-num_languages = len(language_id_map.keys())
-
-language_tone_start_map = {
- "ZH": 0,
- "JP": num_zh_tones,
- "EN": num_zh_tones + num_ja_tones,
-}
-
-if __name__ == "__main__":
- a = set(zh_symbols)
- b = set(en_symbols)
- print(sorted(a & b))
diff --git a/spaces/Akmyradov/TurkmenTTSweSTT/uroman/lib/NLP/UTF8.pm b/spaces/Akmyradov/TurkmenTTSweSTT/uroman/lib/NLP/UTF8.pm
deleted file mode 100644
index b28cb4dede3b84f45aeade2e24f240e3a39e7cc1..0000000000000000000000000000000000000000
--- a/spaces/Akmyradov/TurkmenTTSweSTT/uroman/lib/NLP/UTF8.pm
+++ /dev/null
@@ -1,1404 +0,0 @@
-################################################################
-# #
-# UTF8 #
-# #
-################################################################
-
-package NLP::UTF8;
-
-use NLP::utilities;
-$util = NLP::utilities;
-
-%empty_ht = ();
-
-sub new {
- local($caller) = @_;
-
- my $object = {};
- my $class = ref( $caller ) || $caller;
- bless($object, $class);
- return $object;
-}
-
-sub unicode_string2string {
-# input: string that might contain unicode sequences such as "U+0627"
-# output: string in pure utf-8
- local($caller,$s) = @_;
-
- my $pre;
- my $unicode;
- my $post;
- my $r1;
- my $r2;
- my $r3;
-
- ($pre,$unicode,$post) = ($s =~ /^(.*)(?:U\+|\\u)([0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])(.*)$/);
- return $s unless defined($post);
- $r1 = $caller->unicode_string2string($pre);
- $r2 = $caller->unicode_hex_string2string($unicode);
- $r3 = $caller->unicode_string2string($post);
- $result = $r1 . $r2 . $r3;
- return $result;
-}
-
-sub unicode_hex_string2string {
-# input: "0627" (interpreted as hex code)
-# output: utf-8 string for Arabic letter alef
- local($caller,$unicode) = @_;
- return "" unless defined($unicode);
- my $d = hex($unicode);
- return $caller->unicode2string($d);
-}
-
-sub unicode2string {
-# input: non-neg integer, e.g. 0x627
-# output: utf-8 string for Arabic letter alef
- local($caller,$d) = @_;
- return "" unless defined($d) && $d >= 0;
- return sprintf("%c",$d) if $d <= 0x7F;
-
- my $lastbyte1 = ($d & 0x3F) | 0x80;
- $d >>= 6;
- return sprintf("%c%c",$d | 0xC0, $lastbyte1) if $d <= 0x1F;
-
- my $lastbyte2 = ($d & 0x3F) | 0x80;
- $d >>= 6;
- return sprintf("%c%c%c",$d | 0xE0, $lastbyte2, $lastbyte1) if $d <= 0xF;
-
- my $lastbyte3 = ($d & 0x3F) | 0x80;
- $d >>= 6;
- return sprintf("%c%c%c%c",$d | 0xF0, $lastbyte3, $lastbyte2, $lastbyte1) if $d <= 0x7;
-
- my $lastbyte4 = ($d & 0x3F) | 0x80;
- $d >>= 6;
- return sprintf("%c%c%c%c%c",$d | 0xF8, $lastbyte4, $lastbyte3, $lastbyte2, $lastbyte1) if $d <= 0x3;
-
- my $lastbyte5 = ($d & 0x3F) | 0x80;
- $d >>= 6;
- return sprintf("%c%c%c%c%c%c",$d | 0xFC, $lastbyte5, $lastbyte4, $lastbyte3, $lastbyte2, $lastbyte1) if $d <= 0x1;
- return ""; # bad input
-}
-
-sub html2utf8 {
- local($caller, $string) = @_;
-
- return $string unless $string =~ /\&\#\d{3,5};/;
-
- my $prev = "";
- my $s = $string;
- while ($s ne $prev) {
- $prev = $s;
- ($pre,$d,$post) = ($s =~ /^(.*)\&\#(\d+);(.*)$/);
- if (defined($d) && ((($d >= 160) && ($d <= 255))
- || (($d >= 1500) && ($d <= 1699))
- || (($d >= 19968) && ($d <= 40879)))) {
- $html_code = "\&\#" . $d . ";";
- $utf8_code = $caller->unicode2string($d);
- $s =~ s/$html_code/$utf8_code/;
- }
- }
- return $s;
-}
-
-sub xhtml2utf8 {
- local($caller, $string) = @_;
-
- return $string unless $string =~ /\&\#x[0-9a-fA-F]{2,5};/;
-
- my $prev = "";
- my $s = $string;
- while ($s ne $prev) {
- $prev = $s;
- if (($pre, $html_code, $x, $post) = ($s =~ /^(.*)(\&\#x([0-9a-fA-F]{2,5});)(.*)$/)) {
- $utf8_code = $caller->unicode_hex_string2string($x);
- $s =~ s/$html_code/$utf8_code/;
- }
- }
- return $s;
-}
-
-sub utf8_marker {
- return sprintf("%c%c%c\n", 0xEF, 0xBB, 0xBF);
-}
-
-sub enforcer {
-# input: string that might not conform to utf-8
-# output: string in pure utf-8, with a few "smart replacements" and possibly "?"
- local($caller,$s,$no_repair) = @_;
-
- my $ascii;
- my $utf8;
- my $rest;
-
- return $s if $s =~ /^[\x00-\x7F]*$/;
-
- $no_repair = 0 unless defined($no_repair);
- $orig = $s;
- $result = "";
-
- while ($s ne "") {
- ($ascii,$rest) = ($s =~ /^([\x00-\x7F]+)(.*)$/);
- if (defined($ascii)) {
- $result .= $ascii;
- $s = $rest;
- next;
- }
- ($utf8,$rest) = ($s =~ /^([\xC0-\xDF][\x80-\xBF])(.*)$/);
- ($utf8,$rest) = ($s =~ /^([\xE0-\xEF][\x80-\xBF][\x80-\xBF])(.*)$/)
- unless defined($rest);
- ($utf8,$rest) = ($s =~ /^([\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])(.*)$/)
- unless defined($rest);
- ($utf8,$rest) = ($s =~ /^([\xF8-\xFB][\x80-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF])(.*)$/)
- unless defined($rest);
- if (defined($utf8)) {
- $result .= $utf8;
- $s = $rest;
- next;
- }
- ($c,$rest) = ($s =~ /^(.)(.*)$/);
- if (defined($c)) {
- if ($no_repair) { $result .= "?"; }
- elsif ($c =~ /\x85/) { $result .= "..."; }
- elsif ($c =~ /\x91/) { $result .= "'"; }
- elsif ($c =~ /\x92/) { $result .= "'"; }
- elsif ($c =~ /\x93/) { $result .= $caller->unicode2string(0x201C); }
- elsif ($c =~ /\x94/) { $result .= $caller->unicode2string(0x201D); }
- elsif ($c =~ /[\xC0-\xFF]/) {
- $c2 = $c;
- $c2 =~ tr/[\xC0-\xFF]/[\x80-\xBF]/;
- $result .= "\xC3$c2";
- } else {
- $result .= "?";
- }
- $s = $rest;
- next;
- }
- $s = "";
- }
- $result .= "\n" if ($orig =~ /\n$/) && ! ($result =~ /\n$/);
- return $result;
-}
-
-sub split_into_utf8_characters {
-# input: utf8 string
-# output: list of sub-strings, each representing a utf8 character
- local($caller,$string,$group_control, *ht) = @_;
-
- @characters = ();
- $end_of_token_p_string = "";
- $skipped_bytes = "";
- $group_control = "" unless defined($group_control);
- $group_ascii_numbers = ($group_control =~ /ASCII numbers/);
- $group_ascii_spaces = ($group_control =~ /ASCII spaces/);
- $group_ascii_punct = ($group_control =~ /ASCII punct/);
- $group_ascii_chars = ($group_control =~ /ASCII chars/);
- $group_xml_chars = ($group_control =~ /XML chars/);
- $group_xml_tags = ($group_control =~ /XML tags/);
- $return_only_chars = ($group_control =~ /return only chars/);
- $return_trailing_whitespaces = ($group_control =~ /return trailing whitespaces/);
- if ($group_control =~ /ASCII all/) {
- $group_ascii_numbers = 1;
- $group_ascii_spaces = 1;
- $group_ascii_chars = 1;
- $group_ascii_punct = 1;
- }
- if ($group_control =~ /(XML chars and tags|XML tags and chars)/) {
- $group_xml_chars = 1;
- $group_xml_tags = 1;
- }
- $orig_string = $string;
- $string .= " ";
- while ($string =~ /\S/) {
- # one-character UTF-8 = ASCII
- if ($string =~ /^[\x00-\x7F]/) {
- if ($group_xml_chars
- && (($dec_unicode, $rest) = ($string =~ /^(\d+);(.*)$/s))
- && ($utf8_char = $caller->unicode2string($dec_unicode))) {
- push(@characters, $utf8_char);
- $string = $rest;
- } elsif ($group_xml_chars
- && (($hex_unicode, $rest) = ($string =~ /^([0-9a-f]{1,6});(.*)$/is))
- && ($utf8_char = $caller->unicode_hex_string2string($hex_unicode))) {
- push(@characters, $utf8_char);
- $string = $rest;
- } elsif ($group_xml_chars
- && (($html_entity_name, $rest) = ($string =~ /^&([a-z]{1,6});(.*)$/is))
- && ($dec_unicode = $ht{HTML_ENTITY_NAME_TO_DECUNICODE}->{$html_entity_name})
- && ($utf8_char = $caller->unicode2string($dec_unicode))
- ) {
- push(@characters, $utf8_char);
- $string = $rest;
- } elsif ($group_xml_tags
- && (($tag, $rest) = ($string =~ /^(<\/?[a-zA-Z][-_:a-zA-Z0-9]*(\s+[a-zA-Z][-_:a-zA-Z0-9]*=\"[^"]*\")*\s*\/?>)(.*)$/s))) {
- push(@characters, $tag);
- $string = $rest;
- } elsif ($group_ascii_numbers && ($string =~ /^[12]\d\d\d\.[01]?\d.[0-3]?\d([^0-9].*)?$/)) {
- ($date) = ($string =~ /^(\d\d\d\d\.\d?\d.\d?\d)([^0-9].*)?$/);
- push(@characters,$date);
- $string = substr($string, length($date));
- } elsif ($group_ascii_numbers && ($string =~ /^\d/)) {
- ($number) = ($string =~ /^(\d+(,\d\d\d)*(\.\d+)?)/);
- push(@characters,$number);
- $string = substr($string, length($number));
- } elsif ($group_ascii_spaces && ($string =~ /^(\s+)/)) {
- ($space) = ($string =~ /^(\s+)/);
- $string = substr($string, length($space));
- } elsif ($group_ascii_punct && (($punct_seq) = ($string =~ /^(-+|\.+|[:,%()"])/))) {
- push(@characters,$punct_seq);
- $string = substr($string, length($punct_seq));
- } elsif ($group_ascii_chars && (($word) = ($string =~ /^(\$[A-Z]*|[A-Z]{1,3}\$)/))) {
- push(@characters,$word);
- $string = substr($string, length($word));
- } elsif ($group_ascii_chars && (($abbrev) = ($string =~ /^((?:Jan|Feb|Febr|Mar|Apr|Jun|Jul|Aug|Sep|Sept|Oct|Nov|Dec|Mr|Mrs|Dr|a.m|p.m)\.)/))) {
- push(@characters,$abbrev);
- $string = substr($string, length($abbrev));
- } elsif ($group_ascii_chars && (($word) = ($string =~ /^(second|minute|hour|day|week|month|year|inch|foot|yard|meter|kilometer|mile)-(?:long|old)/i))) {
- push(@characters,$word);
- $string = substr($string, length($word));
- } elsif ($group_ascii_chars && (($word) = ($string =~ /^(zero|one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen|twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|hundred|thousand|million|billion|trillion)-/i))) {
- push(@characters,$word);
- $string = substr($string, length($word));
- } elsif ($group_ascii_chars && (($word) = ($string =~ /^([a-zA-Z]+)(?:[ ,;%?|()"]|'s |' |\. |\d+[:hms][0-9 ])/))) {
- push(@characters,$word);
- $string = substr($string, length($word));
- } elsif ($group_ascii_chars && ($string =~ /^([\x21-\x27\x2A-\x7E]+)/)) { # exclude ()
- ($ascii) = ($string =~ /^([\x21-\x27\x2A-\x7E]+)/); # ASCII black-characters
- push(@characters,$ascii);
- $string = substr($string, length($ascii));
- } elsif ($group_ascii_chars && ($string =~ /^([\x21-\x7E]+)/)) {
- ($ascii) = ($string =~ /^([\x21-\x7E]+)/); # ASCII black-characters
- push(@characters,$ascii);
- $string = substr($string, length($ascii));
- } elsif ($group_ascii_chars && ($string =~ /^([\x00-\x7F]+)/)) {
- ($ascii) = ($string =~ /^([\x00-\x7F]+)/);
- push(@characters,$ascii);
- $string = substr($string, length($ascii));
- } else {
- push(@characters,substr($string, 0, 1));
- $string = substr($string, 1);
- }
-
- # two-character UTF-8
- } elsif ($string =~ /^[\xC0-\xDF][\x80-\xBF]/) {
- push(@characters,substr($string, 0, 2));
- $string = substr($string, 2);
-
- # three-character UTF-8
- } elsif ($string =~ /^[\xE0-\xEF][\x80-\xBF][\x80-\xBF]/) {
- push(@characters,substr($string, 0, 3));
- $string = substr($string, 3);
-
- # four-character UTF-8
- } elsif ($string =~ /^[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF]/) {
- push(@characters,substr($string, 0, 4));
- $string = substr($string, 4);
-
- # five-character UTF-8
- } elsif ($string =~ /^[\xF8-\xFB][\x80-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF]/) {
- push(@characters,substr($string, 0, 5));
- $string = substr($string, 5);
-
- # six-character UTF-8
- } elsif ($string =~ /^[\xFC-\xFD][\x80-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF]/) {
- push(@characters,substr($string, 0, 6));
- $string = substr($string, 6);
-
- # not a UTF-8 character
- } else {
- $skipped_bytes .= substr($string, 0, 1);
- $string = substr($string, 1);
- }
-
- $end_of_token_p_string .= ($string =~ /^\S/) ? "0" : "1"
- if $#characters >= length($end_of_token_p_string);
- }
- $string =~ s/ $//; # remove previously added space, but keep original spaces
- if ($return_trailing_whitespaces) {
- while ($string =~ /^[ \t]/) {
- push(@characters,substr($string, 0, 1));
- $string = substr($string, 1);
- }
- push(@characters, "\n") if $orig_string =~ /\n$/;
- }
- return ($return_only_chars) ? @characters : ($skipped_bytes, $end_of_token_p_string, @characters);
-}
-
-sub max_substring_info {
- local($caller,$s1,$s2,$info_type) = @_;
-
- ($skipped_bytes1, $end_of_token_p_string1, @char_list1) = $caller->split_into_utf8_characters($s1, "", *empty_ht);
- ($skipped_bytes2, $end_of_token_p_string2, @char_list2) = $caller->split_into_utf8_characters($s2, "", *empty_ht);
- return 0 if $skipped_bytes1 || $skipped_bytes2;
-
- $best_substring_start1 = 0;
- $best_substring_start2 = 0;
- $best_substring_length = 0;
-
- foreach $start_pos2 ((0 .. $#char_list2)) {
- last if $start_pos2 + $best_substring_length > $#char_list2;
- foreach $start_pos1 ((0 .. $#char_list1)) {
- last if $start_pos1 + $best_substring_length > $#char_list1;
- $matching_length = 0;
- while (($start_pos1 + $matching_length <= $#char_list1)
- && ($start_pos2 + $matching_length <= $#char_list2)
- && ($char_list1[$start_pos1+$matching_length] eq $char_list2[$start_pos2+$matching_length])) {
- $matching_length++;
- }
- if ($matching_length > $best_substring_length) {
- $best_substring_length = $matching_length;
- $best_substring_start1 = $start_pos1;
- $best_substring_start2 = $start_pos2;
- }
- }
- }
- if ($info_type =~ /^max-ratio1$/) {
- $length1 = $#char_list1 + 1;
- return ($length1 > 0) ? ($best_substring_length / $length1) : 0;
- } elsif ($info_type =~ /^max-ratio2$/) {
- $length2 = $#char_list2 + 1;
- return ($length2 > 0) ? ($best_substring_length / $length2) : 0;
- } elsif ($info_type =~ /^substring$/) {
- return join("", @char_list1[$best_substring_start1 .. $best_substring_start1+$best_substring_length-1]);
- } else {
- $length1 = $#char_list1 + 1;
- $length2 = $#char_list2 + 1;
- $info = "s1=$s1;s2=$s2";
- $info .= ";best_substring_length=$best_substring_length";
- $info .= ";best_substring_start1=$best_substring_start1";
- $info .= ";best_substring_start2=$best_substring_start2";
- $info .= ";length1=$length1";
- $info .= ";length2=$length2";
- return $info;
- }
-}
-
-sub n_shared_chars_at_start {
- local($caller,$s1,$s2) = @_;
-
- my $n = 0;
- while (($s1 ne "") && ($s2 ne "")) {
- ($c1, $rest1) = ($s1 =~ /^(.[\x80-\xBF]*)(.*)$/);
- ($c2, $rest2) = ($s2 =~ /^(.[\x80-\xBF]*)(.*)$/);
- if ($c1 eq $c2) {
- $n++;
- $s1 = $rest1;
- $s2 = $rest2;
- } else {
- last;
- }
- }
- return $n;
-}
-
-sub char_length {
- local($caller,$string,$byte_offset) = @_;
-
- my $char = ($byte_offset) ? substr($string, $byte_offset) : $string;
- return 1 if $char =~ /^[\x00-\x7F]/;
- return 2 if $char =~ /^[\xC0-\xDF]/;
- return 3 if $char =~ /^[\xE0-\xEF]/;
- return 4 if $char =~ /^[\xF0-\xF7]/;
- return 5 if $char =~ /^[\xF8-\xFB]/;
- return 6 if $char =~ /^[\xFC-\xFD]/;
- return 0;
-}
-
-sub length_in_utf8_chars {
- local($caller,$s) = @_;
-
- $s =~ s/[\x80-\xBF]//g;
- $s =~ s/[\x00-\x7F\xC0-\xFF]/c/g;
- return length($s);
-}
-
-sub byte_length_of_n_chars {
- local($caller,$char_length,$string,$byte_offset,$undef_return_value) = @_;
-
- $byte_offset = 0 unless defined($byte_offset);
- $undef_return_value = -1 unless defined($undef_return_value);
- my $result = 0;
- my $len;
- foreach $i ((1 .. $char_length)) {
- $len = $caller->char_length($string,($byte_offset+$result));
- return $undef_return_value unless $len;
- $result += $len;
- }
- return $result;
-}
-
-sub replace_non_ASCII_bytes {
- local($caller,$string,$replacement) = @_;
-
- $replacement = "HEX" unless defined($replacement);
- if ($replacement =~ /^(Unicode|U\+4|\\u|HEX)$/) {
- $new_string = "";
- while (($pre,$utf8_char, $post) = ($string =~ /^([\x09\x0A\x20-\x7E]*)([\x00-\x08\x0B-\x1F\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF]|[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF]|[\xF8-\xFF][\x80-\xBF]+|[\x80-\xBF])(.*)$/s)) {
- if ($replacement =~ /Unicode/) {
- $new_string .= $pre . "utf8_to_unicode($utf8_char)) . ">";
- } elsif ($replacement =~ /\\u/) {
- $new_string .= $pre . "\\u" . (uc sprintf("%04x", $caller->utf8_to_unicode($utf8_char)));
- } elsif ($replacement =~ /U\+4/) {
- $new_string .= $pre . "utf8_to_4hex_unicode($utf8_char)) . ">";
- } else {
- $new_string .= $pre . "utf8_to_hex($utf8_char) . ">";
- }
- $string = $post;
- }
- $new_string .= $string;
- } else {
- $new_string = $string;
- $new_string =~ s/[\x80-\xFF]/$replacement/g;
- }
- return $new_string;
-}
-
-sub valid_utf8_string_p {
- local($caller,$string) = @_;
-
- return $string =~ /^(?:[\x09\x0A\x20-\x7E]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF]|[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])*$/;
-}
-
-sub valid_utf8_string_incl_ascii_control_p {
- local($caller,$string) = @_;
-
- return $string =~ /^(?:[\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF]|[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF])*$/;
-}
-
-sub utf8_to_hex {
- local($caller,$s) = @_;
-
- $hex = "";
- foreach $i ((0 .. length($s)-1)) {
- $hex .= uc sprintf("%2.2x",ord(substr($s, $i, 1)));
- }
- return $hex;
-}
-
-sub hex_to_utf8 {
- local($caller,$s) = @_;
- # surface string \xE2\x80\xBA to UTF8
-
- my $utf8 = "";
- while (($hex, $rest) = ($s =~ /^(?:\\x)?([0-9A-Fa-f]{2,2})(.*)$/)) {
- $utf8 .= sprintf("%c", hex($hex));
- $s = $rest;
- }
- return $utf8;
-}
-
-sub utf8_to_4hex_unicode {
- local($caller,$s) = @_;
-
- return sprintf("%4.4x", $caller->utf8_to_unicode($s));
-}
-
-sub utf8_to_unicode {
- local($caller,$s) = @_;
-
- $unicode = 0;
- foreach $i ((0 .. length($s)-1)) {
- $c = substr($s, $i, 1);
- if ($c =~ /^[\x80-\xBF]$/) {
- $unicode = $unicode * 64 + (ord($c) & 0x3F);
- } elsif ($c =~ /^[\xC0-\xDF]$/) {
- $unicode = $unicode * 32 + (ord($c) & 0x1F);
- } elsif ($c =~ /^[\xE0-\xEF]$/) {
- $unicode = $unicode * 16 + (ord($c) & 0x0F);
- } elsif ($c =~ /^[\xF0-\xF7]$/) {
- $unicode = $unicode * 8 + (ord($c) & 0x07);
- } elsif ($c =~ /^[\xF8-\xFB]$/) {
- $unicode = $unicode * 4 + (ord($c) & 0x03);
- } elsif ($c =~ /^[\xFC-\xFD]$/) {
- $unicode = $unicode * 2 + (ord($c) & 0x01);
- }
- }
- return $unicode;
-}
-
-sub charhex {
- local($caller,$string) = @_;
-
- my $result = "";
- while ($string ne "") {
- $char = substr($string, 0, 1);
- $string = substr($string, 1);
- if ($char =~ /^[ -~]$/) {
- $result .= $char;
- } else {
- $hex = sprintf("%2.2x",ord($char));
- $hex =~ tr/a-f/A-F/;
- $result .= "";
- }
- }
- return $result;
-}
-
-sub windows1252_to_utf8 {
- local($caller,$s, $norm_to_ascii_p, $preserve_potential_utf8s_p) = @_;
-
- return $s if $s =~ /^[\x00-\x7F]*$/; # all ASCII
-
- $norm_to_ascii_p = 1 unless defined($norm_to_ascii_p);
- $preserve_potential_utf8s_p = 1 unless defined($preserve_potential_utf8s_p);
- my $result = "";
- my $c = "";
- while ($s ne "") {
- $n_bytes = 1;
- if ($s =~ /^[\x00-\x7F]/) {
- $result .= substr($s, 0, 1); # ASCII
- } elsif ($preserve_potential_utf8s_p && ($s =~ /^[\xC0-\xDF][\x80-\xBF]/)) {
- $result .= substr($s, 0, 2); # valid 2-byte UTF8
- $n_bytes = 2;
- } elsif ($preserve_potential_utf8s_p && ($s =~ /^[\xE0-\xEF][\x80-\xBF][\x80-\xBF]/)) {
- $result .= substr($s, 0, 3); # valid 3-byte UTF8
- $n_bytes = 3;
- } elsif ($preserve_potential_utf8s_p && ($s =~ /^[\xF0-\xF7][\x80-\xBF][\x80-\xBF][\x80-\xBF]/)) {
- $result .= substr($s, 0, 4); # valid 4-byte UTF8
- $n_bytes = 4;
- } elsif ($preserve_potential_utf8s_p && ($s =~ /^[\xF8-\xFB][\x80-\xBF][\x80-\xBF][\x80-\xBF][\x80-\xBF]/)) {
- $result .= substr($s, 0, 5); # valid 5-byte UTF8
- $n_bytes = 5;
- } elsif ($s =~ /^[\xA0-\xBF]/) {
- $c = substr($s, 0, 1);
- $result .= "\xC2$c";
- } elsif ($s =~ /^[\xC0-\xFF]/) {
- $c = substr($s, 0, 1);
- $c =~ tr/[\xC0-\xFF]/[\x80-\xBF]/;
- $result .= "\xC3$c";
- } elsif ($s =~ /^\x80/) {
- $result .= "\xE2\x82\xAC"; # Euro sign
- } elsif ($s =~ /^\x82/) {
- $result .= "\xE2\x80\x9A"; # single low quotation mark
- } elsif ($s =~ /^\x83/) {
- $result .= "\xC6\x92"; # Latin small letter f with hook
- } elsif ($s =~ /^\x84/) {
- $result .= "\xE2\x80\x9E"; # double low quotation mark
- } elsif ($s =~ /^\x85/) {
- $result .= ($norm_to_ascii_p) ? "..." : "\xE2\x80\xA6"; # horizontal ellipsis (three dots)
- } elsif ($s =~ /^\x86/) {
- $result .= "\xE2\x80\xA0"; # dagger
- } elsif ($s =~ /^\x87/) {
- $result .= "\xE2\x80\xA1"; # double dagger
- } elsif ($s =~ /^\x88/) {
- $result .= "\xCB\x86"; # circumflex
- } elsif ($s =~ /^\x89/) {
- $result .= "\xE2\x80\xB0"; # per mille sign
- } elsif ($s =~ /^\x8A/) {
- $result .= "\xC5\xA0"; # Latin capital letter S with caron
- } elsif ($s =~ /^\x8B/) {
- $result .= "\xE2\x80\xB9"; # single left-pointing angle quotation mark
- } elsif ($s =~ /^\x8C/) {
- $result .= "\xC5\x92"; # OE ligature
- } elsif ($s =~ /^\x8E/) {
- $result .= "\xC5\xBD"; # Latin capital letter Z with caron
- } elsif ($s =~ /^\x91/) {
- $result .= ($norm_to_ascii_p) ? "`" : "\xE2\x80\x98"; # left single quotation mark
- } elsif ($s =~ /^\x92/) {
- $result .= ($norm_to_ascii_p) ? "'" : "\xE2\x80\x99"; # right single quotation mark
- } elsif ($s =~ /^\x93/) {
- $result .= "\xE2\x80\x9C"; # left double quotation mark
- } elsif ($s =~ /^\x94/) {
- $result .= "\xE2\x80\x9D"; # right double quotation mark
- } elsif ($s =~ /^\x95/) {
- $result .= "\xE2\x80\xA2"; # bullet
- } elsif ($s =~ /^\x96/) {
- $result .= ($norm_to_ascii_p) ? "-" : "\xE2\x80\x93"; # n dash
- } elsif ($s =~ /^\x97/) {
- $result .= ($norm_to_ascii_p) ? "-" : "\xE2\x80\x94"; # m dash
- } elsif ($s =~ /^\x98/) {
- $result .= ($norm_to_ascii_p) ? "~" : "\xCB\x9C"; # small tilde
- } elsif ($s =~ /^\x99/) {
- $result .= "\xE2\x84\xA2"; # trade mark sign
- } elsif ($s =~ /^\x9A/) {
- $result .= "\xC5\xA1"; # Latin small letter s with caron
- } elsif ($s =~ /^\x9B/) {
- $result .= "\xE2\x80\xBA"; # single right-pointing angle quotation mark
- } elsif ($s =~ /^\x9C/) {
- $result .= "\xC5\x93"; # oe ligature
- } elsif ($s =~ /^\x9E/) {
- $result .= "\xC5\xBE"; # Latin small letter z with caron
- } elsif ($s =~ /^\x9F/) {
- $result .= "\xC5\xB8"; # Latin capital letter Y with diaeresis
- } else {
- $result .= "?";
- }
- $s = substr($s, $n_bytes);
- }
- return $result;
-}
-
-sub delete_weird_stuff {
- local($caller, $s) = @_;
-
- # delete control chacters (except tab and linefeed), zero-width characters, byte order mark,
- # directional marks, join marks, variation selectors, Arabic tatweel
- $s =~ s/([\x00-\x08\x0B-\x1F\x7F]|\xC2[\x80-\x9F]|\xD9\x80|\xE2\x80[\x8B-\x8F]|\xEF\xB8[\x80-\x8F]|\xEF\xBB\xBF|\xF3\xA0[\x84-\x87][\x80-\xBF])//g;
- return $s;
-}
-
-sub number_of_utf8_character {
- local($caller, $s) = @_;
-
- $s2 = $s;
- $s2 =~ s/[\x80-\xBF]//g;
- return length($s2);
-}
-
-sub cap_letter_reg_exp {
- # includes A-Z and other Latin-based capital letters with accents, umlauts and other decorations etc.
- return "[A-Z]|\xC3[\x80-\x96\x98-\x9E]|\xC4[\x80\x82\x84\x86\x88\x8A\x8C\x8E\x90\x94\x964\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8\xAA\xAC\xAE\xB0\xB2\xB4\xB6\xB9\xBB\xBD\xBF]|\xC5[\x81\x83\x85\x87\x8A\x8C\x8E\x90\x92\x96\x98\x9A\x9C\x9E\xA0\xA2\xA4\xA6\xA8\xAA\xAC\xB0\xB2\xB4\xB6\xB8\xB9\xBB\xBD]";
-}
-
-sub regex_extended_case_expansion {
- local($caller, $s) = @_;
-
- if ($s =~ /\xC3/) {
- $s =~ s/\xC3\xA0/\xC3\[\x80\xA0\]/g;
- $s =~ s/\xC3\xA1/\xC3\[\x81\xA1\]/g;
- $s =~ s/\xC3\xA2/\xC3\[\x82\xA2\]/g;
- $s =~ s/\xC3\xA3/\xC3\[\x83\xA3\]/g;
- $s =~ s/\xC3\xA4/\xC3\[\x84\xA4\]/g;
- $s =~ s/\xC3\xA5/\xC3\[\x85\xA5\]/g;
- $s =~ s/\xC3\xA6/\xC3\[\x86\xA6\]/g;
- $s =~ s/\xC3\xA7/\xC3\[\x87\xA7\]/g;
- $s =~ s/\xC3\xA8/\xC3\[\x88\xA8\]/g;
- $s =~ s/\xC3\xA9/\xC3\[\x89\xA9\]/g;
- $s =~ s/\xC3\xAA/\xC3\[\x8A\xAA\]/g;
- $s =~ s/\xC3\xAB/\xC3\[\x8B\xAB\]/g;
- $s =~ s/\xC3\xAC/\xC3\[\x8C\xAC\]/g;
- $s =~ s/\xC3\xAD/\xC3\[\x8D\xAD\]/g;
- $s =~ s/\xC3\xAE/\xC3\[\x8E\xAE\]/g;
- $s =~ s/\xC3\xAF/\xC3\[\x8F\xAF\]/g;
- $s =~ s/\xC3\xB0/\xC3\[\x90\xB0\]/g;
- $s =~ s/\xC3\xB1/\xC3\[\x91\xB1\]/g;
- $s =~ s/\xC3\xB2/\xC3\[\x92\xB2\]/g;
- $s =~ s/\xC3\xB3/\xC3\[\x93\xB3\]/g;
- $s =~ s/\xC3\xB4/\xC3\[\x94\xB4\]/g;
- $s =~ s/\xC3\xB5/\xC3\[\x95\xB5\]/g;
- $s =~ s/\xC3\xB6/\xC3\[\x96\xB6\]/g;
- $s =~ s/\xC3\xB8/\xC3\[\x98\xB8\]/g;
- $s =~ s/\xC3\xB9/\xC3\[\x99\xB9\]/g;
- $s =~ s/\xC3\xBA/\xC3\[\x9A\xBA\]/g;
- $s =~ s/\xC3\xBB/\xC3\[\x9B\xBB\]/g;
- $s =~ s/\xC3\xBC/\xC3\[\x9C\xBC\]/g;
- $s =~ s/\xC3\xBD/\xC3\[\x9D\xBD\]/g;
- $s =~ s/\xC3\xBE/\xC3\[\x9E\xBE\]/g;
- }
- if ($s =~ /\xC5/) {
- $s =~ s/\xC5\x91/\xC5\[\x90\x91\]/g;
- $s =~ s/\xC5\xA1/\xC5\[\xA0\xA1\]/g;
- $s =~ s/\xC5\xB1/\xC5\[\xB0\xB1\]/g;
- }
-
- return $s;
-}
-
-sub extended_lower_case {
- local($caller, $s) = @_;
-
- $s =~ tr/A-Z/a-z/;
-
- # Latin-1
- if ($s =~ /\xC3[\x80-\x9F]/) {
- $s =~ s/À/à/g;
- $s =~ s/Á/á/g;
- $s =~ s/Â/â/g;
- $s =~ s/Ã/ã/g;
- $s =~ s/Ä/ä/g;
- $s =~ s/Å/å/g;
- $s =~ s/Æ/æ/g;
- $s =~ s/Ç/ç/g;
- $s =~ s/È/è/g;
- $s =~ s/É/é/g;
- $s =~ s/Ê/ê/g;
- $s =~ s/Ë/ë/g;
- $s =~ s/Ì/ì/g;
- $s =~ s/Í/í/g;
- $s =~ s/Î/î/g;
- $s =~ s/Ï/ï/g;
- $s =~ s/Ð/ð/g;
- $s =~ s/Ñ/ñ/g;
- $s =~ s/Ò/ò/g;
- $s =~ s/Ó/ó/g;
- $s =~ s/Ô/ô/g;
- $s =~ s/Õ/õ/g;
- $s =~ s/Ö/ö/g;
- $s =~ s/Ø/ø/g;
- $s =~ s/Ù/ù/g;
- $s =~ s/Ú/ú/g;
- $s =~ s/Û/û/g;
- $s =~ s/Ü/ü/g;
- $s =~ s/Ý/ý/g;
- $s =~ s/Þ/þ/g;
- }
- # Latin Extended-A
- if ($s =~ /[\xC4-\xC5][\x80-\xBF]/) {
- $s =~ s/Ā/ā/g;
- $s =~ s/Ă/ă/g;
- $s =~ s/Ą/ą/g;
- $s =~ s/Ć/ć/g;
- $s =~ s/Ĉ/ĉ/g;
- $s =~ s/Ċ/ċ/g;
- $s =~ s/Č/č/g;
- $s =~ s/Ď/ď/g;
- $s =~ s/Đ/đ/g;
- $s =~ s/Ē/ē/g;
- $s =~ s/Ĕ/ĕ/g;
- $s =~ s/Ė/ė/g;
- $s =~ s/Ę/ę/g;
- $s =~ s/Ě/ě/g;
- $s =~ s/Ĝ/ĝ/g;
- $s =~ s/Ğ/ğ/g;
- $s =~ s/Ġ/ġ/g;
- $s =~ s/Ģ/ģ/g;
- $s =~ s/Ĥ/ĥ/g;
- $s =~ s/Ħ/ħ/g;
- $s =~ s/Ĩ/ĩ/g;
- $s =~ s/Ī/ī/g;
- $s =~ s/Ĭ/ĭ/g;
- $s =~ s/Į/į/g;
- $s =~ s/İ/ı/g;
- $s =~ s/IJ/ij/g;
- $s =~ s/Ĵ/ĵ/g;
- $s =~ s/Ķ/ķ/g;
- $s =~ s/Ĺ/ĺ/g;
- $s =~ s/Ļ/ļ/g;
- $s =~ s/Ľ/ľ/g;
- $s =~ s/Ŀ/ŀ/g;
- $s =~ s/Ł/ł/g;
- $s =~ s/Ń/ń/g;
- $s =~ s/Ņ/ņ/g;
- $s =~ s/Ň/ň/g;
- $s =~ s/Ŋ/ŋ/g;
- $s =~ s/Ō/ō/g;
- $s =~ s/Ŏ/ŏ/g;
- $s =~ s/Ő/ő/g;
- $s =~ s/Œ/œ/g;
- $s =~ s/Ŕ/ŕ/g;
- $s =~ s/Ŗ/ŗ/g;
- $s =~ s/Ř/ř/g;
- $s =~ s/Ś/ś/g;
- $s =~ s/Ŝ/ŝ/g;
- $s =~ s/Ş/ş/g;
- $s =~ s/Š/š/g;
- $s =~ s/Ţ/ţ/g;
- $s =~ s/Ť/ť/g;
- $s =~ s/Ŧ/ŧ/g;
- $s =~ s/Ũ/ũ/g;
- $s =~ s/Ū/ū/g;
- $s =~ s/Ŭ/ŭ/g;
- $s =~ s/Ů/ů/g;
- $s =~ s/Ű/ű/g;
- $s =~ s/Ų/ų/g;
- $s =~ s/Ŵ/ŵ/g;
- $s =~ s/Ŷ/ŷ/g;
- $s =~ s/Ź/ź/g;
- $s =~ s/Ż/ż/g;
- $s =~ s/Ž/ž/g;
- }
- # Greek letters
- if ($s =~ /\xCE[\x86-\xAB]/) {
- $s =~ s/Α/α/g;
- $s =~ s/Β/β/g;
- $s =~ s/Γ/γ/g;
- $s =~ s/Δ/δ/g;
- $s =~ s/Ε/ε/g;
- $s =~ s/Ζ/ζ/g;
- $s =~ s/Η/η/g;
- $s =~ s/Θ/θ/g;
- $s =~ s/Ι/ι/g;
- $s =~ s/Κ/κ/g;
- $s =~ s/Λ/λ/g;
- $s =~ s/Μ/μ/g;
- $s =~ s/Ν/ν/g;
- $s =~ s/Ξ/ξ/g;
- $s =~ s/Ο/ο/g;
- $s =~ s/Π/π/g;
- $s =~ s/Ρ/ρ/g;
- $s =~ s/Σ/σ/g;
- $s =~ s/Τ/τ/g;
- $s =~ s/Υ/υ/g;
- $s =~ s/Φ/φ/g;
- $s =~ s/Χ/χ/g;
- $s =~ s/Ψ/ψ/g;
- $s =~ s/Ω/ω/g;
- $s =~ s/Ϊ/ϊ/g;
- $s =~ s/Ϋ/ϋ/g;
- $s =~ s/Ά/ά/g;
- $s =~ s/Έ/έ/g;
- $s =~ s/Ή/ή/g;
- $s =~ s/Ί/ί/g;
- $s =~ s/Ό/ό/g;
- $s =~ s/Ύ/ύ/g;
- $s =~ s/Ώ/ώ/g;
- }
- # Cyrillic letters
- if ($s =~ /\xD0[\x80-\xAF]/) {
- $s =~ s/А/а/g;
- $s =~ s/Б/б/g;
- $s =~ s/В/в/g;
- $s =~ s/Г/г/g;
- $s =~ s/Д/д/g;
- $s =~ s/Е/е/g;
- $s =~ s/Ж/ж/g;
- $s =~ s/З/з/g;
- $s =~ s/И/и/g;
- $s =~ s/Й/й/g;
- $s =~ s/К/к/g;
- $s =~ s/Л/л/g;
- $s =~ s/М/м/g;
- $s =~ s/Н/н/g;
- $s =~ s/О/о/g;
- $s =~ s/П/п/g;
- $s =~ s/Р/р/g;
- $s =~ s/С/с/g;
- $s =~ s/Т/т/g;
- $s =~ s/У/у/g;
- $s =~ s/Ф/ф/g;
- $s =~ s/Х/х/g;
- $s =~ s/Ц/ц/g;
- $s =~ s/Ч/ч/g;
- $s =~ s/Ш/ш/g;
- $s =~ s/Щ/щ/g;
- $s =~ s/Ъ/ъ/g;
- $s =~ s/Ы/ы/g;
- $s =~ s/Ь/ь/g;
- $s =~ s/Э/э/g;
- $s =~ s/Ю/ю/g;
- $s =~ s/Я/я/g;
- $s =~ s/Ѐ/ѐ/g;
- $s =~ s/Ё/ё/g;
- $s =~ s/Ђ/ђ/g;
- $s =~ s/Ѓ/ѓ/g;
- $s =~ s/Є/є/g;
- $s =~ s/Ѕ/ѕ/g;
- $s =~ s/І/і/g;
- $s =~ s/Ї/ї/g;
- $s =~ s/Ј/ј/g;
- $s =~ s/Љ/љ/g;
- $s =~ s/Њ/њ/g;
- $s =~ s/Ћ/ћ/g;
- $s =~ s/Ќ/ќ/g;
- $s =~ s/Ѝ/ѝ/g;
- $s =~ s/Ў/ў/g;
- $s =~ s/Џ/џ/g;
- }
- # Fullwidth A-Z
- if ($s =~ /\xEF\xBC[\xA1-\xBA]/) {
- $s =~ s/A/a/g;
- $s =~ s/B/b/g;
- $s =~ s/C/c/g;
- $s =~ s/D/d/g;
- $s =~ s/E/e/g;
- $s =~ s/F/f/g;
- $s =~ s/G/g/g;
- $s =~ s/H/h/g;
- $s =~ s/I/i/g;
- $s =~ s/J/j/g;
- $s =~ s/K/k/g;
- $s =~ s/L/l/g;
- $s =~ s/M/m/g;
- $s =~ s/N/n/g;
- $s =~ s/O/o/g;
- $s =~ s/P/p/g;
- $s =~ s/Q/q/g;
- $s =~ s/R/r/g;
- $s =~ s/S/s/g;
- $s =~ s/T/t/g;
- $s =~ s/U/u/g;
- $s =~ s/V/v/g;
- $s =~ s/W/w/g;
- $s =~ s/X/x/g;
- $s =~ s/Y/y/g;
- $s =~ s/Z/z/g;
- }
-
- return $s;
-}
-
-sub extended_upper_case {
- local($caller, $s) = @_;
-
- $s =~ tr/a-z/A-Z/;
- return $s unless $s =~ /[\xC3-\xC5][\x80-\xBF]/;
-
- $s =~ s/\xC3\xA0/\xC3\x80/g;
- $s =~ s/\xC3\xA1/\xC3\x81/g;
- $s =~ s/\xC3\xA2/\xC3\x82/g;
- $s =~ s/\xC3\xA3/\xC3\x83/g;
- $s =~ s/\xC3\xA4/\xC3\x84/g;
- $s =~ s/\xC3\xA5/\xC3\x85/g;
- $s =~ s/\xC3\xA6/\xC3\x86/g;
- $s =~ s/\xC3\xA7/\xC3\x87/g;
- $s =~ s/\xC3\xA8/\xC3\x88/g;
- $s =~ s/\xC3\xA9/\xC3\x89/g;
- $s =~ s/\xC3\xAA/\xC3\x8A/g;
- $s =~ s/\xC3\xAB/\xC3\x8B/g;
- $s =~ s/\xC3\xAC/\xC3\x8C/g;
- $s =~ s/\xC3\xAD/\xC3\x8D/g;
- $s =~ s/\xC3\xAE/\xC3\x8E/g;
- $s =~ s/\xC3\xAF/\xC3\x8F/g;
- $s =~ s/\xC3\xB0/\xC3\x90/g;
- $s =~ s/\xC3\xB1/\xC3\x91/g;
- $s =~ s/\xC3\xB2/\xC3\x92/g;
- $s =~ s/\xC3\xB3/\xC3\x93/g;
- $s =~ s/\xC3\xB4/\xC3\x94/g;
- $s =~ s/\xC3\xB5/\xC3\x95/g;
- $s =~ s/\xC3\xB6/\xC3\x96/g;
- $s =~ s/\xC3\xB8/\xC3\x98/g;
- $s =~ s/\xC3\xB9/\xC3\x99/g;
- $s =~ s/\xC3\xBA/\xC3\x9A/g;
- $s =~ s/\xC3\xBB/\xC3\x9B/g;
- $s =~ s/\xC3\xBC/\xC3\x9C/g;
- $s =~ s/\xC3\xBD/\xC3\x9D/g;
- $s =~ s/\xC3\xBE/\xC3\x9E/g;
-
- $s =~ s/\xC5\x91/\xC5\x90/g;
- $s =~ s/\xC5\xA1/\xC5\xA0/g;
- $s =~ s/\xC5\xB1/\xC5\xB0/g;
- return $s unless $s =~ /[\xC3-\xC5][\x80-\xBF]/;
-
- return $s;
-}
-
-sub extended_first_upper_case {
- local($caller, $s) = @_;
-
- if (($first_char, $rest) = ($s =~ /^([\x00-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF])(.*)$/)) {
- return $caller->extended_upper_case($first_char) . $rest;
- } else {
- return $s;
- }
-}
-
-sub repair_doubly_converted_utf8_strings {
- local($caller, $s) = @_;
-
- if ($s =~ /\xC3[\x82-\x85]\xC2[\x80-\xBF]/) {
- $s =~ s/\xC3\x82\xC2([\x80-\xBF])/\xC2$1/g;
- $s =~ s/\xC3\x83\xC2([\x80-\xBF])/\xC3$1/g;
- $s =~ s/\xC3\x84\xC2([\x80-\xBF])/\xC4$1/g;
- $s =~ s/\xC3\x85\xC2([\x80-\xBF])/\xC5$1/g;
- }
- return $s;
-}
-
-sub repair_misconverted_windows_to_utf8_strings {
- local($caller, $s) = @_;
-
- # correcting conversions of UTF8 using Latin1-to-UTF converter
- if ($s =~ /\xC3\xA2\xC2\x80\xC2[\x90-\xEF]/) {
- my $result = "";
- while (($pre,$last_c,$post) = ($s =~ /^(.*?)\xC3\xA2\xC2\x80\xC2([\x90-\xEF])(.*)$/s)) {
- $result .= "$pre\xE2\x80$last_c";
- $s = $post;
- }
- $result .= $s;
- $s = $result;
- }
- # correcting conversions of Windows1252-to-UTF8 using Latin1-to-UTF converter
- if ($s =~ /\xC2[\x80-\x9F]/) {
- my $result = "";
- while (($pre,$c_windows,$post) = ($s =~ /^(.*?)\xC2([\x80-\x9F])(.*)$/s)) {
- $c_utf8 = $caller->windows1252_to_utf8($c_windows, 0);
- $result .= ($c_utf8 eq "?") ? ($pre . "\xC2" . $c_windows) : "$pre$c_utf8";
- $s = $post;
- }
- $result .= $s;
- $s = $result;
- }
- if ($s =~ /\xC3/) {
- $s =~ s/\xC3\xA2\xE2\x80\x9A\xC2\xAC/\xE2\x82\xAC/g; # x80 -> Euro sign
- # x81 codepoint undefined in Windows 1252
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC5\xA1/\xE2\x80\x9A/g; # x82 -> single low-9 quotation mark
- $s =~ s/\xC3\x86\xE2\x80\x99/\xC6\x92/g; # x83 -> Latin small letter f with hook
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC5\xBE/\xE2\x80\x9E/g; # x84 -> double low-9 quotation mark
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xA6/\xE2\x80\xA6/g; # x85 -> horizontal ellipsis
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xA0/\xE2\x80\xA0/g; # x86 -> dagger
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xA1/\xE2\x80\xA1/g; # x87 -> double dagger
- $s =~ s/\xC3\x8B\xE2\x80\xA0/\xCB\x86/g; # x88 -> modifier letter circumflex accent
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xB0/\xE2\x80\xB0/g; # x89 -> per mille sign
- $s =~ s/\xC3\x85\xC2\xA0/\xC5\xA0/g; # x8A -> Latin capital letter S with caron
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xB9/\xE2\x80\xB9/g; # x8B -> single left-pointing angle quotation mark
- $s =~ s/\xC3\x85\xE2\x80\x99/\xC5\x92/g; # x8C -> Latin capital ligature OE
- # x8D codepoint undefined in Windows 1252
- $s =~ s/\xC3\x85\xC2\xBD/\xC5\xBD/g; # x8E -> Latin capital letter Z with caron
- # x8F codepoint undefined in Windows 1252
- # x90 codepoint undefined in Windows 1252
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xCB\x9C/\xE2\x80\x98/g; # x91 a-circumflex+euro+small tilde -> left single quotation mark
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xE2\x84\xA2/\xE2\x80\x99/g; # x92 a-circumflex+euro+trademark -> right single quotation mark
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC5\x93/\xE2\x80\x9C/g; # x93 a-circumflex+euro+Latin small ligature oe -> left double quotation mark
- # x94 maps through undefined intermediate code point
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xA2/\xE2\x80\xA2/g; # x95 a-circumflex+euro+cent sign -> bullet
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xE2\x80\x9C/\xE2\x80\x93/g; # x96 a-circumflex+euro+left double quotation mark -> en dash
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xE2\x80\x9D/\xE2\x80\x94/g; # x97 a-circumflex+euro+right double quotation mark -> em dash
- $s =~ s/\xC3\x8B\xC5\x93/\xCB\x9C/g; # x98 Latin capital e diaeresis+Latin small ligature oe -> small tilde
- $s =~ s/\xC3\xA2\xE2\x80\x9E\xC2\xA2/\xE2\x84\xA2/g; # x99 -> trade mark sign
- $s =~ s/\xC3\x85\xC2\xA1/\xC5\xA1/g; # x9A -> Latin small letter s with caron
- $s =~ s/\xC3\xA2\xE2\x82\xAC\xC2\xBA/\xE2\x80\xBA/g; # x9B -> single right-pointing angle quotation mark
- $s =~ s/\xC3\x85\xE2\x80\x9C/\xC5\x93/g; # x9C -> Latin small ligature oe
- # x9D codepoint undefined in Windows 1252
- $s =~ s/\xC3\x85\xC2\xBE/\xC5\xBE/g; # x9E -> Latin small letter z with caron
- $s =~ s/\xC3\x85\xC2\xB8/\xC5\xB8/g; # x9F -> Latin capital letter Y with diaeresis
- $s =~ s/\xC3\xAF\xC2\xBF\xC2\xBD/\xEF\xBF\xBD/g; # replacement character
- }
-
- return $s;
-}
-
-sub latin1_to_utf {
- local($caller, $s) = @_;
-
- my $result = "";
- while (($pre,$c,$post) = ($s =~ /^(.*?)([\x80-\xFF])(.*)$/s)) {
- $result .= $pre;
- if ($c =~ /^[\x80-\xBF]$/) {
- $result .= "\xC2$c";
- } elsif ($c =~ /^[\xC0-\xFF]$/) {
- $c =~ tr/[\xC0-\xFF]/[\x80-\xBF]/;
- $result .= "\xC3$c";
- }
- $s = $post;
- }
- $result .= $s;
- return $result;
-}
-
-sub character_type_is_letter_type {
- local($caller, $char_type) = @_;
-
- return ($char_type =~ /\b((CJK|hiragana|kana|katakana)\s+character|diacritic|letter|syllable)\b/);
-}
-
-sub character_type {
- local($caller, $c) = @_;
-
- if ($c =~ /^[\x00-\x7F]/) {
- return "XML tag" if $c =~ /^<.*>$/;
- return "ASCII Latin letter" if $c =~ /^[a-z]$/i;
- return "ASCII digit" if $c =~ /^[0-9]$/i;
- return "ASCII whitespace" if $c =~ /^[\x09-\x0D\x20]$/;
- return "ASCII control-character" if $c =~ /^[\x00-\x1F\x7F]$/;
- return "ASCII currency" if $c eq "\$";
- return "ASCII punctuation";
- } elsif ($c =~ /^[\xC0-\xDF]/) {
- return "non-UTF8 (invalid)" unless $c =~ /^[\xC0-\xDF][\x80-\xBF]$/;
- return "non-shortest-UTF8 (invalid)" if $c =~ /[\xC0-\xC1]/;
- return "non-ASCII control-character" if $c =~ /\xC2[\x80-\x9F]/;
- return "non-ASCII whitespace" if $c =~ /\xC2\xA0/;
- return "non-ASCII currency" if $c =~ /\xC2[\xA2-\xA5]/;
- return "fraction" if $c =~ /\xC2[\xBC-\xBE]/; # NEW
- return "superscript digit" if $c =~ /\xC2[\xB2\xB3\xB9]/;
- return "non-ASCII Latin letter" if $c =~ /\xC2\xB5/; # micro sign
- return "non-ASCII punctuation" if $c =~ /\xC2[\xA0-\xBF]/;
- return "non-ASCII punctuation" if $c =~ /\xC3[\x97\xB7]/;
- return "non-ASCII Latin letter" if $c =~ /\xC3[\x80-\xBF]/;
- return "Latin ligature letter" if $c =~ /\xC4[\xB2\xB3]/;
- return "Latin ligature letter" if $c =~ /\xC5[\x92\x93]/;
- return "non-ASCII Latin letter" if $c =~ /[\xC4-\xC8]/;
- return "non-ASCII Latin letter" if $c =~ /\xC9[\x80-\x8F]/;
- return "IPA" if $c =~ /\xC9[\x90-\xBF]/;
- return "IPA" if $c =~ /\xCA[\x80-\xBF]/;
- return "IPA" if $c =~ /\xCB[\x80-\xBF]/;
- return "combining-diacritic" if $c =~ /\xCC[\x80-\xBF]/;
- return "combining-diacritic" if $c =~ /\xCD[\x80-\xAF]/;
- return "Greek punctuation" if $c =~ /\xCD[\xBE]/; # Greek question mark
- return "Greek punctuation" if $c =~ /\xCE[\x87]/; # Greek semicolon
- return "Greek letter" if $c =~ /\xCD[\xB0-\xBF]/;
- return "Greek letter" if $c =~ /\xCE/;
- return "Greek letter" if $c =~ /\xCF[\x80-\xA1\xB3\xB7\xB8\xBA\xBB]/;
- return "Coptic letter" if $c =~ /\xCF[\xA2-\xAF]/;
- return "Cyrillic letter" if $c =~ /[\xD0-\xD3]/;
- return "Cyrillic letter" if $c =~ /\xD4[\x80-\xAF]/;
- return "Armenian punctuation" if $c =~ /\xD5[\x9A-\x9F]/;
- return "Armenian punctuation" if $c =~ /\xD6[\x89-\x8F]/;
- return "Armenian letter" if $c =~ /\xD4[\xB0-\xBF]/;
- return "Armenian letter" if $c =~ /\xD5/;
- return "Armenian letter" if $c =~ /\xD6[\x80-\x8F]/;
- return "Hebrew accent" if $c =~ /\xD6[\x91-\xAE]/;
- return "Hebrew punctuation" if $c =~ /\xD6\xBE/;
- return "Hebrew punctuation" if $c =~ /\xD7[\x80\x83\x86\xB3\xB4]/;
- return "Hebrew point" if $c =~ /\xD6[\xB0-\xBF]/;
- return "Hebrew point" if $c =~ /\xD7[\x81\x82\x87]/;
- return "Hebrew letter" if $c =~ /\xD7[\x90-\xB2]/;
- return "other Hebrew" if $c =~ /\xD6[\x90-\xBF]/;
- return "other Hebrew" if $c =~ /\xD7/;
- return "Arabic currency" if $c =~ /\xD8\x8B/; # Afghani sign
- return "Arabic punctuation" if $c =~ /\xD8[\x89-\x8D\x9B\x9E\x9F]/;
- return "Arabic punctuation" if $c =~ /\xD9[\xAA-\xAD]/;
- return "Arabic punctuation" if $c =~ /\xDB[\x94]/;
- return "Arabic tatweel" if $c =~ /\xD9\x80/;
- return "Arabic letter" if $c =~ /\xD8[\xA0-\xBF]/;
- return "Arabic letter" if $c =~ /\xD9[\x81-\x9F]/;
- return "Arabic letter" if $c =~ /\xD9[\xAE-\xBF]/;
- return "Arabic letter" if $c =~ /\xDA[\x80-\xBF]/;
- return "Arabic letter" if $c =~ /\xDB[\x80-\x95]/;
- return "Arabic Indic digit" if $c =~ /\xD9[\xA0-\xA9]/;
- return "Arabic Indic digit" if $c =~ /\xDB[\xB0-\xB9]/;
- return "other Arabic" if $c =~ /[\xD8-\xDB]/;
- return "Syriac punctuation" if $c =~ /\xDC[\x80-\x8F]/;
- return "Syriac letter" if $c =~ /\xDC[\x90-\xAF]/;
- return "Syriac diacritic" if $c =~ /\xDC[\xB0-\xBF]/;
- return "Syriac diacritic" if $c =~ /\xDD[\x80-\x8A]/;
- return "Thaana letter" if $c =~ /\xDE/;
- } elsif ($c =~ /^[\xE0-\xEF]/) {
- return "non-UTF8 (invalid)" unless $c =~ /^[\xE0-\xEF][\x80-\xBF]{2,2}$/;
- return "non-shortest-UTF8 (invalid)" if $c =~ /\xE0[\x80-\x9F]/;
- return "Arabic letter" if $c =~ /\xE0\xA2[\xA0-\xBF]/; # extended letters
- return "other Arabic" if $c =~ /\xE0\xA3/; # extended characters
- return "Devanagari punctuation" if $c =~ /\xE0\xA5[\xA4\xA5]/; # danda, double danda
- return "Devanagari digit" if $c =~ /\xE0\xA5[\xA6-\xAF]/;
- return "Devanagari letter" if $c =~ /\xE0[\xA4-\xA5]/;
- return "Bengali digit" if $c =~ /\xE0\xA7[\xA6-\xAF]/;
- return "Bengali currency" if $c =~ /\xE0\xA7[\xB2-\xB9]/;
- return "Bengali letter" if $c =~ /\xE0[\xA6-\xA7]/;
- return "Gurmukhi digit" if $c =~ /\xE0\xA9[\xA6-\xAF]/;
- return "Gurmukhi letter" if $c =~ /\xE0[\xA8-\xA9]/;
- return "Gujarati digit" if $c =~ /\xE0\xAB[\xA6-\xAF]/;
- return "Gujarati letter" if $c =~ /\xE0[\xAA-\xAB]/;
- return "Oriya digit" if $c =~ /\xE0\xAD[\xA6-\xAF]/;
- return "Oriya fraction" if $c =~ /\xE0\xAD[\xB2-\xB7]/;
- return "Oriya letter" if $c =~ /\xE0[\xAC-\xAD]/;
- return "Tamil digit" if $c =~ /\xE0\xAF[\xA6-\xAF]/;
- return "Tamil number" if $c =~ /\xE0\xAF[\xB0-\xB2]/; # number (10, 100, 1000)
- return "Tamil letter" if $c =~ /\xE0[\xAE-\xAF]/;
- return "Telegu digit" if $c =~ /\xE0\xB1[\xA6-\xAF]/;
- return "Telegu fraction" if $c =~ /\xE0\xB1[\xB8-\xBE]/;
- return "Telegu letter" if $c =~ /\xE0[\xB0-\xB1]/;
- return "Kannada digit" if $c =~ /\xE0\xB3[\xA6-\xAF]/;
- return "Kannada letter" if $c =~ /\xE0[\xB2-\xB3]/;
- return "Malayalam digit" if $c =~ /\xE0\xB5[\x98-\x9E\xA6-\xB8]/;
- return "Malayalam punctuation" if $c =~ /\xE0\xB5\xB9/; # date mark
- return "Malayalam letter" if $c =~ /\xE0[\xB4-\xB5]/;
- return "Sinhala digit" if $c =~ /\xE0\xB7[\xA6-\xAF]/;
- return "Sinhala punctuation" if $c =~ /\xE0\xB7\xB4/;
- return "Sinhala letter" if $c =~ /\xE0[\xB6-\xB7]/;
- return "Thai currency" if $c =~ /\xE0\xB8\xBF/;
- return "Thai digit" if $c =~ /\xE0\xB9[\x90-\x99]/;
- return "Thai character" if $c =~ /\xE0[\xB8-\xB9]/;
- return "Lao punctuation" if $c =~ /\xE0\xBA\xAF/; # Lao ellipsis
- return "Lao digit" if $c =~ /\xE0\xBB[\x90-\x99]/;
- return "Lao character" if $c =~ /\xE0[\xBA-\xBB]/;
- return "Tibetan punctuation" if $c =~ /\xE0\xBC[\x81-\x94]/;
- return "Tibetan sign" if $c =~ /\xE0\xBC[\x95-\x9F]/;
- return "Tibetan digit" if $c =~ /\xE0\xBC[\xA0-\xB3]/;
- return "Tibetan punctuation" if $c =~ /\xE0\xBC[\xB4-\xBD]/;
- return "Tibetan letter" if $c =~ /\xE0[\xBC-\xBF]/;
- return "Myanmar digit" if $c =~ /\xE1\x81[\x80-\x89]/;
- return "Myanmar digit" if $c =~ /\xE1\x82[\x90-\x99]/; # Myanmar Shan digits
- return "Myanmar punctuation" if $c =~ /\xE1\x81[\x8A-\x8B]/;
- return "Myanmar letter" if $c =~ /\xE1[\x80-\x81]/;
- return "Myanmar letter" if $c =~ /\xE1\x82[\x80-\x9F]/;
- return "Georgian punctuation" if $c =~ /\xE1\x83\xBB/;
- return "Georgian letter" if $c =~ /\xE1\x82[\xA0-\xBF]/;
- return "Georgian letter" if $c =~ /\xE1\x83/;
- return "Georgian letter" if $c =~ /\xE1\xB2[\x90-\xBF]/; # Georgian Mtavruli capital letters
- return "Georgian letter" if $c =~ /\xE2\xB4[\x80-\xAF]/; # Georgian small letters (Khutsuri)
- return "Korean Hangul letter" if $c =~ /\xE1[\x84-\x87]/;
- return "Ethiopic punctuation" if $c =~ /\xE1\x8D[\xA0-\xA8]/;
- return "Ethiopic digit" if $c =~ /\xE1\x8D[\xA9-\xB1]/;
- return "Ethiopic number" if $c =~ /\xE1\x8D[\xB2-\xBC]/;
- return "Ethiopic syllable" if $c =~ /\xE1[\x88-\x8D]/;
- return "Cherokee letter" if $c =~ /\xE1\x8E[\xA0-\xBF]/;
- return "Cherokee letter" if $c =~ /\xE1\x8F/;
- return "Canadian punctuation" if $c =~ /\xE1\x90\x80/; # Canadian Syllabics hyphen
- return "Canadian punctuation" if $c =~ /\xE1\x99\xAE/; # Canadian Syllabics full stop
- return "Canadian syllable" if $c =~ /\xE1[\x90-\x99]/;
- return "Canadian syllable" if $c =~ /\xE1\xA2[\xB0-\xBF]/;
- return "Canadian syllable" if $c =~ /\xE1\xA3/;
- return "Ogham whitespace" if $c =~ /\xE1\x9A\x80/;
- return "Ogham letter" if $c =~ /\xE1\x9A[\x81-\x9A]/;
- return "Ogham punctuation" if $c =~ /\xE1\x9A[\x9B-\x9C]/;
- return "Runic punctuation" if $c =~ /\xE1\x9B[\xAB-\xAD]/;
- return "Runic letter" if $c =~ /\xE1\x9A[\xA0-\xBF]/;
- return "Runic letter" if $c =~ /\xE1\x9B/;
- return "Khmer currency" if $c =~ /\xE1\x9F\x9B/;
- return "Khmer digit" if $c =~ /\xE1\x9F[\xA0-\xA9]/;
- return "Khmer letter" if $c =~ /\xE1[\x9E-\x9F]/;
- return "Mongolian punctuation" if $c =~ /\xE1\xA0[\x80-\x8A]/;
- return "Mongolian digit" if $c =~ /\xE1\xA0[\x90-\x99]/;
- return "Mongolian letter" if $c =~ /\xE1[\xA0-\xA1]/;
- return "Mongolian letter" if $c =~ /\xE1\xA2[\x80-\xAF]/;
- return "Buginese letter" if $c =~ /\xE1\xA8[\x80-\x9B]/;
- return "Buginese punctuation" if $c =~ /\xE1\xA8[\x9E-\x9F]/;
- return "Balinese letter" if $c =~ /\xE1\xAC/;
- return "Balinese letter" if $c =~ /\xE1\xAD[\x80-\x8F]/;
- return "Balinese digit" if $c =~ /\xE1\xAD[\x90-\x99]/;
- return "Balinese puncutation" if $c =~ /\xE1\xAD[\x9A-\xA0]/;
- return "Balinese symbol" if $c =~ /\xE1\xAD[\xA1-\xBF]/;
- return "Sundanese digit" if $c =~ /\xE1\xAE[\xB0-\xB9]/;
- return "Sundanese letter" if $c =~ /\xE1\xAE/;
- return "Cyrillic letter" if $c =~ /\xE1\xB2[\x80-\x8F]/;
- return "Sundanese punctuation" if $c =~ /\xE1\xB3[\x80-\x8F]/;
- return "IPA" if $c =~ /\xE1[\xB4-\xB6]/;
- return "non-ASCII Latin letter" if $c =~ /\xE1[\xB8-\xBB]/;
- return "Greek letter" if $c =~ /\xE1[\xBC-\xBF]/;
- return "non-ASCII whitespace" if $c =~ /\xE2\x80[\x80-\x8A\xAF]/;
- return "zero-width space" if $c =~ /\xE2\x80\x8B/;
- return "zero-width non-space" if $c =~ /\xE2\x80\x8C/;
- return "zero-width joiner" if $c =~ /\xE2\x80\x8D/;
- return "directional mark" if $c =~ /\xE2\x80[\x8E-\x8F\xAA-\xAE]/;
- return "non-ASCII punctuation" if $c =~ /\xE2\x80[\x90-\xBF]/;
- return "non-ASCII punctuation" if $c =~ /\xE2\x81[\x80-\x9E]/;
- return "superscript letter" if $c =~ /\xE2\x81[\xB1\xBF]/;
- return "superscript digit" if $c =~ /\xE2\x81[\xB0-\xB9]/;
- return "superscript punctuation" if $c =~ /\xE2\x81[\xBA-\xBE]/;
- return "subscript digit" if $c =~ /\xE2\x82[\x80-\x89]/;
- return "subscript punctuation" if $c =~ /\xE2\x82[\x8A-\x8E]/;
- return "non-ASCII currency" if $c =~ /\xE2\x82[\xA0-\xBF]/;
- return "letterlike symbol" if $c =~ /\xE2\x84/;
- return "letterlike symbol" if $c =~ /\xE2\x85[\x80-\x8F]/;
- return "fraction" if $c =~ /\xE2\x85[\x90-\x9E]/; # NEW
- return "Roman number" if $c =~ /\xE2\x85[\xA0-\xBF]/; # NEW
- return "arrow symbol" if $c =~ /\xE2\x86[\x90-\xBF]/;
- return "arrow symbol" if $c =~ /\xE2\x87/;
- return "mathematical operator" if $c =~ /\xE2[\x88-\x8B]/;
- return "technical symbol" if $c =~ /\xE2[\x8C-\x8F]/;
- return "enclosed alphanumeric" if $c =~ /\xE2\x91[\xA0-\xBF]/;
- return "enclosed alphanumeric" if $c =~ /\xE2[\x92-\x93]/;
- return "box drawing" if $c =~ /\xE2[\x94-\x95]/;
- return "geometric shape" if $c =~ /\xE2\x96[\xA0-\xBF]/;
- return "geometric shape" if $c =~ /\xE2\x97/;
- return "pictograph" if $c =~ /\xE2[\x98-\x9E]/;
- return "arrow symbol" if $c =~ /\xE2\xAC[\x80-\x91\xB0-\xBF]/;
- return "geometric shape" if $c =~ /\xE2\xAC[\x92-\xAF]/;
- return "arrow symbol" if $c =~ /\xE2\xAD[\x80-\x8F\x9A-\xBF]/;
- return "geometric shape" if $c =~ /\xE2\xAD[\x90-\x99]/;
- return "arrow symbol" if $c =~ /\xE2\xAE[\x80-\xB9]/;
- return "geometric shape" if $c =~ /\xE2\xAE[\xBA-\xBF]/;
- return "geometric shape" if $c =~ /\xE2\xAF[\x80-\x88\x8A-\x8F]/;
- return "symbol" if $c =~ /\xE2[\xAC-\xAF]/;
- return "Coptic fraction" if $c =~ /\xE2\xB3\xBD/;
- return "Coptic punctuation" if $c =~ /\xE2\xB3[\xB9-\xBF]/;
- return "Coptic letter" if $c =~ /\xE2[\xB2-\xB3]/;
- return "Georgian letter" if $c =~ /\xE2\xB4[\x80-\xAF]/;
- return "Tifinagh punctuation" if $c =~ /\xE2\xB5\xB0/;
- return "Tifinagh letter" if $c =~ /\xE2\xB4[\xB0-\xBF]/;
- return "Tifinagh letter" if $c =~ /\xE2\xB5/;
- return "Ethiopic syllable" if $c =~ /\xE2\xB6/;
- return "Ethiopic syllable" if $c =~ /\xE2\xB7[\x80-\x9F]/;
- return "non-ASCII punctuation" if $c =~ /\xE3\x80[\x80-\x91\x94-\x9F\xB0\xBB-\xBD]/;
- return "symbol" if $c =~ /\xE3\x80[\x91\x92\xA0\xB6\xB7]/;
- return "Japanese hiragana character" if $c =~ /\xE3\x81/;
- return "Japanese hiragana character" if $c =~ /\xE3\x82[\x80-\x9F]/;
- return "Japanese katakana character" if $c =~ /\xE3\x82[\xA0-\xBF]/;
- return "Japanese katakana character" if $c =~ /\xE3\x83/;
- return "Bopomofo letter" if $c =~ /\xE3\x84[\x80-\xAF]/;
- return "Korean Hangul letter" if $c =~ /\xE3\x84[\xB0-\xBF]/;
- return "Korean Hangul letter" if $c =~ /\xE3\x85/;
- return "Korean Hangul letter" if $c =~ /\xE3\x86[\x80-\x8F]/;
- return "Bopomofo letter" if $c =~ /\xE3\x86[\xA0-\xBF]/;
- return "CJK stroke" if $c =~ /\xE3\x87[\x80-\xAF]/;
- return "Japanese kana character" if $c =~ /\xE3\x87[\xB0-\xBF]/;
- return "CJK symbol" if $c =~ /\xE3[\x88-\x8B]/;
- return "CJK square Latin abbreviation" if $c =~ /\xE3\x8D[\xB1-\xBA]/;
- return "CJK square Latin abbreviation" if $c =~ /\xE3\x8E/;
- return "CJK square Latin abbreviation" if $c =~ /\xE3\x8F[\x80-\x9F\xBF]/;
- return "CJK character" if $c =~ /\xE4[\xB8-\xBF]/;
- return "CJK character" if $c =~ /[\xE5-\xE9]/;
- return "Yi syllable" if $c =~ /\xEA[\x80-\x92]/;
- return "Lisu letter" if $c =~ /\xEA\x93[\x90-\xBD]/;
- return "Lisu punctuation" if $c =~ /\xEA\x93[\xBE-\xBF]/;
- return "Cyrillic letter" if $c =~ /\xEA\x99/;
- return "Cyrillic letter" if $c =~ /\xEA\x9A[\x80-\x9F]/;
- return "modifier tone" if $c =~ /\xEA\x9C[\x80-\xA1]/;
- return "Javanese punctuation" if $c =~ /\xEA\xA7[\x81-\x8D\x9E-\x9F]/;
- return "Javanese digit" if $c =~ /\xEA\xA7[\x90-\x99]/;
- return "Javanese letter" if $c =~ /\xEA\xA6/;
- return "Javanese letter" if $c =~ /\xEA\xA7[\x80-\x9F]/;
- return "Ethiopic syllable" if $c =~ /\xEA\xAC[\x80-\xAF]/;
- return "Cherokee letter" if $c =~ /\xEA\xAD[\xB0-\xBF]/;
- return "Cherokee letter" if $c =~ /\xEA\xAE/;
- return "Meetai Mayek digit" if $c =~ /\xEA\xAF[\xB0-\xB9]/;
- return "Meetai Mayek letter" if $c =~ /\xEA\xAF/;
- return "Korean Hangul syllable" if $c =~ /\xEA[\xB0-\xBF]/;
- return "Korean Hangul syllable" if $c =~ /[\xEB-\xEC]/;
- return "Korean Hangul syllable" if $c =~ /\xED[\x80-\x9E]/;
- return "Klingon letter" if $c =~ /\xEF\xA3[\x90-\xA9]/;
- return "Klingon digit" if $c =~ /\xEF\xA3[\xB0-\xB9]/;
- return "Klingon punctuation" if $c =~ /\xEF\xA3[\xBD-\xBE]/;
- return "Klingon symbol" if $c =~ /\xEF\xA3\xBF/;
- return "private use character" if $c =~ /\xEE/;
- return "Latin typographic ligature" if $c =~ /\xEF\xAC[\x80-\x86]/;
- return "Hebrew presentation letter" if $c =~ /\xEF\xAC[\x9D-\xBF]/;
- return "Hebrew presentation letter" if $c =~ /\xEF\xAD[\x80-\x8F]/;
- return "Arabic presentation letter" if $c =~ /\xEF\xAD[\x90-\xBF]/;
- return "Arabic presentation letter" if $c =~ /\xEF[\xAE-\xB7]/;
- return "non-ASCII punctuation" if $c =~ /\xEF\xB8[\x90-\x99]/;
- return "non-ASCII punctuation" if $c =~ /\xEF\xB8[\xB0-\xBF]/;
- return "non-ASCII punctuation" if $c =~ /\xEF\xB9[\x80-\xAB]/;
- return "Arabic presentation letter" if $c =~ /\xEF\xB9[\xB0-\xBF]/;
- return "Arabic presentation letter" if $c =~ /\xEF\xBA/;
- return "Arabic presentation letter" if $c =~ /\xEF\xBB[\x80-\xBC]/;
- return "byte-order mark/zero-width no-break space" if $c eq "\xEF\xBB\xBF";
- return "fullwidth currency" if $c =~ /\xEF\xBC\x84/;
- return "fullwidth digit" if $c =~ /\xEF\xBC[\x90-\x99]/;
- return "fullwidth Latin letter" if $c =~ /\xEF\xBC[\xA1-\xBA]/;
- return "fullwidth Latin letter" if $c =~ /\xEF\xBD[\x81-\x9A]/;
- return "fullwidth punctuation" if $c =~ /\xEF\xBC/;
- return "fullwidth punctuation" if $c =~ /\xEF\xBD[\x9B-\xA4]/;
- return "halfwidth Japanese punctuation" if $c =~ /\xEF\xBD[\xA1-\xA4]/;
- return "halfwidth Japanese katakana character" if $c =~ /\xEF\xBD[\xA5-\xBF]/;
- return "halfwidth Japanese katakana character" if $c =~ /\xEF\xBE[\x80-\x9F]/;
- return "fullwidth currency" if $c =~ /\xEF\xBF[\xA0-\xA6]/;
- return "replacement character" if $c eq "\xEF\xBF\xBD";
- } elsif ($c =~ /[\xF0-\xF7]/) {
- return "non-UTF8 (invalid)" unless $c =~ /[\xF0-\xF7][\x80-\xBF]{3,3}$/;
- return "non-shortest-UTF8 (invalid)" if $c =~ /\xF0[\x80-\x8F]/;
- return "Linear B syllable" if $c =~ /\xF0\x90\x80/;
- return "Linear B syllable" if $c =~ /\xF0\x90\x81[\x80-\x8F]/;
- return "Linear B symbol" if $c =~ /\xF0\x90\x81[\x90-\x9F]/;
- return "Linear B ideogram" if $c =~ /\xF0\x90[\x82-\x83]/;
- return "Gothic letter" if $c =~ /\xF0\x90\x8C[\xB0-\xBF]/;
- return "Gothic letter" if $c =~ /\xF0\x90\x8D[\x80-\x8F]/;
- return "Phoenician letter" if $c =~ /\xF0\x90\xA4[\x80-\x95]/;
- return "Phoenician number" if $c =~ /\xF0\x90\xA4[\x96-\x9B]/;
- return "Phoenician punctuation" if $c =~ /\xF0\x90\xA4\x9F/; # word separator
- return "Old Hungarian number" if $c =~ /\xF0\x90\xB3[\xBA-\xBF]/;
- return "Old Hungarian letter" if $c =~ /\xF0\x90[\xB2-\xB3]/;
- return "Cuneiform digit" if $c =~ /\xF0\x92\x90/; # numberic sign
- return "Cuneiform digit" if $c =~ /\xF0\x92\x91[\x80-\xAF]/; # numberic sign
- return "Cuneiform punctuation" if $c =~ /\xF0\x92\x91[\xB0-\xBF]/;
- return "Cuneiform sign" if $c =~ /\xF0\x92[\x80-\x95]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x81\xA8/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x82[\xAD-\xB6]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x86[\x90\xBC-\xBF]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x87[\x80-\x84]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x8D[\xA2-\xAB]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x8E[\x86-\x92]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x8F[\xBA-\xBF]/;
- return "Egyptian hieroglyph number" if $c =~ /\xF0\x93\x90[\x80-\x83]/;
- return "Egyptian hieroglyph" if $c =~ /\xF0\x93[\x80-\x90]/;
- return "enclosed alphanumeric" if $c =~ /\xF0\x9F[\x84-\x87]/;
- return "Mahjong symbol" if $c =~ /\xF0\x9F\x80[\x80-\xAF]/;
- return "Domino symbol" if $c =~ /\xF0\x9F\x80[\xB0-\xBF]/;
- return "Domino symbol" if $c =~ /\xF0\x9F\x81/;
- return "Domino symbol" if $c =~ /\xF0\x9F\x82[\x80-\x9F]/;
- return "Playing card symbol" if $c =~ /\xF0\x9F\x82[\xA0-\xBF]/;
- return "Playing card symbol" if $c =~ /\xF0\x9F\x83/;
- return "CJK symbol" if $c =~ /\xF0\x9F[\x88-\x8B]/;
- return "pictograph" if $c =~ /\xF0\x9F[\x8C-\x9B]/;
- return "geometric shape" if $c =~ /\xF0\x9F[\x9E-\x9F]/;
- return "non-ASCII punctuation" if $c =~ /\xF0\x9F[\xA0-\xA3]/;
- return "pictograph" if $c =~ /\xF0\x9F[\xA4-\xAB]/;
- return "CJK character" if $c =~ /\xF0[\xA0-\xAF]/;
- return "tag" if $c =~ /\xF3\xA0[\x80-\x81]/;
- return "variation selector" if $c =~ /\xF3\xA0[\x84-\x87]/;
- return "private use character" if $c =~ /\xF3[\xB0-\xBF]/;
- return "private use character" if $c =~ /\xF4[\x80-\x8F]/;
- # ...
- } elsif ($c =~ /[\xF8-\xFB]/) {
- return "non-UTF8 (invalid)" unless $c =~ /[\xF8-\xFB][\x80-\xBF]{4,4}$/;
- } elsif ($c =~ /[\xFC-\xFD]/) {
- return "non-UTF8 (invalid)" unless $c =~ /[\xFC-\xFD][\x80-\xBF]{5,5}$/;
- } elsif ($c =~ /\xFE/) {
- return "non-UTF8 (invalid)" unless $c =~ /\xFE][\x80-\xBF]{6,6}$/;
- } else {
- return "non-UTF8 (invalid)";
- }
- return "other character";
-}
-
-1;
-
-
diff --git a/spaces/Alcedo/yunmedia/resources/chatgpt-plugin/js/chunk-vendors.cd7b5e68.js b/spaces/Alcedo/yunmedia/resources/chatgpt-plugin/js/chunk-vendors.cd7b5e68.js
deleted file mode 100644
index 4fbef84ee16fcc6287d4c440225563de539d8612..0000000000000000000000000000000000000000
--- a/spaces/Alcedo/yunmedia/resources/chatgpt-plugin/js/chunk-vendors.cd7b5e68.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/*!
-
-=========================================================
-* Vue Notus - v1.1.0 based on Tailwind Starter Kit by Creative Tim
-=========================================================
-
-* Product Page: https://www.creative-tim.com/product/vue-notus
-* Copyright 2021 Creative Tim (https://www.creative-tim.com)
-* Licensed under MIT (https://github.com/creativetimofficial/vue-notus/blob/main/LICENSE.md)
-
-* Tailwind Starter Kit Page: https://www.creative-tim.com/learning-lab/tailwind-starter-kit/presentation
-
-* Coded by Creative Tim
-
-=========================================================
-
-* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-*/
-(self["webpackChunkvue_notus"]=self["webpackChunkvue_notus"]||[]).push([[998],{7543:function(e,t,n){"use strict";var r=n(1947);t.Z=o;var i=r(n(9649)),s=r(n(8317));function o(){return{install:function(e){e.vMdParser.use(i.default),e.use((0,s.default)())}}}},9649:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=s;var i=r(n(2960));function s(e){e.extendMarkdown((function(e){e.use(i.default)}))}},8317:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=l;var i=r(n(640));function s(e){return e.classList.contains("v-md-copy-code-btn")}function o(e){return e.classList.contains("v-md-pre-wrapper")?e:o(e.parentNode)}function a(e){var t="v-md-editor-preview";return e.classList.contains(t)?e:e.querySelector("."+t)}function l(){return{install:function(e){e.mixins||(e.mixins=[]),e.mixins.push({emits:["copy-code-success"],mounted:function(){var e=this;this.$nextTick((function(){var t=a(e.$el);t.addEventListener("click",e.handleCopyCodeClick)}))},beforeUnmount:function(){var e=a(this.$el);e.removeEventListener("click",this.handleCopyCodeClick)},methods:{handleCopyCodeClick:function(e){var t=e.target;if(s(t)){var n=o(t.parentNode);if(n){var r=n.querySelector("code").innerText;(0,i.default)(r),this.$emit("copy-code-success",r)}}}}})}}}},1233:function(e,t){"use strict";function n(e,t){e.insert((function(){var e=":",n=":";return{text:""+e+t+n}}))}t.__esModule=!0,t["default"]=n},7988:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=o;var i=r(n(326)),s=r(n(1233));function o(e){var t=e.emojiJson,n=e.parser;return function(e){var r=void 0===e?{}:e,o=r.name,a=void 0===o?"emoji":o,l=r.icon,c=void 0===l?"v-md-icon-emoji":l,u=r.text,d=r.title,h=void 0===d?function(e){return e.langConfig.emoji}:d,p=r.customEmoji,f=(0,i.default)({commandName:a,title:h,text:u,icon:c,emojiJson:t});return{install:function(e){"v-md-editor"===e.name&&(e.command(a,s.default),e.toolbar(a,f),e.lang.add({"zh-CN":{emoji:"插入emoji表情"},"en-US":{emoji:"Insert emoji"}})),e.vMdParser.use(n,{customEmoji:p})}}}}},8043:function(e,t,n){"use strict";var r=n(1947);t.Z=void 0;var i=r(n(2676)),s=r(n(7988)),o=r(n(8741)),a=(0,s.default)({emojiJson:i.default,parser:o.default});t.Z=a},3225:function(e,t){"use strict";function n(e){return function(t,n){void 0===n&&(n={}),t.extendMarkdown((function(t){t.use(e),n.customEmoji&&(t.renderer.rules.emoji=function(e,t){return''})}))}}t.__esModule=!0,t["default"]=n},8741:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=void 0;var i=r(n(6308)),s=r(n(3225)),o=(0,s.default)(i.default);t["default"]=o},326:function(e,t){"use strict";function n(e,t){return Object.keys(e).map((function(n){return{name:n,text:e[n],class:"v-md-emoji-panel-item",action:function(e){e.execCommand(t,n)}}}))}function r(e){var t=e.commandName,r=e.emojiJson,i=e.text,s=e.title,o=e.icon;return{title:s,icon:o,text:i,menus:{mode:"panel",items:n(r,t)}}}t.__esModule=!0,t.generatorMenuItems=n,t["default"]=r},5245:function(e,t,n){"use strict";var r=n(1947);t.Z=void 0;var i=r(n(7763)),s=r(n(9975)),o=(0,i.default)(s.default);t.Z=o},7763:function(e,t){"use strict";function n(e){return function(t){return{install:function(n){n.vMdParser.use(e,t)}}}}t.__esModule=!0,t["default"]=n},9975:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=void 0;var i=r(n(8106)),s="undefined"===typeof window;s||window.katex||console.error("Please import resources katex from cdn");var o=(0,i.default)(s?null:window.katex);t["default"]=o},8106:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=o;var i=r(n(9514)),s=r(n(6325));function o(e){return function(t,n){t.extendMarkdown((function(t){e&&t.use(s.default,(0,i.default)({},n,{katex:e}))}))}}},3375:function(e,t,n){"use strict";var r=n(1947);t.Z=void 0;var i=r(n(7307)),s="undefined"===typeof window;s||window.mermaid||console.error("Please import resources mermaid from cdn");var o=(0,i.default)(s?null:window.mermaid);t.Z=o},7307:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=u;var i=r(n(4684)),s=r(n(4569)),o=r(n(1812)),a=n(1166),l=n(7060);function c(e){var t="v-md-editor-preview";return e.classList.contains(t)?e:e.querySelector("."+t)}function u(e){function t(){return n.apply(this,arguments)}function n(){return n=(0,s.default)(i.default.mark((function t(){var n,r,s;return i.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(l.inBrowser){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,this.$nextTick();case 4:if(n=c(this.$el),r=n.querySelectorAll(".v-md-mermaid"),r.length){t.next=8;break}return t.abrupt("return");case 8:s=!1,r.forEach((function(t){try{s=e.parse(t.innerText)}catch(n){n.str||console.log(n)}s&&e.init(null,t)}));case 10:case"end":return t.stop()}}),t,this)}))),n.apply(this,arguments)}return function(n){var r=void 0===n?{}:n,i=r.mermaidInitializeOptions,s=void 0===i?{}:i,l={altFontFamily:"sans-serif",flowchart:{htmlLabels:!0,useMaxWidth:!0},fontFamily:"sans-serif",gantt:{leftPadding:75,rightPadding:20},securityLevel:"loose",sequence:{boxMargin:8,diagramMarginX:8,diagramMarginY:8,useMaxWidth:!0},startOnLoad:!1};return(0,a.deepAssign)(l,s),{install:function(n){n.vMdParser.use(o.default),n.mixins||(n.mixins=[]);var r={created:function(){e.initialize(l)},watch:{html:{immediate:!0,handler:t}}};"v-md-editor"===n.name?n.Preview.mixins.push(r):n.mixins.push(r)}}}}},1812:function(e,t,n){"use strict";var r=n(1947);t.__esModule=!0,t["default"]=s;var i=r(n(3596));function s(e){e.extendMarkdown((function(e){e&&e.use(i.default)}))}},2104:function(e,t,n){(function(t,r){e.exports=r(n(821))})("undefined"!==typeof self&&self,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(t,n){t.exports=e},,function(e,t,n){"use strict";n.d(t,"f",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return c})),n.d(t,"b",(function(){return u}));var r=Object.prototype.toString,i=function(e){return"[object Object]"===r.call(e)};function s(e,t){return Object.keys(t).forEach((function(n){e[n]=t[n]})),e}function o(e){for(var t={},n=0;nn?"down":"up",c=o/100*(r-n),u=function e(){n+=c,"down"===l&&n>=r||"up"===l&&n<=r?(i(r),window.cancelAnimationFrame(t),a&&window.requestAnimationFrame(a)):(i(n),window.requestAnimationFrame(e))};window.requestAnimationFrame(u)}function s(e){var t=e.scrollTarget,n=e.scrollToTop,s=e.percent,o=void 0===s?10:s,a=e.onScrollEnd,l=Object(r["a"])(t);i({currentScrollTop:l,scrollToTop:n,scrollFn:function(e){return Object(r["b"])(t,e)},percent:o,onScrollEnd:a})}},function(e,t,n){"use strict";n.r(t);var r=n(0);function i(e,t,n,i,s,o){return Object(r["openBlock"])(),Object(r["createBlock"])("div",{class:"v-md-editor-preview",style:{tabSize:e.tabSize,"-moz-tab-size":e.tabSize,"-o-tab-size":e.tabSize},onClick:t[1]||(t[1]=function(){return e.handlePreviewClick.apply(e,arguments)})},[Object(r["createVNode"])("div",{class:[e.previewClass],innerHTML:e.html},null,10,["innerHTML"])],4)}var s=n(7),o=n(13),a=function(){function e(){this.lang=new o["a"]}var t=e.prototype;return t.defaultMarkdownLoader=function(e){return e},t.use=function(e,t){return"function"===typeof e?e(this,t):e.install(this,t),this},t.theme=function(e){this.themeConfig=e},t.extendMarkdown=function(e){if(!this.themeConfig)return console.error("Please use theme before using plugins");var t=this.themeConfig.markdownParser;e(t)},t.parse=function(e){var t,n=this.themeConfig.markdownParser,r=(null==n||null==(t=n.render)?void 0:t.bind(n))||this.defaultMarkdownLoader;return"function"===typeof r&&r!==this.defaultMarkdownLoader||console.error("Please configure your markdown parser"),r(e)},e}(),l=n(16),c={name:"v-md-preview",mixins:[l["a"]],props:{text:{type:String,default:""},theme:Object,beforeChange:Function},emits:["change"],data:function(){return{html:""}},watch:{text:function(){this.handleTextChange()},langConfig:function(){this.handleTextChange()}},computed:{vMdParser:function(){return this.$options.vMdParser},previewClass:function(){return this.vMdParser.themeConfig.previewClass},langConfig:function(){return this.vMdParser.lang.langConfig}},created:function(){this.handleTextChange()},methods:{handleTextChange:function(){var e=this,t=function(t){e.html=s["a"].process(e.$options.vMdParser.parse(t)),e.$emit("change",t,e.html)};this.beforeChange?this.beforeChange(this.text,t):t(this.text)}}},u=new a;u.lang.config=Object(r["reactive"])(u.lang.config),c.vMdParser=new a;var d=c;d.render=i;var h=d,p=(n(18),"2.3.15"),f=function(e){e.component(h.name,h)};h.version=p,h.install=f,h.xss=s["a"],h.use=function(e,t){return"function"===typeof e?e(h,t):e.install(h,t),h};t["default"]=h},,function(e,t,n){var r=n(19),i=n(22),s=n(26);function o(e,t){var n=new s(t);return n.process(e)}for(var a in t=e.exports=o,t.filterXSS=o,t.FilterXSS=s,r)t[a]=r[a];for(var a in i)t[a]=i[a];function l(){return"undefined"!==typeof self&&"undefined"!==typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope}"undefined"!==typeof window&&(window.filterXSS=e.exports),l()&&(self.filterXSS=e.exports)},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=Object.prototype.hasOwnProperty;function s(e,t,n){var s=t[n];void 0!==s&&null!==s&&(i.call(e,n)&&Object(r["f"])(s)?e[n]=o(Object(e[n]),t[n]):e[n]=s)}function o(e,t){return Object.keys(t).forEach((function(n){s(e,t,n)})),e}var a=function(){function e(e){void 0===e&&(e={}),this.config={lang:"zh-CN",langConfig:{"zh-CN":{}}},this.options=e}var t=e.prototype;return t.use=function(e,t){var n;this.config.lang=e,this.add((n={},n[e]=t,n)),this.options.afterUse&&this.options.afterUse(e,t)},t.add=function(e){void 0===e&&(e={}),o(this.config.langConfig,e)},e}()},function(e,t,n){var r=n(20),i=n(24);function s(e,t){var n=new i(t);return n.process(e)}for(var o in t=e.exports=s,t.FilterCSS=i,r)t[o]=r[o];"undefined"!==typeof window&&(window.filterCSS=e.exports)},function(e,t){e.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n/g,m=/"/g,b=/"/g,_=/([a-zA-Z0-9]*);?/gim,y=/:?/gim,v=/&newline;?/gim,E=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,x=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,S=/u\s*r\s*l\s*\(.*/gi;function w(e){return e.replace(m,""")}function T(e){return e.replace(b,'"')}function A(e){return e.replace(_,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function C(e){return e.replace(y,":").replace(v," ")}function I(e){for(var t="",n=0,r=e.length;n/g;function D(e){var t=e.split("");return t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))})),t.join("")}t.whiteList=o(),t.getDefaultWhiteList=o,t.onTag=l,t.onIgnoreTag=c,t.onTagAttr=u,t.onIgnoreTagAttr=d,t.safeAttrValue=p,t.escapeHtml=h,t.escapeQuote=w,t.unescapeQuote=T,t.escapeHtmlEntities=A,t.escapeDangerHtml5Entities=C,t.clearNonPrintableCharacter=I,t.friendlyAttrValue=R,t.escapeAttrValue=k,t.onIgnoreTagStripAll=P,t.StripTagBody=O,t.stripCommentTag=N,t.stripBlankChar=D,t.cssFilter=a,t.getDefaultCSSWhiteList=i},function(e,t){function n(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}function r(e,t,n){}function i(e,t,n){}var s=/javascript\s*\:/gim;function o(e,t){return s.test(t)?"":t}t.whiteList=n(),t.getDefaultWhiteList=n,t.onAttr=r,t.onIgnoreAttr=i,t.safeAttrValue=o},function(e,t){e.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n"===p){r+=n(e.slice(o,a)),h=e.slice(a,c+1),d=i(h),r+=t(a,r.length,d,h,s(h)),o=c+1,a=!1;continue}if('"'===p||"'"===p){var f=1,g=e.charAt(c-f);while(""===g.trim()||"="===g){if("="===g){l=p;continue e}g=e.charAt(c-++f)}}}else if(p===l){l=!1;continue}}return o0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function d(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}function h(e){return d(e)?e.substr(1,e.length-2):e}t.parseTag=o,t.parseAttr=l},,function(e,t,n){var r=n(20),i=n(25);n(21);function s(e){return void 0===e||null===e}function o(e){var t={};for(var n in e)t[n]=e[n];return t}function a(e){e=o(e||{}),e.whiteList=e.whiteList||r.whiteList,e.onAttr=e.onAttr||r.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||r.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,this.options=e}a.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,n=t.options,r=n.whiteList,o=n.onAttr,a=n.onIgnoreAttr,l=n.safeAttrValue,c=i(e,(function(e,t,n,i,c){var u=r[n],d=!1;if(!0===u?d=u:"function"===typeof u?d=u(i):u instanceof RegExp&&(d=u.test(i)),!0!==d&&(d=!1),i=l(n,i),i){var h={position:t,sourcePosition:e,source:c,isWhite:d};if(d){var p=o(n,i,h);return s(p)?n+":"+i:p}p=a(n,i,h);return s(p)?void 0:p}}));return c},e.exports=a},function(e,t,n){var r=n(21);function i(e,t){e=r.trimRight(e),";"!==e[e.length-1]&&(e+=";");var n=e.length,i=!1,s=0,o=0,a="";function l(){if(!i){var n=r.trim(e.slice(s,o)),l=n.indexOf(":");if(-1!==l){var c=r.trim(n.slice(0,l)),u=r.trim(n.slice(l+1));if(c){var d=t(s,a.length,c,u,n);d&&(a+=d+"; ")}}}s=o+1}for(;o";var y=u(i),v=r[n],E=a(y.html,(function(e,t){var r=-1!==l.indexOf(v,e),i=h(n,e,t,r);if(!c(i))return i;if(r)return t=f(n,e,t,m),t?e+'="'+t+'"':e;i=p(n,e,t,r);return c(i)?void 0:i}));i="<"+n;return E&&(i+=" "+E),y.closing&&(i+=" /"),i+=">",i}_=d(n,i,b);return c(_)?g(i):_}),g);return b&&(_=b.remove(_)),_},e.exports=h}])["default"]}))},1986:function(e){!function(t,n){e.exports=n()}("undefined"!=typeof self&&self,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=86)}([function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function s(e){return!(e>=55296&&e<=57343)&&!(e>=64976&&e<=65007)&&65535!=(65535&e)&&65534!=(65535&e)&&!(e>=0&&e<=8)&&11!==e&&!(e>=14&&e<=31)&&!(e>=127&&e<=159)&&!(e>1114111)}function o(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var a=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(a.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(7),d=/[&<>"]/,h=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function f(e){return p[e]}var g=/[.?*+^$[\]\\(){}|-]/g,m=n(3);t.lib={},t.lib.mdurl=n(8),t.lib.ucmicro=n(26),t.assign=function(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach((function(n){e[n]=t[n]}))}})),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(a,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,(function(e,t,n){return t||function(e,t){var n=0;return i(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&s(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?o(n):e}(e,n)}))},t.isValidEntityCode=s,t.fromCodePoint=o,t.escapeHtml=function(e){return d.test(e)?e.replace(h,f):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return m.test(e)},t.escapeRE=function(e){return e.replace(g,"\\$&")},t.normalizeReference=function(e){return e=e.trim().replace(/\s+/g," "),"Ṿ"==="ẞ".toLowerCase()&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t'+r+"
"}}t.b=function(){var e=new i.a;return e.set({html:!0,breaks:!0,linkify:!1,typographer:!0}),e}},function(e,t){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},function(e,t,n){"use strict";function r(){this.__rules__=[],this.__cache__=null}r.prototype.__find__=function(e){for(var t=0;t=0&&(n=this.attrs[t][1]),n},r.prototype.attrJoin=function(e,t){var n=this.attrIndex(e);n<0?this.attrPush([e,t]):this.attrs[n][1]=this.attrs[n][1]+" "+t},e.exports=r},function(e,t,n){"use strict";const r=/[\u0000-\u001f]/g,i=/[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’–—<>,.?/]+/g,s=/[\u0300-\u036F]/g;e.exports=function(e){return e.normalize("NFKD").replace(s,"").replace(r,"").replace(i,"-").replace(/\-{2,}/g,"-").replace(/^\-+|\-+$/g,"").replace(/^(\d)/,"_$1").toLowerCase()}},function(e,t,n){"use strict";e.exports=n(21)},function(e,t,n){"use strict";e.exports.encode=n(22),e.exports.decode=n(23),e.exports.format=n(24),e.exports.parse=n(25)},function(e,t){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},function(e,t){e.exports=/[\0-\x1F\x7F-\x9F]/},function(e,t){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},function(e,t,n){"use strict";var r="<[A-Za-z][A-Za-z0-9\\-]*(?:\\s+[a-zA-Z_:][a-zA-Z0-9:._-]*(?:\\s*=\\s*(?:[^\"'=<>`\\x00-\\x20]+|'[^']*'|\"[^\"]*\"))?)*\\s*\\/?>",i="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",s=new RegExp("^(?:"+r+"|"+i+"|\x3c!----\x3e|\x3c!--(?:-?[^>-])(?:-?[^-])*--\x3e|<[?][\\s\\S]*?[?]>|]*>|)"),o=new RegExp("^(?:"+r+"|"+i+")");e.exports.HTML_TAG_RE=s,e.exports.HTML_OPEN_CLOSE_TAG_RE=o},function(e,t,n){"use strict";function r(e,t){var n,r,i,s,o,a=[],l=t.length;for(n=0;n=0;n--)95!==(r=t[n]).marker&&42!==r.marker||-1!==r.end&&(i=t[r.end],a=n>0&&t[n-1].end===r.end+1&&t[n-1].marker===r.marker&&t[n-1].token===r.token-1&&t[r.end+1].token===i.token+1,o=String.fromCharCode(r.marker),(s=e.tokens[r.token]).type=a?"strong_open":"em_open",s.tag=a?"strong":"em",s.nesting=1,s.markup=a?o+o:o,s.content="",(s=e.tokens[i.token]).type=a?"strong_close":"em_close",s.tag=a?"strong":"em",s.nesting=-1,s.markup=a?o+o:o,s.content="",a&&(e.tokens[t[n-1].token].content="",e.tokens[t[r.end+1].token].content="",n--))}e.exports.tokenize=function(e,t){var n,r,i=e.pos,s=e.src.charCodeAt(i);if(t)return!1;if(95!==s&&42!==s)return!1;for(r=e.scanDelims(e.pos,42===s),n=0;n=0?u[d]:u[u.length+d]);var u,d;if(void 0===c)return r;for(let h in n)if("shift"!==h&&"position"!==h){if(void 0===c[h])return r;if("children"===h&&o(n.children)){if(0===c.children.length)return r;let e,t=n.children,i=c.children;if(t.every((e=>void 0!==e.position))){if(e=t.every((e=>s(i,e.position,e).match)),e){let e=l(t).position;r.j=e>=0?e:i.length+e}}else for(let n=0;ns(i,n,e).match)),e){r.j=n;break}if(!1===e)return r}else switch(typeof n[h]){case"boolean":case"number":case"string":if(c[h]!==n[h])return r;break;case"function":if(!n[h](c[h]))return r;break;case"object":if(a(n[h])){if(!1===n[h].every((e=>e(c[h]))))return r;break}default:throw new Error(`Unknown type of pattern test (key: ${h}). Test should be of type boolean, number, string, function or array of functions.`)}}return r.match=!0,r}function o(e){return Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e))}function a(e){return Array.isArray(e)&&e.length&&e.every((e=>"function"==typeof e))}function l(e){return e.slice(-1)[0]||{}}e.exports=function(e,t){let n=Object.assign({},i);n=Object.assign(n,t);const o=r(n);e.core.ruler.before("linkify","curly_attributes",(function(e){let t=e.tokens;for(let n=0;n{let r=s(t,n,e);return null!==r.j&&(i=r.j),r.match}))&&(r.transform(t,n,i),"inline attributes"!==r.name&&"inline nesting 0"!==r.name||e--)}}))}},function(e,t,n){"use strict";e.exports=n(20)},function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return g}));var r=n(1),i=n(15),s=n.n(i),o=function(e,t){var n=(void 0===t?{}:t).lineMarkup,r=void 0===n?"data-line":n,i=function(e,t,n,r,i){return i.renderToken(e,t,n)};function s(e){return function(t,n,i,s,o){var a=t[n];return a.attrPush([r,a.map[0]+1]),e(t,n,i,s,o)}}function o(e){return function(t,n,i,s,o){var a=e(t,n,i,s,o),l=t[n].map[0]+1;return"'+a+"
"}}var a={table_open:s,blockquote_open:s,bullet_list_open:s,ordered_list_open:s,reference_open:s,heading_open:s,lheading_open:s,paragraph_open:s,hr:s,html_block:o,code_block:o,fence:o};Object.keys(a).forEach((function(t){var n=e.renderer.rules[t]||i;e.renderer.rules[t]=a[t](n)}))},a=function(e,t){void 0===t&&(t={});var n=t.getMarks;n&&e.core.ruler.push("anchor",(function(e){var t={},r=e.tokens;r.filter((function(e){return"heading_open"===e.type})).forEach((function(e){var i=r[r.indexOf(e)+1].content,s=Number(e.tag.substr(1));t[i]=i in t?Number(t[i])+1:"";var o=n(i,s,t[i]);o&&o.forEach((function(t){var n=t.attr,r=t.value;e.attrPush([n,r])}))}))}))},l={includeLevel:[2,3],containerClass:"table-of-contents",listClass:"table-of-content-list",listItemClass:"table-of-content-list-item",markerPattern:/^\[\[toc\]\]/im,listType:"ul",getAnchorAttrs:function(){return[]},format:void 0,forceFullToc:!1,containerHeaderHtml:void 0,containerFooterHtml:void 0,transformLink:void 0},c=function(e,t){var n,i=Object(r.a)({},l,t),s=i.markerPattern;function o(e,t,n){for(var r,s,a=[],l="",c=t.length,u=e;ur){l+=(s=o(u,t,n))[1],u=s[0];continue}if(p",a.push(l),[u,"<"+i.listType+' class="'+i.listClass+'">'+a.join("")+""+i.listType+">"];p==r&&(l+="",a.push(l))}else r=p;var f=h.children.reduce((function(e,t){return e+t.content}),""),g=h.content,m=n[g]=g in n?Number(n[g])+1:"",b=i.getAnchorAttrs(g,p,m);l='- \n ",l+=f,l+="",u++}else u++}return l+=""===l?"":"
",a.push(l),[u,"<"+i.listType+' class="'+i.listClass+'">'+a.join("")+""+i.listType+">"]}e.renderer.rules.toc_open=function(e,t){var n='';return i.containerHeaderHtml&&(n+=i.containerHeaderHtml),n},e.renderer.rules.toc_close=function(e,t){var n="";return i.containerFooterHtml&&(n=i.containerFooterHtml),n+"
"},e.renderer.rules.toc_body=function(e,t){var r={};if(i.forceFullToc){for(var s="",a=0,l=n&&n.tokens&&n.tokens.length;a