diff --git a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download PATCHED Facebook Messenger For Samsung Gt-e2252 Tools Sesiones Speed.md b/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download PATCHED Facebook Messenger For Samsung Gt-e2252 Tools Sesiones Speed.md deleted file mode 100644 index b892e323370f788632f5b7a79bf5a0c4810797f7..0000000000000000000000000000000000000000 --- a/spaces/1acneusushi/gradio-2dmoleculeeditor/data/Download PATCHED Facebook Messenger For Samsung Gt-e2252 Tools Sesiones Speed.md +++ /dev/null @@ -1,32 +0,0 @@ - -
Facebook Messenger is a popular app that allows you to chat with your friends and family on the social media platform. You can also send text messages, images, videos, stickers, voice notes, and more in free group chats. But how can you download Facebook Messenger for Samsung E2252, a feature phone that runs on a proprietary operating system?
-DOWNLOAD ⇔ https://byltly.com/2uKwkO
In this article, we will show you the steps to download and install Facebook Messenger for Samsung E2252 using a third-party website called Apkpure. Apkpure is a website that offers free APK files of various apps and games for Android devices. APK files are the installation packages that contain all the necessary files and data for an app to run on your device.
-Before we begin, please note that downloading and installing APK files from unknown sources may pose some risks to your device and personal data. You should only download APK files from trusted and verified websites, and scan them with an antivirus software before opening them. We are not responsible for any damage or loss that may occur as a result of following this guide.
-Congratulations! You have successfully downloaded and installed Facebook Messenger for Samsung E2252. You can now enjoy chatting with your friends and family on Facebook using this app.
-Now that you have Facebook Messenger on your device, you may want to know some tips and tricks to make the most out of it. Here are some of them:
-These are some of the tips and tricks for using Facebook Messenger on Samsung E2252. We hope you find them useful and enjoy using this app.
81aa517590Download Zip ✑ ✑ ✑ https://imgfil.com/2uxYoa
If you are looking for a song that will inspire you, touch your emotions, and make you feel alive, then you should check out City of Angels by 30 Seconds to Mars. This song is one of the most popular and acclaimed tracks by the American rock band, and it has a lot to offer to the listeners. In this article, we will tell you everything you need to know about City of Angels, and how you can download it as an MP3 file for your convenience.
-City of Angels is a song by 30 Seconds to Mars, released in 2013 as the fourth single from their fourth studio album, Love Lust Faith + Dreams. The song was written and produced by the lead vocalist and founder of the band, Jared Leto, who also directed the music video and the short film based on the song.
-DOWNLOAD ❤ https://jinyurl.com/2uNNFd
City of Angels is a tribute to Los Angeles, the city where 30 Seconds to Mars was formed and where they achieved their success. The song explores the themes of dreams, hopes, struggles, and realities that people face in the city, as well as the beauty and diversity that it offers. Jared Leto said that he wanted to capture the spirit and essence of Los Angeles in the song, and that he was inspired by his own personal experiences and stories from other people who live or have lived in the city.
-The music video for City of Angels was released in October 2013, and it features a series of interviews with various celebrities, artists, musicians, athletes, and ordinary people who share their thoughts and feelings about Los Angeles. Some of the famous faces that appear in the video include Kanye West, James Franco, Selena Gomez, Lindsay Lohan, Olivia Wilde, Steve Nash, Corey Feldman, Ashley Olsen, Alan Cumming, Juliette Lewis, Shaun White, Lily Collins, and many more. The video also shows scenes of the band performing the song in different locations around the city.
-The short film for City of Angels was released in November 2013, and it is an extended version of the music video that runs for about 11 minutes. The short film includes more interviews and footage that were not shown in the music video, as well as some additional narration by Jared Leto. The short film was praised by critics and fans alike for its artistic vision and emotional impact.
-If you want to enjoy City of Angels by 30 Seconds to Mars anytime and anywhere, you might want to download it as an MP3 file that you can store on your device or transfer to other devices. There are several ways you can do this, depending on your preferences and budget.
-The most recommended way to download City of Angels MP3 by 30 Seconds to Mars is to use the official sources and platforms that are authorized by the band and their record label. This way, you can support the band financially and legally, as well as get the best quality and security for your download. Some of the official sources and platforms that you can use are:
-If you don't want to use the official sources and platforms, or if you want to save some money, you can also try some alternative methods and tools to download City of Angels MP3 by 30 Seconds to Mars. However, you should be aware that these methods and tools are not endorsed by the band or their record label, and they may violate some copyright laws or terms of service. You should also be careful about the quality and security of your download, as some of these methods and tools may contain viruses, malware, or spyware. Some of the alternative methods and tools that you can use are:
-Now that you know how to download City of Angels MP3 by 30 Seconds to Mars, you might be wondering why you should listen to it in the first place. Well, there are many reasons why listening to music in general, and City of Angels in particular, can be beneficial for you.
-Listening to music can have many positive effects on your physical, mental, and emotional well-being. Some of the benefits of listening to music are:
-city of angels 30 seconds to mars free mp3
-download city of angels by 30 seconds to mars
-city of angels song 30 seconds to mars mp3
-30 seconds to mars city of angels remix mp3
-city of angels 30stm mp3 download
-30 seconds to mars city of angels acoustic mp3
-city of angels thirty seconds to mars mp3
-30 seconds to mars city of angels official video mp3
-city of angels 30 seconds to mars lyrics mp3
-30 seconds to mars city of angels live mp3
-city of angels soundtrack 30 seconds to mars mp3
-30 seconds to mars city of angels piano mp3
-city of angels 30 seconds to mars instrumental mp3
-30 seconds to mars city of angels album mp3
-city of angels 30 seconds to mars karaoke mp3
-30 seconds to mars city of angels radio edit mp3
-city of angels 30 seconds to mars guitar mp3
-30 seconds to mars city of angels unplugged mp3
-city of angels 30 seconds to mars cover mp3
-30 seconds to mars city of angels extended mp3
-city of angels 30 seconds to mars spotify mp3
-30 seconds to mars city of angels youtube mp3
-city of angels 30 seconds to mars itunes mp3
-30 seconds to mars city of angels soundcloud mp3
-city of angels 30 seconds to mars amazon mp3
-30 seconds to mars city of angels vevo mp3
-city of angels 30 seconds to mars apple music mp3
-30 seconds to mars city of angels last.fm mp3
-city of angels 30 seconds to mars markus schulz remix mp3
-30 seconds to mars city of angels single mp3
-city of angels love lust faith + dreams 30 seconds to mars mp3
-download lagu city of angels 30 seconds to mars mp3
-descargar city of angels de 30 seconds to mars mp3
-baixar musica city of angels de 30 seconds to mars mp3
-telecharger musique city of angels de 30 seconds to mars mp3
-scaricare musica city of angels di 30 seconds to mars mp3
-herunterladen musik city of angels von 30 seconds to mars mp3
-pobierz muzyke city of angels zespolu 30 seconds to mars mp3
-indir muzik sehir melekleri otuz saniye marsempireye ait olan sarki.mp3 (Turkish)
-skachat' muzyku gorod angelov ot tridtsati sekund do marsempireye pesnya.mp3 (Russian)
-xiazai yinyue shengshi tianshi cong sanshi miaozhong dao huoxingempireye gequ.mp3 (Chinese)
-daunrodeu eumak seongsi cheonsa buleoseu san-sibcho dong-an hwa-seongempireye nolae.mp3 (Korean)
-kounyuu ongaku tenshi no machi kara sanjuppun made kaseiempireye kyoku.mp3 (Japanese)
-descargar musica ciutat dels àngels de trenta segons a marsempireye cançó.mp3 (Catalan)
-aflaai musiek stad van engele van dertig sekondes tot marsempireye lied.mp3 (Afrikaans)
-stiahnut hudbu mesto anjelov od tridsiatich sekund do marsempireye piesen.mp3 (Slovak)
-letoltes zene angyalok varosa harminc masodpercig marsempireye dal.mp3 (Hungarian)
-preuzimanje glazbe grad andjela od trideset sekundi do marsempireye pjesma.mp3 (Croatian)
-lataa musiikkia enkelten kaupunki kolmekymmentä sekuntia marsempireye laulu.mp3 (Finnish)
Besides the general benefits of listening to music, City of Angels by 30 Seconds to Mars has some specific qualities that make it a great song to listen to. Some of the reasons why City of Angels is a great song are:
-In conclusion, City of Angels by 30 Seconds to Mars is a song
In conclusion, City of Angels by 30 Seconds to Mars is a song that you should definitely listen to and download as an MP3 file. It is a song that celebrates Los Angeles, the city of dreams, and the people who live or have lived there. It is a song that has a beautiful and meaningful message, a catchy and melodic tune, a rich and diverse sound, a passionate and expressive performance, and a stunning and inspiring visual representation. It is a song that can make you feel inspired, touched, and alive.
-If you want to download City of Angels MP3 by 30 Seconds to Mars, you can use the official sources and platforms that are authorized by the band and their record label, such as iTunes, Amazon, Spotify, YouTube, or YouTube Music. Alternatively, you can use some online converters, desktop software, or mobile apps that can convert YouTube videos or other online audio files into MP3 files. However, you should be careful about the quality and security of your download, and respect the rights of the band and their record label.
-So what are you waiting for? Go ahead and download City of Angels MP3 by 30 Seconds to Mars today, and enjoy this amazing song that will make you feel like you are in the city of angels.
-If you are a fan of action-packed disaster movies, you might have heard of Ashfall, a 2019 South Korean film that depicts the aftermath of a volcanic eruption on the Korean peninsula. But how can you watch this film online with Indonesian subtitles? And is it worth your time and money? In this article, I will give you a brief overview of what Ashfall is about, how to download film ashfall full movie sub indo legally and safely, and my personal opinion on whether you should watch it or not.
-Ashfall (Korean: 백두산; Hanja: 白頭山; RR: Baekdusan), also known as Mount Paektu, is a 2019 South Korean disaster film directed by Lee Hae-jun and Kim Byung-seo, starring Lee Byung-hun, Ha Jung-woo, Ma Dong-seok, Jeon Hye-jin and Bae Suzy. The film was released in December 2019 in South Korea and became one of the highest-grossing films of the year.
-Download Zip ↔ https://jinyurl.com/2uNM3g
The film follows the events that unfold when Paektu Mountain, an active volcano straddling the China–North Korea border, suddenly erupts, causing severe earthquakes in both North and South Korea. To prevent another disaster, Jeon Yoo-kyung (Jeon Hye-jin), a government official, plans an operation based on a theory by Professor Kang Bong-rae (Ma Dong-seok), who had studied Mount Paektu and its possible future eruptions. Jo In-chang (Ha Jung-woo) is assigned to be the captain of a special forces team taking part in the operation. He contacts Lee Joon-pyeong (Lee Byung-hun), who is part of the Korean People's Army in North Korea as a spy. Joon-pyeong is the only one who knows where to find nuclear warheads that can be used to stop the volcano from erupting again. Meanwhile, Jo In-chang's pregnant wife Choi Ji-young (Bae Suzy) is alone in Seoul and struggling to survive amidst the chaos.
-The film features a star-studded cast of some of the most popular actors and actresses in South Korea. Here are some of the main characters and their roles:
-One of the most impressive aspects of Ashfall is the realistic and spectacular depiction of the volcanic eruption and its consequences. The film used a combination of practical and computer-generated effects to create the scenes of destruction, chaos, and panic. The film also employed various techniques such as aerial shots, drone shots, handheld shots, and slow-motion shots to capture the scale and intensity of the disaster. The film's cinematography was praised by critics and audiences alike for its stunning visuals and immersive experience.
-If you are interested in watching Ashfall with Indonesian subtitles, you might be wondering how to download film ashfall full movie sub indo online. There are two main ways to do this: legal and safe ways, and illegal and risky ways. Let's take a look at each option and weigh their pros and cons.
-The best way to watch Ashfall online is to use legal and safe streaming services that offer the film with Indonesian subtitles. This way, you can enjoy the film without worrying about breaking the law, harming your device, or compromising your personal information. Here are some of the streaming services that offer Ashfall:
-Streaming Service | Price | Availability |
---|---|---|
Netflix | $8.99-$17.99 per month | Worldwide (except China, Syria, North Korea, and Crimea) |
iQIYI | $2.99-$19.99 per month | Asia-Pacific (except Japan) |
Viu | $2.99-$6.99 per month | Asia-Pacific (except China) |
Iflix | $0-$9.99 per month | Asia-Pacific (except China, Japan, Taiwan, Hong Kong, Macau) |
HOOQ | $1.99-$7.99 per month | Asia-Pacific (except China, Japan) |
If you already have access to Ashfall through a streaming service or a DVD, but you need Indonesian subtitles, you can also download them from websites that provide subtitles for various languages. However, you should be careful when downloading subtitles from unknown sources, as they might contain malware or viruses that can harm your device or steal your data. Here are some of the websites that provide Ashfall subtitles:
-Another way to download film ashfall full movie sub indo online is to use illegal and risky methods such as torrent sites or file-sharing platforms. These methods allow you to download the film for free, but they also come with many drawbacks and dangers. Here are some of the reasons why you should avoid using these methods:
-download film ashfall full movie sub indo lk21
-download film ashfall full movie sub indo gratis
-download film ashfall full movie sub indo 480p
-download film ashfall full movie sub indo 720p
-download film ashfall full movie sub indo bluray
-download film ashfall full movie sub indo mp4
-download film ashfall full movie sub indo hd
-download film ashfall full movie sub indo streaming
-download film ashfall full movie sub indo xxi
-download film ashfall full movie sub indo bioskopkeren
-download film ashfall full movie sub indo terbaru
-download film ashfall full movie sub indo pusatfilm21
-download film ashfall full movie sub indo nontongratis88
-download film ashfall full movie sub indo rebahin
-download film ashfall full movie sub indo cgvido
-download film ashfall full movie sub indo idlix
-download film ashfall full movie sub indo cinema 21
-download film ashfall full movie sub indo ganool
-download film ashfall full movie sub indo layarkaca21
-download film ashfall full movie sub indo dunia21
-download film ashfall full movie sub indo gudangmovies21
-download film ashfall full movie sub indo indomovie88
-download film ashfall full movie sub indo juraganfilm
-download film ashfall full movie sub indo kawanfilm21
-download film ashfall full movie sub indo lebahmovie
-download film ashfall full movie sub indo melongfilm
-download film ashfall full movie sub indo nontonfilm168
-download film ashfall full movie sub indo nontonfilm77
-download film ashfall full movie sub indo nontonfilm88
-download film ashfall full movie sub indo nontonfilm99
-download film ashfall full movie sub indo nontonindoxxi
-download film ashfall full movie sub indo nontonplus
-download film ashfall full movie sub indo nontonxxi
-download film ashfall full movie sub indo pahe.in
-download film ashfall full movie sub indo savefilm21
-download film ashfall full movie sub indo sobatkeren21
-download film ashfall full movie sub indo sogafime
-download film ashfall full movie sub indo terbit21
-download film ashfall full movie sub indo viu.com
-watch online film ashfall full movie with english subtitles
Torrent sites are websites that allow users to share files through peer-to-peer networks. Some of the torrent sites that host Ashfall files are:
Using torrent sites to download film ashfall full movie sub indo online might seem tempting, but it also comes with many risks and consequences. Some of them are:
-Now that you know what Ashfall is about and how to download film ashfall full movie sub indo online, you might be wondering if it is worth watching. To help you decide, here are some of the pros and cons of Ashfall:
-Pros | Cons |
---|---|
A thrilling and exciting disaster film with realistic and spectacular special effects and cinematography. | A clichéd and predictable plot with some logical flaws and inconsistencies. |
A star-studded cast with impressive performances and chemistry. | A lack of character development and depth for some of the main characters. |
A message of hope and unity in the face of adversity and conflict. | A simplistic and idealistic portrayal of the political and social situation on the Korean peninsula. |
A cultural and commercial success that showcases the potential of the South Korean film industry. | A limited availability and accessibility for international audiences who might not be familiar with the context or language of the film. |
In my personal opinion, Ashfall is a film that is worth watching if you are a fan of disaster movies or Korean cinema. It is a film that delivers on its promise of providing an entertaining and thrilling experience with stunning visuals and sound. It is also a film that has a heart and a message that resonates with the current times. However, it is not a film that is perfect or flawless. It has its share of weaknesses and shortcomings that might disappoint some viewers who expect more from it. It is also not a film that is easy to watch or understand for everyone. It requires some background knowledge and appreciation of the culture and history of Korea. Therefore, I would recommend Ashfall to anyone who is looking for a fun and exciting movie night, but not to anyone who is looking for a deep and meaningful cinematic masterpiece.
-Here are some of the frequently asked questions about Ashfall:
-A: No, Ashfall is not based on a true story. It is a fictional story that imagines what would happen if Mount Paektu erupted in the present day. However, Mount Paektu is a real volcano that has erupted in the past and could erupt again in the future. The film was inspired by the historical and scientific research on Mount Paektu and its potential eruptions.
-A: Ashfall is not meant to be a realistic or accurate depiction of a volcanic eruption or its consequences. It is a fictional story that exaggerates and dramatizes some aspects of the disaster for entertainment purposes. The film does not follow the scientific facts or data on Mount Paektu or its eruptions. The film also does not reflect the actual political or social situation on the Korean peninsula or its relations with other countries.
-A: Ashfall was a commercial success at the box office, both domestically and internationally. It grossed over $61 million in South Korea, becoming the fourth highest-grossing film of 2019 and the 11th highest-grossing film of all time in the country. It also grossed over $24 million in other countries, mainly in Asia, bringing its worldwide total to over $85 million. It was also nominated for several awards, including the Baeksang Arts Awards, the Blue Dragon Film Awards, and the Grand Bell Awards.
-A: If you want to learn more about Ashfall, you can visit the following websites:
-A: If you enjoyed Ashfall and want to watch more films like it, you might like these films:
-Thank you for reading my article on how to download film ashfall full movie sub indo online. I hope you found it helpful and informative. If you have any questions or feedback, please feel free to leave a comment below. Have a great day!
197e85843dUpload your photo here...
', unsafe_allow_html=True) - st.subheader("This app takes in your image and styles it with a unique african art.") - -#Add a header and expander in side bar -st.sidebar.markdown('Afrodreams.AI
', unsafe_allow_html=True) -with st.sidebar.expander("About the App"): - st.write(""" - This app takes in your image and styles it with a unique african art.""") - - -#Add file uploader to allow users to upload photos -uploaded_file = st.file_uploader("", type=['jpg','png','jpeg']) - -# add slider to side bar -style_weight = st.slider("Select Style Weight", min_value=10, max_value=100, value=12) - -#Add 'before' and 'after' columns -if uploaded_file is not None: - image = Image.open(uploaded_file) - - col1, col2 = st.columns( [0.5, 0.5]) - with col1: - st.markdown('Before
',unsafe_allow_html=True) - st.image(image,width=300) - - with col2: - st.markdown('After
',unsafe_allow_html=True) - - # add a button - run = st.button('Generate Art') - my_bar = st.progress(0) - params = neural_style.TransferParams() - params.gpu = 0#"c" - params.backend = "mkl" - params.image_size = 400 - params.content_image = uploaded_file - params.style_weight = style_weight - keep_style = False - if run==True: - # run image selection if keep style is false - if keep_style==False: - path = 'stylesv2' - styles = os.listdir(path) - params.style_image = path + '/' + random.choice(styles) - - st.session_state.submitted = True - with st.spinner('Wait for it...'): - neural_style.transfer(params) - - #display image when done. - with col2: - if 'submitted' in st.session_state: - result = Image.open('out.png') - st.image(result, width=300) - buf = BytesIO() - result.save(buf, format="png") - if len(os.listdir('generated_samples')) <= 10: - img_file_name = f"generated_samples/{str(len(os.listdir('generated_samples')))}.png" - - _ = upload_file(path_or_fileobj = 'out.png', - path_in_repo = img_file_name, - repo_id='AfrodreamsAI/afrodreams', - repo_type='space', - token=HF_TOKEN - ) - - byte_im = buf.getvalue() - #run =ste.download_button(button_text="Download Image", data=byte_im, download_filename='afrodreams.jpg', mime="image/png") - #keeping the current style by update the weight - keep_style = st.sidebar.checkbox("Keep current style") - - - - - - diff --git a/spaces/AlexWortega/food_calories/app.py b/spaces/AlexWortega/food_calories/app.py deleted file mode 100644 index 779d200948b5700d083debcc784294b6bc8b70ac..0000000000000000000000000000000000000000 --- a/spaces/AlexWortega/food_calories/app.py +++ /dev/null @@ -1,50 +0,0 @@ -import torch -from rudalle import get_tokenizer, get_vae -from rudalle.utils import seed_everything - -import sys -from rudolph.model.utils import get_i2t_attention_mask, get_t2t_attention_mask -from rudolph.model import get_rudolph_model, ruDolphModel, FP16Module -from rudolph.pipelines import generate_codebooks, self_reranking_by_image, self_reranking_by_text, show, generate_captions, generate_texts -from rudolph.pipelines import zs_clf - -import gradio as gr -from rudolph import utils -from PIL import Image - -device = 'cpu' -if device=='cuda': - half = True -else: - half = False -model = get_rudolph_model('350M', fp16=half, device=device) -model.load_state_dict(torch.load("awesomemodel__dalle_1500.pt",map_location=torch.device('cpu'))) -tokenizer = get_tokenizer() -vae = get_vae(dwt=False).to(device) - - -template = 'белков: ' - - - -# Download human-readable labels for ImageNet. - - - -def classify_image(inp): - print(type(inp)) - inp = Image.fromarray(inp) - texts = generate_captions(inp, tokenizer, model, vae, template=template, top_k=16, captions_num=1, bs=16, top_p=0.6, seed=43, temperature=0.8) - rp = texts[0].replace('белков','protein').replace('жиров','fat').replace('углеводов','carbs').replace('calories','ккал') - print(rp) - - - return rp - -image = gr.inputs.Image(shape=(128, 128)) -label = gr.outputs.Label(num_top_classes=3) - - -iface = gr.Interface(fn=classify_image, description="https://github.com/sberbank-ai/ru-dolph RuDoplh by SBER AI finetuned for a image2text task to predict food calories by https://t.me/lovedeathtransformers Alex Wortega", inputs=image, outputs="text",examples=[ - ['b9c277a3.jpeg']]) -iface.launch() diff --git a/spaces/AllAideas/SegmentacionVideo/utils/predict.py b/spaces/AllAideas/SegmentacionVideo/utils/predict.py deleted file mode 100644 index e4edb3d986d42fdd8dba8da9ab795350b3b2fa9f..0000000000000000000000000000000000000000 --- a/spaces/AllAideas/SegmentacionVideo/utils/predict.py +++ /dev/null @@ -1,104 +0,0 @@ -#from .custom_layers import TransformerEncoder, PositionalEmbedding -from .constants import MAX_SEQ_LENGTH, NUM_FEATURES, IMG_SIZE, CLASS_VOCAB -from huggingface_hub import from_pretrained_keras -from tensorflow import keras -from keras import layers -import numpy as np -import imageio -import cv2 - -#model = from_pretrained_keras("shivi/video-classification",custom_objects={"PositionalEmbedding":PositionalEmbedding,"TransformerEncoder": TransformerEncoder}) - -model = from_pretrained_keras("keras-io/video-transformers") - -""" -Below code is taken from the Video-Transformers example on keras-io by Sayak Paul -""" -def build_feature_extractor(): - feature_extractor = keras.applications.DenseNet121( - weights="imagenet", - include_top=False, - pooling="avg", - input_shape=(IMG_SIZE, IMG_SIZE, 3), - ) - preprocess_input = keras.applications.densenet.preprocess_input - - inputs = keras.Input((IMG_SIZE, IMG_SIZE, 3)) - preprocessed = preprocess_input(inputs) - - outputs = feature_extractor(preprocessed) - return keras.Model(inputs, outputs, name="feature_extractor") - - -feature_extractor = build_feature_extractor() - - - -def crop_center(frame): - center_crop_layer = layers.CenterCrop(IMG_SIZE, IMG_SIZE) - cropped = center_crop_layer(frame[None, ...]) - cropped = cropped.numpy().squeeze() - return cropped - -def load_video(path, max_frames=0): - cap = cv2.VideoCapture(path) - frames = [] - try: - while True: - ret, frame = cap.read() - if not ret: - break - frame = crop_center(frame) - frame = frame[:, :, [2, 1, 0]] - frames.append(frame) - - if len(frames) == max_frames: - break - finally: - cap.release() - return np.array(frames) - -def prepare_single_video(frames): - frame_features = np.zeros(shape=(1, MAX_SEQ_LENGTH, NUM_FEATURES), dtype="float32") - - # Pad shorter videos. - if len(frames) < MAX_SEQ_LENGTH: - diff = MAX_SEQ_LENGTH - len(frames) - padding = np.zeros((diff, IMG_SIZE, IMG_SIZE, 3)) - frames = np.concatenate(frames, padding) - - frames = frames[None, ...] - - # Extract features from the frames of the current video. - for i, batch in enumerate(frames): - video_length = batch.shape[0] - length = min(MAX_SEQ_LENGTH, video_length) - for j in range(length): - if np.mean(batch[j, :]) > 0.0: - frame_features[i, j, :] = feature_extractor.predict(batch[None, j, :]) - else: - frame_features[i, j, :] = 0.0 - - return frame_features - - -def predict_action(path): - frames = load_video(path) - frame_features = prepare_single_video(frames) - probabilities = model.predict(frame_features)[0] - confidences = {} - - for i in np.argsort(probabilities)[::-1]: - confidences[CLASS_VOCAB[i]] = float(probabilities[i]) - - gif_out = to_gif(frames[:MAX_SEQ_LENGTH]) - - print(confidences) - return confidences, gif_out - - -def to_gif(images): - converted_images = images.astype(np.uint8) - imageio.mimsave("animation.gif", converted_images, fps=10) - return "animation.gif" - diff --git a/spaces/Aloento/9Nine-PITS/app.py b/spaces/Aloento/9Nine-PITS/app.py deleted file mode 100644 index 90b8019a1d2a9af0ae4eef108a0e38193d898b7b..0000000000000000000000000000000000000000 --- a/spaces/Aloento/9Nine-PITS/app.py +++ /dev/null @@ -1,186 +0,0 @@ -import argparse - -import gradio as gr -import torch - -import commons -import utils -from models import SynthesizerTrn -from text import cleaned_text_to_sequence -from text.cleaners import clean_text -from text.symbols import symbols - - -# we use Kyubyong/g2p for demo instead of our internal g2p -# https://github.com/Kyubyong/g2p -def get_text(text, hps): - cleaned_text, lang = clean_text(text) - text_norm = cleaned_text_to_sequence(cleaned_text) - if hps.data.add_blank: - text_norm, lang = commons.intersperse_with_language_id(text_norm, lang, 0) - text_norm = torch.LongTensor(text_norm) - lang = torch.LongTensor(lang) - return text_norm, lang, cleaned_text - - -class GradioApp: - - def __init__(self, args): - self.hps = utils.get_hparams_from_file(args.config) - self.device = "cpu" - - self.net_g = SynthesizerTrn( - len(symbols), - self.hps.data.filter_length // 2 + 1, - self.hps.train.segment_size // - self.hps.data.hop_length, - midi_start=-5, - midi_end=75, - octave_range=24, - n_speakers=len(self.hps.data.speakers), - **self.hps.model - ).to(self.device) - - _ = self.net_g.eval() - _ = utils.load_checkpoint(args.checkpoint_path, model_g=self.net_g) - self.interface = self._gradio_interface() - - def get_phoneme(self, text): - cleaned_text, lang = clean_text(text) - text_norm = cleaned_text_to_sequence(cleaned_text) - - if self.hps.data.add_blank: - text_norm, lang = commons.intersperse_with_language_id(text_norm, lang, 0) - - text_norm = torch.LongTensor(text_norm) - lang = torch.LongTensor(lang) - - return text_norm, lang, cleaned_text - - def inference(self, text, speaker_id_val, seed, scope_shift, duration): - seed = int(seed) - scope_shift = int(scope_shift) - torch.manual_seed(seed) - text_norm, tone, phones = self.get_phoneme(text) - x_tst = text_norm.to(self.device).unsqueeze(0) - t_tst = tone.to(self.device).unsqueeze(0) - x_tst_lengths = torch.LongTensor([text_norm.size(0)]).to(self.device) - speaker_id = torch.LongTensor([speaker_id_val]).to(self.device) - - decoder_inputs, *_ = self.net_g.infer_pre_decoder( - x_tst, - t_tst, - x_tst_lengths, - sid=speaker_id, - noise_scale=0.667, - noise_scale_w=0.8, - length_scale=duration, - scope_shift=scope_shift - ) - - audio = self.net_g.infer_decode_chunk( - decoder_inputs, sid=speaker_id - )[0, 0].data.cpu().float().numpy() - - del decoder_inputs, - - return phones, (self.hps.data.sampling_rate, audio) - - def _gradio_interface(self): - title = "9Nine - PITS" - - self.inputs = [ - gr.Textbox( - label="Text (150 words limitation)", - value="[JA]そんなわけないじゃない。どうしてこうなるだろう。始めて好きな人ができた。一生ものの友达ができた。嬉しいことが二つ重なて。" - "その二つの嬉しさがまたたくさんの嬉しさをつれて来てくれて。梦のように幸せの时间を手に入れたはずなのに。なのにどうして、こうなちょうだろう。[JA]", - elem_id="tts-input" - ), - gr.Dropdown( - list(self.hps.data.speakers), - value=self.hps.data.speakers[1], - label="Speaker Identity", - type="index" - ), - gr.Slider( - 0, 65536, value=0, step=1, label="random seed" - ), - gr.Slider( - -15, 15, value=0, step=1, label="scope-shift" - ), - gr.Slider( - 0.5, 2., value=1., step=0.1, label="duration multiplier" - ), - ] - - self.outputs = [ - gr.Textbox(label="Phonemes"), - gr.Audio(type="numpy", label="Output audio") - ] - - description = "9Nine - PITS" - article = "Github: https://github.com/Aloento/VariTTS" - examples = [["[JA]こんにちは、私は綾地寧々です。[JA]"]] - - return gr.Interface( - fn=self.inference, - inputs=self.inputs, - outputs=self.outputs, - title=title, - description=description, - article=article, - cache_examples=False, - examples=examples, - ) - - def launch(self): - return self.interface.launch(share=False) - - -def parsearg(): - parser = argparse.ArgumentParser() - parser.add_argument( - '-c', - '--config', - type=str, - default="./configs/config_cje.yaml", - help='Path to configuration file' - ) - parser.add_argument( - '-m', - '--model', - type=str, - default='9Nine', - help='Model name' - ) - parser.add_argument( - '-r', - '--checkpoint_path', - type=str, - default='./9Nine_Eval_71200.pth', - help='Path to checkpoint for resume' - ) - parser.add_argument( - '-f', - '--force_resume', - type=str, - help='Path to checkpoint for force resume' - ) - parser.add_argument( - '-d', - '--dir', - type=str, - default='/DATA/audio/pits_samples', - help='root dir' - ) - args = parser.parse_args() - return args - - -if __name__ == "__main__": - import nltk - nltk.download('cmudict') - - args = parsearg() - app = GradioApp(args) - app.launch() diff --git a/spaces/Amon1/ChatGPTForAcadamic/crazy_functions/test_project/cpp/cppipc/policy.h b/spaces/Amon1/ChatGPTForAcadamic/crazy_functions/test_project/cpp/cppipc/policy.h deleted file mode 100644 index f88ab5d8cb343f97026966b402eaeed8831e356a..0000000000000000000000000000000000000000 --- a/spaces/Amon1/ChatGPTForAcadamic/crazy_functions/test_project/cpp/cppipc/policy.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include[TPAMI] UniFormer: Unifying Convolution and Self-attention for Visual Recognition | Github Repo
- """ - ) - - submit_video_button.click(fn=inference_video, inputs=input_video, outputs=label_video) - example_videos.click(fn=set_example_video, inputs=example_videos, outputs=example_videos.components) - submit_image_button.click(fn=inference_image, inputs=input_image, outputs=label_image) - example_images.click(fn=set_example_image, inputs=example_images, outputs=example_images.components) - -demo.launch(enable_queue=True) \ No newline at end of file diff --git a/spaces/AngoHF/ANGO-Leaderboard/assets/evaluation.py b/spaces/AngoHF/ANGO-Leaderboard/assets/evaluation.py deleted file mode 100644 index b2c625686ed23aa67c42815d4ddf372344e8daec..0000000000000000000000000000000000000000 --- a/spaces/AngoHF/ANGO-Leaderboard/assets/evaluation.py +++ /dev/null @@ -1,185 +0,0 @@ -import os -import json -import re -import argparse -import torch -import gc -from tqdm import tqdm - -from transformers import AutoModelForCausalLM, AutoModel, AutoTokenizer - -os.environ['CUDA_VISIBLE_DEVICES'] = '1' - - -def parse_args(): - parser = argparse.ArgumentParser(description='Validation') - parser.add_argument('--model_path', dest="model_path") - parser.add_argument('--dataset_path', dest="dataset_path") - parser.add_argument('--save_path', dest='save_path') - parser.add_argument('--max_length', dest="max_length", default=2000) - parser.add_argument('--max_new_tokens', dest="max_new_tokens", default=48) - parser.add_argument('--input_template', dest="input_template", - default="材料:{material}\n问题:{question}\n{options}\n答案:{response}") - parser.add_argument('--query_template', dest="query_template", default="问题:{question}\n{options}\n答案:{response}") - parser.add_argument('--system_prompt', dest="system_prompt", - default="你是一名考生,请回答问题的正确选项,比如C。如果有多个正确选项,请按顺序回答所有正确选项,比如ABD。") - parser.add_argument('--level_delimiter', dest="level_delimiter", default="|") - args = parser.parse_args() - return args - - -class Validator: - def __init__(self, args): - self.load_model(args.model_path) - self.load_dataset(args.dataset_path) - self.save_dir = os.path.join(args.save_path, os.path.split(model_path)[-1]) - if not os.path.exists(self.save_dir): - os.makedirs(self.save_dir) - - self.max_length = args.max_length - self.max_new_tokens = args.max_new_tokens - self.input_template = args.input_template - self.query_template = args.query_template - self.system_prompt = args.system_prompt - self.level_delimiter = args.level_delimiter - - def load_model(self, model_path): - self.tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) - - self.model = AutoModelForCausalLM.from_pretrained(model_path, device_map={"": 0}, trust_remote_code=True) - self.model.eval() - - def load_dataset(self, dataset_path): - self.dataset = json.load(open(dataset_path, encoding="utf-8")) - - def format_prompt(self, material, question, options, response): - if material: - return self.input_template.format(material=material, question=question, options=options, - response=response).strip() - return self.query_template.format(question=question, options=options, response=response).strip() - - def build_prompt(self, item): - query_prompt = self.format_prompt(item['material'], item['question'], item['options'], "") - history_prompts = [] - for sub in item['history']: - history_prompts.append(self.format_prompt(sub['material'], sub['question'], sub['options'], sub['choice'])) - - final_prompt = self.system_prompt + "\n" + "\n".join(history_prompts) + "\n" + query_prompt - - if len(self.tokenizer.tokenize(final_prompt)) > self.max_length: - history_prompts.pop() - break - return self.system_prompt + "\n" + "\n".join(history_prompts) + "\n" + query_prompt - - def get_predict(self, prompt): - gen_kwargs = {"do_sample": False, "max_new_tokens": self.max_new_tokens} - inputs = self.tokenizer([prompt], return_tensors="pt") - inputs = inputs.to(self.model.device) - with torch.no_grad(): - outputs = self.model.generate(**inputs, return_dict_in_generate=True, **gen_kwargs) - predict = self.tokenizer.decode(outputs.sequences[0], skip_special_tokens=True)[len(prompt):] - return predict - - def extract_answer(self, results): - predict_result = {"acc": 0, "wrong_value": 0, "human_acc": 0, "hit": 0, "total": 0, "wrong_hit": 0, - "wrong_total": 0, 'detail': []} - for result in results: - answer = result['item']['choice'] - most_wrong = result['item']['most_wrong'] - human_acc = result['item']['human_acc'] * 0.01 - - predict = "" - for e in re.split(r'[、,.,和\s]\s*', result['predict']): - if not e.isascii(): - break - predict += e - result['predict'] = predict - predict_result['detail'].append( - {"answer": answer, "most_wrong": most_wrong, "predict": predict, "human_acc": human_acc}) - predict_result['hit'] += 1 if answer == predict else 0 - predict_result['wrong_hit'] += 1 if most_wrong == predict else 0 - predict_result['wrong_value'] += 1 - human_acc if most_wrong == predict else 0 - predict_result['human_acc'] += human_acc - predict_result['total'] += 1 - predict_result['acc'] = predict_result['hit'] / predict_result['total'] - predict_result['wrong_total'] = predict_result['total'] - predict_result['hit'] - predict_result['wrong_value'] = predict_result['wrong_value'] / predict_result['wrong_total'] - predict_result['human_acc'] = predict_result['human_acc'] / len(results) - - json.dump(predict_result, open(os.path.join(self.save_dir, "acc_result.json"), "w", encoding="utf-8"), - ensure_ascii=False) - - def category_summary(self, results): - category_result = {"总计": {"hit": 0, "all": 0, "difficulty": {}, "human_acc": 0}} - for result in results: - hit = 1 if result['item']['choice'] == result['predict'] else 0 - categories_list = result['item']['categories'] - difficulty = result['item']['difficulty'] - human_acc = result['item']['human_acc'] - for categories in categories_list: - if difficulty not in category_result["总计"]["difficulty"]: - category_result["总计"]["difficulty"][difficulty] = {"hit": 0, "all": 0} - category_result["总计"]["difficulty"][difficulty]['hit'] += hit - category_result["总计"]["difficulty"][difficulty]['all'] += 1 - category_result["总计"]['hit'] += hit - category_result["总计"]['all'] += 1 - category_result["总计"]['human_acc'] += human_acc - category_subset = [] - for category in categories: - category_subset.append(category) - category_name = self.level_delimiter.join(category_subset) - if not category_name: - category_name = "未分类" - if category_name not in category_result: - category_result[category_name] = {"hit": 0, "all": 0, "difficulty": {}, "human_acc": 0} - if difficulty not in category_result[category_name]["difficulty"]: - category_result[category_name]["difficulty"][difficulty] = {"hit": 0, "all": 0} - category_result[category_name]["difficulty"][difficulty]['hit'] += hit - category_result[category_name]["difficulty"][difficulty]['all'] += 1 - category_result[category_name]['hit'] += hit - category_result[category_name]['all'] += 1 - category_result[category_name]['human_acc'] += human_acc - - for k, v in category_result.items(): - v['acc'] = v['hit'] / v['all'] - v['human_acc'] = v['human_acc'] / v['all'] - for d, sub_v in v['difficulty'].items(): - sub_v['acc'] = sub_v['hit'] / sub_v['all'] - json.dump(category_result, open(os.path.join(self.save_dir, "category_result.json"), "w", encoding="utf-8"), - ensure_ascii=False) - - def difficulty_summary(self, results): - difficulty_result = {"总计": {"hit": 0, "all": 0}} - for result in results: - hit = 1 if result['item']['choice'] == result['predict'] else 0 - difficulty = result['item']['difficulty'] - if difficulty not in difficulty_result: - difficulty_result[difficulty] = {"hit": 0, "all": 0} - difficulty_result[difficulty]['hit'] += hit - difficulty_result[difficulty]['all'] += 1 - difficulty_result["总计"]['hit'] += hit - difficulty_result["总计"]['all'] += 1 - - for k in difficulty_result: - difficulty_result[k]['acc'] = difficulty_result[k]['hit'] / difficulty_result[k]['all'] - - json.dump(difficulty_result, open(os.path.join(self.save_dir, "difficulty_result.json"), "w", encoding="utf-8"), - ensure_ascii=False) - - def __call__(self): - results = [] - for item in tqdm(self.dataset): - prompt = self.build_prompt(item) - predict = self.get_predict(prompt) - results.append({"item": item, "predict": predict}) - gc.collect() - - json.dump(results, open(os.path.join(self.save_dir, "raw.json"), "w", encoding="utf-8"), ensure_ascii=False) - self.extract_answer(results) - self.category_summary(results) - self.difficulty_summary(results) - - -if __name__ == "__main__": - args = parse_args() - Validator(args)() diff --git a/spaces/AnishKumbhar/ChatBot/text-generation-webui-main/api-examples/api-example.py b/spaces/AnishKumbhar/ChatBot/text-generation-webui-main/api-examples/api-example.py deleted file mode 100644 index d9fd60d05c95d76d2ce011fa5ecdd97433b5e3de..0000000000000000000000000000000000000000 --- a/spaces/AnishKumbhar/ChatBot/text-generation-webui-main/api-examples/api-example.py +++ /dev/null @@ -1,63 +0,0 @@ -import requests - -# For local streaming, the websockets are hosted without ssl - http:// -HOST = 'localhost:5000' -URI = f'http://{HOST}/api/v1/generate' - -# For reverse-proxied streaming, the remote will likely host with ssl - https:// -# URI = 'https://your-uri-here.trycloudflare.com/api/v1/generate' - - -def run(prompt): - request = { - 'prompt': prompt, - 'max_new_tokens': 250, - 'auto_max_new_tokens': False, - 'max_tokens_second': 0, - - # Generation params. If 'preset' is set to different than 'None', the values - # in presets/preset-name.yaml are used instead of the individual numbers. - 'preset': 'None', - 'do_sample': True, - 'temperature': 0.7, - 'top_p': 0.1, - 'typical_p': 1, - 'epsilon_cutoff': 0, # In units of 1e-4 - 'eta_cutoff': 0, # In units of 1e-4 - 'tfs': 1, - 'top_a': 0, - 'repetition_penalty': 1.18, - 'repetition_penalty_range': 0, - 'top_k': 40, - 'min_length': 0, - 'no_repeat_ngram_size': 0, - 'num_beams': 1, - 'penalty_alpha': 0, - 'length_penalty': 1, - 'early_stopping': False, - 'mirostat_mode': 0, - 'mirostat_tau': 5, - 'mirostat_eta': 0.1, - 'grammar_string': '', - 'guidance_scale': 1, - 'negative_prompt': '', - - 'seed': -1, - 'add_bos_token': True, - 'truncation_length': 2048, - 'ban_eos_token': False, - 'custom_token_bans': '', - 'skip_special_tokens': True, - 'stopping_strings': [] - } - - response = requests.post(URI, json=request) - - if response.status_code == 200: - result = response.json()['results'][0]['text'] - print(prompt + result) - - -if __name__ == '__main__': - prompt = "In order to make homemade bread, follow these steps:\n1)" - run(prompt) diff --git a/spaces/Anonymous-123/ImageNet-Editing/editing_diffusion/guided_diffusion/guided_diffusion/fp16_util.py b/spaces/Anonymous-123/ImageNet-Editing/editing_diffusion/guided_diffusion/guided_diffusion/fp16_util.py deleted file mode 100644 index 35a3f461d6d5469719d7734d03056544643d44db..0000000000000000000000000000000000000000 --- a/spaces/Anonymous-123/ImageNet-Editing/editing_diffusion/guided_diffusion/guided_diffusion/fp16_util.py +++ /dev/null @@ -1,236 +0,0 @@ -""" -Helpers to train with 16-bit precision. -""" - -import numpy as np -import torch as th -import torch.nn as nn -from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors - -from . import logger - -INITIAL_LOG_LOSS_SCALE = 20.0 - - -def convert_module_to_f16(l): - """ - Convert primitive modules to float16. - """ - if isinstance(l, (nn.Conv1d, nn.Conv2d, nn.Conv3d)): - l.weight.data = l.weight.data.half() - if l.bias is not None: - l.bias.data = l.bias.data.half() - - -def convert_module_to_f32(l): - """ - Convert primitive modules to float32, undoing convert_module_to_f16(). - """ - if isinstance(l, (nn.Conv1d, nn.Conv2d, nn.Conv3d)): - l.weight.data = l.weight.data.float() - if l.bias is not None: - l.bias.data = l.bias.data.float() - - -def make_master_params(param_groups_and_shapes): - """ - Copy model parameters into a (differently-shaped) list of full-precision - parameters. - """ - master_params = [] - for param_group, shape in param_groups_and_shapes: - master_param = nn.Parameter( - _flatten_dense_tensors( - [param.detach().float() for (_, param) in param_group] - ).view(shape) - ) - master_param.requires_grad = True - master_params.append(master_param) - return master_params - - -def model_grads_to_master_grads(param_groups_and_shapes, master_params): - """ - Copy the gradients from the model parameters into the master parameters - from make_master_params(). - """ - for master_param, (param_group, shape) in zip( - master_params, param_groups_and_shapes - ): - master_param.grad = _flatten_dense_tensors( - [param_grad_or_zeros(param) for (_, param) in param_group] - ).view(shape) - - -def master_params_to_model_params(param_groups_and_shapes, master_params): - """ - Copy the master parameter data back into the model parameters. - """ - # Without copying to a list, if a generator is passed, this will - # silently not copy any parameters. - for master_param, (param_group, _) in zip(master_params, param_groups_and_shapes): - for (_, param), unflat_master_param in zip( - param_group, unflatten_master_params(param_group, master_param.view(-1)) - ): - param.detach().copy_(unflat_master_param) - - -def unflatten_master_params(param_group, master_param): - return _unflatten_dense_tensors(master_param, [param for (_, param) in param_group]) - - -def get_param_groups_and_shapes(named_model_params): - named_model_params = list(named_model_params) - scalar_vector_named_params = ( - [(n, p) for (n, p) in named_model_params if p.ndim <= 1], - (-1), - ) - matrix_named_params = ( - [(n, p) for (n, p) in named_model_params if p.ndim > 1], - (1, -1), - ) - return [scalar_vector_named_params, matrix_named_params] - - -def master_params_to_state_dict( - model, param_groups_and_shapes, master_params, use_fp16 -): - if use_fp16: - state_dict = model.state_dict() - for master_param, (param_group, _) in zip( - master_params, param_groups_and_shapes - ): - for (name, _), unflat_master_param in zip( - param_group, unflatten_master_params(param_group, master_param.view(-1)) - ): - assert name in state_dict - state_dict[name] = unflat_master_param - else: - state_dict = model.state_dict() - for i, (name, _value) in enumerate(model.named_parameters()): - assert name in state_dict - state_dict[name] = master_params[i] - return state_dict - - -def state_dict_to_master_params(model, state_dict, use_fp16): - if use_fp16: - named_model_params = [ - (name, state_dict[name]) for name, _ in model.named_parameters() - ] - param_groups_and_shapes = get_param_groups_and_shapes(named_model_params) - master_params = make_master_params(param_groups_and_shapes) - else: - master_params = [state_dict[name] for name, _ in model.named_parameters()] - return master_params - - -def zero_master_grads(master_params): - for param in master_params: - param.grad = None - - -def zero_grad(model_params): - for param in model_params: - # Taken from https://pytorch.org/docs/stable/_modules/torch/optim/optimizer.html#Optimizer.add_param_group - if param.grad is not None: - param.grad.detach_() - param.grad.zero_() - - -def param_grad_or_zeros(param): - if param.grad is not None: - return param.grad.data.detach() - else: - return th.zeros_like(param) - - -class MixedPrecisionTrainer: - def __init__( - self, - *, - model, - use_fp16=False, - fp16_scale_growth=1e-3, - initial_lg_loss_scale=INITIAL_LOG_LOSS_SCALE, - ): - self.model = model - self.use_fp16 = use_fp16 - self.fp16_scale_growth = fp16_scale_growth - - self.model_params = list(self.model.parameters()) - self.master_params = self.model_params - self.param_groups_and_shapes = None - self.lg_loss_scale = initial_lg_loss_scale - - if self.use_fp16: - self.param_groups_and_shapes = get_param_groups_and_shapes( - self.model.named_parameters() - ) - self.master_params = make_master_params(self.param_groups_and_shapes) - self.model.convert_to_fp16() - - def zero_grad(self): - zero_grad(self.model_params) - - def backward(self, loss: th.Tensor): - if self.use_fp16: - loss_scale = 2 ** self.lg_loss_scale - (loss * loss_scale).backward() - else: - loss.backward() - - def optimize(self, opt: th.optim.Optimizer): - if self.use_fp16: - return self._optimize_fp16(opt) - else: - return self._optimize_normal(opt) - - def _optimize_fp16(self, opt: th.optim.Optimizer): - logger.logkv_mean("lg_loss_scale", self.lg_loss_scale) - model_grads_to_master_grads(self.param_groups_and_shapes, self.master_params) - grad_norm, param_norm = self._compute_norms(grad_scale=2 ** self.lg_loss_scale) - if check_overflow(grad_norm): - self.lg_loss_scale -= 1 - logger.log(f"Found NaN, decreased lg_loss_scale to {self.lg_loss_scale}") - zero_master_grads(self.master_params) - return False - - logger.logkv_mean("grad_norm", grad_norm) - logger.logkv_mean("param_norm", param_norm) - - self.master_params[0].grad.mul_(1.0 / (2 ** self.lg_loss_scale)) - opt.step() - zero_master_grads(self.master_params) - master_params_to_model_params(self.param_groups_and_shapes, self.master_params) - self.lg_loss_scale += self.fp16_scale_growth - return True - - def _optimize_normal(self, opt: th.optim.Optimizer): - grad_norm, param_norm = self._compute_norms() - logger.logkv_mean("grad_norm", grad_norm) - logger.logkv_mean("param_norm", param_norm) - opt.step() - return True - - def _compute_norms(self, grad_scale=1.0): - grad_norm = 0.0 - param_norm = 0.0 - for p in self.master_params: - with th.no_grad(): - param_norm += th.norm(p, p=2, dtype=th.float32).item() ** 2 - if p.grad is not None: - grad_norm += th.norm(p.grad, p=2, dtype=th.float32).item() ** 2 - return np.sqrt(grad_norm) / grad_scale, np.sqrt(param_norm) - - def master_params_to_state_dict(self, master_params): - return master_params_to_state_dict( - self.model, self.param_groups_and_shapes, master_params, self.use_fp16 - ) - - def state_dict_to_master_params(self, state_dict): - return state_dict_to_master_params(self.model, state_dict, self.use_fp16) - - -def check_overflow(value): - return (value == float("inf")) or (value == -float("inf")) or (value != value) diff --git a/spaces/Anonymous-sub/Rerender/gmflow_module/main.py b/spaces/Anonymous-sub/Rerender/gmflow_module/main.py deleted file mode 100644 index 1b4c04adc27507ea86867d6e2bf2e0bfacc9233c..0000000000000000000000000000000000000000 --- a/spaces/Anonymous-sub/Rerender/gmflow_module/main.py +++ /dev/null @@ -1,557 +0,0 @@ -import torch -from torch.utils.data import DataLoader -from torch.utils.tensorboard import SummaryWriter - -import argparse -import numpy as np -import os - -from data import build_train_dataset -from gmflow.gmflow import GMFlow -from loss import flow_loss_func -from evaluate import (validate_chairs, validate_things, validate_sintel, validate_kitti, - create_sintel_submission, create_kitti_submission, inference_on_dir) - -from utils.logger import Logger -from utils import misc -from utils.dist_utils import get_dist_info, init_dist, setup_for_distributed - - -def get_args_parser(): - parser = argparse.ArgumentParser() - - # dataset - parser.add_argument('--checkpoint_dir', default='tmp', type=str, - help='where to save the training log and models') - parser.add_argument('--stage', default='chairs', type=str, - help='training stage') - parser.add_argument('--image_size', default=[384, 512], type=int, nargs='+', - help='image size for training') - parser.add_argument('--padding_factor', default=16, type=int, - help='the input should be divisible by padding_factor, otherwise do padding') - - parser.add_argument('--max_flow', default=400, type=int, - help='exclude very large motions during training') - parser.add_argument('--val_dataset', default=['chairs'], type=str, nargs='+', - help='validation dataset') - parser.add_argument('--with_speed_metric', action='store_true', - help='with speed metric when evaluation') - - # training - parser.add_argument('--lr', default=4e-4, type=float) - parser.add_argument('--batch_size', default=12, type=int) - parser.add_argument('--num_workers', default=4, type=int) - parser.add_argument('--weight_decay', default=1e-4, type=float) - parser.add_argument('--grad_clip', default=1.0, type=float) - parser.add_argument('--num_steps', default=100000, type=int) - parser.add_argument('--seed', default=326, type=int) - parser.add_argument('--summary_freq', default=100, type=int) - parser.add_argument('--val_freq', default=10000, type=int) - parser.add_argument('--save_ckpt_freq', default=10000, type=int) - parser.add_argument('--save_latest_ckpt_freq', default=1000, type=int) - - # resume pretrained model or resume training - parser.add_argument('--resume', default=None, type=str, - help='resume from pretrain model for finetuing or resume from terminated training') - parser.add_argument('--strict_resume', action='store_true') - parser.add_argument('--no_resume_optimizer', action='store_true') - - # GMFlow model - parser.add_argument('--num_scales', default=1, type=int, - help='basic gmflow model uses a single 1/8 feature, the refinement uses 1/4 feature') - parser.add_argument('--feature_channels', default=128, type=int) - parser.add_argument('--upsample_factor', default=8, type=int) - parser.add_argument('--num_transformer_layers', default=6, type=int) - parser.add_argument('--num_head', default=1, type=int) - parser.add_argument('--attention_type', default='swin', type=str) - parser.add_argument('--ffn_dim_expansion', default=4, type=int) - - parser.add_argument('--attn_splits_list', default=[2], type=int, nargs='+', - help='number of splits in attention') - parser.add_argument('--corr_radius_list', default=[-1], type=int, nargs='+', - help='correlation radius for matching, -1 indicates global matching') - parser.add_argument('--prop_radius_list', default=[-1], type=int, nargs='+', - help='self-attention radius for flow propagation, -1 indicates global attention') - - # loss - parser.add_argument('--gamma', default=0.9, type=float, - help='loss weight') - - # evaluation - parser.add_argument('--eval', action='store_true') - parser.add_argument('--save_eval_to_file', action='store_true') - parser.add_argument('--evaluate_matched_unmatched', action='store_true') - - # inference on a directory - parser.add_argument('--inference_dir', default=None, type=str) - parser.add_argument('--inference_size', default=None, type=int, nargs='+', - help='can specify the inference size') - parser.add_argument('--dir_paired_data', action='store_true', - help='Paired data in a dir instead of a sequence') - parser.add_argument('--save_flo_flow', action='store_true') - parser.add_argument('--pred_bidir_flow', action='store_true', - help='predict bidirectional flow') - parser.add_argument('--fwd_bwd_consistency_check', action='store_true', - help='forward backward consistency check with bidirection flow') - - # predict on sintel and kitti test set for submission - parser.add_argument('--submission', action='store_true', - help='submission to sintel or kitti test sets') - parser.add_argument('--output_path', default='output', type=str, - help='where to save the prediction results') - parser.add_argument('--save_vis_flow', action='store_true', - help='visualize flow prediction as .png image') - parser.add_argument('--no_save_flo', action='store_true', - help='not save flow as .flo') - - # distributed training - parser.add_argument('--local_rank', default=0, type=int) - parser.add_argument('--distributed', action='store_true') - parser.add_argument('--launcher', default='none', type=str, choices=['none', 'pytorch']) - parser.add_argument('--gpu_ids', default=0, type=int, nargs='+') - - parser.add_argument('--count_time', action='store_true', - help='measure the inference time on sintel') - - return parser - - -def main(args): - if not args.eval and not args.submission and args.inference_dir is None: - if args.local_rank == 0: - print('pytorch version:', torch.__version__) - print(args) - misc.save_args(args) - misc.check_path(args.checkpoint_dir) - misc.save_command(args.checkpoint_dir) - - seed = args.seed - torch.manual_seed(seed) - np.random.seed(seed) - - torch.backends.cudnn.benchmark = True - - if args.launcher == 'none': - args.distributed = False - device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') - else: - args.distributed = True - - # adjust batch size for each gpu - assert args.batch_size % torch.cuda.device_count() == 0 - args.batch_size = args.batch_size // torch.cuda.device_count() - - dist_params = dict(backend='nccl') - init_dist(args.launcher, **dist_params) - # re-set gpu_ids with distributed training mode - _, world_size = get_dist_info() - args.gpu_ids = range(world_size) - device = torch.device('cuda:{}'.format(args.local_rank)) - - setup_for_distributed(args.local_rank == 0) - - # model - model = GMFlow(feature_channels=args.feature_channels, - num_scales=args.num_scales, - upsample_factor=args.upsample_factor, - num_head=args.num_head, - attention_type=args.attention_type, - ffn_dim_expansion=args.ffn_dim_expansion, - num_transformer_layers=args.num_transformer_layers, - ).to(device) - - if not args.eval and not args.submission and not args.inference_dir: - print('Model definition:') - print(model) - - if args.distributed: - model = torch.nn.parallel.DistributedDataParallel( - model.to(device), - device_ids=[args.local_rank], - output_device=args.local_rank) - model_without_ddp = model.module - else: - if torch.cuda.device_count() > 1: - print('Use %d GPUs' % torch.cuda.device_count()) - model = torch.nn.DataParallel(model) - - model_without_ddp = model.module - else: - model_without_ddp = model - - num_params = sum(p.numel() for p in model.parameters()) - print('Number of params:', num_params) - if not args.eval and not args.submission and args.inference_dir is None: - save_name = '%d_parameters' % num_params - open(os.path.join(args.checkpoint_dir, save_name), 'a').close() - - optimizer = torch.optim.AdamW(model_without_ddp.parameters(), lr=args.lr, - weight_decay=args.weight_decay) - - start_epoch = 0 - start_step = 0 - # resume checkpoints - if args.resume: - print('Load checkpoint: %s' % args.resume) - - loc = 'cuda:{}'.format(args.local_rank) - checkpoint = torch.load(args.resume, map_location=loc) - - weights = checkpoint['model'] if 'model' in checkpoint else checkpoint - - model_without_ddp.load_state_dict(weights, strict=args.strict_resume) - - if 'optimizer' in checkpoint and 'step' in checkpoint and 'epoch' in checkpoint and not \ - args.no_resume_optimizer: - print('Load optimizer') - optimizer.load_state_dict(checkpoint['optimizer']) - start_epoch = checkpoint['epoch'] - start_step = checkpoint['step'] - - print('start_epoch: %d, start_step: %d' % (start_epoch, start_step)) - - # evaluate - if args.eval: - val_results = {} - - if 'chairs' in args.val_dataset: - results_dict = validate_chairs(model_without_ddp, - with_speed_metric=args.with_speed_metric, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - - val_results.update(results_dict) - - if 'things' in args.val_dataset: - results_dict = validate_things(model_without_ddp, - padding_factor=args.padding_factor, - with_speed_metric=args.with_speed_metric, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - val_results.update(results_dict) - - if 'sintel' in args.val_dataset: - results_dict = validate_sintel(model_without_ddp, - count_time=args.count_time, - padding_factor=args.padding_factor, - with_speed_metric=args.with_speed_metric, - evaluate_matched_unmatched=args.evaluate_matched_unmatched, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - val_results.update(results_dict) - - if 'kitti' in args.val_dataset: - results_dict = validate_kitti(model_without_ddp, - padding_factor=args.padding_factor, - with_speed_metric=args.with_speed_metric, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - val_results.update(results_dict) - - if args.save_eval_to_file: - misc.check_path(args.checkpoint_dir) - val_file = os.path.join(args.checkpoint_dir, 'val_results.txt') - with open(val_file, 'a') as f: - f.write('\neval results after training done\n\n') - metrics = ['chairs_epe', 'chairs_s0_10', 'chairs_s10_40', 'chairs_s40+', - 'things_clean_epe', 'things_clean_s0_10', 'things_clean_s10_40', 'things_clean_s40+', - 'things_final_epe', 'things_final_s0_10', 'things_final_s10_40', 'things_final_s40+', - 'sintel_clean_epe', 'sintel_clean_s0_10', 'sintel_clean_s10_40', 'sintel_clean_s40+', - 'sintel_final_epe', 'sintel_final_s0_10', 'sintel_final_s10_40', 'sintel_final_s40+', - 'kitti_epe', 'kitti_f1', 'kitti_s0_10', 'kitti_s10_40', 'kitti_s40+', - ] - eval_metrics = [] - for metric in metrics: - if metric in val_results.keys(): - eval_metrics.append(metric) - - metrics_values = [val_results[metric] for metric in eval_metrics] - - num_metrics = len(eval_metrics) - - # save as markdown format - f.write(("| {:>20} " * num_metrics + '\n').format(*eval_metrics)) - f.write(("| {:20.3f} " * num_metrics).format(*metrics_values)) - - f.write('\n\n') - - return - - # Sintel and KITTI submission - if args.submission: - # NOTE: args.val_dataset is a list - if args.val_dataset[0] == 'sintel': - create_sintel_submission(model_without_ddp, - output_path=args.output_path, - padding_factor=args.padding_factor, - save_vis_flow=args.save_vis_flow, - no_save_flo=args.no_save_flo, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - elif args.val_dataset[0] == 'kitti': - create_kitti_submission(model_without_ddp, - output_path=args.output_path, - padding_factor=args.padding_factor, - save_vis_flow=args.save_vis_flow, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - else: - raise ValueError(f'Not supported dataset for submission') - - return - - # inferece on a dir - if args.inference_dir is not None: - inference_on_dir(model_without_ddp, - inference_dir=args.inference_dir, - output_path=args.output_path, - padding_factor=args.padding_factor, - inference_size=args.inference_size, - paired_data=args.dir_paired_data, - save_flo_flow=args.save_flo_flow, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - pred_bidir_flow=args.pred_bidir_flow, - fwd_bwd_consistency_check=args.fwd_bwd_consistency_check, - ) - - return - - # training datset - train_dataset = build_train_dataset(args) - print('Number of training images:', len(train_dataset)) - - # Multi-processing - if args.distributed: - train_sampler = torch.utils.data.distributed.DistributedSampler( - train_dataset, - num_replicas=torch.cuda.device_count(), - rank=args.local_rank) - else: - train_sampler = None - - shuffle = False if args.distributed else True - train_loader = torch.utils.data.DataLoader(train_dataset, batch_size=args.batch_size, - shuffle=shuffle, num_workers=args.num_workers, - pin_memory=True, drop_last=True, - sampler=train_sampler) - - last_epoch = start_step if args.resume and start_step > 0 else -1 - lr_scheduler = torch.optim.lr_scheduler.OneCycleLR( - optimizer, args.lr, - args.num_steps + 10, - pct_start=0.05, - cycle_momentum=False, - anneal_strategy='cos', - last_epoch=last_epoch, - ) - - if args.local_rank == 0: - summary_writer = SummaryWriter(args.checkpoint_dir) - logger = Logger(lr_scheduler, summary_writer, args.summary_freq, - start_step=start_step) - - total_steps = start_step - epoch = start_epoch - print('Start training') - - while total_steps < args.num_steps: - model.train() - - # mannual change random seed for shuffling every epoch - if args.distributed: - train_sampler.set_epoch(epoch) - - for i, sample in enumerate(train_loader): - img1, img2, flow_gt, valid = [x.to(device) for x in sample] - - results_dict = model(img1, img2, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - - flow_preds = results_dict['flow_preds'] - - loss, metrics = flow_loss_func(flow_preds, flow_gt, valid, - gamma=args.gamma, - max_flow=args.max_flow, - ) - - if isinstance(loss, float): - continue - - if torch.isnan(loss): - continue - - metrics.update({'total_loss': loss.item()}) - - # more efficient zero_grad - for param in model_without_ddp.parameters(): - param.grad = None - - loss.backward() - - # Gradient clipping - torch.nn.utils.clip_grad_norm_(model.parameters(), args.grad_clip) - - optimizer.step() - - lr_scheduler.step() - - if args.local_rank == 0: - logger.push(metrics) - - logger.add_image_summary(img1, img2, flow_preds, flow_gt) - - total_steps += 1 - - if total_steps % args.save_ckpt_freq == 0 or total_steps == args.num_steps: - if args.local_rank == 0: - checkpoint_path = os.path.join(args.checkpoint_dir, 'step_%06d.pth' % total_steps) - torch.save({ - 'model': model_without_ddp.state_dict() - }, checkpoint_path) - - if total_steps % args.save_latest_ckpt_freq == 0: - checkpoint_path = os.path.join(args.checkpoint_dir, 'checkpoint_latest.pth') - - if args.local_rank == 0: - torch.save({ - 'model': model_without_ddp.state_dict(), - 'optimizer': optimizer.state_dict(), - 'step': total_steps, - 'epoch': epoch, - }, checkpoint_path) - - if total_steps % args.val_freq == 0: - print('Start validation') - - val_results = {} - # support validation on multiple datasets - if 'chairs' in args.val_dataset: - results_dict = validate_chairs(model_without_ddp, - with_speed_metric=args.with_speed_metric, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - if args.local_rank == 0: - val_results.update(results_dict) - - if 'things' in args.val_dataset: - results_dict = validate_things(model_without_ddp, - padding_factor=args.padding_factor, - with_speed_metric=args.with_speed_metric, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - if args.local_rank == 0: - val_results.update(results_dict) - - if 'sintel' in args.val_dataset: - results_dict = validate_sintel(model_without_ddp, - count_time=args.count_time, - padding_factor=args.padding_factor, - with_speed_metric=args.with_speed_metric, - evaluate_matched_unmatched=args.evaluate_matched_unmatched, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - if args.local_rank == 0: - val_results.update(results_dict) - - if 'kitti' in args.val_dataset: - results_dict = validate_kitti(model_without_ddp, - padding_factor=args.padding_factor, - with_speed_metric=args.with_speed_metric, - attn_splits_list=args.attn_splits_list, - corr_radius_list=args.corr_radius_list, - prop_radius_list=args.prop_radius_list, - ) - if args.local_rank == 0: - val_results.update(results_dict) - - if args.local_rank == 0: - logger.write_dict(val_results) - - # Save validation results - val_file = os.path.join(args.checkpoint_dir, 'val_results.txt') - with open(val_file, 'a') as f: - f.write('step: %06d\n' % total_steps) - if args.evaluate_matched_unmatched: - metrics = ['chairs_epe', - 'chairs_s0_10', 'chairs_s10_40', 'chairs_s40+', - 'things_clean_epe', 'things_clean_s0_10', 'things_clean_s10_40', - 'things_clean_s40+', - 'sintel_clean_epe', 'sintel_clean_matched', 'sintel_clean_unmatched', - 'sintel_clean_s0_10', 'sintel_clean_s10_40', - 'sintel_clean_s40+', - 'sintel_final_epe', 'sintel_final_matched', 'sintel_final_unmatched', - 'sintel_final_s0_10', 'sintel_final_s10_40', - 'sintel_final_s40+', - 'kitti_epe', 'kitti_f1', 'kitti_s0_10', 'kitti_s10_40', 'kitti_s40+', - ] - else: - metrics = ['chairs_epe', 'chairs_s0_10', 'chairs_s10_40', 'chairs_s40+', - 'things_clean_epe', 'things_clean_s0_10', 'things_clean_s10_40', - 'things_clean_s40+', - 'sintel_clean_epe', 'sintel_clean_s0_10', 'sintel_clean_s10_40', - 'sintel_clean_s40+', - 'sintel_final_epe', 'sintel_final_s0_10', 'sintel_final_s10_40', - 'sintel_final_s40+', - 'kitti_epe', 'kitti_f1', 'kitti_s0_10', 'kitti_s10_40', 'kitti_s40+', - ] - - eval_metrics = [] - for metric in metrics: - if metric in val_results.keys(): - eval_metrics.append(metric) - - metrics_values = [val_results[metric] for metric in eval_metrics] - - num_metrics = len(eval_metrics) - - # save as markdown format - if args.evaluate_matched_unmatched: - f.write(("| {:>25} " * num_metrics + '\n').format(*eval_metrics)) - f.write(("| {:25.3f} " * num_metrics).format(*metrics_values)) - else: - f.write(("| {:>20} " * num_metrics + '\n').format(*eval_metrics)) - f.write(("| {:20.3f} " * num_metrics).format(*metrics_values)) - - f.write('\n\n') - - model.train() - - if total_steps >= args.num_steps: - print('Training done') - - return - - epoch += 1 - - -if __name__ == '__main__': - parser = get_args_parser() - args = parser.parse_args() - - if 'LOCAL_RANK' not in os.environ: - os.environ['LOCAL_RANK'] = str(args.local_rank) - - main(args) diff --git a/spaces/AriaMei/TTSdemo/mel_processing.py b/spaces/AriaMei/TTSdemo/mel_processing.py deleted file mode 100644 index ecc547270f044cfbb5538a051314b770aa2b058e..0000000000000000000000000000000000000000 --- a/spaces/AriaMei/TTSdemo/mel_processing.py +++ /dev/null @@ -1,119 +0,0 @@ -import math -import os -import random -import torch -from torch import nn -import torch.nn.functional as F -import torch.utils.data -import numpy as np - -import logging - -numba_logger = logging.getLogger('numba') -numba_logger.setLevel(logging.WARNING) -import warnings -warnings.filterwarnings('ignore') -import librosa -import librosa.util as librosa_util -from librosa.util import normalize, pad_center, tiny -from scipy.signal import get_window -from scipy.io.wavfile import read -from librosa.filters import mel as librosa_mel_fn - -MAX_WAV_VALUE = 32768.0 - - -def dynamic_range_compression_torch(x, C=1, clip_val=1e-5): - """ - PARAMS - ------ - C: compression factor - """ - return torch.log(torch.clamp(x, min=clip_val) * C) - - -def dynamic_range_decompression_torch(x, C=1): - """ - PARAMS - ------ - C: compression factor used to compress - """ - return torch.exp(x) / C - - -def spectral_normalize_torch(magnitudes): - output = dynamic_range_compression_torch(magnitudes) - return output - - -def spectral_de_normalize_torch(magnitudes): - output = dynamic_range_decompression_torch(magnitudes) - return output - - -mel_basis = {} -hann_window = {} - - -def spectrogram_torch(y, n_fft, sampling_rate, hop_size, win_size, center=False): - if torch.min(y) < -1.: - print('min value is ', torch.min(y)) - if torch.max(y) > 1.: - print('max value is ', torch.max(y)) - - global hann_window - dtype_device = str(y.dtype) + '_' + str(y.device) - wnsize_dtype_device = str(win_size) + '_' + dtype_device - if wnsize_dtype_device not in hann_window: - hann_window[wnsize_dtype_device] = torch.hann_window(win_size).to(dtype=y.dtype, device=y.device) - - y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect') - y = y.squeeze(1) - - spec = torch.stft(y, n_fft, hop_length=hop_size, win_length=win_size, window=hann_window[wnsize_dtype_device], - center=center, pad_mode='reflect', normalized=False, onesided=True) - - spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6) - return spec - - -def spec_to_mel_torch(spec, n_fft, num_mels, sampling_rate, fmin, fmax): - global mel_basis - dtype_device = str(spec.dtype) + '_' + str(spec.device) - fmax_dtype_device = str(fmax) + '_' + dtype_device - if fmax_dtype_device not in mel_basis: - mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax) - mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to(dtype=spec.dtype, device=spec.device) - spec = torch.matmul(mel_basis[fmax_dtype_device], spec) - spec = spectral_normalize_torch(spec) - return spec - - -def mel_spectrogram_torch(y, n_fft, num_mels, sampling_rate, hop_size, win_size, fmin, fmax, center=False): - if torch.min(y) < -1.: - print('min value is ', torch.min(y)) - if torch.max(y) > 1.: - print('max value is ', torch.max(y)) - - global mel_basis, hann_window - dtype_device = str(y.dtype) + '_' + str(y.device) - fmax_dtype_device = str(fmax) + '_' + dtype_device - wnsize_dtype_device = str(win_size) + '_' + dtype_device - if fmax_dtype_device not in mel_basis: - mel = librosa_mel_fn(sampling_rate, n_fft, num_mels, fmin, fmax) - mel_basis[fmax_dtype_device] = torch.from_numpy(mel).to(dtype=y.dtype, device=y.device) - if wnsize_dtype_device not in hann_window: - hann_window[wnsize_dtype_device] = torch.hann_window(win_size).to(dtype=y.dtype, device=y.device) - - y = torch.nn.functional.pad(y.unsqueeze(1), (int((n_fft-hop_size)/2), int((n_fft-hop_size)/2)), mode='reflect') - y = y.squeeze(1) - - spec = torch.stft(y, n_fft, hop_length=hop_size, win_length=win_size, window=hann_window[wnsize_dtype_device], - center=center, pad_mode='reflect', normalized=False, onesided=True) - - spec = torch.sqrt(spec.pow(2).sum(-1) + 1e-6) - - spec = torch.matmul(mel_basis[fmax_dtype_device], spec) - spec = spectral_normalize_torch(spec) - - return spec diff --git a/spaces/Arnx/MusicGenXvAKN/audiocraft/models/loaders.py b/spaces/Arnx/MusicGenXvAKN/audiocraft/models/loaders.py deleted file mode 100644 index 97c662c3212b7695669cbfc5214ff2f099c3f319..0000000000000000000000000000000000000000 --- a/spaces/Arnx/MusicGenXvAKN/audiocraft/models/loaders.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the license found in the -# LICENSE file in the root directory of this source tree. - -""" -Utility functions to load from the checkpoints. -Each checkpoint is a torch.saved dict with the following keys: -- 'xp.cfg': the hydra config as dumped during training. This should be used - to rebuild the object using the audiocraft.models.builders functions, -- 'model_best_state': a readily loadable best state for the model, including - the conditioner. The model obtained from `xp.cfg` should be compatible - with this state dict. In the case of a LM, the encodec model would not be - bundled along but instead provided separately. - -Those functions also support loading from a remote location with the Torch Hub API. -They also support overriding some parameters, in particular the device and dtype -of the returned model. -""" - -from pathlib import Path -from huggingface_hub import hf_hub_download -import typing as tp -import os - -from omegaconf import OmegaConf -import torch - -from . import builders - - -HF_MODEL_CHECKPOINTS_MAP = { - "small": "facebook/musicgen-small", - "medium": "facebook/musicgen-medium", - "large": "facebook/musicgen-large", - "melody": "facebook/musicgen-melody", -} - - -def _get_state_dict( - file_or_url_or_id: tp.Union[Path, str], - filename: tp.Optional[str] = None, - device='cpu', - cache_dir: tp.Optional[str] = None, -): - # Return the state dict either from a file or url - file_or_url_or_id = str(file_or_url_or_id) - assert isinstance(file_or_url_or_id, str) - - if os.path.isfile(file_or_url_or_id): - return torch.load(file_or_url_or_id, map_location=device) - - if os.path.isdir(file_or_url_or_id): - file = f"{file_or_url_or_id}/{filename}" - return torch.load(file, map_location=device) - - elif file_or_url_or_id.startswith('https://'): - return torch.hub.load_state_dict_from_url(file_or_url_or_id, map_location=device, check_hash=True) - - elif file_or_url_or_id in HF_MODEL_CHECKPOINTS_MAP: - assert filename is not None, "filename needs to be defined if using HF checkpoints" - - repo_id = HF_MODEL_CHECKPOINTS_MAP[file_or_url_or_id] - file = hf_hub_download(repo_id=repo_id, filename=filename, cache_dir=cache_dir) - return torch.load(file, map_location=device) - - else: - raise ValueError(f"{file_or_url_or_id} is not a valid name, path or link that can be loaded.") - - -def load_compression_model(file_or_url_or_id: tp.Union[Path, str], device='cpu', cache_dir: tp.Optional[str] = None): - pkg = _get_state_dict(file_or_url_or_id, filename="compression_state_dict.bin", cache_dir=cache_dir) - cfg = OmegaConf.create(pkg['xp.cfg']) - cfg.device = str(device) - model = builders.get_compression_model(cfg) - model.load_state_dict(pkg['best_state']) - model.eval() - return model - - -def load_lm_model(file_or_url_or_id: tp.Union[Path, str], device='cpu', cache_dir: tp.Optional[str] = None): - pkg = _get_state_dict(file_or_url_or_id, filename="state_dict.bin", cache_dir=cache_dir) - cfg = OmegaConf.create(pkg['xp.cfg']) - cfg.device = str(device) - if cfg.device == 'cpu': - cfg.dtype = 'float32' - else: - cfg.dtype = 'float16' - model = builders.get_lm_model(cfg) - model.load_state_dict(pkg['best_state']) - model.eval() - model.cfg = cfg - return model diff --git a/spaces/Artrajz/vits-simple-api/bert_vits2/utils.py b/spaces/Artrajz/vits-simple-api/bert_vits2/utils.py deleted file mode 100644 index 5ac625294ec1c6ef87b12750a1f1b2169d2c5254..0000000000000000000000000000000000000000 --- a/spaces/Artrajz/vits-simple-api/bert_vits2/utils.py +++ /dev/null @@ -1,70 +0,0 @@ -import os -import sys -import logging -import torch - -MATPLOTLIB_FLAG = False - -logging.basicConfig(stream=sys.stdout, level=logging.DEBUG) -logger = logging - - -def load_checkpoint(checkpoint_path, model, optimizer=None, skip_optimizer=False, version=None): - assert os.path.isfile(checkpoint_path) - checkpoint_dict = torch.load(checkpoint_path, map_location='cpu') - iteration = checkpoint_dict['iteration'] - learning_rate = checkpoint_dict['learning_rate'] - if optimizer is not None and not skip_optimizer and checkpoint_dict['optimizer'] is not None: - optimizer.load_state_dict(checkpoint_dict['optimizer']) - elif optimizer is None and not skip_optimizer: - # else: #Disable this line if Infer ,and enable the line upper - new_opt_dict = optimizer.state_dict() - new_opt_dict_params = new_opt_dict['param_groups'][0]['params'] - new_opt_dict['param_groups'] = checkpoint_dict['optimizer']['param_groups'] - new_opt_dict['param_groups'][0]['params'] = new_opt_dict_params - optimizer.load_state_dict(new_opt_dict) - saved_state_dict = checkpoint_dict['model'] - if hasattr(model, 'module'): - state_dict = model.module.state_dict() - else: - state_dict = model.state_dict() - new_state_dict = {} - for k, v in state_dict.items(): - try: - # assert "emb_g" not in k - # print("load", k) - new_state_dict[k] = saved_state_dict[k] - assert saved_state_dict[k].shape == v.shape, (saved_state_dict[k].shape, v.shape) - except: - # Handle legacy model versions and provide appropriate warnings - if "ja_bert_proj" in k: - v = torch.zeros_like(v) - if version is None: - logger.error(f"{k} is not in the checkpoint") - logger.warning( - f"If you're using an older version of the model, consider adding the \"version\" parameter to the model's config.json under the \"data\" section. For instance: \"legacy_version\": \"1.0.1\"") - elif "flow.flows.0.enc.attn_layers.3" in k: - logger.error(f"{k} is not in the checkpoint") - logger.warning( - f"If you're using a transitional version, please add the \"version\": \"1.1.0-transition\" parameter within the \"data\" section of the model's config.json.") - else: - logger.error(f"{k} is not in the checkpoint") - - new_state_dict[k] = v - if hasattr(model, 'module'): - model.module.load_state_dict(new_state_dict, strict=False) - else: - model.load_state_dict(new_state_dict, strict=False) - # print("load ") - logger.info("Loaded checkpoint '{}' (iteration {})".format( - checkpoint_path, iteration)) - return model, optimizer, learning_rate, iteration - - -def process_legacy_versions(hps): - version = getattr(hps, "version", getattr(hps.data, "version", None)) - if version: - prefix = version[0].lower() - if prefix == "v": - version = version[1:] - return version diff --git a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/chardet/langbulgarianmodel.py b/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/chardet/langbulgarianmodel.py deleted file mode 100644 index 994668219dd4def6404e0afd3f538b29a0e50f8b..0000000000000000000000000000000000000000 --- a/spaces/Ataturk-Chatbot/HuggingFaceChat/venv/lib/python3.11/site-packages/pip/_vendor/chardet/langbulgarianmodel.py +++ /dev/null @@ -1,4649 +0,0 @@ -from pip._vendor.chardet.sbcharsetprober import SingleByteCharSetModel - -# 3: Positive -# 2: Likely -# 1: Unlikely -# 0: Negative - -BULGARIAN_LANG_MODEL = { - 63: { # 'e' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 1, # 'б' - 9: 1, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 1, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 0, # 'и' - 26: 1, # 'й' - 12: 1, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 1, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 1, # 'с' - 5: 1, # 'т' - 19: 0, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 45: { # '\xad' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 0, # 'Л' - 38: 1, # 'М' - 36: 0, # 'Н' - 41: 1, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 1, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 1, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 0, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 0, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 0, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 31: { # 'А' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 1, # 'А' - 32: 1, # 'Б' - 35: 2, # 'В' - 43: 1, # 'Г' - 37: 2, # 'Д' - 44: 2, # 'Е' - 55: 1, # 'Ж' - 47: 2, # 'З' - 40: 1, # 'И' - 59: 1, # 'Й' - 33: 1, # 'К' - 46: 2, # 'Л' - 38: 1, # 'М' - 36: 2, # 'Н' - 41: 1, # 'О' - 30: 2, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 1, # 'У' - 48: 2, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 2, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 1, # 'а' - 18: 2, # 'б' - 9: 2, # 'в' - 20: 2, # 'г' - 11: 2, # 'д' - 3: 1, # 'е' - 23: 1, # 'ж' - 15: 2, # 'з' - 2: 0, # 'и' - 26: 2, # 'й' - 12: 2, # 'к' - 10: 3, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 0, # 'о' - 13: 2, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 1, # 'у' - 29: 2, # 'ф' - 25: 1, # 'х' - 22: 1, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 32: { # 'Б' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 2, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 2, # 'Д' - 44: 1, # 'Е' - 55: 1, # 'Ж' - 47: 2, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 2, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 1, # 'У' - 48: 2, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 0, # 'Ш' - 57: 1, # 'Щ' - 61: 2, # 'Ъ' - 60: 1, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 2, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 1, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 35: { # 'В' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 2, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 1, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 2, # 'Ф' - 49: 0, # 'Х' - 53: 1, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 2, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 2, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 2, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 2, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 43: { # 'Г' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 2, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 0, # 'П' - 39: 1, # 'Р' - 28: 1, # 'С' - 34: 0, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 1, # 'Щ' - 61: 1, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 1, # 'б' - 9: 1, # 'в' - 20: 0, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 2, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 1, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 37: { # 'Д' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 2, # 'В' - 43: 1, # 'Г' - 37: 2, # 'Д' - 44: 2, # 'Е' - 55: 2, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 2, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 2, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 2, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 44: { # 'Е' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 1, # 'Б' - 35: 2, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 1, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 1, # 'Й' - 33: 2, # 'К' - 46: 2, # 'Л' - 38: 1, # 'М' - 36: 2, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 1, # 'У' - 48: 2, # 'Ф' - 49: 1, # 'Х' - 53: 2, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 1, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 0, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 2, # 'д' - 3: 0, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 0, # 'и' - 26: 1, # 'й' - 12: 2, # 'к' - 10: 2, # 'л' - 14: 2, # 'м' - 6: 2, # 'н' - 4: 0, # 'о' - 13: 1, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 1, # 'т' - 19: 1, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 55: { # 'Ж' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 1, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 47: { # 'З' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 2, # 'Н' - 41: 1, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 1, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 2, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 1, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 1, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 40: { # 'И' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 1, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 2, # 'Е' - 55: 1, # 'Ж' - 47: 2, # 'З' - 40: 1, # 'И' - 59: 1, # 'Й' - 33: 2, # 'К' - 46: 2, # 'Л' - 38: 2, # 'М' - 36: 2, # 'Н' - 41: 1, # 'О' - 30: 1, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 0, # 'У' - 48: 1, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 1, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 2, # 'Я' - 1: 1, # 'а' - 18: 1, # 'б' - 9: 3, # 'в' - 20: 2, # 'г' - 11: 1, # 'д' - 3: 1, # 'е' - 23: 0, # 'ж' - 15: 3, # 'з' - 2: 0, # 'и' - 26: 1, # 'й' - 12: 1, # 'к' - 10: 2, # 'л' - 14: 2, # 'м' - 6: 2, # 'н' - 4: 0, # 'о' - 13: 1, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 0, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 1, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 59: { # 'Й' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 1, # 'С' - 34: 1, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 1, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 0, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 1, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 0, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 2, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 33: { # 'К' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 0, # 'М' - 36: 2, # 'Н' - 41: 2, # 'О' - 30: 2, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 1, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 1, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 2, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 3, # 'р' - 8: 1, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 46: { # 'Л' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 2, # 'Г' - 37: 1, # 'Д' - 44: 2, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 0, # 'Р' - 28: 1, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 1, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 1, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 2, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 38: { # 'М' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 2, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 1, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 2, # 'л' - 14: 0, # 'м' - 6: 2, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 36: { # 'Н' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 2, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 2, # 'Д' - 44: 2, # 'Е' - 55: 1, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 1, # 'Й' - 33: 2, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 1, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 1, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 2, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 41: { # 'О' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 1, # 'Б' - 35: 2, # 'В' - 43: 1, # 'Г' - 37: 2, # 'Д' - 44: 1, # 'Е' - 55: 1, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 1, # 'Й' - 33: 2, # 'К' - 46: 2, # 'Л' - 38: 2, # 'М' - 36: 2, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 1, # 'Х' - 53: 0, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 1, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 1, # 'а' - 18: 2, # 'б' - 9: 2, # 'в' - 20: 2, # 'г' - 11: 1, # 'д' - 3: 1, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 0, # 'и' - 26: 1, # 'й' - 12: 2, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 0, # 'о' - 13: 2, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 3, # 'т' - 19: 1, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 1, # 'ц' - 21: 2, # 'ч' - 27: 0, # 'ш' - 24: 2, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 30: { # 'П' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 2, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 2, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 3, # 'л' - 14: 0, # 'м' - 6: 1, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 3, # 'р' - 8: 1, # 'с' - 5: 1, # 'т' - 19: 2, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 39: { # 'Р' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 2, # 'Г' - 37: 2, # 'Д' - 44: 2, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 0, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 2, # 'П' - 39: 1, # 'Р' - 28: 1, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 1, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 1, # 'с' - 5: 0, # 'т' - 19: 3, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 28: { # 'С' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 3, # 'А' - 32: 2, # 'Б' - 35: 2, # 'В' - 43: 1, # 'Г' - 37: 2, # 'Д' - 44: 2, # 'Е' - 55: 1, # 'Ж' - 47: 1, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 2, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 2, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 2, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 1, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 2, # 'к' - 10: 3, # 'л' - 14: 2, # 'м' - 6: 1, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 2, # 'р' - 8: 0, # 'с' - 5: 3, # 'т' - 19: 2, # 'у' - 29: 2, # 'ф' - 25: 1, # 'х' - 22: 1, # 'ц' - 21: 1, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 34: { # 'Т' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 2, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 2, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 2, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 2, # 'О' - 30: 1, # 'П' - 39: 2, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 1, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 1, # 'Ъ' - 60: 0, # 'Ю' - 56: 1, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 1, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 1, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 3, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 51: { # 'У' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 1, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 2, # 'Е' - 55: 1, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 0, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 1, # 'С' - 34: 2, # 'Т' - 51: 0, # 'У' - 48: 1, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 1, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 2, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 2, # 'и' - 26: 1, # 'й' - 12: 2, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 2, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 2, # 'с' - 5: 1, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 2, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 48: { # 'Ф' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 2, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 1, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 2, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 2, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 49: { # 'Х' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 1, # 'П' - 39: 1, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 1, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 1, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 0, # 'н' - 4: 2, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 53: { # 'Ц' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 2, # 'И' - 59: 0, # 'Й' - 33: 2, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 1, # 'Р' - 28: 2, # 'С' - 34: 0, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 2, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 1, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 50: { # 'Ч' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 2, # 'А' - 32: 1, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 1, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 2, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 1, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 54: { # 'Ш' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 1, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 1, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 1, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 2, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 2, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 1, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 57: { # 'Щ' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 1, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 1, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 1, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 1, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 61: { # 'Ъ' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 1, # 'Д' - 44: 0, # 'Е' - 55: 1, # 'Ж' - 47: 1, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 2, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 0, # 'О' - 30: 1, # 'П' - 39: 2, # 'Р' - 28: 1, # 'С' - 34: 1, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 1, # 'Х' - 53: 1, # 'Ц' - 50: 1, # 'Ч' - 54: 1, # 'Ш' - 57: 1, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 0, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 0, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 1, # 'л' - 14: 0, # 'м' - 6: 1, # 'н' - 4: 0, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 60: { # 'Ю' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 1, # 'Б' - 35: 0, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 0, # 'Е' - 55: 1, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 0, # 'М' - 36: 1, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 1, # 'Р' - 28: 1, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 1, # 'б' - 9: 1, # 'в' - 20: 2, # 'г' - 11: 1, # 'д' - 3: 0, # 'е' - 23: 2, # 'ж' - 15: 1, # 'з' - 2: 1, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 0, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 1, # 'с' - 5: 1, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 56: { # 'Я' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 1, # 'Б' - 35: 1, # 'В' - 43: 1, # 'Г' - 37: 1, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 1, # 'Л' - 38: 1, # 'М' - 36: 1, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 1, # 'С' - 34: 2, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 1, # 'б' - 9: 1, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 0, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 1, # 'и' - 26: 1, # 'й' - 12: 1, # 'к' - 10: 1, # 'л' - 14: 2, # 'м' - 6: 2, # 'н' - 4: 0, # 'о' - 13: 2, # 'п' - 7: 1, # 'р' - 8: 1, # 'с' - 5: 1, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 1: { # 'а' - 63: 1, # 'e' - 45: 1, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 1, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 1, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 3, # 'з' - 2: 3, # 'и' - 26: 3, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 2, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 3, # 'ф' - 25: 3, # 'х' - 22: 3, # 'ц' - 21: 3, # 'ч' - 27: 3, # 'ш' - 24: 3, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 18: { # 'б' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 3, # 'в' - 20: 1, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 3, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 1, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 0, # 'т' - 19: 3, # 'у' - 29: 0, # 'ф' - 25: 2, # 'х' - 22: 1, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 3, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 9: { # 'в' - 63: 1, # 'e' - 45: 1, # '\xad' - 31: 0, # 'А' - 32: 1, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 0, # 'в' - 20: 2, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 3, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 2, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 3, # 'ч' - 27: 2, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 20: { # 'г' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 3, # 'л' - 14: 1, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 1, # 'п' - 7: 3, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 3, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 11: { # 'д' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 2, # 'б' - 9: 3, # 'в' - 20: 2, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 2, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 1, # 'т' - 19: 3, # 'у' - 29: 1, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 3: { # 'е' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 2, # 'е' - 23: 3, # 'ж' - 15: 3, # 'з' - 2: 2, # 'и' - 26: 3, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 2, # 'у' - 29: 3, # 'ф' - 25: 3, # 'х' - 22: 3, # 'ц' - 21: 3, # 'ч' - 27: 3, # 'ш' - 24: 3, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 23: { # 'ж' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 2, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 3, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 1, # 'с' - 5: 1, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 1, # 'ц' - 21: 1, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 15: { # 'з' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 1, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 2, # 'ш' - 24: 1, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 2: { # 'и' - 63: 1, # 'e' - 45: 1, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 1, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 1, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 1, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 1, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 3, # 'з' - 2: 3, # 'и' - 26: 3, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 2, # 'у' - 29: 3, # 'ф' - 25: 3, # 'х' - 22: 3, # 'ц' - 21: 3, # 'ч' - 27: 3, # 'ш' - 24: 3, # 'щ' - 17: 2, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 26: { # 'й' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 1, # 'а' - 18: 2, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 2, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 2, # 'з' - 2: 1, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 2, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 2, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 1, # 'у' - 29: 2, # 'ф' - 25: 1, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 12: { # 'к' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 1, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 1, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 3, # 'в' - 20: 2, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 2, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 3, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 1, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 3, # 'ц' - 21: 2, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 10: { # 'л' - 63: 1, # 'e' - 45: 1, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 1, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 2, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 1, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 2, # 'п' - 7: 2, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 2, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 2, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 2, # 'ь' - 42: 3, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 14: { # 'м' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 1, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 2, # 'к' - 10: 3, # 'л' - 14: 1, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 1, # 'т' - 19: 3, # 'у' - 29: 2, # 'ф' - 25: 1, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 2, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 6: { # 'н' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 1, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 2, # 'б' - 9: 2, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 2, # 'ж' - 15: 2, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 1, # 'п' - 7: 2, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 3, # 'ф' - 25: 2, # 'х' - 22: 3, # 'ц' - 21: 3, # 'ч' - 27: 2, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 2, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 4: { # 'о' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 2, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 3, # 'з' - 2: 3, # 'и' - 26: 3, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 2, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 2, # 'у' - 29: 3, # 'ф' - 25: 3, # 'х' - 22: 3, # 'ц' - 21: 3, # 'ч' - 27: 3, # 'ш' - 24: 3, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 13: { # 'п' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 1, # 'й' - 12: 2, # 'к' - 10: 3, # 'л' - 14: 1, # 'м' - 6: 2, # 'н' - 4: 3, # 'о' - 13: 1, # 'п' - 7: 3, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 3, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 7: { # 'р' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 3, # 'е' - 23: 3, # 'ж' - 15: 2, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 2, # 'п' - 7: 1, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 2, # 'ф' - 25: 3, # 'х' - 22: 3, # 'ц' - 21: 2, # 'ч' - 27: 3, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 1, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 8: { # 'с' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 2, # 'б' - 9: 3, # 'в' - 20: 2, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 1, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 2, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 2, # 'ш' - 24: 0, # 'щ' - 17: 3, # 'ъ' - 52: 2, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 5: { # 'т' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 2, # 'г' - 11: 2, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 2, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 3, # 'у' - 29: 1, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 2, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 3, # 'ъ' - 52: 2, # 'ь' - 42: 2, # 'ю' - 16: 3, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 19: { # 'у' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 2, # 'е' - 23: 3, # 'ж' - 15: 3, # 'з' - 2: 2, # 'и' - 26: 2, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 2, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 1, # 'у' - 29: 2, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 3, # 'ч' - 27: 3, # 'ш' - 24: 2, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 29: { # 'ф' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 1, # 'в' - 20: 1, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 2, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 2, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 2, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 25: { # 'х' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 3, # 'в' - 20: 0, # 'г' - 11: 1, # 'д' - 3: 2, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 2, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 1, # 'п' - 7: 3, # 'р' - 8: 1, # 'с' - 5: 2, # 'т' - 19: 3, # 'у' - 29: 0, # 'ф' - 25: 1, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 22: { # 'ц' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 2, # 'в' - 20: 1, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 1, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 2, # 'к' - 10: 1, # 'л' - 14: 1, # 'м' - 6: 1, # 'н' - 4: 2, # 'о' - 13: 1, # 'п' - 7: 1, # 'р' - 8: 1, # 'с' - 5: 1, # 'т' - 19: 2, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 1, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 0, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 21: { # 'ч' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 1, # 'б' - 9: 3, # 'в' - 20: 1, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 1, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 2, # 'л' - 14: 2, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 2, # 'р' - 8: 0, # 'с' - 5: 2, # 'т' - 19: 3, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 1, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 27: { # 'ш' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 2, # 'в' - 20: 0, # 'г' - 11: 1, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 3, # 'к' - 10: 2, # 'л' - 14: 1, # 'м' - 6: 3, # 'н' - 4: 2, # 'о' - 13: 2, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 1, # 'т' - 19: 2, # 'у' - 29: 1, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 1, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 2, # 'ъ' - 52: 1, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 24: { # 'щ' - 63: 1, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 3, # 'а' - 18: 0, # 'б' - 9: 1, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 3, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 3, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 2, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 1, # 'р' - 8: 0, # 'с' - 5: 2, # 'т' - 19: 3, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 1, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 2, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 17: { # 'ъ' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 1, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 3, # 'г' - 11: 3, # 'д' - 3: 2, # 'е' - 23: 3, # 'ж' - 15: 3, # 'з' - 2: 1, # 'и' - 26: 2, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 3, # 'о' - 13: 3, # 'п' - 7: 3, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 1, # 'у' - 29: 1, # 'ф' - 25: 2, # 'х' - 22: 2, # 'ц' - 21: 3, # 'ч' - 27: 2, # 'ш' - 24: 3, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 2, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 52: { # 'ь' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 1, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 0, # 'и' - 26: 0, # 'й' - 12: 1, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 1, # 'н' - 4: 3, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 1, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 1, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 1, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 42: { # 'ю' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 1, # 'а' - 18: 2, # 'б' - 9: 1, # 'в' - 20: 2, # 'г' - 11: 2, # 'д' - 3: 1, # 'е' - 23: 2, # 'ж' - 15: 2, # 'з' - 2: 1, # 'и' - 26: 1, # 'й' - 12: 2, # 'к' - 10: 2, # 'л' - 14: 2, # 'м' - 6: 2, # 'н' - 4: 1, # 'о' - 13: 1, # 'п' - 7: 2, # 'р' - 8: 2, # 'с' - 5: 2, # 'т' - 19: 1, # 'у' - 29: 1, # 'ф' - 25: 1, # 'х' - 22: 2, # 'ц' - 21: 3, # 'ч' - 27: 1, # 'ш' - 24: 1, # 'щ' - 17: 1, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 16: { # 'я' - 63: 0, # 'e' - 45: 1, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 3, # 'б' - 9: 3, # 'в' - 20: 2, # 'г' - 11: 3, # 'д' - 3: 2, # 'е' - 23: 1, # 'ж' - 15: 2, # 'з' - 2: 1, # 'и' - 26: 2, # 'й' - 12: 3, # 'к' - 10: 3, # 'л' - 14: 3, # 'м' - 6: 3, # 'н' - 4: 1, # 'о' - 13: 2, # 'п' - 7: 2, # 'р' - 8: 3, # 'с' - 5: 3, # 'т' - 19: 1, # 'у' - 29: 1, # 'ф' - 25: 3, # 'х' - 22: 2, # 'ц' - 21: 1, # 'ч' - 27: 1, # 'ш' - 24: 2, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 1, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 58: { # 'є' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 0, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 0, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 0, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, - 62: { # '№' - 63: 0, # 'e' - 45: 0, # '\xad' - 31: 0, # 'А' - 32: 0, # 'Б' - 35: 0, # 'В' - 43: 0, # 'Г' - 37: 0, # 'Д' - 44: 0, # 'Е' - 55: 0, # 'Ж' - 47: 0, # 'З' - 40: 0, # 'И' - 59: 0, # 'Й' - 33: 0, # 'К' - 46: 0, # 'Л' - 38: 0, # 'М' - 36: 0, # 'Н' - 41: 0, # 'О' - 30: 0, # 'П' - 39: 0, # 'Р' - 28: 0, # 'С' - 34: 0, # 'Т' - 51: 0, # 'У' - 48: 0, # 'Ф' - 49: 0, # 'Х' - 53: 0, # 'Ц' - 50: 0, # 'Ч' - 54: 0, # 'Ш' - 57: 0, # 'Щ' - 61: 0, # 'Ъ' - 60: 0, # 'Ю' - 56: 0, # 'Я' - 1: 0, # 'а' - 18: 0, # 'б' - 9: 0, # 'в' - 20: 0, # 'г' - 11: 0, # 'д' - 3: 0, # 'е' - 23: 0, # 'ж' - 15: 0, # 'з' - 2: 0, # 'и' - 26: 0, # 'й' - 12: 0, # 'к' - 10: 0, # 'л' - 14: 0, # 'м' - 6: 0, # 'н' - 4: 0, # 'о' - 13: 0, # 'п' - 7: 0, # 'р' - 8: 0, # 'с' - 5: 0, # 'т' - 19: 0, # 'у' - 29: 0, # 'ф' - 25: 0, # 'х' - 22: 0, # 'ц' - 21: 0, # 'ч' - 27: 0, # 'ш' - 24: 0, # 'щ' - 17: 0, # 'ъ' - 52: 0, # 'ь' - 42: 0, # 'ю' - 16: 0, # 'я' - 58: 0, # 'є' - 62: 0, # '№' - }, -} - -# 255: Undefined characters that did not exist in training text -# 254: Carriage/Return -# 253: symbol (punctuation) that does not belong to word -# 252: 0 - 9 -# 251: Control characters - -# Character Mapping Table(s): -ISO_8859_5_BULGARIAN_CHAR_TO_ORDER = { - 0: 255, # '\x00' - 1: 255, # '\x01' - 2: 255, # '\x02' - 3: 255, # '\x03' - 4: 255, # '\x04' - 5: 255, # '\x05' - 6: 255, # '\x06' - 7: 255, # '\x07' - 8: 255, # '\x08' - 9: 255, # '\t' - 10: 254, # '\n' - 11: 255, # '\x0b' - 12: 255, # '\x0c' - 13: 254, # '\r' - 14: 255, # '\x0e' - 15: 255, # '\x0f' - 16: 255, # '\x10' - 17: 255, # '\x11' - 18: 255, # '\x12' - 19: 255, # '\x13' - 20: 255, # '\x14' - 21: 255, # '\x15' - 22: 255, # '\x16' - 23: 255, # '\x17' - 24: 255, # '\x18' - 25: 255, # '\x19' - 26: 255, # '\x1a' - 27: 255, # '\x1b' - 28: 255, # '\x1c' - 29: 255, # '\x1d' - 30: 255, # '\x1e' - 31: 255, # '\x1f' - 32: 253, # ' ' - 33: 253, # '!' - 34: 253, # '"' - 35: 253, # '#' - 36: 253, # '$' - 37: 253, # '%' - 38: 253, # '&' - 39: 253, # "'" - 40: 253, # '(' - 41: 253, # ')' - 42: 253, # '*' - 43: 253, # '+' - 44: 253, # ',' - 45: 253, # '-' - 46: 253, # '.' - 47: 253, # '/' - 48: 252, # '0' - 49: 252, # '1' - 50: 252, # '2' - 51: 252, # '3' - 52: 252, # '4' - 53: 252, # '5' - 54: 252, # '6' - 55: 252, # '7' - 56: 252, # '8' - 57: 252, # '9' - 58: 253, # ':' - 59: 253, # ';' - 60: 253, # '<' - 61: 253, # '=' - 62: 253, # '>' - 63: 253, # '?' - 64: 253, # '@' - 65: 77, # 'A' - 66: 90, # 'B' - 67: 99, # 'C' - 68: 100, # 'D' - 69: 72, # 'E' - 70: 109, # 'F' - 71: 107, # 'G' - 72: 101, # 'H' - 73: 79, # 'I' - 74: 185, # 'J' - 75: 81, # 'K' - 76: 102, # 'L' - 77: 76, # 'M' - 78: 94, # 'N' - 79: 82, # 'O' - 80: 110, # 'P' - 81: 186, # 'Q' - 82: 108, # 'R' - 83: 91, # 'S' - 84: 74, # 'T' - 85: 119, # 'U' - 86: 84, # 'V' - 87: 96, # 'W' - 88: 111, # 'X' - 89: 187, # 'Y' - 90: 115, # 'Z' - 91: 253, # '[' - 92: 253, # '\\' - 93: 253, # ']' - 94: 253, # '^' - 95: 253, # '_' - 96: 253, # '`' - 97: 65, # 'a' - 98: 69, # 'b' - 99: 70, # 'c' - 100: 66, # 'd' - 101: 63, # 'e' - 102: 68, # 'f' - 103: 112, # 'g' - 104: 103, # 'h' - 105: 92, # 'i' - 106: 194, # 'j' - 107: 104, # 'k' - 108: 95, # 'l' - 109: 86, # 'm' - 110: 87, # 'n' - 111: 71, # 'o' - 112: 116, # 'p' - 113: 195, # 'q' - 114: 85, # 'r' - 115: 93, # 's' - 116: 97, # 't' - 117: 113, # 'u' - 118: 196, # 'v' - 119: 197, # 'w' - 120: 198, # 'x' - 121: 199, # 'y' - 122: 200, # 'z' - 123: 253, # '{' - 124: 253, # '|' - 125: 253, # '}' - 126: 253, # '~' - 127: 253, # '\x7f' - 128: 194, # '\x80' - 129: 195, # '\x81' - 130: 196, # '\x82' - 131: 197, # '\x83' - 132: 198, # '\x84' - 133: 199, # '\x85' - 134: 200, # '\x86' - 135: 201, # '\x87' - 136: 202, # '\x88' - 137: 203, # '\x89' - 138: 204, # '\x8a' - 139: 205, # '\x8b' - 140: 206, # '\x8c' - 141: 207, # '\x8d' - 142: 208, # '\x8e' - 143: 209, # '\x8f' - 144: 210, # '\x90' - 145: 211, # '\x91' - 146: 212, # '\x92' - 147: 213, # '\x93' - 148: 214, # '\x94' - 149: 215, # '\x95' - 150: 216, # '\x96' - 151: 217, # '\x97' - 152: 218, # '\x98' - 153: 219, # '\x99' - 154: 220, # '\x9a' - 155: 221, # '\x9b' - 156: 222, # '\x9c' - 157: 223, # '\x9d' - 158: 224, # '\x9e' - 159: 225, # '\x9f' - 160: 81, # '\xa0' - 161: 226, # 'Ё' - 162: 227, # 'Ђ' - 163: 228, # 'Ѓ' - 164: 229, # 'Є' - 165: 230, # 'Ѕ' - 166: 105, # 'І' - 167: 231, # 'Ї' - 168: 232, # 'Ј' - 169: 233, # 'Љ' - 170: 234, # 'Њ' - 171: 235, # 'Ћ' - 172: 236, # 'Ќ' - 173: 45, # '\xad' - 174: 237, # 'Ў' - 175: 238, # 'Џ' - 176: 31, # 'А' - 177: 32, # 'Б' - 178: 35, # 'В' - 179: 43, # 'Г' - 180: 37, # 'Д' - 181: 44, # 'Е' - 182: 55, # 'Ж' - 183: 47, # 'З' - 184: 40, # 'И' - 185: 59, # 'Й' - 186: 33, # 'К' - 187: 46, # 'Л' - 188: 38, # 'М' - 189: 36, # 'Н' - 190: 41, # 'О' - 191: 30, # 'П' - 192: 39, # 'Р' - 193: 28, # 'С' - 194: 34, # 'Т' - 195: 51, # 'У' - 196: 48, # 'Ф' - 197: 49, # 'Х' - 198: 53, # 'Ц' - 199: 50, # 'Ч' - 200: 54, # 'Ш' - 201: 57, # 'Щ' - 202: 61, # 'Ъ' - 203: 239, # 'Ы' - 204: 67, # 'Ь' - 205: 240, # 'Э' - 206: 60, # 'Ю' - 207: 56, # 'Я' - 208: 1, # 'а' - 209: 18, # 'б' - 210: 9, # 'в' - 211: 20, # 'г' - 212: 11, # 'д' - 213: 3, # 'е' - 214: 23, # 'ж' - 215: 15, # 'з' - 216: 2, # 'и' - 217: 26, # 'й' - 218: 12, # 'к' - 219: 10, # 'л' - 220: 14, # 'м' - 221: 6, # 'н' - 222: 4, # 'о' - 223: 13, # 'п' - 224: 7, # 'р' - 225: 8, # 'с' - 226: 5, # 'т' - 227: 19, # 'у' - 228: 29, # 'ф' - 229: 25, # 'х' - 230: 22, # 'ц' - 231: 21, # 'ч' - 232: 27, # 'ш' - 233: 24, # 'щ' - 234: 17, # 'ъ' - 235: 75, # 'ы' - 236: 52, # 'ь' - 237: 241, # 'э' - 238: 42, # 'ю' - 239: 16, # 'я' - 240: 62, # '№' - 241: 242, # 'ё' - 242: 243, # 'ђ' - 243: 244, # 'ѓ' - 244: 58, # 'є' - 245: 245, # 'ѕ' - 246: 98, # 'і' - 247: 246, # 'ї' - 248: 247, # 'ј' - 249: 248, # 'љ' - 250: 249, # 'њ' - 251: 250, # 'ћ' - 252: 251, # 'ќ' - 253: 91, # '§' - 254: 252, # 'ў' - 255: 253, # 'џ' -} - -ISO_8859_5_BULGARIAN_MODEL = SingleByteCharSetModel( - charset_name="ISO-8859-5", - language="Bulgarian", - char_to_order_map=ISO_8859_5_BULGARIAN_CHAR_TO_ORDER, - language_model=BULGARIAN_LANG_MODEL, - typical_positive_ratio=0.969392, - keep_ascii_letters=False, - alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя", -) - -WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER = { - 0: 255, # '\x00' - 1: 255, # '\x01' - 2: 255, # '\x02' - 3: 255, # '\x03' - 4: 255, # '\x04' - 5: 255, # '\x05' - 6: 255, # '\x06' - 7: 255, # '\x07' - 8: 255, # '\x08' - 9: 255, # '\t' - 10: 254, # '\n' - 11: 255, # '\x0b' - 12: 255, # '\x0c' - 13: 254, # '\r' - 14: 255, # '\x0e' - 15: 255, # '\x0f' - 16: 255, # '\x10' - 17: 255, # '\x11' - 18: 255, # '\x12' - 19: 255, # '\x13' - 20: 255, # '\x14' - 21: 255, # '\x15' - 22: 255, # '\x16' - 23: 255, # '\x17' - 24: 255, # '\x18' - 25: 255, # '\x19' - 26: 255, # '\x1a' - 27: 255, # '\x1b' - 28: 255, # '\x1c' - 29: 255, # '\x1d' - 30: 255, # '\x1e' - 31: 255, # '\x1f' - 32: 253, # ' ' - 33: 253, # '!' - 34: 253, # '"' - 35: 253, # '#' - 36: 253, # '$' - 37: 253, # '%' - 38: 253, # '&' - 39: 253, # "'" - 40: 253, # '(' - 41: 253, # ')' - 42: 253, # '*' - 43: 253, # '+' - 44: 253, # ',' - 45: 253, # '-' - 46: 253, # '.' - 47: 253, # '/' - 48: 252, # '0' - 49: 252, # '1' - 50: 252, # '2' - 51: 252, # '3' - 52: 252, # '4' - 53: 252, # '5' - 54: 252, # '6' - 55: 252, # '7' - 56: 252, # '8' - 57: 252, # '9' - 58: 253, # ':' - 59: 253, # ';' - 60: 253, # '<' - 61: 253, # '=' - 62: 253, # '>' - 63: 253, # '?' - 64: 253, # '@' - 65: 77, # 'A' - 66: 90, # 'B' - 67: 99, # 'C' - 68: 100, # 'D' - 69: 72, # 'E' - 70: 109, # 'F' - 71: 107, # 'G' - 72: 101, # 'H' - 73: 79, # 'I' - 74: 185, # 'J' - 75: 81, # 'K' - 76: 102, # 'L' - 77: 76, # 'M' - 78: 94, # 'N' - 79: 82, # 'O' - 80: 110, # 'P' - 81: 186, # 'Q' - 82: 108, # 'R' - 83: 91, # 'S' - 84: 74, # 'T' - 85: 119, # 'U' - 86: 84, # 'V' - 87: 96, # 'W' - 88: 111, # 'X' - 89: 187, # 'Y' - 90: 115, # 'Z' - 91: 253, # '[' - 92: 253, # '\\' - 93: 253, # ']' - 94: 253, # '^' - 95: 253, # '_' - 96: 253, # '`' - 97: 65, # 'a' - 98: 69, # 'b' - 99: 70, # 'c' - 100: 66, # 'd' - 101: 63, # 'e' - 102: 68, # 'f' - 103: 112, # 'g' - 104: 103, # 'h' - 105: 92, # 'i' - 106: 194, # 'j' - 107: 104, # 'k' - 108: 95, # 'l' - 109: 86, # 'm' - 110: 87, # 'n' - 111: 71, # 'o' - 112: 116, # 'p' - 113: 195, # 'q' - 114: 85, # 'r' - 115: 93, # 's' - 116: 97, # 't' - 117: 113, # 'u' - 118: 196, # 'v' - 119: 197, # 'w' - 120: 198, # 'x' - 121: 199, # 'y' - 122: 200, # 'z' - 123: 253, # '{' - 124: 253, # '|' - 125: 253, # '}' - 126: 253, # '~' - 127: 253, # '\x7f' - 128: 206, # 'Ђ' - 129: 207, # 'Ѓ' - 130: 208, # '‚' - 131: 209, # 'ѓ' - 132: 210, # '„' - 133: 211, # '…' - 134: 212, # '†' - 135: 213, # '‡' - 136: 120, # '€' - 137: 214, # '‰' - 138: 215, # 'Љ' - 139: 216, # '‹' - 140: 217, # 'Њ' - 141: 218, # 'Ќ' - 142: 219, # 'Ћ' - 143: 220, # 'Џ' - 144: 221, # 'ђ' - 145: 78, # '‘' - 146: 64, # '’' - 147: 83, # '“' - 148: 121, # '”' - 149: 98, # '•' - 150: 117, # '–' - 151: 105, # '—' - 152: 222, # None - 153: 223, # '™' - 154: 224, # 'љ' - 155: 225, # '›' - 156: 226, # 'њ' - 157: 227, # 'ќ' - 158: 228, # 'ћ' - 159: 229, # 'џ' - 160: 88, # '\xa0' - 161: 230, # 'Ў' - 162: 231, # 'ў' - 163: 232, # 'Ј' - 164: 233, # '¤' - 165: 122, # 'Ґ' - 166: 89, # '¦' - 167: 106, # '§' - 168: 234, # 'Ё' - 169: 235, # '©' - 170: 236, # 'Є' - 171: 237, # '«' - 172: 238, # '¬' - 173: 45, # '\xad' - 174: 239, # '®' - 175: 240, # 'Ї' - 176: 73, # '°' - 177: 80, # '±' - 178: 118, # 'І' - 179: 114, # 'і' - 180: 241, # 'ґ' - 181: 242, # 'µ' - 182: 243, # '¶' - 183: 244, # '·' - 184: 245, # 'ё' - 185: 62, # '№' - 186: 58, # 'є' - 187: 246, # '»' - 188: 247, # 'ј' - 189: 248, # 'Ѕ' - 190: 249, # 'ѕ' - 191: 250, # 'ї' - 192: 31, # 'А' - 193: 32, # 'Б' - 194: 35, # 'В' - 195: 43, # 'Г' - 196: 37, # 'Д' - 197: 44, # 'Е' - 198: 55, # 'Ж' - 199: 47, # 'З' - 200: 40, # 'И' - 201: 59, # 'Й' - 202: 33, # 'К' - 203: 46, # 'Л' - 204: 38, # 'М' - 205: 36, # 'Н' - 206: 41, # 'О' - 207: 30, # 'П' - 208: 39, # 'Р' - 209: 28, # 'С' - 210: 34, # 'Т' - 211: 51, # 'У' - 212: 48, # 'Ф' - 213: 49, # 'Х' - 214: 53, # 'Ц' - 215: 50, # 'Ч' - 216: 54, # 'Ш' - 217: 57, # 'Щ' - 218: 61, # 'Ъ' - 219: 251, # 'Ы' - 220: 67, # 'Ь' - 221: 252, # 'Э' - 222: 60, # 'Ю' - 223: 56, # 'Я' - 224: 1, # 'а' - 225: 18, # 'б' - 226: 9, # 'в' - 227: 20, # 'г' - 228: 11, # 'д' - 229: 3, # 'е' - 230: 23, # 'ж' - 231: 15, # 'з' - 232: 2, # 'и' - 233: 26, # 'й' - 234: 12, # 'к' - 235: 10, # 'л' - 236: 14, # 'м' - 237: 6, # 'н' - 238: 4, # 'о' - 239: 13, # 'п' - 240: 7, # 'р' - 241: 8, # 'с' - 242: 5, # 'т' - 243: 19, # 'у' - 244: 29, # 'ф' - 245: 25, # 'х' - 246: 22, # 'ц' - 247: 21, # 'ч' - 248: 27, # 'ш' - 249: 24, # 'щ' - 250: 17, # 'ъ' - 251: 75, # 'ы' - 252: 52, # 'ь' - 253: 253, # 'э' - 254: 42, # 'ю' - 255: 16, # 'я' -} - -WINDOWS_1251_BULGARIAN_MODEL = SingleByteCharSetModel( - charset_name="windows-1251", - language="Bulgarian", - char_to_order_map=WINDOWS_1251_BULGARIAN_CHAR_TO_ORDER, - language_model=BULGARIAN_LANG_MODEL, - typical_positive_ratio=0.969392, - keep_ascii_letters=False, - alphabet="АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЬЮЯабвгдежзийклмнопрстуфхцчшщъьюя", -) diff --git a/spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/layers/rotated_boxes.py b/spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/layers/rotated_boxes.py deleted file mode 100644 index 03f73b3bb99275931a887ad9b2d8c0ac9f412bf3..0000000000000000000000000000000000000000 --- a/spaces/Awiny/Image2Paragraph/models/grit_src/third_party/CenterNet2/detectron2/layers/rotated_boxes.py +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -from __future__ import absolute_import, division, print_function, unicode_literals -import torch - - -def pairwise_iou_rotated(boxes1, boxes2): - """ - Return intersection-over-union (Jaccard index) of boxes. - - Both sets of boxes are expected to be in - (x_center, y_center, width, height, angle) format. - - Arguments: - boxes1 (Tensor[N, 5]) - boxes2 (Tensor[M, 5]) - - Returns: - iou (Tensor[N, M]): the NxM matrix containing the pairwise - IoU values for every element in boxes1 and boxes2 - """ - return torch.ops.detectron2.box_iou_rotated(boxes1, boxes2) diff --git a/spaces/Benson/text-generation/Examples/Descargar Facebook Lite Apk Versin Antigua.md b/spaces/Benson/text-generation/Examples/Descargar Facebook Lite Apk Versin Antigua.md deleted file mode 100644 index f98750ba5fc9faa4300e551aa73528a3b1a8cba7..0000000000000000000000000000000000000000 --- a/spaces/Benson/text-generation/Examples/Descargar Facebook Lite Apk Versin Antigua.md +++ /dev/null @@ -1,118 +0,0 @@ - -Facebook Lite es una aplicación popular que te permite usar Facebook en tu dispositivo Android sin consumir demasiados datos o espacio de almacenamiento. Sin embargo, a veces es posible que tenga que descargar una versión antigua de Facebook Lite por varias razones, como problemas de compatibilidad, problemas de rendimiento o preferencias personales. En este artículo, le mostraremos cómo encontrar y descargar la versión antigua de Facebook Lite APK de diferentes fuentes, y cómo instalarlo en su dispositivo Android.
-Facebook Lite es una versión de Facebook diseñada para trabajar más rápido y usar menos datos en dispositivos de gama baja o lenta. Tiene muchas características y beneficios que lo convierten en una gran alternativa a la aplicación regular de Facebook, como:
-Download ○ https://bltlly.com/2v6Lhe
Sin embargo, puede haber algunas situaciones en las que prefieras usar una versión antigua de Facebook Lite en lugar de la última, como:
-Uptodown es un sitio web que proporciona descargas gratuitas de aplicaciones y juegos para Android, iOS, Windows, Mac y Linux. Tiene una gran colección de versiones antiguas de Facebook Lite, que se remonta a 2015. Para descargar una versión antigua de Facebook Lite de Uptodown, sigue estos pasos:
-APKPure es otro sitio web que ofrece descargas gratuitas de aplicaciones y juegos para dispositivos Android. También tiene una amplia gama de versiones antiguas de Facebook Lite, que se remonta a 2015. Para descargar una versión antigua de Facebook Lite desde APKPure, sigue estos pasos:
- -APKMirror es otro sitio web que ofrece descargas gratuitas de aplicaciones y juegos para dispositivos Android. También tiene un enorme archivo de versiones antiguas de Facebook Lite, que se remonta a 2015. Para descargar una versión antigua de Facebook Lite desde APKMirror, sigue estos pasos:
- -Una vez que haya descargado el archivo de versión antigua de Facebook Lite APK de una de las fuentes anteriores, tendrá que instalarlo en su dispositivo Android. Para ello, deberá seguir estos pasos:
-De forma predeterminada, tu dispositivo Android no te permitirá instalar aplicaciones desde fuentes distintas de Google Play Store. Esta es una medida de seguridad para evitar que malware y virus infecten tu dispositivo. Sin embargo, si confías en la fuente del archivo APK, puedes habilitar la opción de instalar aplicaciones de fuentes desconocidas. Para hacerlo, sigue estos pasos:
-Siguiente, tendrá que encontrar y abrir el archivo de versión antigua de Facebook Lite APK que ha descargado. Para hacer eso, siga estos pasos:
- -Finalmente, tendrá que seguir los pasos de instalación para completar el proceso. Para ello, siga estos pasos:
-En este artículo, le hemos mostrado cómo descargar la versión antigua de Facebook Lite APK de diferentes fuentes, y cómo instalarlo en su dispositivo Android. Esperamos que esta guía haya sido útil e informativa para usted. Si tiene alguna pregunta o comentario, no dude en dejar un comentario a continuación.
-he&&re++,be!==0&&me++,ge+=be,he=be}if(W[me]++,me>k&&(k=me),ge===0)Y++;else{var Pe=1/ge,ye=0;for(_e=0;_e.001&&H++}}var Be=this.skeleton.bones.length,ke=this.getVerticesData(c.b.MatricesIndicesKind),We=this.getVerticesData(c.b.MatricesIndicesExtraKind),je=0;for(q=0;q =Be||He<0)&&je++}return{skinned:!0,valid:Y===0&&H===0&&je===0,report:"Number of Weights = "+oe/4+` -Maximum influences = `+k+` -Missing Weights = `+Y+` -Not Sorted = `+re+` -Not Normalized = `+H+` -WeightCounts = [`+W+`] -Number of bones = `+Be+` -Bad Bone Indices = `+je}},L.prototype._checkDelayState=function(){var G=this.getScene();return this._geometry?this._geometry.load(G):this.delayLoadState===D.a.DELAYLOADSTATE_NOTLOADED&&(this.delayLoadState=D.a.DELAYLOADSTATE_LOADING,this._queueLoad(G)),this},L.prototype._queueLoad=function(G){var Q=this;G._addPendingData(this);var oe=this.delayLoadingFile.indexOf(".babylonbinarymeshdata")!==-1;return x.b.LoadFile(this.delayLoadingFile,function(re){re instanceof ArrayBuffer?Q._delayLoadingFunction(re,Q):Q._delayLoadingFunction(JSON.parse(re),Q),Q.instances.forEach(function(Y){Y.refreshBoundingInfo(),Y._syncSubMeshes()}),Q.delayLoadState=D.a.DELAYLOADSTATE_LOADED,G._removePendingData(Q)},function(){},G.offlineProvider,oe),this},L.prototype.isInFrustum=function(G){return this.delayLoadState!==D.a.DELAYLOADSTATE_LOADING&&!!$.prototype.isInFrustum.call(this,G)&&(this._checkDelayState(),!0)},L.prototype.setMaterialByID=function(G){var Q,oe=this.getScene().materials;for(Q=oe.length-1;Q>-1;Q--)if(oe[Q].id===G)return this.material=oe[Q],this;var re=this.getScene().multiMaterials;for(Q=re.length-1;Q>-1;Q--)if(re[Q].id===G)return this.material=re[Q],this;return this},L.prototype.getAnimatables=function(){var G=new Array;return this.material&&G.push(this.material),this.skeleton&&G.push(this.skeleton),G},L.prototype.bakeTransformIntoVertices=function(G){if(!this.isVerticesDataPresent(c.b.PositionKind))return this;var Q=this.subMeshes.splice(0);this._resetPointsArrayCache();var oe,re=this.getVerticesData(c.b.PositionKind),Y=new Array;for(oe=0;oe 1)for(var oe=0,re=Q.meshes.slice(0);oe -1&&(re.morphTargetManager=Q.getMorphTargetManagerById(G.morphTargetManagerId)),G.skeletonId!==void 0&&G.skeletonId!==null&&(re.skeleton=Q.getLastSkeletonByID(G.skeletonId),G.numBoneInfluencers&&(re.numBoneInfluencers=G.numBoneInfluencers)),G.animations){for(var Y=0;Y 4,he=q?this.getVerticesData(c.b.MatricesIndicesExtraKind):null,ge=q?this.getVerticesData(c.b.MatricesWeightsExtraKind):null,me=G.getTransformMatrices(this),_e=R.e.Zero(),be=new R.a,Pe=new R.a,ye=0,Be=0;Be 0&&(R.a.FromFloat32ArrayToRefScaled(me,Math.floor(16*H[ye+W]),ke,Pe),be.addToSelf(Pe));if(q)for(W=0;W<4;W++)(ke=ge[ye+W])>0&&(R.a.FromFloat32ArrayToRefScaled(me,Math.floor(16*he[ye+W]),ke,Pe),be.addToSelf(Pe));R.e.TransformCoordinatesFromFloatsToRef(oe._sourcePositions[Be],oe._sourcePositions[Be+1],oe._sourcePositions[Be+2],be,_e),_e.toArray(Y,Be),Q&&(R.e.TransformNormalFromFloatsToRef(oe._sourceNormals[Be],oe._sourceNormals[Be+1],oe._sourceNormals[Be+2],be,_e),_e.toArray(k,Be)),be.reset()}return this.updateVerticesData(c.b.PositionKind,Y),Q&&this.updateVerticesData(c.b.NormalKind,k),this},L.MinMax=function(G){var Q=null,oe=null;return G.forEach(function(re){var Y=re.getBoundingInfo().boundingBox;Q&&oe?(Q.minimizeInPlace(Y.minimumWorld),oe.maximizeInPlace(Y.maximumWorld)):(Q=Y.minimumWorld,oe=Y.maximumWorld)}),Q&&oe?{min:Q,max:oe}:{min:R.e.Zero(),max:R.e.Zero()}},L.Center=function(G){var Q=G instanceof Array?L.MinMax(G):G;return R.e.Center(Q.min,Q.max)},L.MergeMeshes=function(G,Q,oe,re,Y,k){var H;if(Q===void 0&&(Q=!0),!oe){var Z=0;for(H=0;H =65536)return N.a.Warn("Cannot merge meshes because resulting mesh will have more than 65536 vertices. Please use allow32BitsIndices = true to use 32 bits indices"),null}if(k){var W,q,he=null;Y=!1}var ge,me=new Array,_e=new Array,be=null,Pe=new Array,ye=null;for(H=0;H
";_._AddLogEntry(M)},_._WarnDisabled=function(x){},_._WarnEnabled=function(x){var u=_._FormatMessage(x);console.warn("BJS - "+u);var M=""+u+"
";_._AddLogEntry(M)},_._ErrorDisabled=function(x){},_._ErrorEnabled=function(x){_.errorsCount++;var u=_._FormatMessage(x);console.error("BJS - "+u);var M=""+u+"
";_._AddLogEntry(M)},Object.defineProperty(_,"LogCache",{get:function(){return _._LogCache},enumerable:!1,configurable:!0}),_.ClearLogCache=function(){_._LogCache="",_.errorsCount=0},Object.defineProperty(_,"LogLevels",{set:function(x){(x&_.MessageLogLevel)===_.MessageLogLevel?_.Log=_._LogEnabled:_.Log=_._LogDisabled,(x&_.WarningLogLevel)===_.WarningLogLevel?_.Warn=_._WarnEnabled:_.Warn=_._WarnDisabled,(x&_.ErrorLogLevel)===_.ErrorLogLevel?_.Error=_._ErrorEnabled:_.Error=_._ErrorDisabled},enumerable:!1,configurable:!0}),_.NoneLogLevel=0,_.MessageLogLevel=1,_.WarningLogLevel=2,_.ErrorLogLevel=4,_.AllLogLevel=7,_._LogCache="",_.errorsCount=0,_.Log=_._LogEnabled,_.Warn=_._WarnEnabled,_.Error=_._ErrorEnabled,_}()},function(Me,y,f){f.d(y,"a",function(){return M}),f.d(y,"b",function(){return R}),f.d(y,"c",function(){return C});var U=f(14),_=f(28),x=f(44),u=f(11),M=function(){function m(c,T,A){c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=0),this.r=c,this.g=T,this.b=A}return m.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+"}"},m.prototype.getClassName=function(){return"Color3"},m.prototype.getHashCode=function(){var c=255*this.r|0;return c=397*(c=397*c^(255*this.g|0))^(255*this.b|0)},m.prototype.toArray=function(c,T){return T===void 0&&(T=0),c[T]=this.r,c[T+1]=this.g,c[T+2]=this.b,this},m.prototype.fromArray=function(c,T){return T===void 0&&(T=0),m.FromArrayToRef(c,T,this),this},m.prototype.toColor4=function(c){return c===void 0&&(c=1),new R(this.r,this.g,this.b,c)},m.prototype.asArray=function(){var c=new Array;return this.toArray(c,0),c},m.prototype.toLuminance=function(){return .3*this.r+.59*this.g+.11*this.b},m.prototype.multiply=function(c){return new m(this.r*c.r,this.g*c.g,this.b*c.b)},m.prototype.multiplyToRef=function(c,T){return T.r=this.r*c.r,T.g=this.g*c.g,T.b=this.b*c.b,this},m.prototype.equals=function(c){return c&&this.r===c.r&&this.g===c.g&&this.b===c.b},m.prototype.equalsFloats=function(c,T,A){return this.r===c&&this.g===T&&this.b===A},m.prototype.scale=function(c){return new m(this.r*c,this.g*c,this.b*c)},m.prototype.scaleToRef=function(c,T){return T.r=this.r*c,T.g=this.g*c,T.b=this.b*c,this},m.prototype.scaleAndAddToRef=function(c,T){return T.r+=this.r*c,T.g+=this.g*c,T.b+=this.b*c,this},m.prototype.clampToRef=function(c,T,A){return c===void 0&&(c=0),T===void 0&&(T=1),A.r=U.a.Clamp(this.r,c,T),A.g=U.a.Clamp(this.g,c,T),A.b=U.a.Clamp(this.b,c,T),this},m.prototype.add=function(c){return new m(this.r+c.r,this.g+c.g,this.b+c.b)},m.prototype.addToRef=function(c,T){return T.r=this.r+c.r,T.g=this.g+c.g,T.b=this.b+c.b,this},m.prototype.subtract=function(c){return new m(this.r-c.r,this.g-c.g,this.b-c.b)},m.prototype.subtractToRef=function(c,T){return T.r=this.r-c.r,T.g=this.g-c.g,T.b=this.b-c.b,this},m.prototype.clone=function(){return new m(this.r,this.g,this.b)},m.prototype.copyFrom=function(c){return this.r=c.r,this.g=c.g,this.b=c.b,this},m.prototype.copyFromFloats=function(c,T,A){return this.r=c,this.g=T,this.b=A,this},m.prototype.set=function(c,T,A){return this.copyFromFloats(c,T,A)},m.prototype.toHexString=function(){var c=255*this.r|0,T=255*this.g|0,A=255*this.b|0;return"#"+U.a.ToHex(c)+U.a.ToHex(T)+U.a.ToHex(A)},m.prototype.toLinearSpace=function(){var c=new m;return this.toLinearSpaceToRef(c),c},m.prototype.toHSV=function(){var c=new m;return this.toHSVToRef(c),c},m.prototype.toHSVToRef=function(c){var T=this.r,A=this.g,S=this.b,g=Math.max(T,A,S),l=Math.min(T,A,S),h=0,v=0,E=g,D=g-l;g!==0&&(v=D/g),g!=l&&(g==T?(h=(A-S)/D,A=0&&l<=1?(v=g,E=h):l>=1&&l<=2?(v=h,E=g):l>=2&&l<=3?(E=g,D=h):l>=3&&l<=4?(E=h,D=g):l>=4&&l<=5?(v=h,D=g):l>=5&&l<=6&&(v=g,D=h);var w=A-g;S.set(v+w,E+w,D+w)},m.FromHexString=function(c){if(c.substring(0,1)!=="#"||c.length!==7)return new m(0,0,0);var T=parseInt(c.substring(1,3),16),A=parseInt(c.substring(3,5),16),S=parseInt(c.substring(5,7),16);return m.FromInts(T,A,S)},m.FromArray=function(c,T){return T===void 0&&(T=0),new m(c[T],c[T+1],c[T+2])},m.FromArrayToRef=function(c,T,A){T===void 0&&(T=0),A.r=c[T],A.g=c[T+1],A.b=c[T+2]},m.FromInts=function(c,T,A){return new m(c/255,T/255,A/255)},m.Lerp=function(c,T,A){var S=new m(0,0,0);return m.LerpToRef(c,T,A,S),S},m.LerpToRef=function(c,T,A,S){S.r=c.r+(T.r-c.r)*A,S.g=c.g+(T.g-c.g)*A,S.b=c.b+(T.b-c.b)*A},m.Red=function(){return new m(1,0,0)},m.Green=function(){return new m(0,1,0)},m.Blue=function(){return new m(0,0,1)},m.Black=function(){return new m(0,0,0)},Object.defineProperty(m,"BlackReadOnly",{get:function(){return m._BlackReadOnly},enumerable:!1,configurable:!0}),m.White=function(){return new m(1,1,1)},m.Purple=function(){return new m(.5,0,.5)},m.Magenta=function(){return new m(1,0,1)},m.Yellow=function(){return new m(1,1,0)},m.Gray=function(){return new m(.5,.5,.5)},m.Teal=function(){return new m(0,1,1)},m.Random=function(){return new m(Math.random(),Math.random(),Math.random())},m._BlackReadOnly=m.Black(),m}(),R=function(){function m(c,T,A,S){c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=0),S===void 0&&(S=1),this.r=c,this.g=T,this.b=A,this.a=S}return m.prototype.addInPlace=function(c){return this.r+=c.r,this.g+=c.g,this.b+=c.b,this.a+=c.a,this},m.prototype.asArray=function(){var c=new Array;return this.toArray(c,0),c},m.prototype.toArray=function(c,T){return T===void 0&&(T=0),c[T]=this.r,c[T+1]=this.g,c[T+2]=this.b,c[T+3]=this.a,this},m.prototype.fromArray=function(c,T){return T===void 0&&(T=0),m.FromArrayToRef(c,T,this),this},m.prototype.equals=function(c){return c&&this.r===c.r&&this.g===c.g&&this.b===c.b&&this.a===c.a},m.prototype.add=function(c){return new m(this.r+c.r,this.g+c.g,this.b+c.b,this.a+c.a)},m.prototype.subtract=function(c){return new m(this.r-c.r,this.g-c.g,this.b-c.b,this.a-c.a)},m.prototype.subtractToRef=function(c,T){return T.r=this.r-c.r,T.g=this.g-c.g,T.b=this.b-c.b,T.a=this.a-c.a,this},m.prototype.scale=function(c){return new m(this.r*c,this.g*c,this.b*c,this.a*c)},m.prototype.scaleToRef=function(c,T){return T.r=this.r*c,T.g=this.g*c,T.b=this.b*c,T.a=this.a*c,this},m.prototype.scaleAndAddToRef=function(c,T){return T.r+=this.r*c,T.g+=this.g*c,T.b+=this.b*c,T.a+=this.a*c,this},m.prototype.clampToRef=function(c,T,A){return c===void 0&&(c=0),T===void 0&&(T=1),A.r=U.a.Clamp(this.r,c,T),A.g=U.a.Clamp(this.g,c,T),A.b=U.a.Clamp(this.b,c,T),A.a=U.a.Clamp(this.a,c,T),this},m.prototype.multiply=function(c){return new m(this.r*c.r,this.g*c.g,this.b*c.b,this.a*c.a)},m.prototype.multiplyToRef=function(c,T){return T.r=this.r*c.r,T.g=this.g*c.g,T.b=this.b*c.b,T.a=this.a*c.a,T},m.prototype.toString=function(){return"{R: "+this.r+" G:"+this.g+" B:"+this.b+" A:"+this.a+"}"},m.prototype.getClassName=function(){return"Color4"},m.prototype.getHashCode=function(){var c=255*this.r|0;return c=397*(c=397*(c=397*c^(255*this.g|0))^(255*this.b|0))^(255*this.a|0)},m.prototype.clone=function(){return new m(this.r,this.g,this.b,this.a)},m.prototype.copyFrom=function(c){return this.r=c.r,this.g=c.g,this.b=c.b,this.a=c.a,this},m.prototype.copyFromFloats=function(c,T,A,S){return this.r=c,this.g=T,this.b=A,this.a=S,this},m.prototype.set=function(c,T,A,S){return this.copyFromFloats(c,T,A,S)},m.prototype.toHexString=function(c){c===void 0&&(c=!1);var T=255*this.r|0,A=255*this.g|0,S=255*this.b|0;if(c)return"#"+U.a.ToHex(T)+U.a.ToHex(A)+U.a.ToHex(S);var g=255*this.a|0;return"#"+U.a.ToHex(T)+U.a.ToHex(A)+U.a.ToHex(S)+U.a.ToHex(g)},m.prototype.toLinearSpace=function(){var c=new m;return this.toLinearSpaceToRef(c),c},m.prototype.toLinearSpaceToRef=function(c){return c.r=Math.pow(this.r,_.c),c.g=Math.pow(this.g,_.c),c.b=Math.pow(this.b,_.c),c.a=this.a,this},m.prototype.toGammaSpace=function(){var c=new m;return this.toGammaSpaceToRef(c),c},m.prototype.toGammaSpaceToRef=function(c){return c.r=Math.pow(this.r,_.b),c.g=Math.pow(this.g,_.b),c.b=Math.pow(this.b,_.b),c.a=this.a,this},m.FromHexString=function(c){if(c.substring(0,1)!=="#"||c.length!==9)return new m(0,0,0,0);var T=parseInt(c.substring(1,3),16),A=parseInt(c.substring(3,5),16),S=parseInt(c.substring(5,7),16),g=parseInt(c.substring(7,9),16);return m.FromInts(T,A,S,g)},m.Lerp=function(c,T,A){var S=new m(0,0,0,0);return m.LerpToRef(c,T,A,S),S},m.LerpToRef=function(c,T,A,S){S.r=c.r+(T.r-c.r)*A,S.g=c.g+(T.g-c.g)*A,S.b=c.b+(T.b-c.b)*A,S.a=c.a+(T.a-c.a)*A},m.FromColor3=function(c,T){return T===void 0&&(T=1),new m(c.r,c.g,c.b,T)},m.FromArray=function(c,T){return T===void 0&&(T=0),new m(c[T],c[T+1],c[T+2],c[T+3])},m.FromArrayToRef=function(c,T,A){T===void 0&&(T=0),A.r=c[T],A.g=c[T+1],A.b=c[T+2],A.a=c[T+3]},m.FromInts=function(c,T,A,S){return new m(c/255,T/255,A/255,S/255)},m.CheckColors4=function(c,T){if(c.length===3*T){for(var A=[],S=0;S0?E.name:w+E.name,(S.a.StartsWith(E.url,"data:")||v.UseSerializedUrlIfAny&&E.url)&&(ae=E.url),X=new v(ae,D,!j,E.invertY,void 0,I)}return X},E,D);return V},v.CreateFromBase64String=function(E,D,w,N,I,V,X,j,ne){return V===void 0&&(V=v.TRILINEAR_SAMPLINGMODE),X===void 0&&(X=null),j===void 0&&(j=null),ne===void 0&&(ne=R.a.TEXTUREFORMAT_RGBA),new v("data:"+D,w,N,I,V,X,j,E,!1,ne)},v.LoadFromDataString=function(E,D,w,N,I,V,X,j,ne,te){return N===void 0&&(N=!1),I===void 0&&(I=!1),V===void 0&&(V=!0),X===void 0&&(X=v.TRILINEAR_SAMPLINGMODE),j===void 0&&(j=null),ne===void 0&&(ne=null),te===void 0&&(te=R.a.TEXTUREFORMAT_RGBA),E.substr(0,5)!=="data:"&&(E="data:"+E),new v(E,w,I,V,X,j,ne,D,N,te)},v.SerializeBuffers=!0,v.ForceSerializeBuffers=!1,v._CubeTextureParser=function(E,D,w){throw m.a.WarnImport("CubeTexture")},v._CreateMirror=function(E,D,w,N){throw m.a.WarnImport("MirrorTexture")},v._CreateRenderTargetTexture=function(E,D,w,N){throw m.a.WarnImport("RenderTargetTexture")},v.NEAREST_SAMPLINGMODE=R.a.TEXTURE_NEAREST_SAMPLINGMODE,v.NEAREST_NEAREST_MIPLINEAR=R.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,v.BILINEAR_SAMPLINGMODE=R.a.TEXTURE_BILINEAR_SAMPLINGMODE,v.LINEAR_LINEAR_MIPNEAREST=R.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,v.TRILINEAR_SAMPLINGMODE=R.a.TEXTURE_TRILINEAR_SAMPLINGMODE,v.LINEAR_LINEAR_MIPLINEAR=R.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,v.NEAREST_NEAREST_MIPNEAREST=R.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,v.NEAREST_LINEAR_MIPNEAREST=R.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,v.NEAREST_LINEAR_MIPLINEAR=R.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,v.NEAREST_LINEAR=R.a.TEXTURE_NEAREST_LINEAR,v.NEAREST_NEAREST=R.a.TEXTURE_NEAREST_NEAREST,v.LINEAR_NEAREST_MIPNEAREST=R.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,v.LINEAR_NEAREST_MIPLINEAR=R.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,v.LINEAR_LINEAR=R.a.TEXTURE_LINEAR_LINEAR,v.LINEAR_NEAREST=R.a.TEXTURE_LINEAR_NEAREST,v.EXPLICIT_MODE=R.a.TEXTURE_EXPLICIT_MODE,v.SPHERICAL_MODE=R.a.TEXTURE_SPHERICAL_MODE,v.PLANAR_MODE=R.a.TEXTURE_PLANAR_MODE,v.CUBIC_MODE=R.a.TEXTURE_CUBIC_MODE,v.PROJECTION_MODE=R.a.TEXTURE_PROJECTION_MODE,v.SKYBOX_MODE=R.a.TEXTURE_SKYBOX_MODE,v.INVCUBIC_MODE=R.a.TEXTURE_INVCUBIC_MODE,v.EQUIRECTANGULAR_MODE=R.a.TEXTURE_EQUIRECTANGULAR_MODE,v.FIXED_EQUIRECTANGULAR_MODE=R.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,v.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=R.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,v.CLAMP_ADDRESSMODE=R.a.TEXTURE_CLAMP_ADDRESSMODE,v.WRAP_ADDRESSMODE=R.a.TEXTURE_WRAP_ADDRESSMODE,v.MIRROR_ADDRESSMODE=R.a.TEXTURE_MIRROR_ADDRESSMODE,v.UseSerializedUrlIfAny=!1,Object(U.c)([Object(_.c)()],v.prototype,"url",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uOffset",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vOffset",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uScale",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vScale",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uAng",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vAng",void 0),Object(U.c)([Object(_.c)()],v.prototype,"wAng",void 0),Object(U.c)([Object(_.c)()],v.prototype,"uRotationCenter",void 0),Object(U.c)([Object(_.c)()],v.prototype,"vRotationCenter",void 0),Object(U.c)([Object(_.c)()],v.prototype,"wRotationCenter",void 0),Object(U.c)([Object(_.c)()],v.prototype,"homogeneousRotationInUVTransform",void 0),Object(U.c)([Object(_.c)()],v.prototype,"isBlocking",null),v}(M.a);C.a.RegisteredTypes["BABYLON.Texture"]=l,_.a._TextureParser=l.Parse},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.GetClass=function(x){return this.RegisteredTypes&&this.RegisteredTypes[x]?this.RegisteredTypes[x]:null},_.RegisteredTypes={},_}()},function(Me,y,f){f.d(y,"b",function(){return l}),f.d(y,"c",function(){return h}),f.d(y,"a",function(){return v});var U=f(6),_=f(38),x=f(8),u=f(41),M=f(57),R=f(21),C=f(49),m=f(22),c=f(56),T=f(145),A=f(104),S=f(122),g=f(120),l=function(){function E(){}return Object.defineProperty(E,"BaseUrl",{get:function(){return c.a.BaseUrl},set:function(D){c.a.BaseUrl=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"DefaultRetryStrategy",{get:function(){return c.a.DefaultRetryStrategy},set:function(D){c.a.DefaultRetryStrategy=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"CorsBehavior",{get:function(){return c.a.CorsBehavior},set:function(D){c.a.CorsBehavior=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"UseFallbackTexture",{get:function(){return m.a.UseFallbackTexture},set:function(D){m.a.UseFallbackTexture=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"RegisteredExternalClasses",{get:function(){return S.a.RegisteredExternalClasses},set:function(D){S.a.RegisteredExternalClasses=D},enumerable:!1,configurable:!0}),Object.defineProperty(E,"fallbackTexture",{get:function(){return m.a.FallbackTexture},set:function(D){m.a.FallbackTexture=D},enumerable:!1,configurable:!0}),E.FetchToRef=function(D,w,N,I,V,X){var j=4*((Math.abs(D)*N%N|0)+(Math.abs(w)*I%I|0)*N);X.r=V[j]/255,X.g=V[j+1]/255,X.b=V[j+2]/255,X.a=V[j+3]/255},E.Mix=function(D,w,N){return D*(1-N)+w*N},E.Instantiate=function(D){return S.a.Instantiate(D)},E.Slice=function(D,w,N){return D.slice?D.slice(w,N):Array.prototype.slice.call(D,w,N)},E.SliceToArray=function(D,w,N){return Array.isArray(D)?D.slice(w,N):Array.prototype.slice.call(D,w,N)},E.SetImmediate=function(D){A.a.SetImmediate(D)},E.IsExponentOfTwo=function(D){var w=1;do w*=2;while(w =D)break;if(N(te),V&&V()){j.breakLoop();break}}j.executeNext()},X)},I)},E}();m.a.FallbackTexture="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/4QBmRXhpZgAATU0AKgAAAAgABAEaAAUAAAABAAAAPgEbAAUAAAABAAAARgEoAAMAAAABAAIAAAExAAIAAAAQAAAATgAAAAAAAABgAAAAAQAAAGAAAAABcGFpbnQubmV0IDQuMC41AP/bAEMABAIDAwMCBAMDAwQEBAQFCQYFBQUFCwgIBgkNCw0NDQsMDA4QFBEODxMPDAwSGBITFRYXFxcOERkbGRYaFBYXFv/bAEMBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/AABEIAQABAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APH6KKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76CiiigD5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BQooooA+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/voKKKKAPl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FCiiigD6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++gooooA+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gUKKKKAPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76Pl+iiivuj+BT6gooor4U/vo+X6KKK+6P4FPqCiiivhT++j5fooor7o/gU+oKKKK+FP76P//Z",T.a.Apply()},function(Me,y,f){f.d(y,"a",function(){return S});var U=f(1),_=f(6),x=f(38),u=f(22),M=f(21),R=f(26),C=f(2),m=f(146),c=f(55),T=f(88),A=f(8),S=(f(123),f(129),f(124),function(g){function l(h,v,E,D){D===void 0&&(D=!1);var w=g.call(this,h,v,E,D)||this;if(w.enableOfflineSupport=!1,w.disableManifestCheck=!1,w.scenes=new Array,w.onNewSceneAddedObservable=new _.c,w.postProcesses=new Array,w.isPointerLock=!1,w.onResizeObservable=new _.c,w.onCanvasBlurObservable=new _.c,w.onCanvasFocusObservable=new _.c,w.onCanvasPointerOutObservable=new _.c,w.onBeginFrameObservable=new _.c,w.customAnimationFrameRequester=null,w.onEndFrameObservable=new _.c,w.onBeforeShaderCompilationObservable=new _.c,w.onAfterShaderCompilationObservable=new _.c,w._deterministicLockstep=!1,w._lockstepMaxSteps=4,w._timeStep=1/60,w._fps=60,w._deltaTime=0,w._drawCalls=new c.a,w.canvasTabIndex=1,w.disablePerformanceMonitorInBackground=!1,w._performanceMonitor=new m.a,l.Instances.push(w),!h)return w;if(E=w._creationOptions,h.getContext){var N=h;if(w._onCanvasFocus=function(){w.onCanvasFocusObservable.notifyObservers(w)},w._onCanvasBlur=function(){w.onCanvasBlurObservable.notifyObservers(w)},N.addEventListener("focus",w._onCanvasFocus),N.addEventListener("blur",w._onCanvasBlur),w._onBlur=function(){w.disablePerformanceMonitorInBackground&&w._performanceMonitor.disable(),w._windowIsBackground=!0},w._onFocus=function(){w.disablePerformanceMonitorInBackground&&w._performanceMonitor.enable(),w._windowIsBackground=!1},w._onCanvasPointerOut=function(X){w.onCanvasPointerOutObservable.notifyObservers(X)},N.addEventListener("pointerout",w._onCanvasPointerOut),x.a.IsWindowObjectExist()){var I=w.getHostWindow();I.addEventListener("blur",w._onBlur),I.addEventListener("focus",w._onFocus);var V=document;w._onFullscreenChange=function(){V.fullscreen!==void 0?w.isFullscreen=V.fullscreen:V.mozFullScreen!==void 0?w.isFullscreen=V.mozFullScreen:V.webkitIsFullScreen!==void 0?w.isFullscreen=V.webkitIsFullScreen:V.msIsFullScreen!==void 0&&(w.isFullscreen=V.msIsFullScreen),w.isFullscreen&&w._pointerLockRequested&&N&&l._RequestPointerlock(N)},document.addEventListener("fullscreenchange",w._onFullscreenChange,!1),document.addEventListener("mozfullscreenchange",w._onFullscreenChange,!1),document.addEventListener("webkitfullscreenchange",w._onFullscreenChange,!1),document.addEventListener("msfullscreenchange",w._onFullscreenChange,!1),w._onPointerLockChange=function(){w.isPointerLock=V.mozPointerLockElement===N||V.webkitPointerLockElement===N||V.msPointerLockElement===N||V.pointerLockElement===N},document.addEventListener("pointerlockchange",w._onPointerLockChange,!1),document.addEventListener("mspointerlockchange",w._onPointerLockChange,!1),document.addEventListener("mozpointerlockchange",w._onPointerLockChange,!1),document.addEventListener("webkitpointerlockchange",w._onPointerLockChange,!1),!l.audioEngine&&E.audioEngine&&l.AudioEngineFactory&&(l.audioEngine=l.AudioEngineFactory(w.getRenderingCanvas()))}w._connectVREvents(),w.enableOfflineSupport=l.OfflineProviderFactory!==void 0,E.doNotHandleTouchAction||w._disableTouchAction(),w._deterministicLockstep=!!E.deterministicLockstep,w._lockstepMaxSteps=E.lockstepMaxSteps||0,w._timeStep=E.timeStep||1/60}return w._prepareVRComponent(),E.autoEnableWebVR&&w.initWebVR(),w}return Object(U.d)(l,g),Object.defineProperty(l,"NpmPackage",{get:function(){return R.a.NpmPackage},enumerable:!1,configurable:!0}),Object.defineProperty(l,"Version",{get:function(){return R.a.Version},enumerable:!1,configurable:!0}),Object.defineProperty(l,"Instances",{get:function(){return u.a.Instances},enumerable:!1,configurable:!0}),Object.defineProperty(l,"LastCreatedEngine",{get:function(){return u.a.LastCreatedEngine},enumerable:!1,configurable:!0}),Object.defineProperty(l,"LastCreatedScene",{get:function(){return u.a.LastCreatedScene},enumerable:!1,configurable:!0}),l.MarkAllMaterialsAsDirty=function(h,v){for(var E=0;E 0?this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this.isVRPresenting()?this._requestVRFrame():this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},l.prototype._renderViews=function(){return!1},l.prototype.switchFullscreen=function(h){this.isFullscreen?this.exitFullscreen():this.enterFullscreen(h)},l.prototype.enterFullscreen=function(h){this.isFullscreen||(this._pointerLockRequested=h,this._renderingCanvas&&l._RequestFullscreen(this._renderingCanvas))},l.prototype.exitFullscreen=function(){this.isFullscreen&&l._ExitFullscreen()},l.prototype.enterPointerlock=function(){this._renderingCanvas&&l._RequestPointerlock(this._renderingCanvas)},l.prototype.exitPointerlock=function(){l._ExitPointerlock()},l.prototype.beginFrame=function(){this._measureFps(),this.onBeginFrameObservable.notifyObservers(this),g.prototype.beginFrame.call(this)},l.prototype.endFrame=function(){g.prototype.endFrame.call(this),this._submitVRFrame(),this.onEndFrameObservable.notifyObservers(this)},l.prototype.resize=function(){this.isVRPresenting()||g.prototype.resize.call(this)},l.prototype.setSize=function(h,v){if(!this._renderingCanvas||!g.prototype.setSize.call(this,h,v))return!1;if(this.scenes){for(var E=0;E 1&&w){var I=this.createTransformFeedback();this.bindTransformFeedback(I),this.setTranformFeedbackVaryings(N,w),h.transformFeedback=I}return D.linkProgram(N),this.webGLVersion>1&&w&&this.bindTransformFeedback(null),h.context=D,h.vertexShader=v,h.fragmentShader=E,h.isParallelCompiled||this._finalizePipelineContext(h),N},l.prototype._releaseTexture=function(h){g.prototype._releaseTexture.call(this,h),this.scenes.forEach(function(v){v.postProcesses.forEach(function(E){E._outputTexture==h&&(E._outputTexture=null)}),v.cameras.forEach(function(E){E._postProcesses.forEach(function(D){D&&D._outputTexture==h&&(D._outputTexture=null)})})})},l.prototype._rescaleTexture=function(h,v,E,D,w){var N=this;this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MAG_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_MIN_FILTER,this._gl.LINEAR),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_S,this._gl.CLAMP_TO_EDGE),this._gl.texParameteri(this._gl.TEXTURE_2D,this._gl.TEXTURE_WRAP_T,this._gl.CLAMP_TO_EDGE);var I=this.createRenderTargetTexture({width:v.width,height:v.height},{generateMipMaps:!1,type:C.a.TEXTURETYPE_UNSIGNED_INT,samplingMode:C.a.TEXTURE_BILINEAR_SAMPLINGMODE,generateDepthBuffer:!1,generateStencilBuffer:!1});!this._rescalePostProcess&&l._RescalePostProcessFactory&&(this._rescalePostProcess=l._RescalePostProcessFactory(this)),this._rescalePostProcess.getEffect().executeWhenCompiled(function(){N._rescalePostProcess.onApply=function(X){X._bindTexture("textureSampler",h)};var V=E;V||(V=N.scenes[N.scenes.length-1]),V.postProcessManager.directRender([N._rescalePostProcess],I,!0),N._bindTextureDirectly(N._gl.TEXTURE_2D,v,!0),N._gl.copyTexImage2D(N._gl.TEXTURE_2D,0,D,0,0,v.width,v.height,0),N.unBindFramebuffer(I),N._releaseTexture(I),w&&w()})},l.prototype.getFps=function(){return this._fps},l.prototype.getDeltaTime=function(){return this._deltaTime},l.prototype._measureFps=function(){this._performanceMonitor.sampleFrame(),this._fps=this._performanceMonitor.averageFPS,this._deltaTime=this._performanceMonitor.instantaneousFrameTime||0},l.prototype._uploadImageToTexture=function(h,v,E,D){E===void 0&&(E=0),D===void 0&&(D=0);var w=this._gl,N=this._getWebGLTextureType(h.type),I=this._getInternalFormat(h.format),V=this._getRGBABufferInternalSizedFormat(h.type,I),X=h.isCube?w.TEXTURE_CUBE_MAP:w.TEXTURE_2D;this._bindTextureDirectly(X,h,!0),this._unpackFlipY(h.invertY);var j=w.TEXTURE_2D;h.isCube&&(j=w.TEXTURE_CUBE_MAP_POSITIVE_X+E),w.texImage2D(j,D,V,I,N,v),this._bindTextureDirectly(X,null,!0)},l.prototype.updateRenderTargetTextureSampleCount=function(h,v){if(this.webGLVersion<2||!h)return 1;if(h.samples===v)return v;var E=this._gl;if(v=Math.min(v,this.getCaps().maxMSAASamples),h._depthStencilBuffer&&(E.deleteRenderbuffer(h._depthStencilBuffer),h._depthStencilBuffer=null),h._MSAAFramebuffer&&(E.deleteFramebuffer(h._MSAAFramebuffer),h._MSAAFramebuffer=null),h._MSAARenderBuffer&&(E.deleteRenderbuffer(h._MSAARenderBuffer),h._MSAARenderBuffer=null),v>1&&E.renderbufferStorageMultisample){var D=E.createFramebuffer();if(!D)throw new Error("Unable to create multi sampled framebuffer");h._MSAAFramebuffer=D,this._bindUnboundFramebuffer(h._MSAAFramebuffer);var w=E.createRenderbuffer();if(!w)throw new Error("Unable to create multi sampled framebuffer");E.bindRenderbuffer(E.RENDERBUFFER,w),E.renderbufferStorageMultisample(E.RENDERBUFFER,v,this._getRGBAMultiSampleBufferFormat(h.type),h.width,h.height),E.framebufferRenderbuffer(E.FRAMEBUFFER,E.COLOR_ATTACHMENT0,E.RENDERBUFFER,w),h._MSAARenderBuffer=w}else this._bindUnboundFramebuffer(h._framebuffer);return h.samples=v,h._depthStencilBuffer=this._setupFramebufferDepthAttachments(h._generateStencilBuffer,h._generateDepthBuffer,h.width,h.height,v),this._bindUnboundFramebuffer(null),v},l.prototype.updateTextureComparisonFunction=function(h,v){if(this.webGLVersion!==1){var E=this._gl;h.isCube?(this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,h,!0),v===0?(E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_FUNC,C.a.LEQUAL),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_MODE,E.NONE)):(E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_FUNC,v),E.texParameteri(E.TEXTURE_CUBE_MAP,E.TEXTURE_COMPARE_MODE,E.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null)):(this._bindTextureDirectly(this._gl.TEXTURE_2D,h,!0),v===0?(E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_FUNC,C.a.LEQUAL),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_MODE,E.NONE)):(E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_FUNC,v),E.texParameteri(E.TEXTURE_2D,E.TEXTURE_COMPARE_MODE,E.COMPARE_REF_TO_TEXTURE)),this._bindTextureDirectly(this._gl.TEXTURE_2D,null)),h._comparisonFunction=v}else A.a.Error("WebGL 1 does not support texture comparison.")},l.prototype.createInstancesBuffer=function(h){var v=this._gl.createBuffer();if(!v)throw new Error("Unable to create instance buffer");var E=new T.a(v);return E.capacity=h,this.bindArrayBuffer(E),this._gl.bufferData(this._gl.ARRAY_BUFFER,h,this._gl.DYNAMIC_DRAW),E},l.prototype.deleteInstancesBuffer=function(h){this._gl.deleteBuffer(h)},l.prototype._clientWaitAsync=function(h,v,E){v===void 0&&(v=0),E===void 0&&(E=10);var D=this._gl;return new Promise(function(w,N){var I=function(){var V=D.clientWaitSync(h,v,0);V!=D.WAIT_FAILED?V!=D.TIMEOUT_EXPIRED?w():setTimeout(I,E):N()};I()})},l.prototype._readPixelsAsync=function(h,v,E,D,w,N,I){if(this._webGLVersion<2)throw new Error("_readPixelsAsync only work on WebGL2+");var V=this._gl,X=V.createBuffer();V.bindBuffer(V.PIXEL_PACK_BUFFER,X),V.bufferData(V.PIXEL_PACK_BUFFER,I.byteLength,V.STREAM_READ),V.readPixels(h,v,E,D,w,N,0),V.bindBuffer(V.PIXEL_PACK_BUFFER,null);var j=V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE,0);return j?(V.flush(),this._clientWaitAsync(j,0,10).then(function(){return V.deleteSync(j),V.bindBuffer(V.PIXEL_PACK_BUFFER,X),V.getBufferSubData(V.PIXEL_PACK_BUFFER,0,I),V.bindBuffer(V.PIXEL_PACK_BUFFER,null),V.deleteBuffer(X),I})):null},l.prototype.dispose=function(){for(this.hideLoadingUI(),this.onNewSceneAddedObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(this._rescalePostProcess&&this._rescalePostProcess.dispose();this.scenes.length;)this.scenes[0].dispose();l.Instances.length===1&&l.audioEngine&&l.audioEngine.dispose(),this.disableVR(),x.a.IsWindowObjectExist()&&(window.removeEventListener("blur",this._onBlur),window.removeEventListener("focus",this._onFocus),this._renderingCanvas&&(this._renderingCanvas.removeEventListener("focus",this._onCanvasFocus),this._renderingCanvas.removeEventListener("blur",this._onCanvasBlur),this._renderingCanvas.removeEventListener("pointerout",this._onCanvasPointerOut)),x.a.IsDocumentAvailable()&&(document.removeEventListener("fullscreenchange",this._onFullscreenChange),document.removeEventListener("mozfullscreenchange",this._onFullscreenChange),document.removeEventListener("webkitfullscreenchange",this._onFullscreenChange),document.removeEventListener("msfullscreenchange",this._onFullscreenChange),document.removeEventListener("pointerlockchange",this._onPointerLockChange),document.removeEventListener("mspointerlockchange",this._onPointerLockChange),document.removeEventListener("mozpointerlockchange",this._onPointerLockChange),document.removeEventListener("webkitpointerlockchange",this._onPointerLockChange))),g.prototype.dispose.call(this);var h=l.Instances.indexOf(this);h>=0&&l.Instances.splice(h,1),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()},l.prototype._disableTouchAction=function(){this._renderingCanvas&&this._renderingCanvas.setAttribute&&(this._renderingCanvas.setAttribute("touch-action","none"),this._renderingCanvas.style.touchAction="none",this._renderingCanvas.style.msTouchAction="none")},l.prototype.displayLoadingUI=function(){if(x.a.IsWindowObjectExist()){var h=this.loadingScreen;h&&h.displayLoadingUI()}},l.prototype.hideLoadingUI=function(){if(x.a.IsWindowObjectExist()){var h=this._loadingScreen;h&&h.hideLoadingUI()}},Object.defineProperty(l.prototype,"loadingScreen",{get:function(){return!this._loadingScreen&&this._renderingCanvas&&(this._loadingScreen=l.DefaultLoadingScreenFactory(this._renderingCanvas)),this._loadingScreen},set:function(h){this._loadingScreen=h},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"loadingUIText",{set:function(h){this.loadingScreen.loadingUIText=h},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"loadingUIBackgroundColor",{set:function(h){this.loadingScreen.loadingUIBackgroundColor=h},enumerable:!1,configurable:!0}),l._RequestPointerlock=function(h){h.requestPointerLock=h.requestPointerLock||h.msRequestPointerLock||h.mozRequestPointerLock||h.webkitRequestPointerLock,h.requestPointerLock&&h.requestPointerLock()},l._ExitPointerlock=function(){var h=document;document.exitPointerLock=document.exitPointerLock||h.msExitPointerLock||h.mozExitPointerLock||h.webkitExitPointerLock,document.exitPointerLock&&document.exitPointerLock()},l._RequestFullscreen=function(h){var v=h.requestFullscreen||h.msRequestFullscreen||h.webkitRequestFullscreen||h.mozRequestFullScreen;v&&v.call(h)},l._ExitFullscreen=function(){var h=document;document.exitFullscreen?document.exitFullscreen():h.mozCancelFullScreen?h.mozCancelFullScreen():h.webkitCancelFullScreen?h.webkitCancelFullScreen():h.msCancelFullScreen&&h.msCancelFullScreen()},l.ALPHA_DISABLE=C.a.ALPHA_DISABLE,l.ALPHA_ADD=C.a.ALPHA_ADD,l.ALPHA_COMBINE=C.a.ALPHA_COMBINE,l.ALPHA_SUBTRACT=C.a.ALPHA_SUBTRACT,l.ALPHA_MULTIPLY=C.a.ALPHA_MULTIPLY,l.ALPHA_MAXIMIZED=C.a.ALPHA_MAXIMIZED,l.ALPHA_ONEONE=C.a.ALPHA_ONEONE,l.ALPHA_PREMULTIPLIED=C.a.ALPHA_PREMULTIPLIED,l.ALPHA_PREMULTIPLIED_PORTERDUFF=C.a.ALPHA_PREMULTIPLIED_PORTERDUFF,l.ALPHA_INTERPOLATE=C.a.ALPHA_INTERPOLATE,l.ALPHA_SCREENMODE=C.a.ALPHA_SCREENMODE,l.DELAYLOADSTATE_NONE=C.a.DELAYLOADSTATE_NONE,l.DELAYLOADSTATE_LOADED=C.a.DELAYLOADSTATE_LOADED,l.DELAYLOADSTATE_LOADING=C.a.DELAYLOADSTATE_LOADING,l.DELAYLOADSTATE_NOTLOADED=C.a.DELAYLOADSTATE_NOTLOADED,l.NEVER=C.a.NEVER,l.ALWAYS=C.a.ALWAYS,l.LESS=C.a.LESS,l.EQUAL=C.a.EQUAL,l.LEQUAL=C.a.LEQUAL,l.GREATER=C.a.GREATER,l.GEQUAL=C.a.GEQUAL,l.NOTEQUAL=C.a.NOTEQUAL,l.KEEP=C.a.KEEP,l.REPLACE=C.a.REPLACE,l.INCR=C.a.INCR,l.DECR=C.a.DECR,l.INVERT=C.a.INVERT,l.INCR_WRAP=C.a.INCR_WRAP,l.DECR_WRAP=C.a.DECR_WRAP,l.TEXTURE_CLAMP_ADDRESSMODE=C.a.TEXTURE_CLAMP_ADDRESSMODE,l.TEXTURE_WRAP_ADDRESSMODE=C.a.TEXTURE_WRAP_ADDRESSMODE,l.TEXTURE_MIRROR_ADDRESSMODE=C.a.TEXTURE_MIRROR_ADDRESSMODE,l.TEXTUREFORMAT_ALPHA=C.a.TEXTUREFORMAT_ALPHA,l.TEXTUREFORMAT_LUMINANCE=C.a.TEXTUREFORMAT_LUMINANCE,l.TEXTUREFORMAT_LUMINANCE_ALPHA=C.a.TEXTUREFORMAT_LUMINANCE_ALPHA,l.TEXTUREFORMAT_RGB=C.a.TEXTUREFORMAT_RGB,l.TEXTUREFORMAT_RGBA=C.a.TEXTUREFORMAT_RGBA,l.TEXTUREFORMAT_RED=C.a.TEXTUREFORMAT_RED,l.TEXTUREFORMAT_R=C.a.TEXTUREFORMAT_R,l.TEXTUREFORMAT_RG=C.a.TEXTUREFORMAT_RG,l.TEXTUREFORMAT_RED_INTEGER=C.a.TEXTUREFORMAT_RED_INTEGER,l.TEXTUREFORMAT_R_INTEGER=C.a.TEXTUREFORMAT_R_INTEGER,l.TEXTUREFORMAT_RG_INTEGER=C.a.TEXTUREFORMAT_RG_INTEGER,l.TEXTUREFORMAT_RGB_INTEGER=C.a.TEXTUREFORMAT_RGB_INTEGER,l.TEXTUREFORMAT_RGBA_INTEGER=C.a.TEXTUREFORMAT_RGBA_INTEGER,l.TEXTURETYPE_UNSIGNED_BYTE=C.a.TEXTURETYPE_UNSIGNED_BYTE,l.TEXTURETYPE_UNSIGNED_INT=C.a.TEXTURETYPE_UNSIGNED_INT,l.TEXTURETYPE_FLOAT=C.a.TEXTURETYPE_FLOAT,l.TEXTURETYPE_HALF_FLOAT=C.a.TEXTURETYPE_HALF_FLOAT,l.TEXTURETYPE_BYTE=C.a.TEXTURETYPE_BYTE,l.TEXTURETYPE_SHORT=C.a.TEXTURETYPE_SHORT,l.TEXTURETYPE_UNSIGNED_SHORT=C.a.TEXTURETYPE_UNSIGNED_SHORT,l.TEXTURETYPE_INT=C.a.TEXTURETYPE_INT,l.TEXTURETYPE_UNSIGNED_INTEGER=C.a.TEXTURETYPE_UNSIGNED_INTEGER,l.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4=C.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4,l.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1=C.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1,l.TEXTURETYPE_UNSIGNED_SHORT_5_6_5=C.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5,l.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV=C.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV,l.TEXTURETYPE_UNSIGNED_INT_24_8=C.a.TEXTURETYPE_UNSIGNED_INT_24_8,l.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV=C.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV,l.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV=C.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV,l.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV=C.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV,l.TEXTURE_NEAREST_SAMPLINGMODE=C.a.TEXTURE_NEAREST_SAMPLINGMODE,l.TEXTURE_BILINEAR_SAMPLINGMODE=C.a.TEXTURE_BILINEAR_SAMPLINGMODE,l.TEXTURE_TRILINEAR_SAMPLINGMODE=C.a.TEXTURE_TRILINEAR_SAMPLINGMODE,l.TEXTURE_NEAREST_NEAREST_MIPLINEAR=C.a.TEXTURE_NEAREST_NEAREST_MIPLINEAR,l.TEXTURE_LINEAR_LINEAR_MIPNEAREST=C.a.TEXTURE_LINEAR_LINEAR_MIPNEAREST,l.TEXTURE_LINEAR_LINEAR_MIPLINEAR=C.a.TEXTURE_LINEAR_LINEAR_MIPLINEAR,l.TEXTURE_NEAREST_NEAREST_MIPNEAREST=C.a.TEXTURE_NEAREST_NEAREST_MIPNEAREST,l.TEXTURE_NEAREST_LINEAR_MIPNEAREST=C.a.TEXTURE_NEAREST_LINEAR_MIPNEAREST,l.TEXTURE_NEAREST_LINEAR_MIPLINEAR=C.a.TEXTURE_NEAREST_LINEAR_MIPLINEAR,l.TEXTURE_NEAREST_LINEAR=C.a.TEXTURE_NEAREST_LINEAR,l.TEXTURE_NEAREST_NEAREST=C.a.TEXTURE_NEAREST_NEAREST,l.TEXTURE_LINEAR_NEAREST_MIPNEAREST=C.a.TEXTURE_LINEAR_NEAREST_MIPNEAREST,l.TEXTURE_LINEAR_NEAREST_MIPLINEAR=C.a.TEXTURE_LINEAR_NEAREST_MIPLINEAR,l.TEXTURE_LINEAR_LINEAR=C.a.TEXTURE_LINEAR_LINEAR,l.TEXTURE_LINEAR_NEAREST=C.a.TEXTURE_LINEAR_NEAREST,l.TEXTURE_EXPLICIT_MODE=C.a.TEXTURE_EXPLICIT_MODE,l.TEXTURE_SPHERICAL_MODE=C.a.TEXTURE_SPHERICAL_MODE,l.TEXTURE_PLANAR_MODE=C.a.TEXTURE_PLANAR_MODE,l.TEXTURE_CUBIC_MODE=C.a.TEXTURE_CUBIC_MODE,l.TEXTURE_PROJECTION_MODE=C.a.TEXTURE_PROJECTION_MODE,l.TEXTURE_SKYBOX_MODE=C.a.TEXTURE_SKYBOX_MODE,l.TEXTURE_INVCUBIC_MODE=C.a.TEXTURE_INVCUBIC_MODE,l.TEXTURE_EQUIRECTANGULAR_MODE=C.a.TEXTURE_EQUIRECTANGULAR_MODE,l.TEXTURE_FIXED_EQUIRECTANGULAR_MODE=C.a.TEXTURE_FIXED_EQUIRECTANGULAR_MODE,l.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE=C.a.TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE,l.SCALEMODE_FLOOR=C.a.SCALEMODE_FLOOR,l.SCALEMODE_NEAREST=C.a.SCALEMODE_NEAREST,l.SCALEMODE_CEILING=C.a.SCALEMODE_CEILING,l._RescalePostProcessFactory=null,l}(R.a))},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.WithinEpsilon=function(x,u,M){M===void 0&&(M=1401298e-51);var R=x-u;return-M<=R&&R<=M},_.ToHex=function(x){var u=x.toString(16);return x<=15?("0"+u).toUpperCase():u.toUpperCase()},_.Sign=function(x){return(x=+x)==0||isNaN(x)?x:x>0?1:-1},_.Clamp=function(x,u,M){return u===void 0&&(u=0),M===void 0&&(M=1),Math.min(M,Math.max(u,x))},_.Log2=function(x){return Math.log(x)*Math.LOG2E},_.Repeat=function(x,u){return x-Math.floor(x/u)*u},_.Normalize=function(x,u,M){return(x-u)/(M-u)},_.Denormalize=function(x,u,M){return x*(M-u)+u},_.DeltaAngle=function(x,u){var M=_.Repeat(u-x,360);return M>180&&(M-=360),M},_.PingPong=function(x,u){var M=_.Repeat(x,2*u);return u-Math.abs(M-u)},_.SmoothStep=function(x,u,M){var R=_.Clamp(M);return u*(R=-2*R*R*R+3*R*R)+x*(1-R)},_.MoveTowards=function(x,u,M){return Math.abs(u-x)<=M?u:x+_.Sign(u-x)*M},_.MoveTowardsAngle=function(x,u,M){var R=_.DeltaAngle(x,u),C=0;return-M 180&&(R-=360),x+R*_.Clamp(M)},_.InverseLerp=function(x,u,M){return x!=u?_.Clamp((M-x)/(u-x)):0},_.Hermite=function(x,u,M,R,C){var m=C*C,c=C*m;return x*(2*c-3*m+1)+M*(-2*c+3*m)+u*(c-2*m+C)+R*(c-m)},_.RandomRange=function(x,u){return x===u?x:Math.random()*(u-x)+x},_.RangeToPercent=function(x,u,M){return(x-u)/(M-u)},_.PercentToRange=function(x,u,M){return(M-u)*x+u},_.NormalizeRadians=function(x){return x-=_.TwoPi*Math.floor((x+Math.PI)/_.TwoPi)},_.TwoPi=2*Math.PI,_}()},function(Me,y,f){f.d(y,"a",function(){return c});var U=f(8),_=f(20),x=f(22),u=f(4),M=f(48),R=f(2),C=f(9),m=f(119),c=function(){function T(){}return T.BindEyePosition=function(A,S,g){if(g===void 0&&(g="vEyePosition"),S._forcedViewPosition)A.setVector3(g,S._forcedViewPosition);else{var l=S.activeCamera.globalPosition;l||(l=S.activeCamera.devicePosition),A.setVector3(g,S._mirroredCameraPosition?S._mirroredCameraPosition:l)}},T.PrepareDefinesForMergedUV=function(A,S,g){S._needUVs=!0,S[g]=!0,A.getTextureMatrix().isIdentityAs3x2()?(S[g+"DIRECTUV"]=A.coordinatesIndex+1,A.coordinatesIndex===0?S.MAINUV1=!0:S.MAINUV2=!0):S[g+"DIRECTUV"]=0},T.BindTextureMatrix=function(A,S,g){var l=A.getTextureMatrix();S.updateMatrix(g+"Matrix",l)},T.GetFogState=function(A,S){return S.fogEnabled&&A.applyFog&&S.fogMode!==_.a.FOGMODE_NONE},T.PrepareDefinesForMisc=function(A,S,g,l,h,v,E){E._areMiscDirty&&(E.LOGARITHMICDEPTH=g,E.POINTSIZE=l,E.FOG=h&&this.GetFogState(A,S),E.NONUNIFORMSCALING=A.nonUniformScaling,E.ALPHATEST=v)},T.PrepareDefinesForFrameBoundValues=function(A,S,g,l,h,v){h===void 0&&(h=null),v===void 0&&(v=!1);var E,D,w,N,I,V,X=!1;E=h??(A.clipPlane!==void 0&&A.clipPlane!==null),D=h??(A.clipPlane2!==void 0&&A.clipPlane2!==null),w=h??(A.clipPlane3!==void 0&&A.clipPlane3!==null),N=h??(A.clipPlane4!==void 0&&A.clipPlane4!==null),I=h??(A.clipPlane5!==void 0&&A.clipPlane5!==null),V=h??(A.clipPlane6!==void 0&&A.clipPlane6!==null),g.CLIPPLANE!==E&&(g.CLIPPLANE=E,X=!0),g.CLIPPLANE2!==D&&(g.CLIPPLANE2=D,X=!0),g.CLIPPLANE3!==w&&(g.CLIPPLANE3=w,X=!0),g.CLIPPLANE4!==N&&(g.CLIPPLANE4=N,X=!0),g.CLIPPLANE5!==I&&(g.CLIPPLANE5=I,X=!0),g.CLIPPLANE6!==V&&(g.CLIPPLANE6=V,X=!0),g.DEPTHPREPASS!==!S.getColorWrite()&&(g.DEPTHPREPASS=!g.DEPTHPREPASS,X=!0),g.INSTANCES!==l&&(g.INSTANCES=l,X=!0),g.THIN_INSTANCES!==v&&(g.THIN_INSTANCES=v,X=!0),X&&g.markAsUnprocessed()},T.PrepareDefinesForBones=function(A,S){if(A.useBones&&A.computeBonesUsingShaders&&A.skeleton){S.NUM_BONE_INFLUENCERS=A.numBoneInfluencers;var g=S.BONETEXTURE!==void 0;if(A.skeleton.isUsingTextureForMatrices&&g)S.BONETEXTURE=!0;else{S.BonesPerMesh=A.skeleton.bones.length+1,S.BONETEXTURE=!g&&void 0;var l=A.getScene().prePassRenderer;if(l&&l.enabled){var h=l.excludedSkinnedMesh.indexOf(A)===-1;S.BONES_VELOCITY_ENABLED=h}}}else S.NUM_BONE_INFLUENCERS=0,S.BonesPerMesh=0},T.PrepareDefinesForMorphTargets=function(A,S){var g=A.morphTargetManager;g?(S.MORPHTARGETS_UV=g.supportsUVs&&S.UV1,S.MORPHTARGETS_TANGENT=g.supportsTangents&&S.TANGENT,S.MORPHTARGETS_NORMAL=g.supportsNormals&&S.NORMAL,S.MORPHTARGETS=g.numInfluencers>0,S.NUM_MORPH_INFLUENCERS=g.numInfluencers):(S.MORPHTARGETS_UV=!1,S.MORPHTARGETS_TANGENT=!1,S.MORPHTARGETS_NORMAL=!1,S.MORPHTARGETS=!1,S.NUM_MORPH_INFLUENCERS=0)},T.PrepareDefinesForAttributes=function(A,S,g,l,h,v){if(h===void 0&&(h=!1),v===void 0&&(v=!0),!S._areAttributesDirty&&S._needNormals===S._normals&&S._needUVs===S._uvs)return!1;if(S._normals=S._needNormals,S._uvs=S._needUVs,S.NORMAL=S._needNormals&&A.isVerticesDataPresent(u.b.NormalKind),S._needNormals&&A.isVerticesDataPresent(u.b.TangentKind)&&(S.TANGENT=!0),S._needUVs?(S.UV1=A.isVerticesDataPresent(u.b.UVKind),S.UV2=A.isVerticesDataPresent(u.b.UV2Kind)):(S.UV1=!1,S.UV2=!1),g){var E=A.useVertexColors&&A.isVerticesDataPresent(u.b.ColorKind);S.VERTEXCOLOR=E,S.VERTEXALPHA=A.hasVertexAlpha&&E&&v}return l&&this.PrepareDefinesForBones(A,S),h&&this.PrepareDefinesForMorphTargets(A,S),!0},T.PrepareDefinesForMultiview=function(A,S){if(A.activeCamera){var g=S.MULTIVIEW;S.MULTIVIEW=A.activeCamera.outputRenderTarget!==null&&A.activeCamera.outputRenderTarget.getViewCount()>1,S.MULTIVIEW!=g&&S.markAsUnprocessed()}},T.PrepareDefinesForPrePass=function(A,S,g){var l=S.PREPASS;if(S._arePrePassDirty){var h=[{type:R.a.PREPASS_POSITION_TEXTURE_TYPE,define:"PREPASS_POSITION",index:"PREPASS_POSITION_INDEX"},{type:R.a.PREPASS_VELOCITY_TEXTURE_TYPE,define:"PREPASS_VELOCITY",index:"PREPASS_VELOCITY_INDEX"},{type:R.a.PREPASS_REFLECTIVITY_TEXTURE_TYPE,define:"PREPASS_REFLECTIVITY",index:"PREPASS_REFLECTIVITY_INDEX"},{type:R.a.PREPASS_IRRADIANCE_TEXTURE_TYPE,define:"PREPASS_IRRADIANCE",index:"PREPASS_IRRADIANCE_INDEX"},{type:R.a.PREPASS_ALBEDO_TEXTURE_TYPE,define:"PREPASS_ALBEDO",index:"PREPASS_ALBEDO_INDEX"},{type:R.a.PREPASS_DEPTHNORMAL_TEXTURE_TYPE,define:"PREPASS_DEPTHNORMAL",index:"PREPASS_DEPTHNORMAL_INDEX"}];if(A.prePassRenderer&&A.prePassRenderer.enabled&&g){S.PREPASS=!0,S.SCENE_MRT_COUNT=A.prePassRenderer.mrtCount;for(var v=0;v 0&&(E.shadowEnabled=!0,D.prepareDefines(h,l))}}g.lightmapMode!=M.a.LIGHTMAP_DEFAULT?(E.lightmapMode=!0,h["LIGHTMAPEXCLUDED"+l]=!0,h["LIGHTMAPNOSPECULAR"+l]=g.lightmapMode==M.a.LIGHTMAP_SHADOWSONLY):(h["LIGHTMAPEXCLUDED"+l]=!1,h["LIGHTMAPNOSPECULAR"+l]=!1)},T.PrepareDefinesForLights=function(A,S,g,l,h,v){if(h===void 0&&(h=4),v===void 0&&(v=!1),!g._areLightsDirty)return g._needNormals;var E=0,D={needNormals:!1,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};if(A.lightsEnabled&&!v)for(var w=0,N=S.lightSources;w 0&&(h=l+v,S.addFallback(h,"LIGHT"+v)),A.SHADOWS||(A["SHADOW"+v]&&S.addFallback(l,"SHADOW"+v),A["SHADOWPCF"+v]&&S.addFallback(l,"SHADOWPCF"+v),A["SHADOWPCSS"+v]&&S.addFallback(l,"SHADOWPCSS"+v),A["SHADOWPOISSON"+v]&&S.addFallback(l,"SHADOWPOISSON"+v),A["SHADOWESM"+v]&&S.addFallback(l,"SHADOWESM"+v),A["SHADOWCLOSEESM"+v]&&S.addFallback(l,"SHADOWCLOSEESM"+v));return h++},T.PrepareAttributesForMorphTargetsInfluencers=function(A,S,g){this._TmpMorphInfluencers.NUM_MORPH_INFLUENCERS=g,this.PrepareAttributesForMorphTargets(A,S,this._TmpMorphInfluencers)},T.PrepareAttributesForMorphTargets=function(A,S,g){var l=g.NUM_MORPH_INFLUENCERS;if(l>0&&x.a.LastCreatedEngine)for(var h=x.a.LastCreatedEngine.getCaps().maxVertexAttribs,v=S.morphTargetManager,E=v&&v.supportsNormals&&g.NORMAL,D=v&&v.supportsTangents&&g.TANGENT,w=v&&v.supportsUVs&&g.UV1,N=0;N h&&U.a.Error("Cannot add more vertex attributes for mesh "+S.name)},T.PrepareAttributesForBones=function(A,S,g,l){g.NUM_BONE_INFLUENCERS>0&&(l.addCPUSkinningFallback(0,S),A.push(u.b.MatricesIndicesKind),A.push(u.b.MatricesWeightsKind),g.NUM_BONE_INFLUENCERS>4&&(A.push(u.b.MatricesIndicesExtraKind),A.push(u.b.MatricesWeightsExtraKind)))},T.PrepareAttributesForInstances=function(A,S){(S.INSTANCES||S.THIN_INSTANCES)&&this.PushAttributesForInstances(A)},T.PushAttributesForInstances=function(A){A.push("world0"),A.push("world1"),A.push("world2"),A.push("world3")},T.BindLightProperties=function(A,S,g){A.transferToEffect(S,g+"")},T.BindLight=function(A,S,g,l,h,v){v===void 0&&(v=!1),A._bindLight(S,g,l,h,v)},T.BindLights=function(A,S,g,l,h,v){h===void 0&&(h=4),v===void 0&&(v=!1);for(var E=Math.min(S.lightSources.length,h),D=0;D -1){var h=l.getTransformMatrixTexture(A);S.setTexture("boneSampler",h),S.setFloat("boneTextureWidth",4*(l.bones.length+1))}else{var v=l.getTransformMatrices(A);v&&(S.setMatrices("mBones",v),g&&A.getScene().prePassRenderer&&A.getScene().prePassRenderer.getIndex(R.a.PREPASS_VELOCITY_TEXTURE_TYPE)&&(g.previousBones[A.uniqueId]&&S.setMatrices("mPreviousBones",g.previousBones[A.uniqueId]),T._CopyBonesTransformationMatrices(v,g.previousBones[A.uniqueId])))}}},T._CopyBonesTransformationMatrices=function(A,S){return S.set(A),S},T.BindMorphTargetParameters=function(A,S){var g=A.morphTargetManager;A&&g&&S.setFloatArray("morphTargetInfluences",g.influences)},T.BindLogDepth=function(A,S,g){A.LOGARITHMICDEPTH&&S.setFloat("logarithmicDepthConstant",2/(Math.log(g.activeCamera.maxZ+1)/Math.LN2))},T.BindClipPlane=function(A,S){m.a.BindClipPlane(A,S)},T._TmpMorphInfluencers={NUM_MORPH_INFLUENCERS:0},T._tempFogColor=C.a.Black(),T}()},function(Me,y,f){f.d(y,"a",function(){return R});var U=f(0),_=f(4),x=f(21),u=f(9),M=f(8),R=function(){function C(){}return C.prototype.set=function(m,c){switch(m.length||M.a.Warn("Setting vertex data kind '"+c+"' with an empty array"),c){case _.b.PositionKind:this.positions=m;break;case _.b.NormalKind:this.normals=m;break;case _.b.TangentKind:this.tangents=m;break;case _.b.UVKind:this.uvs=m;break;case _.b.UV2Kind:this.uvs2=m;break;case _.b.UV3Kind:this.uvs3=m;break;case _.b.UV4Kind:this.uvs4=m;break;case _.b.UV5Kind:this.uvs5=m;break;case _.b.UV6Kind:this.uvs6=m;break;case _.b.ColorKind:this.colors=m;break;case _.b.MatricesIndicesKind:this.matricesIndices=m;break;case _.b.MatricesWeightsKind:this.matricesWeights=m;break;case _.b.MatricesIndicesExtraKind:this.matricesIndicesExtra=m;break;case _.b.MatricesWeightsExtraKind:this.matricesWeightsExtra=m}},C.prototype.applyToMesh=function(m,c){return this._applyTo(m,c),this},C.prototype.applyToGeometry=function(m,c){return this._applyTo(m,c),this},C.prototype.updateMesh=function(m){return this._update(m),this},C.prototype.updateGeometry=function(m){return this._update(m),this},C.prototype._applyTo=function(m,c){return c===void 0&&(c=!1),this.positions&&m.setVerticesData(_.b.PositionKind,this.positions,c),this.normals&&m.setVerticesData(_.b.NormalKind,this.normals,c),this.tangents&&m.setVerticesData(_.b.TangentKind,this.tangents,c),this.uvs&&m.setVerticesData(_.b.UVKind,this.uvs,c),this.uvs2&&m.setVerticesData(_.b.UV2Kind,this.uvs2,c),this.uvs3&&m.setVerticesData(_.b.UV3Kind,this.uvs3,c),this.uvs4&&m.setVerticesData(_.b.UV4Kind,this.uvs4,c),this.uvs5&&m.setVerticesData(_.b.UV5Kind,this.uvs5,c),this.uvs6&&m.setVerticesData(_.b.UV6Kind,this.uvs6,c),this.colors&&m.setVerticesData(_.b.ColorKind,this.colors,c),this.matricesIndices&&m.setVerticesData(_.b.MatricesIndicesKind,this.matricesIndices,c),this.matricesWeights&&m.setVerticesData(_.b.MatricesWeightsKind,this.matricesWeights,c),this.matricesIndicesExtra&&m.setVerticesData(_.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,c),this.matricesWeightsExtra&&m.setVerticesData(_.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,c),this.indices?m.setIndices(this.indices,null,c):m.setIndices([],null),this},C.prototype._update=function(m,c,T){return this.positions&&m.updateVerticesData(_.b.PositionKind,this.positions,c,T),this.normals&&m.updateVerticesData(_.b.NormalKind,this.normals,c,T),this.tangents&&m.updateVerticesData(_.b.TangentKind,this.tangents,c,T),this.uvs&&m.updateVerticesData(_.b.UVKind,this.uvs,c,T),this.uvs2&&m.updateVerticesData(_.b.UV2Kind,this.uvs2,c,T),this.uvs3&&m.updateVerticesData(_.b.UV3Kind,this.uvs3,c,T),this.uvs4&&m.updateVerticesData(_.b.UV4Kind,this.uvs4,c,T),this.uvs5&&m.updateVerticesData(_.b.UV5Kind,this.uvs5,c,T),this.uvs6&&m.updateVerticesData(_.b.UV6Kind,this.uvs6,c,T),this.colors&&m.updateVerticesData(_.b.ColorKind,this.colors,c,T),this.matricesIndices&&m.updateVerticesData(_.b.MatricesIndicesKind,this.matricesIndices,c,T),this.matricesWeights&&m.updateVerticesData(_.b.MatricesWeightsKind,this.matricesWeights,c,T),this.matricesIndicesExtra&&m.updateVerticesData(_.b.MatricesIndicesExtraKind,this.matricesIndicesExtra,c,T),this.matricesWeightsExtra&&m.updateVerticesData(_.b.MatricesWeightsExtraKind,this.matricesWeightsExtra,c,T),this.indices&&m.setIndices(this.indices,null),this},C.prototype.transform=function(m){var c,T=m.determinant()<0,A=U.e.Zero();if(this.positions){var S=U.e.Zero();for(c=0;c A.bbSize.y?A.bbSize.x:A.bbSize.y;ct=ct>A.bbSize.z?ct:A.bbSize.z,H=A.subDiv.X*re/A.bbSize.x,Z=A.subDiv.Y*re/A.bbSize.y,W=A.subDiv.Z*re/A.bbSize.z,q=A.subDiv.max*A.subDiv.max,A.facetPartitioning.length=0}for(S=0;S re.LongPressDelay&&!H._isPointerSwiping()&&(H._startingPointerTime=0,W.processTrigger(I.a.ACTION_OnLongPressTrigger,E.a.CreateNew(_e.pickedMesh,k)))},re.LongPressDelay)}}else for(var q=0,he=Z._pointerDownStage;q re.DragMovementThreshold||Math.abs(this._startingPointerPosition.y-this._pointerY)>re.DragMovementThreshold},re.prototype.simulatePointerUp=function(Y,k,H){var Z=new PointerEvent("pointerup",k),W=new ae;H?W.doubleClick=!0:W.singleClick=!0,this._checkPrePointerObservable(Y,Z,te.a.POINTERUP)||this._processPointerUp(Y,Z,W)},re.prototype._processPointerUp=function(Y,k,H){var Z=this._scene;if(Y&&Y&&Y.pickedMesh){if(this._pickedUpMesh=Y.pickedMesh,this._pickedDownMesh===this._pickedUpMesh&&(Z.onPointerPick&&Z.onPointerPick(k,Y),H.singleClick&&!H.ignore&&Z.onPointerObservable.hasObservers())){var W=te.a.POINTERPICK,q=new te.b(W,k,Y);this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,W)}var he=Y.pickedMesh._getActionManagerForTrigger();if(he&&!H.ignore){he.processTrigger(I.a.ACTION_OnPickUpTrigger,E.a.CreateNew(Y.pickedMesh,k)),!H.hasSwiped&&H.singleClick&&he.processTrigger(I.a.ACTION_OnPickTrigger,E.a.CreateNew(Y.pickedMesh,k));var ge=Y.pickedMesh._getActionManagerForTrigger(I.a.ACTION_OnDoublePickTrigger);H.doubleClick&&ge&&ge.processTrigger(I.a.ACTION_OnDoublePickTrigger,E.a.CreateNew(Y.pickedMesh,k))}}else if(!H.ignore)for(var me=0,_e=Z._pointerUpStage;me<_e.length;me++)Y=_e[me].action(this._unTranslatedPointerX,this._unTranslatedPointerY,Y,k);if(this._pickedDownMesh&&this._pickedDownMesh!==this._pickedUpMesh){var be=this._pickedDownMesh._getActionManagerForTrigger(I.a.ACTION_OnPickOutTrigger);be&&be.processTrigger(I.a.ACTION_OnPickOutTrigger,E.a.CreateNew(this._pickedDownMesh,k))}var Pe=0;Z.onPointerObservable.hasObservers()&&(!H.ignore&&!H.hasSwiped&&(H.singleClick&&Z.onPointerObservable.hasSpecificMask(te.a.POINTERTAP)?Pe=te.a.POINTERTAP:H.doubleClick&&Z.onPointerObservable.hasSpecificMask(te.a.POINTERDOUBLETAP)&&(Pe=te.a.POINTERDOUBLETAP),Pe)&&(q=new te.b(Pe,k,Y),this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,Pe)),H.ignore||(Pe=te.a.POINTERUP,q=new te.b(Pe,k,Y),this._setRayOnPointerInfo(q),Z.onPointerObservable.notifyObservers(q,Pe))),Z.onPointerUp&&!H.ignore&&Z.onPointerUp(k,Y,Pe)},re.prototype.isPointerCaptured=function(Y){return Y===void 0&&(Y=0),this._pointerCaptures[Y]},re.prototype.attachControl=function(Y,k,H,Z){var W=this;Y===void 0&&(Y=!0),k===void 0&&(k=!0),H===void 0&&(H=!0),Z===void 0&&(Z=null);var q=this._scene;if(Z||(Z=q.getEngine().getInputElement()),Z){this._alreadyAttached&&this.detachControl(),this._alreadyAttachedTo=Z;var he=q.getEngine();this._initActionManager=function(be,Pe){if(!W._meshPickProceed){var ye=q.pick(W._unTranslatedPointerX,W._unTranslatedPointerY,q.pointerDownPredicate,!1,q.cameraToUseForPointers);W._currentPickResult=ye,ye&&(be=ye.hit&&ye.pickedMesh?ye.pickedMesh._getActionManagerForTrigger():null),W._meshPickProceed=!0}return be},this._delayedSimpleClick=function(be,Pe,ye){(Date.now()-W._previousStartingPointerTime>re.DoubleClickDelay&&!W._doubleClickOccured||be!==W._previousButtonPressed)&&(W._doubleClickOccured=!1,Pe.singleClick=!0,Pe.ignore=!1,ye(Pe,W._currentPickResult))},this._initClickEvent=function(be,Pe,ye,Be){var ke=new ae;W._currentPickResult=null;var We=null,je=be.hasSpecificMask(te.a.POINTERPICK)||Pe.hasSpecificMask(te.a.POINTERPICK)||be.hasSpecificMask(te.a.POINTERTAP)||Pe.hasSpecificMask(te.a.POINTERTAP)||be.hasSpecificMask(te.a.POINTERDOUBLETAP)||Pe.hasSpecificMask(te.a.POINTERDOUBLETAP);!je&&de.a&&(We=W._initActionManager(We,ke))&&(je=We.hasPickTriggers);var He=!1;if(je){var qe=ye.button;if(ke.hasSwiped=W._isPointerSwiping(),!ke.hasSwiped){var Ge=!re.ExclusiveDoubleClickMode;Ge||(Ge=!be.hasSpecificMask(te.a.POINTERDOUBLETAP)&&!Pe.hasSpecificMask(te.a.POINTERDOUBLETAP))&&!de.a.HasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)&&(We=W._initActionManager(We,ke))&&(Ge=!We.hasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)),Ge?(Date.now()-W._previousStartingPointerTime>re.DoubleClickDelay||qe!==W._previousButtonPressed)&&(ke.singleClick=!0,Be(ke,W._currentPickResult),He=!0):(W._previousDelayedSimpleClickTimeout=W._delayedSimpleClickTimeout,W._delayedSimpleClickTimeout=window.setTimeout(W._delayedSimpleClick.bind(W,qe,ke,Be),re.DoubleClickDelay));var nt=be.hasSpecificMask(te.a.POINTERDOUBLETAP)||Pe.hasSpecificMask(te.a.POINTERDOUBLETAP);!nt&&de.a.HasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)&&(We=W._initActionManager(We,ke))&&(nt=We.hasSpecificTrigger(I.a.ACTION_OnDoublePickTrigger)),nt&&(qe===W._previousButtonPressed&&Date.now()-W._previousStartingPointerTime 0){for(var k=0,H=this._transientComponents;k 0)return!1;for(k=0;k 0,q=0,he=this._isReadyForMeshStage;q 0){for(var ge=0,me=this.activeCameras;ge 0},enumerable:!1,configurable:!0}),Y.prototype.executeWhenReady=function(k){var H=this;this.onReadyObservable.add(k),this._executeWhenReadyTimeoutId===-1&&(this._executeWhenReadyTimeoutId=setTimeout(function(){H._checkIsReady()},150))},Y.prototype.whenReadyAsync=function(){var k=this;return new Promise(function(H){k.executeWhenReady(function(){H()})})},Y.prototype._checkIsReady=function(){var k=this;return this._registerTransientComponents(),this.isReady()?(this.onReadyObservable.notifyObservers(this),this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1)):this._isDisposed?(this.onReadyObservable.clear(),void(this._executeWhenReadyTimeoutId=-1)):void(this._executeWhenReadyTimeoutId=setTimeout(function(){k._checkIsReady()},150))},Object.defineProperty(Y.prototype,"animatables",{get:function(){return this._activeAnimatables},enumerable:!1,configurable:!0}),Y.prototype.resetLastAnimationTimeFrame=function(){this._animationTimeLast=x.a.Now},Y.prototype.getViewMatrix=function(){return this._viewMatrix},Y.prototype.getProjectionMatrix=function(){return this._projectionMatrix},Y.prototype.getTransformMatrix=function(){return this._transformMatrix},Y.prototype.setTransformMatrix=function(k,H,Z,W){this._viewUpdateFlag===k.updateFlag&&this._projectionUpdateFlag===H.updateFlag||(this._viewUpdateFlag=k.updateFlag,this._projectionUpdateFlag=H.updateFlag,this._viewMatrix=k,this._projectionMatrix=H,this._viewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._frustumPlanes?L.a.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=L.a.GetPlanes(this._transformMatrix),this._multiviewSceneUbo&&this._multiviewSceneUbo.useUbo?this._updateMultiviewUbo(Z,W):this._sceneUbo.useUbo&&(this._sceneUbo.updateMatrix("viewProjection",this._transformMatrix),this._sceneUbo.updateMatrix("view",this._viewMatrix),this._sceneUbo.update()))},Y.prototype.getSceneUniformBuffer=function(){return this._multiviewSceneUbo?this._multiviewSceneUbo:this._sceneUbo},Y.prototype.getUniqueId=function(){return G.a.UniqueId},Y.prototype.addMesh=function(k,H){var Z=this;H===void 0&&(H=!1),this._blockEntityCollection||(this.meshes.push(k),k._resyncLightSources(),k.parent||k._addToSceneRootNodes(),this.onNewMeshAddedObservable.notifyObservers(k),H&&k.getChildMeshes().forEach(function(W){Z.addMesh(W)}))},Y.prototype.removeMesh=function(k,H){var Z=this;H===void 0&&(H=!1);var W=this.meshes.indexOf(k);return W!==-1&&(this.meshes[W]=this.meshes[this.meshes.length-1],this.meshes.pop(),k.parent||k._removeFromSceneRootNodes()),this.onMeshRemovedObservable.notifyObservers(k),H&&k.getChildMeshes().forEach(function(q){Z.removeMesh(q)}),W},Y.prototype.addTransformNode=function(k){this._blockEntityCollection||(k._indexInSceneTransformNodesArray=this.transformNodes.length,this.transformNodes.push(k),k.parent||k._addToSceneRootNodes(),this.onNewTransformNodeAddedObservable.notifyObservers(k))},Y.prototype.removeTransformNode=function(k){var H=k._indexInSceneTransformNodesArray;if(H!==-1){if(H!==this.transformNodes.length-1){var Z=this.transformNodes[this.transformNodes.length-1];this.transformNodes[H]=Z,Z._indexInSceneTransformNodesArray=H}k._indexInSceneTransformNodesArray=-1,this.transformNodes.pop(),k.parent||k._removeFromSceneRootNodes()}return this.onTransformNodeRemovedObservable.notifyObservers(k),H},Y.prototype.removeSkeleton=function(k){var H=this.skeletons.indexOf(k);return H!==-1&&(this.skeletons.splice(H,1),this.onSkeletonRemovedObservable.notifyObservers(k)),H},Y.prototype.removeMorphTargetManager=function(k){var H=this.morphTargetManagers.indexOf(k);return H!==-1&&this.morphTargetManagers.splice(H,1),H},Y.prototype.removeLight=function(k){var H=this.lights.indexOf(k);if(H!==-1){for(var Z=0,W=this.meshes;Z 0?this.activeCamera=this.cameras[0]:this.activeCamera=null),this.onCameraRemovedObservable.notifyObservers(k),H},Y.prototype.removeParticleSystem=function(k){var H=this.particleSystems.indexOf(k);return H!==-1&&this.particleSystems.splice(H,1),H},Y.prototype.removeAnimation=function(k){var H=this.animations.indexOf(k);return H!==-1&&this.animations.splice(H,1),H},Y.prototype.stopAnimation=function(k,H,Z){},Y.prototype.removeAnimationGroup=function(k){var H=this.animationGroups.indexOf(k);return H!==-1&&this.animationGroups.splice(H,1),H},Y.prototype.removeMultiMaterial=function(k){var H=this.multiMaterials.indexOf(k);return H!==-1&&this.multiMaterials.splice(H,1),this.onMultiMaterialRemovedObservable.notifyObservers(k),H},Y.prototype.removeMaterial=function(k){var H=k._indexInSceneMaterialArray;if(H!==-1&&H =0;H--)if(this.materials[H].id===k)return this.materials[H];return null},Y.prototype.getMaterialByName=function(k){for(var H=0;H =0;H--)if(this.meshes[H].id===k)return this.meshes[H];return null},Y.prototype.getLastEntryByID=function(k){var H;for(H=this.meshes.length-1;H>=0;H--)if(this.meshes[H].id===k)return this.meshes[H];for(H=this.transformNodes.length-1;H>=0;H--)if(this.transformNodes[H].id===k)return this.transformNodes[H];for(H=this.cameras.length-1;H>=0;H--)if(this.cameras[H].id===k)return this.cameras[H];for(H=this.lights.length-1;H>=0;H--)if(this.lights[H].id===k)return this.lights[H];return null},Y.prototype.getNodeByID=function(k){var H=this.getMeshByID(k);if(H)return H;var Z=this.getTransformNodeByID(k);if(Z)return Z;var W=this.getLightByID(k);if(W)return W;var q=this.getCameraByID(k);if(q)return q;var he=this.getBoneByID(k);return he||null},Y.prototype.getNodeByName=function(k){var H=this.getMeshByName(k);if(H)return H;var Z=this.getTransformNodeByName(k);if(Z)return Z;var W=this.getLightByName(k);if(W)return W;var q=this.getCameraByName(k);if(q)return q;var he=this.getBoneByName(k);return he||null},Y.prototype.getMeshByName=function(k){for(var H=0;H =0;H--)if(this.skeletons[H].id===k)return this.skeletons[H];return null},Y.prototype.getSkeletonByUniqueId=function(k){for(var H=0;H 0&&(me.layerMask&this.activeCamera.layerMask)!=0&&(this._skipFrustumClipping||me.alwaysSelectAsActiveMesh||me.isInFrustum(this._frustumPlanes)))){this._activeMeshes.push(me),this.activeCamera._activeMeshes.push(me),_e!==me&&_e._activate(this._renderId,!1);for(var be=0,Pe=this._preActiveMeshStage;be 0)for(var Z=this.getActiveSubMeshCandidates(H),W=Z.length,q=0;q 1)this.activeCamera.outputRenderTarget._bindFrameBuffer();else{var k=this.activeCamera.outputRenderTarget.getInternalTexture();k?this.getEngine().bindFramebuffer(k):X.a.Error("Camera contains invalid customDefaultRenderTarget")}else this.getEngine().restoreDefaultFramebuffer()},Y.prototype._renderForCamera=function(k,H){if(!k||!k._skipRendering){var Z=this._engine;if(this._activeCamera=k,!this.activeCamera)throw new Error("Active camera not set");Z.setViewport(this.activeCamera.viewport),this.resetCachedMaterial(),this._renderId++,this.getEngine().getCaps().multiview&&k.outputRenderTarget&&k.outputRenderTarget.getViewCount()>1?this.setTransformMatrix(k._rigCameras[0].getViewMatrix(),k._rigCameras[0].getProjectionMatrix(),k._rigCameras[1].getViewMatrix(),k._rigCameras[1].getProjectionMatrix()):this.updateTransformMatrix(),this.onBeforeCameraRenderObservable.notifyObservers(this.activeCamera),this._evaluateActiveMeshes();for(var W=0;W 0&&this._renderTargets.concatWithNoDuplicate(k.customRenderTargets),H&&H.customRenderTargets&&H.customRenderTargets.length>0&&this._renderTargets.concatWithNoDuplicate(H.customRenderTargets);for(var he=0,ge=this._gatherActiveCameraRenderTargetsStage;he 0){_.b.StartPerformanceCounter("Render targets",this._renderTargets.length>0);for(var _e=0;_e 0),this._renderId++}for(var ye=0,Be=this._cameraDrawRenderTargetStage;ye 1&&this.getEngine().getCaps().multiview)return this._renderForCamera(k),void this.onAfterRenderCameraObservable.notifyObservers(k);if(k._useMultiviewToSingleView)this._renderMultiviewToSingleView(k);else for(var H=0;H -1&&(W.trigger===I.a.ACTION_OnIntersectionExitTrigger&&W._executeCurrent(E.a.CreateNew(H,void 0,he)),H.actionManager.hasSpecificTrigger(I.a.ACTION_OnIntersectionExitTrigger,function(_e){var be=_e instanceof T.a?_e:_e.mesh;return he===be})&&W.trigger!==I.a.ACTION_OnIntersectionExitTrigger||H._intersectionsInProgress.splice(me,1))}}}},Y.prototype._advancePhysicsEngineStep=function(k){},Y.prototype._animate=function(){},Y.prototype.animate=function(){if(this._engine.isDeterministicLockStep()){var k=Math.max(Y.MinDeltaTime,Math.min(this._engine.getDeltaTime(),Y.MaxDeltaTime))+this._timeAccumulator,H=this._engine.getTimeStep(),Z=1e3/H/1e3,W=0,q=this._engine.getLockstepMaxSteps(),he=Math.floor(k/H);for(he=Math.min(he,q);k>0&&W 0)for(var q=0;q 0),this._intermediateRendering=!0;for(var be=0;be 0),this._intermediateRendering=!1,this._renderId++}this.activeCamera=_e,this._activeCamera&&this._activeCamera.cameraRigMode!==A.a.RIG_MODE_CUSTOM&&!this.prePass&&this._bindFrameBuffer(),this.onAfterRenderTargetsRenderObservable.notifyObservers(this);for(var ye=0,Be=this._beforeClearStage;ye 0)for(q=0;q 0&&this._engine.clear(null,!1,!0,!0),this._processSubCameras(this.activeCameras[q]);else{if(!this.activeCamera)throw new Error("No camera defined");this._processSubCameras(this.activeCamera)}this._checkIntersections();for(var je=0,He=this._afterRenderStage;je -1&&this._engine.scenes.splice(q,1),this._engine.wipeCaches(!0),this._isDisposed=!0},Object.defineProperty(Y.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Y.prototype.clearCachedVertexData=function(){for(var k=0;k -1?(m.a.Error("You're trying to reuse a post process not defined as reusable."),0):(E==null||E<0?this._postProcesses.push(v):this._postProcesses[E]===null?this._postProcesses[E]=v:this._postProcesses.splice(E,0,v),this._cascadePostProcessesToRigCams(),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._postProcesses.indexOf(v))},h.prototype.detachPostProcess=function(v){var E=this._postProcesses.indexOf(v);E!==-1&&(this._postProcesses[E]=null),this._scene.prePassRenderer&&this._scene.prePassRenderer.markAsDirty(),this._cascadePostProcessesToRigCams()},h.prototype.getWorldMatrix=function(){return this._isSynchronizedViewMatrix()||this.getViewMatrix(),this._worldMatrix},h.prototype._getViewMatrix=function(){return R.a.Identity()},h.prototype.getViewMatrix=function(v){return!v&&this._isSynchronizedViewMatrix()||(this.updateCache(),this._computedViewMatrix=this._getViewMatrix(),this._currentRenderId=this.getScene().getRenderId(),this._childUpdateId++,this._refreshFrustumPlanes=!0,this._cameraRigParams&&this._cameraRigParams.vrPreViewMatrix&&this._computedViewMatrix.multiplyToRef(this._cameraRigParams.vrPreViewMatrix,this._computedViewMatrix),this.parent&&this.parent.onViewMatrixChangedObservable&&this.parent.onViewMatrixChangedObservable.notifyObservers(this.parent),this.onViewMatrixChangedObservable.notifyObservers(this),this._computedViewMatrix.invertToRef(this._worldMatrix)),this._computedViewMatrix},h.prototype.freezeProjectionMatrix=function(v){this._doNotComputeProjectionMatrix=!0,v!==void 0&&(this._projectionMatrix=v)},h.prototype.unfreezeProjectionMatrix=function(){this._doNotComputeProjectionMatrix=!1},h.prototype.getProjectionMatrix=function(v){var E,D,w,N,I,V,X,j;if(this._doNotComputeProjectionMatrix||!v&&this._isSynchronizedProjectionMatrix())return this._projectionMatrix;this._cache.mode=this.mode,this._cache.minZ=this.minZ,this._cache.maxZ=this.maxZ,this._refreshFrustumPlanes=!0;var ne=this.getEngine(),te=this.getScene();if(this.mode===h.PERSPECTIVE_CAMERA){this._cache.fov=this.fov,this._cache.fovMode=this.fovMode,this._cache.aspectRatio=ne.getAspectRatio(this),this.minZ<=0&&(this.minZ=.1);var de=ne.useReverseDepthBuffer;(te.useRightHandedSystem?de?R.a.PerspectiveFovReverseRHToRef:R.a.PerspectiveFovRHToRef:de?R.a.PerspectiveFovReverseLHToRef:R.a.PerspectiveFovLHToRef)(this.fov,ne.getAspectRatio(this),this.minZ,this.maxZ,this._projectionMatrix,this.fovMode===h.FOVMODE_VERTICAL_FIXED)}else{var pe=ne.getRenderWidth()/2,ae=ne.getRenderHeight()/2;te.useRightHandedSystem?R.a.OrthoOffCenterRHToRef((E=this.orthoLeft)!==null&&E!==void 0?E:-pe,(D=this.orthoRight)!==null&&D!==void 0?D:pe,(w=this.orthoBottom)!==null&&w!==void 0?w:-ae,(N=this.orthoTop)!==null&&N!==void 0?N:ae,this.minZ,this.maxZ,this._projectionMatrix):R.a.OrthoOffCenterLHToRef((I=this.orthoLeft)!==null&&I!==void 0?I:-pe,(V=this.orthoRight)!==null&&V!==void 0?V:pe,(X=this.orthoBottom)!==null&&X!==void 0?X:-ae,(j=this.orthoTop)!==null&&j!==void 0?j:ae,this.minZ,this.maxZ,this._projectionMatrix),this._cache.orthoLeft=this.orthoLeft,this._cache.orthoRight=this.orthoRight,this._cache.orthoBottom=this.orthoBottom,this._cache.orthoTop=this.orthoTop,this._cache.renderWidth=ne.getRenderWidth(),this._cache.renderHeight=ne.getRenderHeight()}return this.onProjectionMatrixChangedObservable.notifyObservers(this),this._projectionMatrix},h.prototype.getTransformationMatrix=function(){return this._computedViewMatrix.multiplyToRef(this._projectionMatrix,this._transformMatrix),this._transformMatrix},h.prototype._updateFrustumPlanes=function(){this._refreshFrustumPlanes&&(this.getTransformationMatrix(),this._frustumPlanes?S.a.GetPlanesToRef(this._transformMatrix,this._frustumPlanes):this._frustumPlanes=S.a.GetPlanes(this._transformMatrix),this._refreshFrustumPlanes=!1)},h.prototype.isInFrustum=function(v,E){if(E===void 0&&(E=!1),this._updateFrustumPlanes(),E&&this.rigCameras.length>0){var D=!1;return this.rigCameras.forEach(function(w){w._updateFrustumPlanes(),D=D||v.isInFrustum(w._frustumPlanes)}),D}return v.isInFrustum(this._frustumPlanes)},h.prototype.isCompletelyInFrustum=function(v){return this._updateFrustumPlanes(),v.isCompletelyInFrustum(this._frustumPlanes)},h.prototype.getForwardRay=function(v,E,D){throw T.a.WarnImport("Ray")},h.prototype.getForwardRayToRef=function(v,E,D,w){throw T.a.WarnImport("Ray")},h.prototype.dispose=function(v,E){for(E===void 0&&(E=!1),this.onViewMatrixChangedObservable.clear(),this.onProjectionMatrixChangedObservable.clear(),this.onAfterCheckInputsObservable.clear(),this.onRestoreStateObservable.clear(),this.inputs&&this.inputs.clear(),this.getScene().stopAnimation(this),this.getScene().removeCamera(this);this._rigCameras.length>0;){var D=this._rigCameras.pop();D&&D.dispose()}if(this._rigPostProcess)this._rigPostProcess.dispose(this),this._rigPostProcess=null,this._postProcesses=[];else if(this.cameraRigMode!==h.RIG_MODE_NONE)this._rigPostProcess=null,this._postProcesses=[];else for(var w=this._postProcesses.length;--w>=0;){var N=this._postProcesses[w];N&&N.dispose(this)}for(w=this.customRenderTargets.length;--w>=0;)this.customRenderTargets[w].dispose();this.customRenderTargets=[],this._activeMeshes.dispose(),l.prototype.dispose.call(this,v,E)},Object.defineProperty(h.prototype,"isLeftCamera",{get:function(){return this._isLeftCamera},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"isRightCamera",{get:function(){return this._isRightCamera},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"leftCamera",{get:function(){return this._rigCameras.length<1?null:this._rigCameras[0]},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"rightCamera",{get:function(){return this._rigCameras.length<2?null:this._rigCameras[1]},enumerable:!1,configurable:!0}),h.prototype.getLeftTarget=function(){return this._rigCameras.length<1?null:this._rigCameras[0].getTarget()},h.prototype.getRightTarget=function(){return this._rigCameras.length<2?null:this._rigCameras[1].getTarget()},h.prototype.setCameraRigMode=function(v,E){if(this.cameraRigMode!==v){for(;this._rigCameras.length>0;){var D=this._rigCameras.pop();D&&D.dispose()}if(this.cameraRigMode=v,this._cameraRigParams={},this._cameraRigParams.interaxialDistance=E.interaxialDistance||.0637,this._cameraRigParams.stereoHalfAngle=u.b.ToRadians(this._cameraRigParams.interaxialDistance/.0637),this.cameraRigMode!==h.RIG_MODE_NONE){var w=this.createRigCamera(this.name+"_L",0);w&&(w._isLeftCamera=!0);var N=this.createRigCamera(this.name+"_R",1);N&&(N._isRightCamera=!0),w&&N&&(this._rigCameras.push(w),this._rigCameras.push(N))}switch(this.cameraRigMode){case h.RIG_MODE_STEREOSCOPIC_ANAGLYPH:h._setStereoscopicAnaglyphRigMode(this);break;case h.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case h.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case h.RIG_MODE_STEREOSCOPIC_OVERUNDER:case h.RIG_MODE_STEREOSCOPIC_INTERLACED:h._setStereoscopicRigMode(this);break;case h.RIG_MODE_VR:h._setVRRigMode(this,E);break;case h.RIG_MODE_WEBVR:h._setWebVRRigMode(this,E)}this._cascadePostProcessesToRigCams(),this.update()}},h._setStereoscopicRigMode=function(v){throw"Import Cameras/RigModes/stereoscopicRigMode before using stereoscopic rig mode"},h._setStereoscopicAnaglyphRigMode=function(v){throw"Import Cameras/RigModes/stereoscopicAnaglyphRigMode before using stereoscopic anaglyph rig mode"},h._setVRRigMode=function(v,E){throw"Import Cameras/RigModes/vrRigMode before using VR rig mode"},h._setWebVRRigMode=function(v,E){throw"Import Cameras/RigModes/WebVRRigMode before using Web VR rig mode"},h.prototype._getVRProjectionMatrix=function(){return R.a.PerspectiveFovLHToRef(this._cameraRigParams.vrMetrics.aspectRatioFov,this._cameraRigParams.vrMetrics.aspectRatio,this.minZ,this.maxZ,this._cameraRigParams.vrWorkMatrix),this._cameraRigParams.vrWorkMatrix.multiplyToRef(this._cameraRigParams.vrHMatrix,this._projectionMatrix),this._projectionMatrix},h.prototype._updateCameraRotationMatrix=function(){},h.prototype._updateWebVRCameraRotationMatrix=function(){},h.prototype._getWebVRProjectionMatrix=function(){return R.a.Identity()},h.prototype._getWebVRViewMatrix=function(){return R.a.Identity()},h.prototype.setCameraRigParameter=function(v,E){this._cameraRigParams||(this._cameraRigParams={}),this._cameraRigParams[v]=E,v==="interaxialDistance"&&(this._cameraRigParams.stereoHalfAngle=u.b.ToRadians(E/.0637))},h.prototype.createRigCamera=function(v,E){return null},h.prototype._updateRigCameras=function(){for(var v=0;v =1)&&(this.needAlphaBlending()||g.visibility<1||g.hasVertexAlpha)},S.prototype.needAlphaTesting=function(){return!!this._forceAlphaTest},S.prototype._shouldTurnAlphaTestOn=function(g){return!this.needAlphaBlendingForMesh(g)&&this.needAlphaTesting()},S.prototype.getAlphaTestTexture=function(){return null},S.prototype.markDirty=function(){for(var g=0,l=this.getScene().meshes;g 1&&be.renderbufferStorageMultisample?be.renderbufferStorageMultisample(be.RENDERBUFFER,he,me,W,q):be.renderbufferStorage(be.RENDERBUFFER,ge,W,q),be.framebufferRenderbuffer(be.FRAMEBUFFER,_e,be.RENDERBUFFER,Pe),be.bindRenderbuffer(be.RENDERBUFFER,null),Pe},this._boundUniforms={};var te=null;if(I){if(X=X||{},E.a.SetMatrixPrecision(!!X.useHighPrecisionMatrix),I.getContext){if(te=I,this._renderingCanvas=te,V!=null&&(X.antialias=V),X.deterministicLockstep===void 0&&(X.deterministicLockstep=!1),X.lockstepMaxSteps===void 0&&(X.lockstepMaxSteps=4),X.timeStep===void 0&&(X.timeStep=1/60),X.preserveDrawingBuffer===void 0&&(X.preserveDrawingBuffer=!1),X.audioEngine===void 0&&(X.audioEngine=!0),X.stencil===void 0&&(X.stencil=!0),X.premultipliedAlpha===!1&&(this.premultipliedAlpha=!1),X.xrCompatible===void 0&&(X.xrCompatible=!0),this._doNotHandleContextLost=!!X.doNotHandleContextLost,navigator&&navigator.userAgent){var de=navigator.userAgent;this.hostInformation.isMobile=de.indexOf("Mobile")!==-1;for(var pe=0,ae=N.ExceptionList;pe 0&&parseInt(Q[Q.length-1])>=G)continue}for(var oe=0,re=$;oe 1?this._shaderProcessor=new g.a:this._shaderProcessor=new S,this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),this._creationOptions=X,console.log("Babylon.js v"+N.Version+" - "+this.description)}}return Object.defineProperty(N,"NpmPackage",{get:function(){return"babylonjs@4.2.2"},enumerable:!1,configurable:!0}),Object.defineProperty(N,"Version",{get:function(){return"4.2.2"},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"description",{get:function(){var I="WebGL"+this.webGLVersion;return this._caps.parallelShaderCompile&&(I+=" - Parallel shader compilation"),I},enumerable:!1,configurable:!0}),Object.defineProperty(N,"ShadersRepository",{get:function(){return _.a.ShadersRepository},set:function(I){_.a.ShadersRepository=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsUniformBuffers",{get:function(){return this.webGLVersion>1&&!this.disableUniformBuffers},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"_shouldUseHighPrecisionShader",{get:function(){return!(!this._caps.highPrecisionShaderSupported||!this._highPrecisionShadersAllowed)},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"needPOTTextures",{get:function(){return this._webGLVersion<2||this.forcePOTTextures},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"doNotHandleContextLost",{get:function(){return this._doNotHandleContextLost},set:function(I){this._doNotHandleContextLost=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"_supportsHardwareTextureRescaling",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"framebufferDimensionsObject",{set:function(I){this._framebufferDimensionsObject=I},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"currentViewport",{get:function(){return this._cachedViewport},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture",{get:function(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture3D",{get:function(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture3D},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyTexture2DArray",{get:function(){return this._emptyTexture2DArray||(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,m.a.TEXTUREFORMAT_RGBA,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)),this._emptyTexture2DArray},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"emptyCubeTexture",{get:function(){if(!this._emptyCubeTexture){var I=new Uint8Array(4),V=[I,I,I,I,I,I];this._emptyCubeTexture=this.createRawCubeTexture(V,1,m.a.TEXTUREFORMAT_RGBA,m.a.TEXTURETYPE_UNSIGNED_INT,!1,!1,m.a.TEXTURE_NEAREST_SAMPLINGMODE)}return this._emptyCubeTexture},enumerable:!1,configurable:!0}),N.prototype._rebuildInternalTextures=function(){for(var I=0,V=this._internalTexturesCache.slice();I 1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile"),standardDerivatives:this._webGLVersion>1||this._gl.getExtension("OES_standard_derivatives")!==null,maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||this._gl.getExtension("OES_element_index_uint")!==null,fragmentDepthSupported:this._webGLVersion>1||this._gl.getExtension("EXT_frag_depth")!==null,highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float"),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1},this._glVersion=this._gl.getParameter(this._gl.VERSION);var I=this._gl.getExtension("WEBGL_debug_renderer_info");if(I!=null&&(this._glRenderer=this._gl.getParameter(I.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(I.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor="Unknown vendor"),this._glRenderer||(this._glRenderer="Unknown renderer"),this._gl.HALF_FLOAT_OES!==36193&&(this._gl.HALF_FLOAT_OES=36193),this._gl.RGBA16F!==34842&&(this._gl.RGBA16F=34842),this._gl.RGBA32F!==34836&&(this._gl.RGBA32F=34836),this._gl.DEPTH24_STENCIL8!==35056&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(this._webGLVersion===1&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!(!this._caps.textureFloat||!this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!(!this._caps.textureFloat||!this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._webGLVersion>1&&this._gl.HALF_FLOAT_OES!==5131&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=this._gl.getParameter(this._gl.MAX_SAMPLES);else{var V=this._gl.getExtension("WEBGL_draw_buffers");if(V!==null){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=V.drawBuffersWEBGL.bind(V),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(var X=0;X<16;X++)this._gl["COLOR_ATTACHMENT"+X+"_WEBGL"]=V["COLOR_ATTACHMENT"+X+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{var j=this._gl.getExtension("WEBGL_depth_texture");j!=null&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=j.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{var ne=this._gl.getExtension("OES_vertex_array_object");ne!=null&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=ne.createVertexArrayOES.bind(ne),this._gl.bindVertexArray=ne.bindVertexArrayOES.bind(ne),this._gl.deleteVertexArray=ne.deleteVertexArrayOES.bind(ne))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{var te=this._gl.getExtension("ANGLE_instanced_arrays");te!=null?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=te.drawArraysInstancedANGLE.bind(te),this._gl.drawElementsInstanced=te.drawElementsInstancedANGLE.bind(te),this._gl.vertexAttribDivisor=te.vertexAttribDivisorANGLE.bind(te)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){var de=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),pe=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);de&&pe&&(this._caps.highPrecisionShaderSupported=de.precision!==0&&pe.precision!==0)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{var ae=this._gl.getExtension("EXT_blend_minmax");ae!=null&&(this._caps.blendMinMax=!0,this._gl.MAX=ae.MAX_EXT,this._gl.MIN=ae.MIN_EXT)}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(var ee=0;ee =0&&this._activeRenderLoops.splice(V,1)}else this._activeRenderLoops=[]},N.prototype._renderLoop=function(){if(!this._contextWasLost){var I=!0;if(!this.renderEvenInBackground&&this._windowIsBackground&&(I=!1),I){this.beginFrame();for(var V=0;V 0?this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow()):this._renderingQueueLaunched=!1},N.prototype.getRenderingCanvas=function(){return this._renderingCanvas},N.prototype.getHostWindow=function(){return A.a.IsWindowObjectExist()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null},N.prototype.getRenderWidth=function(I){return I===void 0&&(I=!1),!I&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth},N.prototype.getRenderHeight=function(I){return I===void 0&&(I=!1),!I&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight},N.prototype._queueNewFrame=function(I,V){return N.QueueNewFrame(I,V)},N.prototype.runRenderLoop=function(I){this._activeRenderLoops.indexOf(I)===-1&&(this._activeRenderLoops.push(I),this._renderingQueueLaunched||(this._renderingQueueLaunched=!0,this._boundRenderFunction=this._renderLoop.bind(this),this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())))},N.prototype.clear=function(I,V,X,j){j===void 0&&(j=!1),this.applyStates();var ne=0;V&&I&&(this._gl.clearColor(I.r,I.g,I.b,I.a!==void 0?I.a:1),ne|=this._gl.COLOR_BUFFER_BIT),X&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GREATER,this._gl.clearDepth(0)):this._gl.clearDepth(1),ne|=this._gl.DEPTH_BUFFER_BIT),j&&(this._gl.clearStencil(0),ne|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(ne)},N.prototype._viewport=function(I,V,X,j){I===this._viewportCached.x&&V===this._viewportCached.y&&X===this._viewportCached.z&&j===this._viewportCached.w||(this._viewportCached.x=I,this._viewportCached.y=V,this._viewportCached.z=X,this._viewportCached.w=j,this._gl.viewport(I,V,X,j))},N.prototype.setViewport=function(I,V,X){var j=V||this.getRenderWidth(),ne=X||this.getRenderHeight(),te=I.x||0,de=I.y||0;this._cachedViewport=I,this._viewport(te*j,de*ne,j*I.width,ne*I.height)},N.prototype.beginFrame=function(){},N.prototype.endFrame=function(){this._badOS&&this.flushFramebuffer()},N.prototype.resize=function(){var I,V;A.a.IsWindowObjectExist()?(I=this._renderingCanvas?this._renderingCanvas.clientWidth||this._renderingCanvas.width:window.innerWidth,V=this._renderingCanvas?this._renderingCanvas.clientHeight||this._renderingCanvas.height:window.innerHeight):(I=this._renderingCanvas?this._renderingCanvas.width:100,V=this._renderingCanvas?this._renderingCanvas.height:100),this.setSize(I/this._hardwareScalingLevel,V/this._hardwareScalingLevel)},N.prototype.setSize=function(I,V){return!!this._renderingCanvas&&(I|=0,V|=0,(this._renderingCanvas.width!==I||this._renderingCanvas.height!==V)&&(this._renderingCanvas.width=I,this._renderingCanvas.height=V,!0))},N.prototype.bindFramebuffer=function(I,V,X,j,ne,te,de){V===void 0&&(V=0),te===void 0&&(te=0),de===void 0&&(de=0),this._currentRenderTarget&&this.unBindFramebuffer(this._currentRenderTarget),this._currentRenderTarget=I,this._bindUnboundFramebuffer(I._MSAAFramebuffer?I._MSAAFramebuffer:I._framebuffer);var pe=this._gl;I.is2DArray?pe.framebufferTextureLayer(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,I._webGLTexture,te,de):I.isCube&&pe.framebufferTexture2D(pe.FRAMEBUFFER,pe.COLOR_ATTACHMENT0,pe.TEXTURE_CUBE_MAP_POSITIVE_X+V,I._webGLTexture,te);var ae=I._depthStencilTexture;if(ae){var ee=ae._generateStencilBuffer?pe.DEPTH_STENCIL_ATTACHMENT:pe.DEPTH_ATTACHMENT;I.is2DArray?pe.framebufferTextureLayer(pe.FRAMEBUFFER,ee,ae._webGLTexture,te,de):I.isCube?pe.framebufferTexture2D(pe.FRAMEBUFFER,ee,pe.TEXTURE_CUBE_MAP_POSITIVE_X+V,ae._webGLTexture,te):pe.framebufferTexture2D(pe.FRAMEBUFFER,ee,pe.TEXTURE_2D,ae._webGLTexture,te)}this._cachedViewport&&!ne?this.setViewport(this._cachedViewport,X,j):(X||(X=I.width,te&&(X/=Math.pow(2,te))),j||(j=I.height,te&&(j/=Math.pow(2,te))),this._viewport(0,0,X,j)),this.wipeCaches()},N.prototype._bindUnboundFramebuffer=function(I){this._currentFramebuffer!==I&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,I),this._currentFramebuffer=I)},N.prototype.unBindFramebuffer=function(I,V,X){V===void 0&&(V=!1),this._currentRenderTarget=null;var j=this._gl;if(I._MSAAFramebuffer){if(I._textureArray)return void this.unBindMultiColorAttachmentFramebuffer(I._textureArray,V,X);j.bindFramebuffer(j.READ_FRAMEBUFFER,I._MSAAFramebuffer),j.bindFramebuffer(j.DRAW_FRAMEBUFFER,I._framebuffer),j.blitFramebuffer(0,0,I.width,I.height,0,0,I.width,I.height,j.COLOR_BUFFER_BIT,j.NEAREST)}!I.generateMipMaps||V||I.isCube||(this._bindTextureDirectly(j.TEXTURE_2D,I,!0),j.generateMipmap(j.TEXTURE_2D),this._bindTextureDirectly(j.TEXTURE_2D,null)),X&&(I._MSAAFramebuffer&&this._bindUnboundFramebuffer(I._framebuffer),X()),this._bindUnboundFramebuffer(null)},N.prototype.flushFramebuffer=function(){this._gl.flush()},N.prototype.restoreDefaultFramebuffer=function(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()},N.prototype._resetVertexBufferBinding=function(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null},N.prototype.createVertexBuffer=function(I){return this._createVertexBuffer(I,this._gl.STATIC_DRAW)},N.prototype._createVertexBuffer=function(I,V){var X=this._gl.createBuffer();if(!X)throw new Error("Unable to create vertex buffer");var j=new l.a(X);return this.bindArrayBuffer(j),I instanceof Array?this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(I),this._gl.STATIC_DRAW):this._gl.bufferData(this._gl.ARRAY_BUFFER,I,this._gl.STATIC_DRAW),this._resetVertexBufferBinding(),j.references=1,j},N.prototype.createDynamicVertexBuffer=function(I){return this._createVertexBuffer(I,this._gl.DYNAMIC_DRAW)},N.prototype._resetIndexBufferBinding=function(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null},N.prototype.createIndexBuffer=function(I,V){var X=this._gl.createBuffer(),j=new l.a(X);if(!X)throw new Error("Unable to create index buffer");this.bindIndexBuffer(j);var ne=this._normalizeIndexData(I);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,ne,V?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),j.references=1,j.is32Bits=ne.BYTES_PER_ELEMENT===4,j},N.prototype._normalizeIndexData=function(I){if(I instanceof Uint16Array)return I;if(this._caps.uintIndices){if(I instanceof Uint32Array)return I;for(var V=0;V =65535)return new Uint32Array(I);return new Uint16Array(I)}return new Uint16Array(I)},N.prototype.bindArrayBuffer=function(I){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(I,this._gl.ARRAY_BUFFER)},N.prototype.bindUniformBlock=function(I,V,X){var j=I.program,ne=this._gl.getUniformBlockIndex(j,V);this._gl.uniformBlockBinding(j,ne,X)},N.prototype.bindIndexBuffer=function(I){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.bindBuffer(I,this._gl.ELEMENT_ARRAY_BUFFER)},N.prototype.bindBuffer=function(I,V){(this._vaoRecordInProgress||this._currentBoundBuffer[V]!==I)&&(this._gl.bindBuffer(V,I?I.underlyingResource:null),this._currentBoundBuffer[V]=I)},N.prototype.updateArrayBuffer=function(I){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,I)},N.prototype._vertexAttribPointer=function(I,V,X,j,ne,te,de){var pe=this._currentBufferPointers[V];if(pe){var ae=!1;pe.active?(pe.buffer!==I&&(pe.buffer=I,ae=!0),pe.size!==X&&(pe.size=X,ae=!0),pe.type!==j&&(pe.type=j,ae=!0),pe.normalized!==ne&&(pe.normalized=ne,ae=!0),pe.stride!==te&&(pe.stride=te,ae=!0),pe.offset!==de&&(pe.offset=de,ae=!0)):(ae=!0,pe.active=!0,pe.index=V,pe.size=X,pe.type=j,pe.normalized=ne,pe.stride=te,pe.offset=de,pe.buffer=I),(ae||this._vaoRecordInProgress)&&(this.bindArrayBuffer(I),this._gl.vertexAttribPointer(V,X,j,ne,te,de))}},N.prototype._bindIndexBufferWithCache=function(I){I!=null&&this._cachedIndexBuffer!==I&&(this._cachedIndexBuffer=I,this.bindIndexBuffer(I),this._uintIndicesCurrentlySet=I.is32Bits)},N.prototype._bindVertexBuffersAttributes=function(I,V){var X=V.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var j=0;j =0){var te=I[X[j]];if(!te)continue;this._gl.enableVertexAttribArray(ne),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[ne]=!0);var de=te.getBuffer();de&&(this._vertexAttribPointer(de,ne,te.getSize(),te.type,te.normalized,te.byteStride,te.byteOffset),te.getIsInstanced()&&(this._gl.vertexAttribDivisor(ne,te.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(ne),this._currentInstanceBuffers.push(de))))}}},N.prototype.recordVertexArrayObject=function(I,V,X){var j=this._gl.createVertexArray();return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(j),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(I,X),this.bindIndexBuffer(V),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),j},N.prototype.bindVertexArrayObject=function(I,V){this._cachedVertexArrayObject!==I&&(this._cachedVertexArrayObject=I,this._gl.bindVertexArray(I),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=V!=null&&V.is32Bits,this._mustWipeVertexAttributes=!0)},N.prototype.bindBuffersDirectly=function(I,V,X,j,ne){if(this._cachedVertexBuffers!==I||this._cachedEffectForVertexBuffers!==ne){this._cachedVertexBuffers=I,this._cachedEffectForVertexBuffers=ne;var te=ne.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();for(var de=0,pe=0;pe =0&&(this._gl.enableVertexAttribArray(ae),this._vertexAttribArraysEnabled[ae]=!0,this._vertexAttribPointer(I,ae,X[pe],this._gl.FLOAT,!1,j,de)),de+=4*X[pe]}}this._bindIndexBufferWithCache(V)},N.prototype._unbindVertexArrayObject=function(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))},N.prototype.bindBuffers=function(I,V,X){this._cachedVertexBuffers===I&&this._cachedEffectForVertexBuffers===X||(this._cachedVertexBuffers=I,this._cachedEffectForVertexBuffers=X,this._bindVertexBuffersAttributes(I,X)),this._bindIndexBufferWithCache(V)},N.prototype.unbindInstanceAttributes=function(){for(var I,V=0,X=this._currentInstanceLocations.length;V 1?`#version 300 es -#define WEBGL2 -`:"",pe=this._compileShader(V,"vertex",j,de),ae=this._compileShader(X,"fragment",j,de);return this._createShaderProgram(I,pe,ae,ne,te)},N.prototype.createPipelineContext=function(){var I=new h.a;return I.engine=this,this._caps.parallelShaderCompile&&(I.isParallelCompiled=!0),I},N.prototype._createShaderProgram=function(I,V,X,j,ne){var te=j.createProgram();if(I.program=te,!te)throw new Error("Unable to create program");return j.attachShader(te,V),j.attachShader(te,X),j.linkProgram(te),I.context=j,I.vertexShader=V,I.fragmentShader=X,I.isParallelCompiled||this._finalizePipelineContext(I),te},N.prototype._finalizePipelineContext=function(I){var V=I.context,X=I.vertexShader,j=I.fragmentShader,ne=I.program;if(!V.getProgramParameter(ne,V.LINK_STATUS)){var te,de;if(!this._gl.getShaderParameter(X,this._gl.COMPILE_STATUS)&&(te=this._gl.getShaderInfoLog(X)))throw I.vertexCompilationError=te,new Error("VERTEX SHADER "+te);if(!this._gl.getShaderParameter(j,this._gl.COMPILE_STATUS)&&(te=this._gl.getShaderInfoLog(j)))throw I.fragmentCompilationError=te,new Error("FRAGMENT SHADER "+te);if(de=V.getProgramInfoLog(ne))throw I.programLinkError=de,new Error(de)}if(this.validateShaderPrograms&&(V.validateProgram(ne),!V.getProgramParameter(ne,V.VALIDATE_STATUS)&&(de=V.getProgramInfoLog(ne))))throw I.programValidationError=de,new Error(de);V.deleteShader(X),V.deleteShader(j),I.vertexShader=void 0,I.fragmentShader=void 0,I.onCompiled&&(I.onCompiled(),I.onCompiled=void 0)},N.prototype._preparePipelineContext=function(I,V,X,j,ne,te,de){var pe=I;pe.program=j?this.createRawShaderProgram(pe,V,X,void 0,de):this.createShaderProgram(pe,V,X,te,void 0,de),pe.program.__SPECTOR_rebuildProgram=ne},N.prototype._isRenderingStateCompiled=function(I){var V=I;return!!this._gl.getProgramParameter(V.program,this._caps.parallelShaderCompile.COMPLETION_STATUS_KHR)&&(this._finalizePipelineContext(V),!0)},N.prototype._executeWhenRenderingStateIsCompiled=function(I,V){var X=I;if(X.isParallelCompiled){var j=X.onCompiled;X.onCompiled=j?function(){j(),V()}:V}else V()},N.prototype.getUniforms=function(I,V){for(var X=new Array,j=I,ne=0;ne -1?I.substring(H).toLowerCase():""),W=null;Z.indexOf("?")>-1&&(Z=Z.split("?")[0]);for(var q=0,he=N._TextureLoaders;q Ge||ye.height>Ge||!G._supportsHardwareTextureRescaling)return G._prepareWorkingCanvas(),!(!G._workingCanvas||!G._workingContext)&&(G._workingCanvas.width=Be,G._workingCanvas.height=ke,G._workingContext.drawImage(ye,0,0,ye.width,ye.height,0,0,Be,ke),je.texImage2D(je.TEXTURE_2D,0,qe,qe,je.UNSIGNED_BYTE,G._workingCanvas),Y.width=Be,Y.height=ke,!1);var nt=new c.a(G,c.b.Temp);return G._bindTextureDirectly(je.TEXTURE_2D,nt,!0),je.texImage2D(je.TEXTURE_2D,0,qe,qe,je.UNSIGNED_BYTE,ye),G._rescaleTexture(nt,Y,j,qe,function(){G._releaseTexture(nt),G._bindTextureDirectly(je.TEXTURE_2D,Y,!0),We()}),!0},ne)};!Q||re?pe&&(pe.decoding||pe.close)?Pe(pe):N._FileToolsLoadImage(I,Pe,_e,j?j.offlineProvider:null,$):typeof pe=="string"||pe instanceof ArrayBuffer||ArrayBuffer.isView(pe)||pe instanceof Blob?N._FileToolsLoadImage(pe,Pe,_e,j?j.offlineProvider:null,$):pe&&Pe(pe)}return Y},N._FileToolsLoadImage=function(I,V,X,j,ne){throw x.a.WarnImport("FileTools")},N.prototype._rescaleTexture=function(I,V,X,j,ne){},N.prototype.createRawTexture=function(I,V,X,j,ne,te,de,pe,ae){throw ae===void 0&&(ae=m.a.TEXTURETYPE_UNSIGNED_INT),x.a.WarnImport("Engine.RawTexture")},N.prototype.createRawCubeTexture=function(I,V,X,j,ne,te,de,pe){throw x.a.WarnImport("Engine.RawTexture")},N.prototype.createRawTexture3D=function(I,V,X,j,ne,te,de,pe,ae,ee){throw ee===void 0&&(ee=m.a.TEXTURETYPE_UNSIGNED_INT),x.a.WarnImport("Engine.RawTexture")},N.prototype.createRawTexture2DArray=function(I,V,X,j,ne,te,de,pe,ae,ee){throw ee===void 0&&(ee=m.a.TEXTURETYPE_UNSIGNED_INT),x.a.WarnImport("Engine.RawTexture")},N.prototype._unpackFlipY=function(I){this._unpackFlipYCached!==I&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,I?1:0),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=I))},N.prototype._getUnpackAlignement=function(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)},N.prototype._getTextureTarget=function(I){return I.isCube?this._gl.TEXTURE_CUBE_MAP:I.is3D?this._gl.TEXTURE_3D:I.is2DArray||I.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D},N.prototype.updateTextureSamplingMode=function(I,V,X){X===void 0&&(X=!1);var j=this._getTextureTarget(V),ne=this._getSamplingParameters(I,V.generateMipMaps||X);this._setTextureParameterInteger(j,this._gl.TEXTURE_MAG_FILTER,ne.mag,V),this._setTextureParameterInteger(j,this._gl.TEXTURE_MIN_FILTER,ne.min),X&&(V.generateMipMaps=!0,this._gl.generateMipmap(j)),this._bindTextureDirectly(j,null),V.samplingMode=I},N.prototype.updateTextureWrappingMode=function(I,V,X,j){X===void 0&&(X=null),j===void 0&&(j=null);var ne=this._getTextureTarget(I);V!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(V),I),I._cachedWrapU=V),X!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(X),I),I._cachedWrapV=X),(I.is2DArray||I.is3D)&&j!==null&&(this._setTextureParameterInteger(ne,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(j),I),I._cachedWrapR=j),this._bindTextureDirectly(ne,null)},N.prototype._setupDepthStencilTexture=function(I,V,X,j,ne){var te=V.width||V,de=V.height||V,pe=V.layers||0;I.baseWidth=te,I.baseHeight=de,I.width=te,I.height=de,I.is2DArray=pe>0,I.depth=pe,I.isReady=!0,I.samples=1,I.generateMipMaps=!1,I._generateDepthBuffer=!0,I._generateStencilBuffer=X,I.samplingMode=j?m.a.TEXTURE_BILINEAR_SAMPLINGMODE:m.a.TEXTURE_NEAREST_SAMPLINGMODE,I.type=m.a.TEXTURETYPE_UNSIGNED_INT,I._comparisonFunction=ne;var ae=this._gl,ee=this._getTextureTarget(I),K=this._getSamplingParameters(I.samplingMode,!1);ae.texParameteri(ee,ae.TEXTURE_MAG_FILTER,K.mag),ae.texParameteri(ee,ae.TEXTURE_MIN_FILTER,K.min),ae.texParameteri(ee,ae.TEXTURE_WRAP_S,ae.CLAMP_TO_EDGE),ae.texParameteri(ee,ae.TEXTURE_WRAP_T,ae.CLAMP_TO_EDGE),ne===0?(ae.texParameteri(ee,ae.TEXTURE_COMPARE_FUNC,m.a.LEQUAL),ae.texParameteri(ee,ae.TEXTURE_COMPARE_MODE,ae.NONE)):(ae.texParameteri(ee,ae.TEXTURE_COMPARE_FUNC,ne),ae.texParameteri(ee,ae.TEXTURE_COMPARE_MODE,ae.COMPARE_REF_TO_TEXTURE))},N.prototype._uploadCompressedDataToTextureDirectly=function(I,V,X,j,ne,te,de){te===void 0&&(te=0),de===void 0&&(de=0);var pe=this._gl,ae=pe.TEXTURE_2D;I.isCube&&(ae=pe.TEXTURE_CUBE_MAP_POSITIVE_X+te),this._gl.compressedTexImage2D(ae,de,V,X,j,0,ne)},N.prototype._uploadDataToTextureDirectly=function(I,V,X,j,ne,te){X===void 0&&(X=0),j===void 0&&(j=0),te===void 0&&(te=!1);var de=this._gl,pe=this._getWebGLTextureType(I.type),ae=this._getInternalFormat(I.format),ee=ne===void 0?this._getRGBABufferInternalSizedFormat(I.type,I.format):this._getInternalFormat(ne);this._unpackFlipY(I.invertY);var K=de.TEXTURE_2D;I.isCube&&(K=de.TEXTURE_CUBE_MAP_POSITIVE_X+X);var $=Math.round(Math.log(I.width)*Math.LOG2E),L=Math.round(Math.log(I.height)*Math.LOG2E),G=te?I.width:Math.pow(2,Math.max($-j,0)),Q=te?I.height:Math.pow(2,Math.max(L-j,0));de.texImage2D(K,j,ee,G,Q,0,ae,pe,V)},N.prototype.updateTextureData=function(I,V,X,j,ne,te,de,pe){de===void 0&&(de=0),pe===void 0&&(pe=0);var ae=this._gl,ee=this._getWebGLTextureType(I.type),K=this._getInternalFormat(I.format);this._unpackFlipY(I.invertY);var $=ae.TEXTURE_2D;I.isCube&&($=ae.TEXTURE_CUBE_MAP_POSITIVE_X+de),ae.texSubImage2D($,pe,X,j,ne,te,K,ee,V)},N.prototype._uploadArrayBufferViewToTexture=function(I,V,X,j){X===void 0&&(X=0),j===void 0&&(j=0);var ne=this._gl,te=I.isCube?ne.TEXTURE_CUBE_MAP:ne.TEXTURE_2D;this._bindTextureDirectly(te,I,!0),this._uploadDataToTextureDirectly(I,V,X,j),this._bindTextureDirectly(te,null,!0)},N.prototype._prepareWebGLTextureContinuation=function(I,V,X,j,ne){var te=this._gl;if(te){var de=this._getSamplingParameters(ne,!X);te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MAG_FILTER,de.mag),te.texParameteri(te.TEXTURE_2D,te.TEXTURE_MIN_FILTER,de.min),X||j||te.generateMipmap(te.TEXTURE_2D),this._bindTextureDirectly(te.TEXTURE_2D,null),V&&V._removePendingData(I),I.onLoadedObservable.notifyObservers(I),I.onLoadedObservable.clear()}},N.prototype._prepareWebGLTexture=function(I,V,X,j,ne,te,de,pe,ae){var ee=this;ae===void 0&&(ae=m.a.TEXTURE_TRILINEAR_SAMPLINGMODE);var K=this.getCaps().maxTextureSize,$=Math.min(K,this.needPOTTextures?N.GetExponentOfTwo(X,K):X),L=Math.min(K,this.needPOTTextures?N.GetExponentOfTwo(j,K):j),G=this._gl;G&&(I._webGLTexture?(this._bindTextureDirectly(G.TEXTURE_2D,I,!0),this._unpackFlipY(ne===void 0||!!ne),I.baseWidth=X,I.baseHeight=j,I.width=$,I.height=L,I.isReady=!0,pe($,L,function(){ee._prepareWebGLTextureContinuation(I,V,te,de,ae)})||this._prepareWebGLTextureContinuation(I,V,te,de,ae)):V&&V._removePendingData(I))},N.prototype._setupFramebufferDepthAttachments=function(I,V,X,j,ne){ne===void 0&&(ne=1);var te=this._gl;if(I&&V)return this._getDepthStencilBuffer(X,j,ne,te.DEPTH_STENCIL,te.DEPTH24_STENCIL8,te.DEPTH_STENCIL_ATTACHMENT);if(V){var de=te.DEPTH_COMPONENT16;return this._webGLVersion>1&&(de=te.DEPTH_COMPONENT32F),this._getDepthStencilBuffer(X,j,ne,de,de,te.DEPTH_ATTACHMENT)}return I?this._getDepthStencilBuffer(X,j,ne,te.STENCIL_INDEX8,te.STENCIL_INDEX8,te.STENCIL_ATTACHMENT):null},N.prototype._releaseFramebufferObjects=function(I){var V=this._gl;I._framebuffer&&(V.deleteFramebuffer(I._framebuffer),I._framebuffer=null),I._depthStencilBuffer&&(V.deleteRenderbuffer(I._depthStencilBuffer),I._depthStencilBuffer=null),I._MSAAFramebuffer&&(V.deleteFramebuffer(I._MSAAFramebuffer),I._MSAAFramebuffer=null),I._MSAARenderBuffer&&(V.deleteRenderbuffer(I._MSAARenderBuffer),I._MSAARenderBuffer=null)},N.prototype._releaseTexture=function(I){this._releaseFramebufferObjects(I),this._deleteTexture(I._webGLTexture),this.unbindAllTextures();var V=this._internalTexturesCache.indexOf(I);V!==-1&&this._internalTexturesCache.splice(V,1),I._lodTextureHigh&&I._lodTextureHigh.dispose(),I._lodTextureMid&&I._lodTextureMid.dispose(),I._lodTextureLow&&I._lodTextureLow.dispose(),I._irradianceTexture&&I._irradianceTexture.dispose()},N.prototype._deleteTexture=function(I){this._gl.deleteTexture(I)},N.prototype._setProgram=function(I){this._currentProgram!==I&&(this._gl.useProgram(I),this._currentProgram=I)},N.prototype.bindSamplers=function(I){var V=I.getPipelineContext();this._setProgram(V.program);for(var X=I.getSamplers(),j=0;j -1;return X&&te&&(this._activeChannel=V._associatedChannel),this._boundTexturesCache[this._activeChannel]!==V||j?(this._activateCurrentTexture(),V&&V.isMultiview?this._gl.bindTexture(I,V?V._colorTextureArray:null):this._gl.bindTexture(I,V?V._webGLTexture:null),this._boundTexturesCache[this._activeChannel]=V,V&&(V._associatedChannel=this._activeChannel)):X&&(ne=!0,this._activateCurrentTexture()),te&&!X&&this._bindSamplerUniformToChannel(V._associatedChannel,this._activeChannel),ne},N.prototype._bindTexture=function(I,V){if(I!==void 0){V&&(V._associatedChannel=I),this._activeChannel=I;var X=V?this._getTextureTarget(V):this._gl.TEXTURE_2D;this._bindTextureDirectly(X,V)}},N.prototype.unbindAllTextures=function(){for(var I=0;I 1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))},N.prototype.setTexture=function(I,V,X){I!==void 0&&(V&&(this._boundUniforms[I]=V),this._setTexture(I,X))},N.prototype._bindSamplerUniformToChannel=function(I,V){var X=this._boundUniforms[I];X&&X._currentState!==V&&(this._gl.uniform1i(X,V),X._currentState=V)},N.prototype._getTextureWrapMode=function(I){switch(I){case m.a.TEXTURE_WRAP_ADDRESSMODE:return this._gl.REPEAT;case m.a.TEXTURE_CLAMP_ADDRESSMODE:return this._gl.CLAMP_TO_EDGE;case m.a.TEXTURE_MIRROR_ADDRESSMODE:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT},N.prototype._setTexture=function(I,V,X,j){if(X===void 0&&(X=!1),j===void 0&&(j=!1),!V)return this._boundTexturesCache[I]!=null&&(this._activeChannel=I,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(V.video)this._activeChannel=I,V.update();else if(V.delayLoadState===m.a.DELAYLOADSTATE_NOTLOADED)return V.delayLoad(),!1;var ne;ne=j?V.depthStencilTexture:V.isReady()?V.getInternalTexture():V.isCube?this.emptyCubeTexture:V.is3D?this.emptyTexture3D:V.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!X&&ne&&(ne._associatedChannel=I);var te=!0;this._boundTexturesCache[I]===ne&&(X||this._bindSamplerUniformToChannel(ne._associatedChannel,I),te=!1),this._activeChannel=I;var de=this._getTextureTarget(ne);if(te&&this._bindTextureDirectly(de,ne,X),ne&&!ne.isMultiview){if(ne.isCube&&ne._cachedCoordinatesMode!==V.coordinatesMode){ne._cachedCoordinatesMode=V.coordinatesMode;var pe=V.coordinatesMode!==m.a.TEXTURE_CUBIC_MODE&&V.coordinatesMode!==m.a.TEXTURE_SKYBOX_MODE?m.a.TEXTURE_WRAP_ADDRESSMODE:m.a.TEXTURE_CLAMP_ADDRESSMODE;V.wrapU=pe,V.wrapV=pe}ne._cachedWrapU!==V.wrapU&&(ne._cachedWrapU=V.wrapU,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(V.wrapU),ne)),ne._cachedWrapV!==V.wrapV&&(ne._cachedWrapV=V.wrapV,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(V.wrapV),ne)),ne.is3D&&ne._cachedWrapR!==V.wrapR&&(ne._cachedWrapR=V.wrapR,this._setTextureParameterInteger(de,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(V.wrapR),ne)),this._setAnisotropicLevel(de,ne,V.anisotropicFilteringLevel)}return!0},N.prototype.setTextureArray=function(I,V,X){if(I!==void 0&&V){this._textureUnits&&this._textureUnits.length===X.length||(this._textureUnits=new Int32Array(X.length));for(var j=0;j =this._caps.maxVertexAttribs||!this._vertexAttribArraysEnabled[I]||this.disableAttributeByIndex(I)}},N.prototype.releaseEffects=function(){for(var I in this._compiledEffects){var V=this._compiledEffects[I].getPipelineContext();this._deletePipelineContext(V)}this._compiledEffects={}},N.prototype.dispose=function(){this.stopRenderLoop(),this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.releaseEffects(),this.unbindAllAttributes(),this._boundUniforms=[],A.a.IsWindowObjectExist()&&this._renderingCanvas&&(this._doNotHandleContextLost||(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored))),this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers=[],this._renderingCanvas=null,this._currentProgram=null,this._boundRenderFunction=null,_.a.ResetCache();for(var I=0,V=this._activeRequests;I 1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(m.a.TEXTURETYPE_FLOAT)},N.prototype._canRenderToHalfFloatFramebuffer=function(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(m.a.TEXTURETYPE_HALF_FLOAT)},N.prototype._canRenderToFramebuffer=function(I){for(var V=this._gl;V.getError()!==V.NO_ERROR;);var X=!0,j=V.createTexture();V.bindTexture(V.TEXTURE_2D,j),V.texImage2D(V.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(I),1,1,0,V.RGBA,this._getWebGLTextureType(I),null),V.texParameteri(V.TEXTURE_2D,V.TEXTURE_MIN_FILTER,V.NEAREST),V.texParameteri(V.TEXTURE_2D,V.TEXTURE_MAG_FILTER,V.NEAREST);var ne=V.createFramebuffer();V.bindFramebuffer(V.FRAMEBUFFER,ne),V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_2D,j,0);var te=V.checkFramebufferStatus(V.FRAMEBUFFER);if((X=(X=X&&te===V.FRAMEBUFFER_COMPLETE)&&V.getError()===V.NO_ERROR)&&(V.clear(V.COLOR_BUFFER_BIT),X=X&&V.getError()===V.NO_ERROR),X){V.bindFramebuffer(V.FRAMEBUFFER,null);var de=V.RGBA,pe=V.UNSIGNED_BYTE,ae=new Uint8Array(4);V.readPixels(0,0,1,1,de,pe,ae),X=X&&V.getError()===V.NO_ERROR}for(V.deleteTexture(j),V.deleteFramebuffer(ne),V.bindFramebuffer(V.FRAMEBUFFER,null);!X&&V.getError()!==V.NO_ERROR;);return X},N.prototype._getWebGLTextureType=function(I){if(this._webGLVersion===1){switch(I){case m.a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case m.a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT_OES;case m.a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(I){case m.a.TEXTURETYPE_BYTE:return this._gl.BYTE;case m.a.TEXTURETYPE_UNSIGNED_BYTE:return this._gl.UNSIGNED_BYTE;case m.a.TEXTURETYPE_SHORT:return this._gl.SHORT;case m.a.TEXTURETYPE_UNSIGNED_SHORT:return this._gl.UNSIGNED_SHORT;case m.a.TEXTURETYPE_INT:return this._gl.INT;case m.a.TEXTURETYPE_UNSIGNED_INTEGER:return this._gl.UNSIGNED_INT;case m.a.TEXTURETYPE_FLOAT:return this._gl.FLOAT;case m.a.TEXTURETYPE_HALF_FLOAT:return this._gl.HALF_FLOAT;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.UNSIGNED_SHORT_4_4_4_4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.UNSIGNED_SHORT_5_5_5_1;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.UNSIGNED_SHORT_5_6_5;case m.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case m.a.TEXTURETYPE_UNSIGNED_INT_24_8:return this._gl.UNSIGNED_INT_24_8;case m.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case m.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case m.a.TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE},N.prototype._getInternalFormat=function(I){var V=this._gl.RGBA;switch(I){case m.a.TEXTUREFORMAT_ALPHA:V=this._gl.ALPHA;break;case m.a.TEXTUREFORMAT_LUMINANCE:V=this._gl.LUMINANCE;break;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:V=this._gl.LUMINANCE_ALPHA;break;case m.a.TEXTUREFORMAT_RED:V=this._gl.RED;break;case m.a.TEXTUREFORMAT_RG:V=this._gl.RG;break;case m.a.TEXTUREFORMAT_RGB:V=this._gl.RGB;break;case m.a.TEXTUREFORMAT_RGBA:V=this._gl.RGBA}if(this._webGLVersion>1)switch(I){case m.a.TEXTUREFORMAT_RED_INTEGER:V=this._gl.RED_INTEGER;break;case m.a.TEXTUREFORMAT_RG_INTEGER:V=this._gl.RG_INTEGER;break;case m.a.TEXTUREFORMAT_RGB_INTEGER:V=this._gl.RGB_INTEGER;break;case m.a.TEXTUREFORMAT_RGBA_INTEGER:V=this._gl.RGBA_INTEGER}return V},N.prototype._getRGBABufferInternalSizedFormat=function(I,V){if(this._webGLVersion===1){if(V!==void 0)switch(V){case m.a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case m.a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB}return this._gl.RGBA}switch(I){case m.a.TEXTURETYPE_BYTE:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R8_SNORM;case m.a.TEXTUREFORMAT_RG:return this._gl.RG8_SNORM;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB8_SNORM;case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case m.a.TEXTURETYPE_UNSIGNED_BYTE:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R8;case m.a.TEXTUREFORMAT_RG:return this._gl.RG8;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB8;case m.a.TEXTUREFORMAT_RGBA:return this._gl.RGBA8;case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R8UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG8UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB8UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGBA8UI;case m.a.TEXTUREFORMAT_ALPHA:return this._gl.ALPHA;case m.a.TEXTUREFORMAT_LUMINANCE:return this._gl.LUMINANCE;case m.a.TEXTUREFORMAT_LUMINANCE_ALPHA:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case m.a.TEXTURETYPE_SHORT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16I}case m.a.TEXTURETYPE_UNSIGNED_SHORT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R16UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG16UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB16UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA16UI}case m.a.TEXTURETYPE_INT:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32I;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32I;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32I;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32I}case m.a.TEXTURETYPE_UNSIGNED_INTEGER:switch(V){case m.a.TEXTUREFORMAT_RED_INTEGER:return this._gl.R32UI;case m.a.TEXTUREFORMAT_RG_INTEGER:return this._gl.RG32UI;case m.a.TEXTUREFORMAT_RGB_INTEGER:return this._gl.RGB32UI;case m.a.TEXTUREFORMAT_RGBA_INTEGER:default:return this._gl.RGBA32UI}case m.a.TEXTURETYPE_FLOAT:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R32F;case m.a.TEXTUREFORMAT_RG:return this._gl.RG32F;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB32F;case m.a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA32F}case m.a.TEXTURETYPE_HALF_FLOAT:switch(V){case m.a.TEXTUREFORMAT_RED:return this._gl.R16F;case m.a.TEXTUREFORMAT_RG:return this._gl.RG16F;case m.a.TEXTUREFORMAT_RGB:return this._gl.RGB16F;case m.a.TEXTUREFORMAT_RGBA:default:return this._gl.RGBA16F}case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_6_5:return this._gl.RGB565;case m.a.TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV:return this._gl.R11F_G11F_B10F;case m.a.TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV:return this._gl.RGB9_E5;case m.a.TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4:return this._gl.RGBA4;case m.a.TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1:return this._gl.RGB5_A1;case m.a.TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV:switch(V){case m.a.TEXTUREFORMAT_RGBA:return this._gl.RGB10_A2;case m.a.TEXTUREFORMAT_RGBA_INTEGER:return this._gl.RGB10_A2UI;default:return this._gl.RGB10_A2}}return this._gl.RGBA8},N.prototype._getRGBAMultiSampleBufferFormat=function(I){return I===m.a.TEXTURETYPE_FLOAT?this._gl.RGBA32F:I===m.a.TEXTURETYPE_HALF_FLOAT?this._gl.RGBA16F:this._gl.RGBA8},N.prototype._loadFile=function(I,V,X,j,ne,te){var de=this,pe=N._FileToolsLoadFile(I,V,X,j,ne,te);return this._activeRequests.push(pe),pe.onCompleteObservable.add(function(ae){de._activeRequests.splice(de._activeRequests.indexOf(ae),1)}),pe},N._FileToolsLoadFile=function(I,V,X,j,ne,te){throw x.a.WarnImport("FileTools")},N.prototype.readPixels=function(I,V,X,j,ne){ne===void 0&&(ne=!0);var te=ne?4:3,de=ne?this._gl.RGBA:this._gl.RGB,pe=new Uint8Array(j*X*te);return this._gl.readPixels(I,V,X,j,de,this._gl.UNSIGNED_BYTE,pe),pe},Object.defineProperty(N,"IsSupported",{get:function(){return this.isSupported()},enumerable:!1,configurable:!0}),N.isSupported=function(){if(this._HasMajorPerformanceCaveat!==null)return!this._HasMajorPerformanceCaveat;if(this._IsSupported===null)try{var I=v.a.CreateCanvas(1,1),V=I.getContext("webgl")||I.getContext("experimental-webgl");this._IsSupported=V!=null&&!!window.WebGLRenderingContext}catch{this._IsSupported=!1}return this._IsSupported},Object.defineProperty(N,"HasMajorPerformanceCaveat",{get:function(){if(this._HasMajorPerformanceCaveat===null)try{var I=v.a.CreateCanvas(1,1),V=I.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||I.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!V}catch{this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat},enumerable:!1,configurable:!0}),N.CeilingPOT=function(I){return I--,I|=I>>1,I|=I>>2,I|=I>>4,I|=I>>8,I|=I>>16,++I},N.FloorPOT=function(I){return I|=I>>1,I|=I>>2,I|=I>>4,I|=I>>8,(I|=I>>16)-(I>>1)},N.NearestPOT=function(I){var V=N.CeilingPOT(I),X=N.FloorPOT(I);return V-I>I-X?X:V},N.GetExponentOfTwo=function(I,V,X){var j;switch(X===void 0&&(X=m.a.SCALEMODE_NEAREST),X){case m.a.SCALEMODE_FLOOR:j=N.FloorPOT(I);break;case m.a.SCALEMODE_NEAREST:j=N.NearestPOT(I);break;case m.a.SCALEMODE_CEILING:default:j=N.CeilingPOT(I)}return Math.min(j,V)},N.QueueNewFrame=function(I,V){return A.a.IsWindowObjectExist()?(V||(V=window),V.requestPostAnimationFrame?V.requestPostAnimationFrame(I):V.requestAnimationFrame?V.requestAnimationFrame(I):V.msRequestAnimationFrame?V.msRequestAnimationFrame(I):V.webkitRequestAnimationFrame?V.webkitRequestAnimationFrame(I):V.mozRequestAnimationFrame?V.mozRequestAnimationFrame(I):V.oRequestAnimationFrame?V.oRequestAnimationFrame(I):window.setTimeout(I,16)):typeof requestAnimationFrame<"u"?requestAnimationFrame(I):setTimeout(I,16)},N.prototype.getHostDocument=function(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:document},N.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]}],N._TextureLoaders=[],N.CollisionsEpsilon=.001,N._IsSupported=null,N._HasMajorPerformanceCaveat=null,N}()},function(Me,y,f){f.d(y,"b",function(){return U}),f.d(y,"a",function(){return R});var U,_=f(6),x=f(102),u=f(2),M=f(21);(function(C){C[C.Unknown=0]="Unknown",C[C.Url=1]="Url",C[C.Temp=2]="Temp",C[C.Raw=3]="Raw",C[C.Dynamic=4]="Dynamic",C[C.RenderTarget=5]="RenderTarget",C[C.MultiRenderTarget=6]="MultiRenderTarget",C[C.Cube=7]="Cube",C[C.CubeRaw=8]="CubeRaw",C[C.CubePrefiltered=9]="CubePrefiltered",C[C.Raw3D=10]="Raw3D",C[C.Raw2DArray=11]="Raw2DArray",C[C.Depth=12]="Depth",C[C.CubeRawRGBD=13]="CubeRawRGBD"})(U||(U={}));var R=function(){function C(m,c,T){T===void 0&&(T=!1),this.isReady=!1,this.isCube=!1,this.is3D=!1,this.is2DArray=!1,this.isMultiview=!1,this.url="",this.samplingMode=-1,this.generateMipMaps=!1,this.samples=0,this.type=-1,this.format=-1,this.onLoadedObservable=new _.c,this.width=0,this.height=0,this.depth=0,this.baseWidth=0,this.baseHeight=0,this.baseDepth=0,this.invertY=!1,this._invertVScale=!1,this._associatedChannel=-1,this._source=U.Unknown,this._buffer=null,this._bufferView=null,this._bufferViewArray=null,this._bufferViewArrayArray=null,this._size=0,this._extension="",this._files=null,this._workingCanvas=null,this._workingContext=null,this._framebuffer=null,this._depthStencilBuffer=null,this._MSAAFramebuffer=null,this._MSAARenderBuffer=null,this._attachments=null,this._textureArray=null,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedWrapR=null,this._cachedAnisotropicFilteringLevel=null,this._isDisabled=!1,this._compression=null,this._generateStencilBuffer=!1,this._generateDepthBuffer=!1,this._comparisonFunction=0,this._sphericalPolynomial=null,this._lodGenerationScale=0,this._lodGenerationOffset=0,this._colorTextureArray=null,this._depthStencilTextureArray=null,this._lodTextureHigh=null,this._lodTextureMid=null,this._lodTextureLow=null,this._isRGBD=!1,this._linearSpecularLOD=!1,this._irradianceTexture=null,this._webGLTexture=null,this._references=1,this._gammaSpace=null,this._engine=m,this._source=c,T||(this._webGLTexture=m._createTexture())}return C.prototype.getEngine=function(){return this._engine},Object.defineProperty(C.prototype,"source",{get:function(){return this._source},enumerable:!1,configurable:!0}),C.prototype.incrementReferences=function(){this._references++},C.prototype.updateSize=function(m,c,T){T===void 0&&(T=1),this.width=m,this.height=c,this.depth=T,this.baseWidth=m,this.baseHeight=c,this.baseDepth=T,this._size=m*c*T},C.prototype._rebuild=function(){var m,c,T=this;switch(this.isReady=!1,this._cachedCoordinatesMode=null,this._cachedWrapU=null,this._cachedWrapV=null,this._cachedAnisotropicFilteringLevel=null,this.source){case U.Temp:return;case U.Url:return void(c=this._engine.createTexture((m=this._originalUrl)!==null&&m!==void 0?m:this.url,!this.generateMipMaps,this.invertY,null,this.samplingMode,function(){c._swapAndDie(T),T.isReady=!0},null,this._buffer,void 0,this.format));case U.Raw:return(c=this._engine.createRawTexture(this._bufferView,this.baseWidth,this.baseHeight,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.Raw3D:return(c=this._engine.createRawTexture3D(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.Raw2DArray:return(c=this._engine.createRawTexture2DArray(this._bufferView,this.baseWidth,this.baseHeight,this.baseDepth,this.format,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.Dynamic:return(c=this._engine.createDynamicTexture(this.baseWidth,this.baseHeight,this.generateMipMaps,this.samplingMode))._swapAndDie(this),void this._engine.updateDynamicTexture(this,this._engine.getRenderingCanvas(),this.invertY,void 0,void 0,!0);case U.RenderTarget:var A=new x.a;if(A.generateDepthBuffer=this._generateDepthBuffer,A.generateMipMaps=this.generateMipMaps,A.generateStencilBuffer=this._generateStencilBuffer,A.samplingMode=this.samplingMode,A.type=this.type,this.isCube)c=this._engine.createRenderTargetCubeTexture(this.width,A);else{var S={width:this.width,height:this.height,layers:this.is2DArray?this.depth:void 0};c=this._engine.createRenderTargetTexture(S,A)}return c._swapAndDie(this),void(this.isReady=!0);case U.Depth:var g={bilinearFiltering:this.samplingMode!==u.a.TEXTURE_BILINEAR_SAMPLINGMODE,comparisonFunction:this._comparisonFunction,generateStencil:this._generateStencilBuffer,isCube:this.isCube},l={width:this.width,height:this.height,layers:this.is2DArray?this.depth:void 0};return(c=this._engine.createDepthStencilTexture(l,g))._swapAndDie(this),void(this.isReady=!0);case U.Cube:return void(c=this._engine.createCubeTexture(this.url,null,this._files,!this.generateMipMaps,function(){c._swapAndDie(T),T.isReady=!0},null,this.format,this._extension));case U.CubeRaw:return(c=this._engine.createRawCubeTexture(this._bufferViewArray,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression))._swapAndDie(this),void(this.isReady=!0);case U.CubeRawRGBD:return c=this._engine.createRawCubeTexture(null,this.width,this.format,this.type,this.generateMipMaps,this.invertY,this.samplingMode,this._compression),void C._UpdateRGBDAsync(c,this._bufferViewArrayArray,this._sphericalPolynomial,this._lodGenerationScale,this._lodGenerationOffset).then(function(){c._swapAndDie(T),T.isReady=!0});case U.CubePrefiltered:return void((c=this._engine.createPrefilteredCubeTexture(this.url,null,this._lodGenerationScale,this._lodGenerationOffset,function(h){h&&h._swapAndDie(T),T.isReady=!0},null,this.format,this._extension))._sphericalPolynomial=this._sphericalPolynomial)}},C.prototype._swapAndDie=function(m){m._webGLTexture=this._webGLTexture,m._isRGBD=this._isRGBD,this._framebuffer&&(m._framebuffer=this._framebuffer),this._depthStencilBuffer&&(m._depthStencilBuffer=this._depthStencilBuffer),m._depthStencilTexture=this._depthStencilTexture,this._lodTextureHigh&&(m._lodTextureHigh&&m._lodTextureHigh.dispose(),m._lodTextureHigh=this._lodTextureHigh),this._lodTextureMid&&(m._lodTextureMid&&m._lodTextureMid.dispose(),m._lodTextureMid=this._lodTextureMid),this._lodTextureLow&&(m._lodTextureLow&&m._lodTextureLow.dispose(),m._lodTextureLow=this._lodTextureLow),this._irradianceTexture&&(m._irradianceTexture&&m._irradianceTexture.dispose(),m._irradianceTexture=this._irradianceTexture);var c,T=this._engine.getLoadedTexturesCache();(c=T.indexOf(this))!==-1&&T.splice(c,1),(c=T.indexOf(m))===-1&&T.push(m)},C.prototype.dispose=function(){this._webGLTexture&&(this._references--,this._references===0&&(this._engine._releaseTexture(this),this._webGLTexture=null))},C._UpdateRGBDAsync=function(m,c,T,A,S){throw M.a.WarnImport("environmentTextureTools")},C}()},function(Me,y,f){f.d(y,"b",function(){return U}),f.d(y,"c",function(){return _}),f.d(y,"a",function(){return x});var U=1/2.2,_=2.2,x=.001},function(Me,y,f){f.d(y,"a",function(){return C});var U=f(1),_=f(0),x=f(3),u=f(6),M=f(22),R=f(21),C=function(){function m(c,T){T===void 0&&(T=null),this.state="",this.metadata=null,this.reservedDataStore=null,this._doNotSerialize=!1,this._isDisposed=!1,this.animations=new Array,this._ranges={},this.onReady=null,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=_.a.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._sceneRootNodesIndex=-1,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new u.c,this._onDisposeObserver=null,this._behaviors=new Array,this.name=c,this.id=c,this._scene=T||M.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache()}return m.AddNodeConstructor=function(c,T){this._NodeConstructors[c]=T},m.Construct=function(c,T,A,S){var g=this._NodeConstructors[c];return g?g(T,A,S):null},Object.defineProperty(m.prototype,"doNotSerialize",{get:function(){return!!this._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize},set:function(c){this._doNotSerialize=c},enumerable:!1,configurable:!0}),m.prototype.isDisposed=function(){return this._isDisposed},Object.defineProperty(m.prototype,"parent",{get:function(){return this._parentNode},set:function(c){if(this._parentNode!==c){var T=this._parentNode;if(this._parentNode&&this._parentNode._children!==void 0&&this._parentNode._children!==null){var A=this._parentNode._children.indexOf(this);A!==-1&&this._parentNode._children.splice(A,1),c||this._isDisposed||this._addToSceneRootNodes()}this._parentNode=c,this._parentNode&&(this._parentNode._children!==void 0&&this._parentNode._children!==null||(this._parentNode._children=new Array),this._parentNode._children.push(this),T||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}},enumerable:!1,configurable:!0}),m.prototype._addToSceneRootNodes=function(){this._sceneRootNodesIndex===-1&&(this._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))},m.prototype._removeFromSceneRootNodes=function(){if(this._sceneRootNodesIndex!==-1){var c=this._scene.rootNodes,T=c.length-1;c[this._sceneRootNodesIndex]=c[T],c[this._sceneRootNodesIndex]._sceneRootNodesIndex=this._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._sceneRootNodesIndex=-1}},Object.defineProperty(m.prototype,"animationPropertiesOverride",{get:function(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride},set:function(c){this._animationPropertiesOverride=c},enumerable:!1,configurable:!0}),m.prototype.getClassName=function(){return"Node"},Object.defineProperty(m.prototype,"onDispose",{set:function(c){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(c)},enumerable:!1,configurable:!0}),m.prototype.getScene=function(){return this._scene},m.prototype.getEngine=function(){return this._scene.getEngine()},m.prototype.addBehavior=function(c,T){var A=this;return T===void 0&&(T=!1),this._behaviors.indexOf(c)!==-1||(c.init(),this._scene.isLoading&&!T?this._scene.onDataLoadedObservable.addOnce(function(){c.attach(A)}):c.attach(this),this._behaviors.push(c)),this},m.prototype.removeBehavior=function(c){var T=this._behaviors.indexOf(c);return T===-1||(this._behaviors[T].detach(),this._behaviors.splice(T,1)),this},Object.defineProperty(m.prototype,"behaviors",{get:function(){return this._behaviors},enumerable:!1,configurable:!0}),m.prototype.getBehaviorByName=function(c){for(var T=0,A=this._behaviors;T -#if defined(BUMP) || !defined(NORMAL) -#extension GL_OES_standard_derivatives : enable -#endif -#include [SCENE_MRT_COUNT] -#define CUSTOM_FRAGMENT_BEGIN -#ifdef LOGARITHMICDEPTH -#extension GL_EXT_frag_depth : enable -#endif - -#define RECIPROCAL_PI2 0.15915494 -uniform vec3 vEyePosition; -uniform vec3 vAmbientColor; - -varying vec3 vPositionW; -#ifdef NORMAL -varying vec3 vNormalW; -#endif -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif - -#include - -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include - -#ifdef DIFFUSE -#if DIFFUSEDIRECTUV == 1 -#define vDiffuseUV vMainUV1 -#elif DIFFUSEDIRECTUV == 2 -#define vDiffuseUV vMainUV2 -#else -varying vec2 vDiffuseUV; -#endif -uniform sampler2D diffuseSampler; -#endif -#ifdef AMBIENT -#if AMBIENTDIRECTUV == 1 -#define vAmbientUV vMainUV1 -#elif AMBIENTDIRECTUV == 2 -#define vAmbientUV vMainUV2 -#else -varying vec2 vAmbientUV; -#endif -uniform sampler2D ambientSampler; -#endif -#ifdef OPACITY -#if OPACITYDIRECTUV == 1 -#define vOpacityUV vMainUV1 -#elif OPACITYDIRECTUV == 2 -#define vOpacityUV vMainUV2 -#else -varying vec2 vOpacityUV; -#endif -uniform sampler2D opacitySampler; -#endif -#ifdef EMISSIVE -#if EMISSIVEDIRECTUV == 1 -#define vEmissiveUV vMainUV1 -#elif EMISSIVEDIRECTUV == 2 -#define vEmissiveUV vMainUV2 -#else -varying vec2 vEmissiveUV; -#endif -uniform sampler2D emissiveSampler; -#endif -#ifdef LIGHTMAP -#if LIGHTMAPDIRECTUV == 1 -#define vLightmapUV vMainUV1 -#elif LIGHTMAPDIRECTUV == 2 -#define vLightmapUV vMainUV2 -#else -varying vec2 vLightmapUV; -#endif -uniform sampler2D lightmapSampler; -#endif -#ifdef REFRACTION -#ifdef REFRACTIONMAP_3D -uniform samplerCube refractionCubeSampler; -#else -uniform sampler2D refraction2DSampler; -#endif -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) -#if SPECULARDIRECTUV == 1 -#define vSpecularUV vMainUV1 -#elif SPECULARDIRECTUV == 2 -#define vSpecularUV vMainUV2 -#else -varying vec2 vSpecularUV; -#endif -uniform sampler2D specularSampler; -#endif -#ifdef ALPHATEST -uniform float alphaCutOff; -#endif - -#include - -#ifdef REFLECTION -#ifdef REFLECTIONMAP_3D -uniform samplerCube reflectionCubeSampler; -#else -uniform sampler2D reflection2DSampler; -#endif -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#else -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#endif -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#define CUSTOM_FRAGMENT_DEFINITIONS -void main(void) { -#define CUSTOM_FRAGMENT_MAIN_BEGIN -#include -vec3 viewDirectionW=normalize(vEyePosition-vPositionW); - -vec4 baseColor=vec4(1.,1.,1.,1.); -vec3 diffuseColor=vDiffuseColor.rgb; - -float alpha=vDiffuseColor.a; - -#ifdef NORMAL -vec3 normalW=normalize(vNormalW); -#else -vec3 normalW=normalize(-cross(dFdx(vPositionW),dFdy(vPositionW))); -#endif -#include -#ifdef TWOSIDEDLIGHTING -normalW=gl_FrontFacing ? normalW : -normalW; -#endif -#ifdef DIFFUSE -baseColor=texture2D(diffuseSampler,vDiffuseUV+uvOffset); -#if defined(ALPHATEST) && !defined(ALPHATEST_AFTERALLALPHACOMPUTATIONS) -if (baseColor.a -#ifdef VERTEXCOLOR -baseColor.rgb*=vColor.rgb; -#endif -#ifdef DETAIL -baseColor.rgb=baseColor.rgb*2.0*mix(0.5,detailColor.r,vDetailInfos.y); -#endif -#define CUSTOM_FRAGMENT_UPDATE_DIFFUSE - -vec3 baseAmbientColor=vec3(1.,1.,1.); -#ifdef AMBIENT -baseAmbientColor=texture2D(ambientSampler,vAmbientUV+uvOffset).rgb*vAmbientInfos.y; -#endif -#define CUSTOM_FRAGMENT_BEFORE_LIGHTS - -#ifdef SPECULARTERM -float glossiness=vSpecularColor.a; -vec3 specularColor=vSpecularColor.rgb; -#ifdef SPECULAR -vec4 specularMapColor=texture2D(specularSampler,vSpecularUV+uvOffset); -specularColor=specularMapColor.rgb; -#ifdef GLOSSINESS -glossiness=glossiness*specularMapColor.a; -#endif -#endif -#else -float glossiness=0.; -#endif - -vec3 diffuseBase=vec3(0.,0.,0.); -lightingInfo info; -#ifdef SPECULARTERM -vec3 specularBase=vec3(0.,0.,0.); -#endif -float shadow=1.; -#ifdef LIGHTMAP -vec4 lightmapColor=texture2D(lightmapSampler,vLightmapUV+uvOffset); -#ifdef RGBDLIGHTMAP -lightmapColor.rgb=fromRGBD(lightmapColor); -#endif -lightmapColor.rgb*=vLightmapInfos.y; -#endif -#include [0..maxSimultaneousLights] - -vec4 refractionColor=vec4(0.,0.,0.,1.); -#ifdef REFRACTION -vec3 refractionVector=normalize(refract(-viewDirectionW,normalW,vRefractionInfos.y)); -#ifdef REFRACTIONMAP_3D -refractionVector.y=refractionVector.y*vRefractionInfos.w; -if (dot(refractionVector,viewDirectionW)<1.0) { -refractionColor=textureCube(refractionCubeSampler,refractionVector); -} -#else -vec3 vRefractionUVW=vec3(refractionMatrix*(view*vec4(vPositionW+refractionVector*vRefractionInfos.z,1.0))); -vec2 refractionCoords=vRefractionUVW.xy/vRefractionUVW.z; -refractionCoords.y=1.0-refractionCoords.y; -refractionColor=texture2D(refraction2DSampler,refractionCoords); -#endif -#ifdef RGBDREFRACTION -refractionColor.rgb=fromRGBD(refractionColor); -#endif -#ifdef IS_REFRACTION_LINEAR -refractionColor.rgb=toGammaSpace(refractionColor.rgb); -#endif -refractionColor.rgb*=vRefractionInfos.x; -#endif - -vec4 reflectionColor=vec4(0.,0.,0.,1.); -#ifdef REFLECTION -vec3 vReflectionUVW=computeReflectionCoords(vec4(vPositionW,1.0),normalW); -#ifdef REFLECTIONMAP_3D -#ifdef ROUGHNESS -float bias=vReflectionInfos.y; -#ifdef SPECULARTERM -#ifdef SPECULAR -#ifdef GLOSSINESS -bias*=(1.0-specularMapColor.a); -#endif -#endif -#endif -reflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW,bias); -#else -reflectionColor=textureCube(reflectionCubeSampler,vReflectionUVW); -#endif -#else -vec2 coords=vReflectionUVW.xy; -#ifdef REFLECTIONMAP_PROJECTION -coords/=vReflectionUVW.z; -#endif -coords.y=1.0-coords.y; -reflectionColor=texture2D(reflection2DSampler,coords); -#endif -#ifdef RGBDREFLECTION -reflectionColor.rgb=fromRGBD(reflectionColor); -#endif -#ifdef IS_REFLECTION_LINEAR -reflectionColor.rgb=toGammaSpace(reflectionColor.rgb); -#endif -reflectionColor.rgb*=vReflectionInfos.x; -#ifdef REFLECTIONFRESNEL -float reflectionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,reflectionRightColor.a,reflectionLeftColor.a); -#ifdef REFLECTIONFRESNELFROMSPECULAR -#ifdef SPECULARTERM -reflectionColor.rgb*=specularColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; -#else -reflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; -#endif -#else -reflectionColor.rgb*=reflectionLeftColor.rgb*(1.0-reflectionFresnelTerm)+reflectionFresnelTerm*reflectionRightColor.rgb; -#endif -#endif -#endif -#ifdef REFRACTIONFRESNEL -float refractionFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,refractionRightColor.a,refractionLeftColor.a); -refractionColor.rgb*=refractionLeftColor.rgb*(1.0-refractionFresnelTerm)+refractionFresnelTerm*refractionRightColor.rgb; -#endif -#ifdef OPACITY -vec4 opacityMap=texture2D(opacitySampler,vOpacityUV+uvOffset); -#ifdef OPACITYRGB -opacityMap.rgb=opacityMap.rgb*vec3(0.3,0.59,0.11); -alpha*=(opacityMap.x+opacityMap.y+opacityMap.z)* vOpacityInfos.y; -#else -alpha*=opacityMap.a*vOpacityInfos.y; -#endif -#endif -#ifdef VERTEXALPHA -alpha*=vColor.a; -#endif -#ifdef OPACITYFRESNEL -float opacityFresnelTerm=computeFresnelTerm(viewDirectionW,normalW,opacityParts.z,opacityParts.w); -alpha+=opacityParts.x*(1.0-opacityFresnelTerm)+opacityFresnelTerm*opacityParts.y; -#endif -#ifdef ALPHATEST -#ifdef ALPHATEST_AFTERALLALPHACOMPUTATIONS -if (alpha -#include - - -#ifdef IMAGEPROCESSINGPOSTPROCESS -color.rgb=toLinearSpace(color.rgb); -#else -#ifdef IMAGEPROCESSING -color.rgb=toLinearSpace(color.rgb); -color=applyImageProcessing(color); -#endif -#endif -color.a*=visibility; -#ifdef PREMULTIPLYALPHA - -color.rgb*=color.a; -#endif -#define CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR -#ifdef PREPASS -gl_FragData[0]=color; -#ifdef PREPASS_POSITION -gl_FragData[PREPASS_POSITION_INDEX]=vec4(vPositionW,1.0); -#endif -#ifdef PREPASS_VELOCITY -vec2 a=(vCurrentPosition.xy/vCurrentPosition.w)*0.5+0.5; -vec2 b=(vPreviousPosition.xy/vPreviousPosition.w)*0.5+0.5; -vec2 velocity=abs(a-b); -velocity=vec2(pow(velocity.x,1.0/3.0),pow(velocity.y,1.0/3.0))*sign(a-b)*0.5+0.5; -gl_FragData[PREPASS_VELOCITY_INDEX]=vec4(velocity,0.0,1.0); -#endif -#ifdef PREPASS_IRRADIANCE -gl_FragData[PREPASS_IRRADIANCE_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#ifdef PREPASS_DEPTHNORMAL -gl_FragData[PREPASS_DEPTHNORMAL_INDEX]=vec4(vViewPos.z,(view*vec4(normalW,0.0)).rgb); -#endif -#ifdef PREPASS_ALBEDO -gl_FragData[PREPASS_ALBEDO_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#ifdef PREPASS_REFLECTIVITY -#if defined(SPECULAR) -gl_FragData[PREPASS_REFLECTIVITY_INDEX]=specularMapColor; -#else -gl_FragData[PREPASS_REFLECTIVITY_INDEX]=vec4(0.0,0.0,0.0,1.0); -#endif -#endif -#endif -#if !defined(PREPASS) || defined(WEBGL2) -gl_FragColor=color; -#endif -} -`;E.a.ShadersStore.defaultPixelShader=N;var I=` -uniform mat4 viewProjection; -uniform mat4 view; -#ifdef DIFFUSE -uniform mat4 diffuseMatrix; -uniform vec2 vDiffuseInfos; -#endif -#ifdef AMBIENT -uniform mat4 ambientMatrix; -uniform vec2 vAmbientInfos; -#endif -#ifdef OPACITY -uniform mat4 opacityMatrix; -uniform vec2 vOpacityInfos; -#endif -#ifdef EMISSIVE -uniform vec2 vEmissiveInfos; -uniform mat4 emissiveMatrix; -#endif -#ifdef LIGHTMAP -uniform vec2 vLightmapInfos; -uniform mat4 lightmapMatrix; -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) -uniform vec2 vSpecularInfos; -uniform mat4 specularMatrix; -#endif -#ifdef BUMP -uniform vec3 vBumpInfos; -uniform mat4 bumpMatrix; -#endif -#ifdef REFLECTION -uniform mat4 reflectionMatrix; -#endif -#ifdef POINTSIZE -uniform float pointSize; -#endif -`;E.a.IncludesShadersStore.defaultVertexDeclaration=I,f(78),f(79),f(163),f(164),f(117),f(137),f(93),f(94),f(100),f(80),f(81),f(165),f(156),f(111),f(157),f(138),E.a.IncludesShadersStore.pointCloudVertex=`#ifdef POINTSIZE -gl_PointSize=pointSize; -#endif`,f(158);var V=`#include<__decl__defaultVertex> - -#define CUSTOM_VERTEX_BEGIN -attribute vec3 position; -#ifdef NORMAL -attribute vec3 normal; -#endif -#ifdef TANGENT -attribute vec4 tangent; -#endif -#ifdef UV1 -attribute vec2 uv; -#endif -#ifdef UV2 -attribute vec2 uv2; -#endif -#ifdef VERTEXCOLOR -attribute vec4 color; -#endif -#include -#include - -#include -#include -#ifdef MAINUV1 -varying vec2 vMainUV1; -#endif -#ifdef MAINUV2 -varying vec2 vMainUV2; -#endif -#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 -varying vec2 vDiffuseUV; -#endif -#if defined(DETAIL) && DETAILDIRECTUV == 0 -varying vec2 vDetailUV; -#endif -#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 -varying vec2 vAmbientUV; -#endif -#if defined(OPACITY) && OPACITYDIRECTUV == 0 -varying vec2 vOpacityUV; -#endif -#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 -varying vec2 vEmissiveUV; -#endif -#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 -varying vec2 vLightmapUV; -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 -varying vec2 vSpecularUV; -#endif -#if defined(BUMP) && BUMPDIRECTUV == 0 -varying vec2 vBumpUV; -#endif - -varying vec3 vPositionW; -#ifdef NORMAL -varying vec3 vNormalW; -#endif -#ifdef VERTEXCOLOR -varying vec4 vColor; -#endif -#include -#include -#include -#include<__decl__lightFragment>[0..maxSimultaneousLights] -#include -#include [0..maxSimultaneousMorphTargets] -#ifdef REFLECTIONMAP_SKYBOX -varying vec3 vPositionUVW; -#endif -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -varying vec3 vDirectionW; -#endif -#include -#define CUSTOM_VERTEX_DEFINITIONS -void main(void) { -#define CUSTOM_VERTEX_MAIN_BEGIN -vec3 positionUpdated=position; -#ifdef NORMAL -vec3 normalUpdated=normal; -#endif -#ifdef TANGENT -vec4 tangentUpdated=tangent; -#endif -#ifdef UV1 -vec2 uvUpdated=uv; -#endif -#include [0..maxSimultaneousMorphTargets] -#ifdef REFLECTIONMAP_SKYBOX -vPositionUVW=positionUpdated; -#endif -#define CUSTOM_VERTEX_UPDATE_POSITION -#define CUSTOM_VERTEX_UPDATE_NORMAL -#include -#if defined(PREPASS) && defined(PREPASS_VELOCITY) && !defined(BONES_VELOCITY_ENABLED) - -vCurrentPosition=viewProjection*finalWorld*vec4(positionUpdated,1.0); -vPreviousPosition=previousViewProjection*previousWorld*vec4(positionUpdated,1.0); -#endif -#include -vec4 worldPos=finalWorld*vec4(positionUpdated,1.0); -#ifdef NORMAL -mat3 normalWorld=mat3(finalWorld); -#if defined(INSTANCES) && defined(THIN_INSTANCES) -vNormalW=normalUpdated/vec3(dot(normalWorld[0],normalWorld[0]),dot(normalWorld[1],normalWorld[1]),dot(normalWorld[2],normalWorld[2])); -vNormalW=normalize(normalWorld*vNormalW); -#else -#ifdef NONUNIFORMSCALING -normalWorld=transposeMat3(inverseMat3(normalWorld)); -#endif -vNormalW=normalize(normalWorld*normalUpdated); -#endif -#endif -#define CUSTOM_VERTEX_UPDATE_WORLDPOS -#ifdef MULTIVIEW -if (gl_ViewID_OVR == 0u) { -gl_Position=viewProjection*worldPos; -} else { -gl_Position=viewProjectionR*worldPos; -} -#else -gl_Position=viewProjection*worldPos; -#endif -vPositionW=vec3(worldPos); -#include -#if defined(REFLECTIONMAP_EQUIRECTANGULAR_FIXED) || defined(REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED) -vDirectionW=normalize(vec3(finalWorld*vec4(positionUpdated,0.0))); -#endif - -#ifndef UV1 -vec2 uvUpdated=vec2(0.,0.); -#endif -#ifndef UV2 -vec2 uv2=vec2(0.,0.); -#endif -#ifdef MAINUV1 -vMainUV1=uvUpdated; -#endif -#ifdef MAINUV2 -vMainUV2=uv2; -#endif -#if defined(DIFFUSE) && DIFFUSEDIRECTUV == 0 -if (vDiffuseInfos.x == 0.) -{ -vDiffuseUV=vec2(diffuseMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vDiffuseUV=vec2(diffuseMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(DETAIL) && DETAILDIRECTUV == 0 -if (vDetailInfos.x == 0.) -{ -vDetailUV=vec2(detailMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vDetailUV=vec2(detailMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(AMBIENT) && AMBIENTDIRECTUV == 0 -if (vAmbientInfos.x == 0.) -{ -vAmbientUV=vec2(ambientMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vAmbientUV=vec2(ambientMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(OPACITY) && OPACITYDIRECTUV == 0 -if (vOpacityInfos.x == 0.) -{ -vOpacityUV=vec2(opacityMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vOpacityUV=vec2(opacityMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(EMISSIVE) && EMISSIVEDIRECTUV == 0 -if (vEmissiveInfos.x == 0.) -{ -vEmissiveUV=vec2(emissiveMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vEmissiveUV=vec2(emissiveMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(LIGHTMAP) && LIGHTMAPDIRECTUV == 0 -if (vLightmapInfos.x == 0.) -{ -vLightmapUV=vec2(lightmapMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vLightmapUV=vec2(lightmapMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(SPECULAR) && defined(SPECULARTERM) && SPECULARDIRECTUV == 0 -if (vSpecularInfos.x == 0.) -{ -vSpecularUV=vec2(specularMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vSpecularUV=vec2(specularMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#if defined(BUMP) && BUMPDIRECTUV == 0 -if (vBumpInfos.x == 0.) -{ -vBumpUV=vec2(bumpMatrix*vec4(uvUpdated,1.0,0.0)); -} -else -{ -vBumpUV=vec2(bumpMatrix*vec4(uv2,1.0,0.0)); -} -#endif -#include -#include -#include -#include [0..maxSimultaneousLights] -#ifdef VERTEXCOLOR - -vColor=color; -#endif -#include -#include -#define CUSTOM_VERTEX_MAIN_END -} -`;E.a.ShadersStore.defaultVertexShader=V;var X=f(2),j=f(67),ne=f(92),te={effect:null,subMesh:null},de=function(ae){function ee(){var K=ae.call(this)||this;return K.MAINUV1=!1,K.MAINUV2=!1,K.DIFFUSE=!1,K.DIFFUSEDIRECTUV=0,K.DETAIL=!1,K.DETAILDIRECTUV=0,K.DETAIL_NORMALBLENDMETHOD=0,K.AMBIENT=!1,K.AMBIENTDIRECTUV=0,K.OPACITY=!1,K.OPACITYDIRECTUV=0,K.OPACITYRGB=!1,K.REFLECTION=!1,K.EMISSIVE=!1,K.EMISSIVEDIRECTUV=0,K.SPECULAR=!1,K.SPECULARDIRECTUV=0,K.BUMP=!1,K.BUMPDIRECTUV=0,K.PARALLAX=!1,K.PARALLAXOCCLUSION=!1,K.SPECULAROVERALPHA=!1,K.CLIPPLANE=!1,K.CLIPPLANE2=!1,K.CLIPPLANE3=!1,K.CLIPPLANE4=!1,K.CLIPPLANE5=!1,K.CLIPPLANE6=!1,K.ALPHATEST=!1,K.DEPTHPREPASS=!1,K.ALPHAFROMDIFFUSE=!1,K.POINTSIZE=!1,K.FOG=!1,K.SPECULARTERM=!1,K.DIFFUSEFRESNEL=!1,K.OPACITYFRESNEL=!1,K.REFLECTIONFRESNEL=!1,K.REFRACTIONFRESNEL=!1,K.EMISSIVEFRESNEL=!1,K.FRESNEL=!1,K.NORMAL=!1,K.UV1=!1,K.UV2=!1,K.VERTEXCOLOR=!1,K.VERTEXALPHA=!1,K.NUM_BONE_INFLUENCERS=0,K.BonesPerMesh=0,K.BONETEXTURE=!1,K.BONES_VELOCITY_ENABLED=!1,K.INSTANCES=!1,K.THIN_INSTANCES=!1,K.GLOSSINESS=!1,K.ROUGHNESS=!1,K.EMISSIVEASILLUMINATION=!1,K.LINKEMISSIVEWITHDIFFUSE=!1,K.REFLECTIONFRESNELFROMSPECULAR=!1,K.LIGHTMAP=!1,K.LIGHTMAPDIRECTUV=0,K.OBJECTSPACE_NORMALMAP=!1,K.USELIGHTMAPASSHADOWMAP=!1,K.REFLECTIONMAP_3D=!1,K.REFLECTIONMAP_SPHERICAL=!1,K.REFLECTIONMAP_PLANAR=!1,K.REFLECTIONMAP_CUBIC=!1,K.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,K.REFLECTIONMAP_PROJECTION=!1,K.REFLECTIONMAP_SKYBOX=!1,K.REFLECTIONMAP_EXPLICIT=!1,K.REFLECTIONMAP_EQUIRECTANGULAR=!1,K.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,K.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,K.INVERTCUBICMAP=!1,K.LOGARITHMICDEPTH=!1,K.REFRACTION=!1,K.REFRACTIONMAP_3D=!1,K.REFLECTIONOVERALPHA=!1,K.TWOSIDEDLIGHTING=!1,K.SHADOWFLOAT=!1,K.MORPHTARGETS=!1,K.MORPHTARGETS_NORMAL=!1,K.MORPHTARGETS_TANGENT=!1,K.MORPHTARGETS_UV=!1,K.NUM_MORPH_INFLUENCERS=0,K.NONUNIFORMSCALING=!1,K.PREMULTIPLYALPHA=!1,K.ALPHATEST_AFTERALLALPHACOMPUTATIONS=!1,K.ALPHABLEND=!0,K.PREPASS=!1,K.PREPASS_IRRADIANCE=!1,K.PREPASS_IRRADIANCE_INDEX=-1,K.PREPASS_ALBEDO=!1,K.PREPASS_ALBEDO_INDEX=-1,K.PREPASS_DEPTHNORMAL=!1,K.PREPASS_DEPTHNORMAL_INDEX=-1,K.PREPASS_POSITION=!1,K.PREPASS_POSITION_INDEX=-1,K.PREPASS_VELOCITY=!1,K.PREPASS_VELOCITY_INDEX=-1,K.PREPASS_REFLECTIVITY=!1,K.PREPASS_REFLECTIVITY_INDEX=-1,K.SCENE_MRT_COUNT=0,K.RGBDLIGHTMAP=!1,K.RGBDREFLECTION=!1,K.RGBDREFRACTION=!1,K.IMAGEPROCESSING=!1,K.VIGNETTE=!1,K.VIGNETTEBLENDMODEMULTIPLY=!1,K.VIGNETTEBLENDMODEOPAQUE=!1,K.TONEMAPPING=!1,K.TONEMAPPING_ACES=!1,K.CONTRAST=!1,K.COLORCURVES=!1,K.COLORGRADING=!1,K.COLORGRADING3D=!1,K.SAMPLER3DGREENDEPTH=!1,K.SAMPLER3DBGRMAP=!1,K.IMAGEPROCESSINGPOSTPROCESS=!1,K.MULTIVIEW=!1,K.IS_REFLECTION_LINEAR=!1,K.IS_REFRACTION_LINEAR=!1,K.EXPOSURE=!1,K.rebuild(),K}return Object(U.d)(ee,ae),ee.prototype.setReflectionMode=function(K){for(var $=0,L=["REFLECTIONMAP_CUBIC","REFLECTIONMAP_EXPLICIT","REFLECTIONMAP_PLANAR","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_PROJECTION","REFLECTIONMAP_SKYBOX","REFLECTIONMAP_SPHERICAL","REFLECTIONMAP_EQUIRECTANGULAR","REFLECTIONMAP_EQUIRECTANGULAR_FIXED","REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED"];$ 0,Q.REFLECTIONOVERALPHA=this._useReflectionOverAlpha,Q.INVERTCUBICMAP=this._reflectionTexture.coordinatesMode===l.a.INVCUBIC_MODE,Q.REFLECTIONMAP_3D=this._reflectionTexture.isCube,Q.RGBDREFLECTION=this._reflectionTexture.isRGBD,this._reflectionTexture.coordinatesMode){case l.a.EXPLICIT_MODE:Q.setReflectionMode("REFLECTIONMAP_EXPLICIT");break;case l.a.PLANAR_MODE:Q.setReflectionMode("REFLECTIONMAP_PLANAR");break;case l.a.PROJECTION_MODE:Q.setReflectionMode("REFLECTIONMAP_PROJECTION");break;case l.a.SKYBOX_MODE:Q.setReflectionMode("REFLECTIONMAP_SKYBOX");break;case l.a.SPHERICAL_MODE:Q.setReflectionMode("REFLECTIONMAP_SPHERICAL");break;case l.a.EQUIRECTANGULAR_MODE:Q.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR");break;case l.a.FIXED_EQUIRECTANGULAR_MODE:Q.setReflectionMode("REFLECTIONMAP_EQUIRECTANGULAR_FIXED");break;case l.a.FIXED_EQUIRECTANGULAR_MIRRORED_MODE:Q.setReflectionMode("REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED");break;case l.a.CUBIC_MODE:case l.a.INVCUBIC_MODE:default:Q.setReflectionMode("REFLECTIONMAP_CUBIC")}Q.USE_LOCAL_REFLECTIONMAP_CUBIC=!!this._reflectionTexture.boundingBoxSize}else Q.REFLECTION=!1;if(this._emissiveTexture&&ee.EmissiveTextureEnabled){if(!this._emissiveTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._emissiveTexture,Q,"EMISSIVE")}else Q.EMISSIVE=!1;if(this._lightmapTexture&&ee.LightmapTextureEnabled){if(!this._lightmapTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._lightmapTexture,Q,"LIGHTMAP"),Q.USELIGHTMAPASSHADOWMAP=this._useLightmapAsShadowmap,Q.RGBDLIGHTMAP=this._lightmapTexture.isRGBD}else Q.LIGHTMAP=!1;if(this._specularTexture&&ee.SpecularTextureEnabled){if(!this._specularTexture.isReadyOrNotBlocking())return!1;g.a.PrepareDefinesForMergedUV(this._specularTexture,Q,"SPECULAR"),Q.GLOSSINESS=this._useGlossinessFromSpecularMapAlpha}else Q.SPECULAR=!1;if(G.getEngine().getCaps().standardDerivatives&&this._bumpTexture&&ee.BumpTextureEnabled){if(!this._bumpTexture.isReady())return!1;g.a.PrepareDefinesForMergedUV(this._bumpTexture,Q,"BUMP"),Q.PARALLAX=this._useParallax,Q.PARALLAXOCCLUSION=this._useParallaxOcclusion,Q.OBJECTSPACE_NORMALMAP=this._useObjectSpaceNormalMap}else Q.BUMP=!1;if(this._refractionTexture&&ee.RefractionTextureEnabled){if(!this._refractionTexture.isReadyOrNotBlocking())return!1;Q._needUVs=!0,Q.REFRACTION=!0,Q.REFRACTIONMAP_3D=this._refractionTexture.isCube,Q.RGBDREFRACTION=this._refractionTexture.isRGBD}else Q.REFRACTION=!1;Q.TWOSIDEDLIGHTING=!this._backFaceCulling&&this._twoSidedLighting}else Q.DIFFUSE=!1,Q.AMBIENT=!1,Q.OPACITY=!1,Q.REFLECTION=!1,Q.EMISSIVE=!1,Q.LIGHTMAP=!1,Q.BUMP=!1,Q.REFRACTION=!1;Q.ALPHAFROMDIFFUSE=this._shouldUseAlphaFromDiffuseTexture(),Q.EMISSIVEASILLUMINATION=this._useEmissiveAsIllumination,Q.LINKEMISSIVEWITHDIFFUSE=this._linkEmissiveWithDiffuse,Q.SPECULAROVERALPHA=this._useSpecularOverAlpha,Q.PREMULTIPLYALPHA=this.alphaMode===X.a.ALPHA_PREMULTIPLIED||this.alphaMode===X.a.ALPHA_PREMULTIPLIED_PORTERDUFF,Q.ALPHATEST_AFTERALLALPHACOMPUTATIONS=this.transparencyMode!==null,Q.ALPHABLEND=this.transparencyMode===null||this.needAlphaBlendingForMesh(K)}if(!this.detailMap.isReadyForSubMesh(Q,G))return!1;if(Q._areImageProcessingDirty&&this._imageProcessingConfiguration){if(!this._imageProcessingConfiguration.isReady())return!1;this._imageProcessingConfiguration.prepareDefines(Q),Q.IS_REFLECTION_LINEAR=this.reflectionTexture!=null&&!this.reflectionTexture.gammaSpace,Q.IS_REFRACTION_LINEAR=this.refractionTexture!=null&&!this.refractionTexture.gammaSpace}if(Q._areFresnelDirty&&(ee.FresnelEnabled?(this._diffuseFresnelParameters||this._opacityFresnelParameters||this._emissiveFresnelParameters||this._refractionFresnelParameters||this._reflectionFresnelParameters)&&(Q.DIFFUSEFRESNEL=this._diffuseFresnelParameters&&this._diffuseFresnelParameters.isEnabled,Q.OPACITYFRESNEL=this._opacityFresnelParameters&&this._opacityFresnelParameters.isEnabled,Q.REFLECTIONFRESNEL=this._reflectionFresnelParameters&&this._reflectionFresnelParameters.isEnabled,Q.REFLECTIONFRESNELFROMSPECULAR=this._useReflectionFresnelFromSpecular,Q.REFRACTIONFRESNEL=this._refractionFresnelParameters&&this._refractionFresnelParameters.isEnabled,Q.EMISSIVEFRESNEL=this._emissiveFresnelParameters&&this._emissiveFresnelParameters.isEnabled,Q._needNormals=!0,Q.FRESNEL=!0):Q.FRESNEL=!1),g.a.PrepareDefinesForMisc(K,G,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,this._shouldTurnAlphaTestOn(K)||this._forceAlphaTest,Q),g.a.PrepareDefinesForAttributes(K,Q,!0,!0,!0),g.a.PrepareDefinesForFrameBoundValues(G,oe,Q,L,null,$.getRenderingMesh().hasThinInstances),this.detailMap.prepareDefines(Q,G),Q.isDirty){var re=Q._areLightsDisposed;Q.markAsProcessed();var Y=new j.a;Q.REFLECTION&&Y.addFallback(0,"REFLECTION"),Q.SPECULAR&&Y.addFallback(0,"SPECULAR"),Q.BUMP&&Y.addFallback(0,"BUMP"),Q.PARALLAX&&Y.addFallback(1,"PARALLAX"),Q.PARALLAXOCCLUSION&&Y.addFallback(0,"PARALLAXOCCLUSION"),Q.SPECULAROVERALPHA&&Y.addFallback(0,"SPECULAROVERALPHA"),Q.FOG&&Y.addFallback(1,"FOG"),Q.POINTSIZE&&Y.addFallback(0,"POINTSIZE"),Q.LOGARITHMICDEPTH&&Y.addFallback(0,"LOGARITHMICDEPTH"),g.a.HandleFallbacksForShadows(Q,Y,this._maxSimultaneousLights),Q.SPECULARTERM&&Y.addFallback(0,"SPECULARTERM"),Q.DIFFUSEFRESNEL&&Y.addFallback(1,"DIFFUSEFRESNEL"),Q.OPACITYFRESNEL&&Y.addFallback(2,"OPACITYFRESNEL"),Q.REFLECTIONFRESNEL&&Y.addFallback(3,"REFLECTIONFRESNEL"),Q.EMISSIVEFRESNEL&&Y.addFallback(4,"EMISSIVEFRESNEL"),Q.FRESNEL&&Y.addFallback(4,"FRESNEL"),Q.MULTIVIEW&&Y.addFallback(0,"MULTIVIEW");var k=[C.b.PositionKind];Q.NORMAL&&k.push(C.b.NormalKind),Q.UV1&&k.push(C.b.UVKind),Q.UV2&&k.push(C.b.UV2Kind),Q.VERTEXCOLOR&&k.push(C.b.ColorKind),g.a.PrepareAttributesForBones(k,K,Q,Y),g.a.PrepareAttributesForInstances(k,Q),g.a.PrepareAttributesForMorphTargets(k,K,Q);var H="default",Z=["world","view","viewProjection","vEyePosition","vLightsType","vAmbientColor","vDiffuseColor","vSpecularColor","vEmissiveColor","visibility","vFogInfos","vFogColor","pointSize","vDiffuseInfos","vAmbientInfos","vOpacityInfos","vReflectionInfos","vEmissiveInfos","vSpecularInfos","vBumpInfos","vLightmapInfos","vRefractionInfos","mBones","vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","diffuseMatrix","ambientMatrix","opacityMatrix","reflectionMatrix","emissiveMatrix","specularMatrix","bumpMatrix","normalMatrix","lightmapMatrix","refractionMatrix","diffuseLeftColor","diffuseRightColor","opacityParts","reflectionLeftColor","reflectionRightColor","emissiveLeftColor","emissiveRightColor","refractionLeftColor","refractionRightColor","vReflectionPosition","vReflectionSize","logarithmicDepthConstant","vTangentSpaceParams","alphaCutOff","boneTextureWidth"],W=["diffuseSampler","ambientSampler","opacitySampler","reflectionCubeSampler","reflection2DSampler","emissiveSampler","specularSampler","bumpSampler","lightmapSampler","refractionCubeSampler","refraction2DSampler","boneSampler"],q=["Material","Scene"];ne.a.AddUniforms(Z),ne.a.AddSamplers(W),m.a.AddUniforms(Z),m.a.AddSamplers(Z),c.a&&(c.a.PrepareUniforms(Z,Q),c.a.PrepareSamplers(W,Q)),g.a.PrepareUniformsAndSamplersList({uniformsNames:Z,uniformBuffersNames:q,samplers:W,defines:Q,maxSimultaneousLights:this._maxSimultaneousLights});var he={};this.customShaderNameResolve&&(H=this.customShaderNameResolve(H,Z,q,W,Q,k,he));var ge=Q.toString(),me=$.effect,_e=G.getEngine().createEffect(H,{attributes:k,uniformsNames:Z,uniformBuffersNames:q,samplers:W,defines:ge,fallbacks:Y,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousLights:this._maxSimultaneousLights,maxSimultaneousMorphTargets:Q.NUM_MORPH_INFLUENCERS},processFinalCode:he.processFinalCode,multiTarget:Q.PREPASS},oe);if(_e)if(this._onEffectCreatedObservable&&(te.effect=_e,te.subMesh=$,this._onEffectCreatedObservable.notifyObservers(te)),this.allowShaderHotSwapping&&me&&!_e.isReady()){if(_e=me,this._rebuildInParallel=!0,Q.markAsUnprocessed(),re)return Q._areLightsDisposed=!0,!1}else this._rebuildInParallel=!1,G.resetCachedMaterial(),$.setEffect(_e,Q),this.buildUniformLayout()}return!(!$.effect||!$.effect.isReady())&&(Q._renderId=G.getRenderId(),$.effect._wasPreviouslyReady=!0,!0)},ee.prototype.buildUniformLayout=function(){var K=this._uniformBuffer;K.addUniform("diffuseLeftColor",4),K.addUniform("diffuseRightColor",4),K.addUniform("opacityParts",4),K.addUniform("reflectionLeftColor",4),K.addUniform("reflectionRightColor",4),K.addUniform("refractionLeftColor",4),K.addUniform("refractionRightColor",4),K.addUniform("emissiveLeftColor",4),K.addUniform("emissiveRightColor",4),K.addUniform("vDiffuseInfos",2),K.addUniform("vAmbientInfos",2),K.addUniform("vOpacityInfos",2),K.addUniform("vReflectionInfos",2),K.addUniform("vReflectionPosition",3),K.addUniform("vReflectionSize",3),K.addUniform("vEmissiveInfos",2),K.addUniform("vLightmapInfos",2),K.addUniform("vSpecularInfos",2),K.addUniform("vBumpInfos",3),K.addUniform("diffuseMatrix",16),K.addUniform("ambientMatrix",16),K.addUniform("opacityMatrix",16),K.addUniform("reflectionMatrix",16),K.addUniform("emissiveMatrix",16),K.addUniform("lightmapMatrix",16),K.addUniform("specularMatrix",16),K.addUniform("bumpMatrix",16),K.addUniform("vTangentSpaceParams",2),K.addUniform("pointSize",1),K.addUniform("refractionMatrix",16),K.addUniform("vRefractionInfos",4),K.addUniform("vSpecularColor",4),K.addUniform("vEmissiveColor",3),K.addUniform("visibility",1),K.addUniform("vDiffuseColor",4),ne.a.PrepareUniformBuffer(K),K.create()},ee.prototype.unbind=function(){if(this._activeEffect){var K=!1;this._reflectionTexture&&this._reflectionTexture.isRenderTarget&&(this._activeEffect.setTexture("reflection2DSampler",null),K=!0),this._refractionTexture&&this._refractionTexture.isRenderTarget&&(this._activeEffect.setTexture("refraction2DSampler",null),K=!0),K&&this._markAllSubMeshesAsTexturesDirty()}ae.prototype.unbind.call(this)},ee.prototype.bindForSubMesh=function(K,$,L){var G=this.getScene(),Q=L._materialDefines;if(Q){var oe=L.effect;if(oe){this._activeEffect=oe,Q.INSTANCES&&!Q.THIN_INSTANCES||this.bindOnlyWorldMatrix(K),this.prePassConfiguration.bindForSubMesh(this._activeEffect,G,$,K,this.isFrozen),Q.OBJECTSPACE_NORMALMAP&&(K.toNormalMatrix(this._normalMatrix),this.bindOnlyNormalMatrix(this._normalMatrix));var re=this._mustRebind(G,oe,$.visibility);g.a.BindBonesParameters($,oe);var Y=this._uniformBuffer;if(re){if(Y.bindToEffect(oe,"Material"),this.bindViewProjection(oe),!Y.useUbo||!this.isFrozen||!Y.isSync){if(ee.FresnelEnabled&&Q.FRESNEL&&(this.diffuseFresnelParameters&&this.diffuseFresnelParameters.isEnabled&&(Y.updateColor4("diffuseLeftColor",this.diffuseFresnelParameters.leftColor,this.diffuseFresnelParameters.power),Y.updateColor4("diffuseRightColor",this.diffuseFresnelParameters.rightColor,this.diffuseFresnelParameters.bias)),this.opacityFresnelParameters&&this.opacityFresnelParameters.isEnabled&&Y.updateColor4("opacityParts",new R.a(this.opacityFresnelParameters.leftColor.toLuminance(),this.opacityFresnelParameters.rightColor.toLuminance(),this.opacityFresnelParameters.bias),this.opacityFresnelParameters.power),this.reflectionFresnelParameters&&this.reflectionFresnelParameters.isEnabled&&(Y.updateColor4("reflectionLeftColor",this.reflectionFresnelParameters.leftColor,this.reflectionFresnelParameters.power),Y.updateColor4("reflectionRightColor",this.reflectionFresnelParameters.rightColor,this.reflectionFresnelParameters.bias)),this.refractionFresnelParameters&&this.refractionFresnelParameters.isEnabled&&(Y.updateColor4("refractionLeftColor",this.refractionFresnelParameters.leftColor,this.refractionFresnelParameters.power),Y.updateColor4("refractionRightColor",this.refractionFresnelParameters.rightColor,this.refractionFresnelParameters.bias)),this.emissiveFresnelParameters&&this.emissiveFresnelParameters.isEnabled&&(Y.updateColor4("emissiveLeftColor",this.emissiveFresnelParameters.leftColor,this.emissiveFresnelParameters.power),Y.updateColor4("emissiveRightColor",this.emissiveFresnelParameters.rightColor,this.emissiveFresnelParameters.bias))),G.texturesEnabled){if(this._diffuseTexture&&ee.DiffuseTextureEnabled&&(Y.updateFloat2("vDiffuseInfos",this._diffuseTexture.coordinatesIndex,this._diffuseTexture.level),g.a.BindTextureMatrix(this._diffuseTexture,Y,"diffuse")),this._ambientTexture&&ee.AmbientTextureEnabled&&(Y.updateFloat2("vAmbientInfos",this._ambientTexture.coordinatesIndex,this._ambientTexture.level),g.a.BindTextureMatrix(this._ambientTexture,Y,"ambient")),this._opacityTexture&&ee.OpacityTextureEnabled&&(Y.updateFloat2("vOpacityInfos",this._opacityTexture.coordinatesIndex,this._opacityTexture.level),g.a.BindTextureMatrix(this._opacityTexture,Y,"opacity")),this._hasAlphaChannel()&&oe.setFloat("alphaCutOff",this.alphaCutOff),this._reflectionTexture&&ee.ReflectionTextureEnabled&&(Y.updateFloat2("vReflectionInfos",this._reflectionTexture.level,this.roughness),Y.updateMatrix("reflectionMatrix",this._reflectionTexture.getReflectionTextureMatrix()),this._reflectionTexture.boundingBoxSize)){var k=this._reflectionTexture;Y.updateVector3("vReflectionPosition",k.boundingBoxPosition),Y.updateVector3("vReflectionSize",k.boundingBoxSize)}if(this._emissiveTexture&&ee.EmissiveTextureEnabled&&(Y.updateFloat2("vEmissiveInfos",this._emissiveTexture.coordinatesIndex,this._emissiveTexture.level),g.a.BindTextureMatrix(this._emissiveTexture,Y,"emissive")),this._lightmapTexture&&ee.LightmapTextureEnabled&&(Y.updateFloat2("vLightmapInfos",this._lightmapTexture.coordinatesIndex,this._lightmapTexture.level),g.a.BindTextureMatrix(this._lightmapTexture,Y,"lightmap")),this._specularTexture&&ee.SpecularTextureEnabled&&(Y.updateFloat2("vSpecularInfos",this._specularTexture.coordinatesIndex,this._specularTexture.level),g.a.BindTextureMatrix(this._specularTexture,Y,"specular")),this._bumpTexture&&G.getEngine().getCaps().standardDerivatives&&ee.BumpTextureEnabled&&(Y.updateFloat3("vBumpInfos",this._bumpTexture.coordinatesIndex,1/this._bumpTexture.level,this.parallaxScaleBias),g.a.BindTextureMatrix(this._bumpTexture,Y,"bump"),G._mirroredCameraPosition?Y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?1:-1,this._invertNormalMapY?1:-1):Y.updateFloat2("vTangentSpaceParams",this._invertNormalMapX?-1:1,this._invertNormalMapY?-1:1)),this._refractionTexture&&ee.RefractionTextureEnabled){var H=1;this._refractionTexture.isCube||(Y.updateMatrix("refractionMatrix",this._refractionTexture.getReflectionTextureMatrix()),this._refractionTexture.depth&&(H=this._refractionTexture.depth)),Y.updateFloat4("vRefractionInfos",this._refractionTexture.level,this.indexOfRefraction,H,this.invertRefractionY?-1:1)}}this.pointsCloud&&Y.updateFloat("pointSize",this.pointSize),Q.SPECULARTERM&&Y.updateColor4("vSpecularColor",this.specularColor,this.specularPower),Y.updateColor3("vEmissiveColor",ee.EmissiveTextureEnabled?this.emissiveColor:R.a.BlackReadOnly),Y.updateColor4("vDiffuseColor",this.diffuseColor,this.alpha)}Y.updateFloat("visibility",$.visibility),G.texturesEnabled&&(this._diffuseTexture&&ee.DiffuseTextureEnabled&&oe.setTexture("diffuseSampler",this._diffuseTexture),this._ambientTexture&&ee.AmbientTextureEnabled&&oe.setTexture("ambientSampler",this._ambientTexture),this._opacityTexture&&ee.OpacityTextureEnabled&&oe.setTexture("opacitySampler",this._opacityTexture),this._reflectionTexture&&ee.ReflectionTextureEnabled&&(this._reflectionTexture.isCube?oe.setTexture("reflectionCubeSampler",this._reflectionTexture):oe.setTexture("reflection2DSampler",this._reflectionTexture)),this._emissiveTexture&&ee.EmissiveTextureEnabled&&oe.setTexture("emissiveSampler",this._emissiveTexture),this._lightmapTexture&&ee.LightmapTextureEnabled&&oe.setTexture("lightmapSampler",this._lightmapTexture),this._specularTexture&&ee.SpecularTextureEnabled&&oe.setTexture("specularSampler",this._specularTexture),this._bumpTexture&&G.getEngine().getCaps().standardDerivatives&&ee.BumpTextureEnabled&&oe.setTexture("bumpSampler",this._bumpTexture),this._refractionTexture&&ee.RefractionTextureEnabled)&&(H=1,this._refractionTexture.isCube?oe.setTexture("refractionCubeSampler",this._refractionTexture):oe.setTexture("refraction2DSampler",this._refractionTexture)),this.detailMap.bindForSubMesh(Y,G,this.isFrozen),g.a.BindClipPlane(oe,G),G.ambientColor.multiplyToRef(this.ambientColor,this._globalAmbientColor),g.a.BindEyePosition(oe,G),oe.setColor3("vAmbientColor",this._globalAmbientColor)}!re&&this.isFrozen||(G.lightsEnabled&&!this._disableLighting&&g.a.BindLights(G,$,oe,Q,this._maxSimultaneousLights,this._rebuildInParallel),(G.fogEnabled&&$.applyFog&&G.fogMode!==u.a.FOGMODE_NONE||this._reflectionTexture||this._refractionTexture)&&this.bindView(oe),g.a.BindFogParameters(G,$,oe),Q.NUM_MORPH_INFLUENCERS&&g.a.BindMorphTargetParameters($,oe),this.useLogarithmicDepth&&g.a.BindLogDepth(Q,oe,G),this._imageProcessingConfiguration&&!this._imageProcessingConfiguration.applyByPostProcess&&this._imageProcessingConfiguration.bind(this._activeEffect)),Y.update(),this._afterBind($,this._activeEffect)}}},ee.prototype.getAnimatables=function(){var K=[];return this._diffuseTexture&&this._diffuseTexture.animations&&this._diffuseTexture.animations.length>0&&K.push(this._diffuseTexture),this._ambientTexture&&this._ambientTexture.animations&&this._ambientTexture.animations.length>0&&K.push(this._ambientTexture),this._opacityTexture&&this._opacityTexture.animations&&this._opacityTexture.animations.length>0&&K.push(this._opacityTexture),this._reflectionTexture&&this._reflectionTexture.animations&&this._reflectionTexture.animations.length>0&&K.push(this._reflectionTexture),this._emissiveTexture&&this._emissiveTexture.animations&&this._emissiveTexture.animations.length>0&&K.push(this._emissiveTexture),this._specularTexture&&this._specularTexture.animations&&this._specularTexture.animations.length>0&&K.push(this._specularTexture),this._bumpTexture&&this._bumpTexture.animations&&this._bumpTexture.animations.length>0&&K.push(this._bumpTexture),this._lightmapTexture&&this._lightmapTexture.animations&&this._lightmapTexture.animations.length>0&&K.push(this._lightmapTexture),this._refractionTexture&&this._refractionTexture.animations&&this._refractionTexture.animations.length>0&&K.push(this._refractionTexture),this.detailMap.getAnimatables(K),K},ee.prototype.getActiveTextures=function(){var K=ae.prototype.getActiveTextures.call(this);return this._diffuseTexture&&K.push(this._diffuseTexture),this._ambientTexture&&K.push(this._ambientTexture),this._opacityTexture&&K.push(this._opacityTexture),this._reflectionTexture&&K.push(this._reflectionTexture),this._emissiveTexture&&K.push(this._emissiveTexture),this._specularTexture&&K.push(this._specularTexture),this._bumpTexture&&K.push(this._bumpTexture),this._lightmapTexture&&K.push(this._lightmapTexture),this._refractionTexture&&K.push(this._refractionTexture),this.detailMap.getActiveTextures(K),K},ee.prototype.hasTexture=function(K){return!!ae.prototype.hasTexture.call(this,K)||this._diffuseTexture===K||this._ambientTexture===K||this._opacityTexture===K||this._reflectionTexture===K||this._emissiveTexture===K||this._specularTexture===K||this._bumpTexture===K||this._lightmapTexture===K||this._refractionTexture===K||this.detailMap.hasTexture(K)},ee.prototype.dispose=function(K,$){var L,G,Q,oe,re,Y,k,H,Z;$&&((L=this._diffuseTexture)===null||L===void 0||L.dispose(),(G=this._ambientTexture)===null||G===void 0||G.dispose(),(Q=this._opacityTexture)===null||Q===void 0||Q.dispose(),(oe=this._reflectionTexture)===null||oe===void 0||oe.dispose(),(re=this._emissiveTexture)===null||re===void 0||re.dispose(),(Y=this._specularTexture)===null||Y===void 0||Y.dispose(),(k=this._bumpTexture)===null||k===void 0||k.dispose(),(H=this._lightmapTexture)===null||H===void 0||H.dispose(),(Z=this._refractionTexture)===null||Z===void 0||Z.dispose()),this.detailMap.dispose($),this._imageProcessingConfiguration&&this._imageProcessingObserver&&this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver),ae.prototype.dispose.call(this,K,$)},ee.prototype.clone=function(K){var $=this,L=_.a.Clone(function(){return new ee(K,$.getScene())},this);return L.name=K,L.id=K,L},ee.prototype.serialize=function(){return _.a.Serialize(this)},ee.Parse=function(K,$,L){return _.a.Parse(function(){return new ee(K.name,$)},K,$,L)},Object.defineProperty(ee,"DiffuseTextureEnabled",{get:function(){return v.a.DiffuseTextureEnabled},set:function(K){v.a.DiffuseTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"DetailTextureEnabled",{get:function(){return v.a.DetailTextureEnabled},set:function(K){v.a.DetailTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"AmbientTextureEnabled",{get:function(){return v.a.AmbientTextureEnabled},set:function(K){v.a.AmbientTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"OpacityTextureEnabled",{get:function(){return v.a.OpacityTextureEnabled},set:function(K){v.a.OpacityTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"ReflectionTextureEnabled",{get:function(){return v.a.ReflectionTextureEnabled},set:function(K){v.a.ReflectionTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"EmissiveTextureEnabled",{get:function(){return v.a.EmissiveTextureEnabled},set:function(K){v.a.EmissiveTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"SpecularTextureEnabled",{get:function(){return v.a.SpecularTextureEnabled},set:function(K){v.a.SpecularTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"BumpTextureEnabled",{get:function(){return v.a.BumpTextureEnabled},set:function(K){v.a.BumpTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"LightmapTextureEnabled",{get:function(){return v.a.LightmapTextureEnabled},set:function(K){v.a.LightmapTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"RefractionTextureEnabled",{get:function(){return v.a.RefractionTextureEnabled},set:function(K){v.a.RefractionTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"ColorGradingTextureEnabled",{get:function(){return v.a.ColorGradingTextureEnabled},set:function(K){v.a.ColorGradingTextureEnabled=K},enumerable:!1,configurable:!0}),Object.defineProperty(ee,"FresnelEnabled",{get:function(){return v.a.FresnelEnabled},set:function(K){v.a.FresnelEnabled=K},enumerable:!1,configurable:!0}),Object(U.c)([Object(_.m)("diffuseTexture")],ee.prototype,"_diffuseTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"diffuseTexture",void 0),Object(U.c)([Object(_.m)("ambientTexture")],ee.prototype,"_ambientTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"ambientTexture",void 0),Object(U.c)([Object(_.m)("opacityTexture")],ee.prototype,"_opacityTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"opacityTexture",void 0),Object(U.c)([Object(_.m)("reflectionTexture")],ee.prototype,"_reflectionTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"reflectionTexture",void 0),Object(U.c)([Object(_.m)("emissiveTexture")],ee.prototype,"_emissiveTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"emissiveTexture",void 0),Object(U.c)([Object(_.m)("specularTexture")],ee.prototype,"_specularTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"specularTexture",void 0),Object(U.c)([Object(_.m)("bumpTexture")],ee.prototype,"_bumpTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"bumpTexture",void 0),Object(U.c)([Object(_.m)("lightmapTexture")],ee.prototype,"_lightmapTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"lightmapTexture",void 0),Object(U.c)([Object(_.m)("refractionTexture")],ee.prototype,"_refractionTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"refractionTexture",void 0),Object(U.c)([Object(_.e)("ambient")],ee.prototype,"ambientColor",void 0),Object(U.c)([Object(_.e)("diffuse")],ee.prototype,"diffuseColor",void 0),Object(U.c)([Object(_.e)("specular")],ee.prototype,"specularColor",void 0),Object(U.c)([Object(_.e)("emissive")],ee.prototype,"emissiveColor",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"specularPower",void 0),Object(U.c)([Object(_.c)("useAlphaFromDiffuseTexture")],ee.prototype,"_useAlphaFromDiffuseTexture",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesAndMiscDirty")],ee.prototype,"useAlphaFromDiffuseTexture",void 0),Object(U.c)([Object(_.c)("useEmissiveAsIllumination")],ee.prototype,"_useEmissiveAsIllumination",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useEmissiveAsIllumination",void 0),Object(U.c)([Object(_.c)("linkEmissiveWithDiffuse")],ee.prototype,"_linkEmissiveWithDiffuse",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"linkEmissiveWithDiffuse",void 0),Object(U.c)([Object(_.c)("useSpecularOverAlpha")],ee.prototype,"_useSpecularOverAlpha",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useSpecularOverAlpha",void 0),Object(U.c)([Object(_.c)("useReflectionOverAlpha")],ee.prototype,"_useReflectionOverAlpha",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useReflectionOverAlpha",void 0),Object(U.c)([Object(_.c)("disableLighting")],ee.prototype,"_disableLighting",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsLightsDirty")],ee.prototype,"disableLighting",void 0),Object(U.c)([Object(_.c)("useObjectSpaceNormalMap")],ee.prototype,"_useObjectSpaceNormalMap",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useObjectSpaceNormalMap",void 0),Object(U.c)([Object(_.c)("useParallax")],ee.prototype,"_useParallax",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useParallax",void 0),Object(U.c)([Object(_.c)("useParallaxOcclusion")],ee.prototype,"_useParallaxOcclusion",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useParallaxOcclusion",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"parallaxScaleBias",void 0),Object(U.c)([Object(_.c)("roughness")],ee.prototype,"_roughness",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"roughness",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"indexOfRefraction",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"invertRefractionY",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"alphaCutOff",void 0),Object(U.c)([Object(_.c)("useLightmapAsShadowmap")],ee.prototype,"_useLightmapAsShadowmap",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useLightmapAsShadowmap",void 0),Object(U.c)([Object(_.h)("diffuseFresnelParameters")],ee.prototype,"_diffuseFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"diffuseFresnelParameters",void 0),Object(U.c)([Object(_.h)("opacityFresnelParameters")],ee.prototype,"_opacityFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelAndMiscDirty")],ee.prototype,"opacityFresnelParameters",void 0),Object(U.c)([Object(_.h)("reflectionFresnelParameters")],ee.prototype,"_reflectionFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"reflectionFresnelParameters",void 0),Object(U.c)([Object(_.h)("refractionFresnelParameters")],ee.prototype,"_refractionFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"refractionFresnelParameters",void 0),Object(U.c)([Object(_.h)("emissiveFresnelParameters")],ee.prototype,"_emissiveFresnelParameters",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"emissiveFresnelParameters",void 0),Object(U.c)([Object(_.c)("useReflectionFresnelFromSpecular")],ee.prototype,"_useReflectionFresnelFromSpecular",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsFresnelDirty")],ee.prototype,"useReflectionFresnelFromSpecular",void 0),Object(U.c)([Object(_.c)("useGlossinessFromSpecularMapAlpha")],ee.prototype,"_useGlossinessFromSpecularMapAlpha",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"useGlossinessFromSpecularMapAlpha",void 0),Object(U.c)([Object(_.c)("maxSimultaneousLights")],ee.prototype,"_maxSimultaneousLights",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsLightsDirty")],ee.prototype,"maxSimultaneousLights",void 0),Object(U.c)([Object(_.c)("invertNormalMapX")],ee.prototype,"_invertNormalMapX",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"invertNormalMapX",void 0),Object(U.c)([Object(_.c)("invertNormalMapY")],ee.prototype,"_invertNormalMapY",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"invertNormalMapY",void 0),Object(U.c)([Object(_.c)("twoSidedLighting")],ee.prototype,"_twoSidedLighting",void 0),Object(U.c)([Object(_.b)("_markAllSubMeshesAsTexturesDirty")],ee.prototype,"twoSidedLighting",void 0),Object(U.c)([Object(_.c)()],ee.prototype,"useLogarithmicDepth",null),ee}(S.a);h.a.RegisteredTypes["BABYLON.StandardMaterial"]=pe,u.a.DefaultMaterialFactory=function(ae){return new pe("default material",ae)}},function(Me,y,f){f.d(y,"a",function(){return I});var U=f(1),_=f(12),x=f(6),u=f(0),M=f(13),R=f(4),C=f(16),m=f(46),c=f(54),T=f(43),A=f(2),S=f(147),g=f(21),l=f(101),h=f(9),v=f(28),E=f(23),D=f(11),w=function(){this.facetNb=0,this.partitioningSubdivisions=10,this.partitioningBBoxRatio=1.01,this.facetDataEnabled=!1,this.facetParameters={},this.bbSize=u.e.Zero(),this.subDiv={max:1,X:1,Y:1,Z:1},this.facetDepthSort=!1,this.facetDepthSortEnabled=!1},N=function(){this._hasVertexAlpha=!1,this._useVertexColors=!0,this._numBoneInfluencers=4,this._applyFog=!0,this._receiveShadows=!1,this._facetData=new w,this._visibility=1,this._skeleton=null,this._layerMask=268435455,this._computeBonesUsingShaders=!0,this._isActive=!1,this._onlyForInstances=!1,this._isActiveIntermediate=!1,this._onlyForInstancesIntermediate=!1,this._actAsRegularMesh=!1,this._currentLOD=null,this._currentLODIsUpToDate=!1},I=function(V){function X(j,ne){ne===void 0&&(ne=null);var te=V.call(this,j,ne,!1)||this;return te._internalAbstractMeshDataInfo=new N,te.cullingStrategy=X.CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY,te.onCollideObservable=new x.c,te.onCollisionPositionChangeObservable=new x.c,te.onMaterialChangedObservable=new x.c,te.definedFacingForward=!0,te._occlusionQuery=null,te._renderingGroup=null,te.alphaIndex=Number.MAX_VALUE,te.isVisible=!0,te.isPickable=!0,te.showSubMeshesBoundingBox=!1,te.isBlocker=!1,te.enablePointerMoveEvents=!1,te._renderingGroupId=0,te._material=null,te.outlineColor=h.a.Red(),te.outlineWidth=.02,te.overlayColor=h.a.Red(),te.overlayAlpha=.5,te.useOctreeForRenderingSelection=!0,te.useOctreeForPicking=!0,te.useOctreeForCollisions=!0,te.alwaysSelectAsActiveMesh=!1,te.doNotSyncBoundingInfo=!1,te.actionManager=null,te._meshCollisionData=new S.a,te.ellipsoid=new u.e(.5,1,.5),te.ellipsoidOffset=new u.e(0,0,0),te.edgesWidth=1,te.edgesColor=new h.b(1,0,0,1),te._edgesRenderer=null,te._masterMesh=null,te._boundingInfo=null,te._renderId=0,te._intersectionsInProgress=new Array,te._unIndexed=!1,te._lightSources=new Array,te._waitingData={lods:null,actions:null,freezeWorldMatrix:null},te._bonesTransformMatrices=null,te._transformMatrixTexture=null,te.onRebuildObservable=new x.c,te._onCollisionPositionChange=function(de,pe,ae){ae===void 0&&(ae=null),pe.subtractToRef(te._meshCollisionData._oldPositionForCollisions,te._meshCollisionData._diffPositionForCollisions),te._meshCollisionData._diffPositionForCollisions.length()>M.a.CollisionsEpsilon&&te.position.addInPlace(te._meshCollisionData._diffPositionForCollisions),ae&&te.onCollideObservable.notifyObservers(ae),te.onCollisionPositionChangeObservable.notifyObservers(te.position)},te.getScene().addMesh(te),te._resyncLightSources(),te}return Object(U.d)(X,V),Object.defineProperty(X,"BILLBOARDMODE_NONE",{get:function(){return m.a.BILLBOARDMODE_NONE},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_X",{get:function(){return m.a.BILLBOARDMODE_X},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_Y",{get:function(){return m.a.BILLBOARDMODE_Y},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_Z",{get:function(){return m.a.BILLBOARDMODE_Z},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_ALL",{get:function(){return m.a.BILLBOARDMODE_ALL},enumerable:!1,configurable:!0}),Object.defineProperty(X,"BILLBOARDMODE_USE_POSITION",{get:function(){return m.a.BILLBOARDMODE_USE_POSITION},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"facetNb",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetNb},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"partitioningSubdivisions",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions},set:function(j){this._internalAbstractMeshDataInfo._facetData.partitioningSubdivisions=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"partitioningBBoxRatio",{get:function(){return this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio},set:function(j){this._internalAbstractMeshDataInfo._facetData.partitioningBBoxRatio=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"mustDepthSortFacets",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSort},set:function(j){this._internalAbstractMeshDataInfo._facetData.facetDepthSort=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"facetDepthSortFrom",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom},set:function(j){this._internalAbstractMeshDataInfo._facetData.facetDepthSortFrom=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"isFacetDataEnabled",{get:function(){return this._internalAbstractMeshDataInfo._facetData.facetDataEnabled},enumerable:!1,configurable:!0}),X.prototype._updateNonUniformScalingState=function(j){return!!V.prototype._updateNonUniformScalingState.call(this,j)&&(this._markSubMeshesAsMiscDirty(),!0)},Object.defineProperty(X.prototype,"onCollide",{set:function(j){this._meshCollisionData._onCollideObserver&&this.onCollideObservable.remove(this._meshCollisionData._onCollideObserver),this._meshCollisionData._onCollideObserver=this.onCollideObservable.add(j)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"onCollisionPositionChange",{set:function(j){this._meshCollisionData._onCollisionPositionChangeObserver&&this.onCollisionPositionChangeObservable.remove(this._meshCollisionData._onCollisionPositionChangeObserver),this._meshCollisionData._onCollisionPositionChangeObserver=this.onCollisionPositionChangeObservable.add(j)},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"visibility",{get:function(){return this._internalAbstractMeshDataInfo._visibility},set:function(j){this._internalAbstractMeshDataInfo._visibility!==j&&(this._internalAbstractMeshDataInfo._visibility=j,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"renderingGroupId",{get:function(){return this._renderingGroupId},set:function(j){this._renderingGroupId=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"material",{get:function(){return this._material},set:function(j){this._material!==j&&(this._material&&this._material.meshMap&&(this._material.meshMap[this.uniqueId]=void 0),this._material=j,j&&j.meshMap&&(j.meshMap[this.uniqueId]=this),this.onMaterialChangedObservable.hasObservers()&&this.onMaterialChangedObservable.notifyObservers(this),this.subMeshes&&this._unBindEffect())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"receiveShadows",{get:function(){return this._internalAbstractMeshDataInfo._receiveShadows},set:function(j){this._internalAbstractMeshDataInfo._receiveShadows!==j&&(this._internalAbstractMeshDataInfo._receiveShadows=j,this._markSubMeshesAsLightDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"hasVertexAlpha",{get:function(){return this._internalAbstractMeshDataInfo._hasVertexAlpha},set:function(j){this._internalAbstractMeshDataInfo._hasVertexAlpha!==j&&(this._internalAbstractMeshDataInfo._hasVertexAlpha=j,this._markSubMeshesAsAttributesDirty(),this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"useVertexColors",{get:function(){return this._internalAbstractMeshDataInfo._useVertexColors},set:function(j){this._internalAbstractMeshDataInfo._useVertexColors!==j&&(this._internalAbstractMeshDataInfo._useVertexColors=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"computeBonesUsingShaders",{get:function(){return this._internalAbstractMeshDataInfo._computeBonesUsingShaders},set:function(j){this._internalAbstractMeshDataInfo._computeBonesUsingShaders!==j&&(this._internalAbstractMeshDataInfo._computeBonesUsingShaders=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"numBoneInfluencers",{get:function(){return this._internalAbstractMeshDataInfo._numBoneInfluencers},set:function(j){this._internalAbstractMeshDataInfo._numBoneInfluencers!==j&&(this._internalAbstractMeshDataInfo._numBoneInfluencers=j,this._markSubMeshesAsAttributesDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"applyFog",{get:function(){return this._internalAbstractMeshDataInfo._applyFog},set:function(j){this._internalAbstractMeshDataInfo._applyFog!==j&&(this._internalAbstractMeshDataInfo._applyFog=j,this._markSubMeshesAsMiscDirty())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"layerMask",{get:function(){return this._internalAbstractMeshDataInfo._layerMask},set:function(j){j!==this._internalAbstractMeshDataInfo._layerMask&&(this._internalAbstractMeshDataInfo._layerMask=j,this._resyncLightSources())},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionMask",{get:function(){return this._meshCollisionData._collisionMask},set:function(j){this._meshCollisionData._collisionMask=isNaN(j)?-1:j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionResponse",{get:function(){return this._meshCollisionData._collisionResponse},set:function(j){this._meshCollisionData._collisionResponse=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"collisionGroup",{get:function(){return this._meshCollisionData._collisionGroup},set:function(j){this._meshCollisionData._collisionGroup=isNaN(j)?-1:j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"surroundingMeshes",{get:function(){return this._meshCollisionData._surroundingMeshes},set:function(j){this._meshCollisionData._surroundingMeshes=j},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"lightSources",{get:function(){return this._lightSources},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"_positions",{get:function(){return null},enumerable:!1,configurable:!0}),Object.defineProperty(X.prototype,"skeleton",{get:function(){return this._internalAbstractMeshDataInfo._skeleton},set:function(j){var ne=this._internalAbstractMeshDataInfo._skeleton;ne&&ne.needInitialSkinMatrix&&ne._unregisterMeshWithPoseMatrix(this),j&&j.needInitialSkinMatrix&&j._registerMeshWithPoseMatrix(this),this._internalAbstractMeshDataInfo._skeleton=j,this._internalAbstractMeshDataInfo._skeleton||(this._bonesTransformMatrices=null),this._markSubMeshesAsAttributesDirty()},enumerable:!1,configurable:!0}),X.prototype.getClassName=function(){return"AbstractMesh"},X.prototype.toString=function(j){var ne="Name: "+this.name+", isInstance: "+(this.getClassName()!=="InstancedMesh"?"YES":"NO");ne+=", # of submeshes: "+(this.subMeshes?this.subMeshes.length:0);var te=this._internalAbstractMeshDataInfo._skeleton;return te&&(ne+=", skeleton: "+te.name),j&&(ne+=", billboard mode: "+["NONE","X","Y",null,"Z",null,null,"ALL"][this.billboardMode],ne+=", freeze wrld mat: "+(this._isWorldMatrixFrozen||this._waitingData.freezeWorldMatrix?"YES":"NO")),ne},X.prototype._getEffectiveParent=function(){return this._masterMesh&&this.billboardMode!==m.a.BILLBOARDMODE_NONE?this._masterMesh:V.prototype._getEffectiveParent.call(this)},X.prototype._getActionManagerForTrigger=function(j,ne){if(ne===void 0&&(ne=!0),this.actionManager&&(ne||this.actionManager.isRecursive)){if(!j)return this.actionManager;if(this.actionManager.hasSpecificTrigger(j))return this.actionManager}return this.parent?this.parent._getActionManagerForTrigger(j,!1):null},X.prototype._rebuild=function(){if(this.onRebuildObservable.notifyObservers(this),this._occlusionQuery&&(this._occlusionQuery=null),this.subMeshes)for(var j=0,ne=this.subMeshes;j 4,ae=pe?this.getVerticesData(R.b.MatricesIndicesExtraKind):null,ee=pe?this.getVerticesData(R.b.MatricesWeightsExtraKind):null;this.skeleton.prepare();for(var K=this.skeleton.getTransformMatrices(this),$=u.c.Vector3[0],L=u.c.Matrix[0],G=u.c.Matrix[1],Q=0,oe=0;oe 0&&(u.a.FromFloat32ArrayToRefScaled(K,Math.floor(16*te[Q+re]),Y,G),L.addToSelf(G));if(pe)for(re=0;re<4;re++)(Y=ee[Q+re])>0&&(u.a.FromFloat32ArrayToRefScaled(K,Math.floor(16*ae[Q+re]),Y,G),L.addToSelf(G));u.e.TransformCoordinatesFromFloatsToRef(ne[oe],ne[oe+1],ne[oe+2],L,$),$.toArray(ne,oe),this._positions&&this._positions[oe/3].copyFrom($)}}}return ne},X.prototype._updateBoundingInfo=function(){var j=this._effectiveMesh;return this._boundingInfo?this._boundingInfo.update(j.worldMatrixFromCache):this._boundingInfo=new T.a(this.absolutePosition,this.absolutePosition,j.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(j.worldMatrixFromCache),this},X.prototype._updateSubMeshesBoundingInfo=function(j){if(!this.subMeshes)return this;for(var ne=this.subMeshes.length,te=0;te 1||!de.IsGlobal)&&de.updateBoundingInfo(j)}return this},X.prototype._afterComputeWorldMatrix=function(){this.doNotSyncBoundingInfo||this._updateBoundingInfo()},Object.defineProperty(X.prototype,"_effectiveMesh",{get:function(){return this.skeleton&&this.skeleton.overrideMesh||this},enumerable:!1,configurable:!0}),X.prototype.isInFrustum=function(j){return this._boundingInfo!==null&&this._boundingInfo.isInFrustum(j,this.cullingStrategy)},X.prototype.isCompletelyInFrustum=function(j){return this._boundingInfo!==null&&this._boundingInfo.isCompletelyInFrustum(j)},X.prototype.intersectsMesh=function(j,ne,te){if(ne===void 0&&(ne=!1),!this._boundingInfo||!j._boundingInfo)return!1;if(this._boundingInfo.intersects(j._boundingInfo,ne))return!0;if(te){for(var de=0,pe=this.getChildMeshes();de 1&&!ae._checkCollision(j)||this._collideForSubMesh(ae,ne,j)}return this},X.prototype._checkCollision=function(j){if(!this._boundingInfo||!this._boundingInfo._checkCollision(j))return this;var ne=u.c.Matrix[0],te=u.c.Matrix[1];return u.a.ScalingToRef(1/j._radius.x,1/j._radius.y,1/j._radius.z,ne),this.worldMatrixFromCache.multiplyToRef(ne,te),this._processCollisionsForSubMeshes(j,te),this},X.prototype._generatePointsArray=function(){return!1},X.prototype.intersects=function(j,ne,te,de,pe,ae){var ee;de===void 0&&(de=!1),ae===void 0&&(ae=!1);var K=new c.a,$=this.getClassName()==="InstancedLinesMesh"||this.getClassName()==="LinesMesh"?this.intersectionThreshold:0,L=this._boundingInfo;if(!this.subMeshes||!L||!(ae||j.intersectsSphere(L.boundingSphere,$)&&j.intersectsBox(L.boundingBox,$)))return K;if(de)return K.hit=!ae,K.pickedMesh=ae?null:this,K.distance=ae?0:u.e.Distance(j.origin,L.boundingSphere.center),K.subMeshId=0,K;if(!this._generatePointsArray())return K;for(var G=null,Q=this._scene.getIntersectingSubMeshCandidates(this,j),oe=Q.length,re=!1,Y=0;Y 1)||H.canIntersects(j)){var Z=H.intersects(j,this._positions,this.getIndices(),ne,te);if(Z&&(ne||!G||Z.distance 65535){ae=!0;break}j.depthSortedIndices=ae?new Uint32Array(te):new Uint16Array(te)}if(j.facetDepthSortFunction=function(re,Y){return Y.sqDistance-re.sqDistance},!j.facetDepthSortFrom){var K=this.getScene().activeCamera;j.facetDepthSortFrom=K?K.position:u.e.Zero()}j.depthSortedFacets=[];for(var $=0;$ v.a?pe.maximum.x-pe.minimum.x:v.a,j.bbSize.y=pe.maximum.y-pe.minimum.y>v.a?pe.maximum.y-pe.minimum.y:v.a,j.bbSize.z=pe.maximum.z-pe.minimum.z>v.a?pe.maximum.z-pe.minimum.z:v.a;var G=j.bbSize.x>j.bbSize.y?j.bbSize.x:j.bbSize.y;if(G=G>j.bbSize.z?G:j.bbSize.z,j.subDiv.max=j.partitioningSubdivisions,j.subDiv.X=Math.floor(j.subDiv.max*j.bbSize.x/G),j.subDiv.Y=Math.floor(j.subDiv.max*j.bbSize.y/G),j.subDiv.Z=Math.floor(j.subDiv.max*j.bbSize.z/G),j.subDiv.X=j.subDiv.X<1?1:j.subDiv.X,j.subDiv.Y=j.subDiv.Y<1?1:j.subDiv.Y,j.subDiv.Z=j.subDiv.Z<1?1:j.subDiv.Z,j.facetParameters.facetNormals=this.getFacetLocalNormals(),j.facetParameters.facetPositions=this.getFacetLocalPositions(),j.facetParameters.facetPartitioning=this.getFacetLocalPartitioning(),j.facetParameters.bInfo=pe,j.facetParameters.bbSize=j.bbSize,j.facetParameters.subDiv=j.subDiv,j.facetParameters.ratio=this.partitioningBBoxRatio,j.facetParameters.depthSort=j.facetDepthSort,j.facetDepthSort&&j.facetDepthSortEnabled&&(this.computeWorldMatrix(!0),this._worldMatrix.invertToRef(j.invertedMatrix),u.e.TransformCoordinatesToRef(j.facetDepthSortFrom,j.invertedMatrix,j.facetDepthSortOrigin),j.facetParameters.distanceTo=j.facetDepthSortOrigin),j.facetParameters.depthSortedFacets=j.depthSortedFacets,C.a.ComputeNormals(ne,te,de,j.facetParameters),j.facetDepthSort&&j.facetDepthSortEnabled){j.depthSortedFacets.sort(j.facetDepthSortFunction);var Q=j.depthSortedIndices.length/3|0;for($=0;$ pe.subDiv.max||ee<0||ee>pe.subDiv.max||K<0||K>pe.subDiv.max?null:pe.facetPartitioning[ae+pe.subDiv.max*ee+pe.subDiv.max*pe.subDiv.max*K]},X.prototype.getClosestFacetAtCoordinates=function(j,ne,te,de,pe,ae){pe===void 0&&(pe=!1),ae===void 0&&(ae=!0);var ee=this.getWorldMatrix(),K=u.c.Matrix[5];ee.invertToRef(K);var $=u.c.Vector3[8];u.e.TransformCoordinatesFromFloatsToRef(j,ne,te,K,$);var L=this.getClosestFacetAtLocalCoordinates($.x,$.y,$.z,de,pe,ae);return de&&u.e.TransformCoordinatesFromFloatsToRef(de.x,de.y,de.z,ee,de),L},X.prototype.getClosestFacetAtLocalCoordinates=function(j,ne,te,de,pe,ae){pe===void 0&&(pe=!1),ae===void 0&&(ae=!0);var ee=null,K=0,$=0,L=0,G=0,Q=0,oe=0,re=0,Y=0,k=this.getFacetLocalPositions(),H=this.getFacetLocalNormals(),Z=this.getFacetsAtLocalCoordinates(j,ne,te);if(!Z)return null;for(var W,q,he,ge=Number.MAX_VALUE,me=ge,_e=0;_e=0||pe&&!ae&&G<=0)&&(G=q.x*he.x+q.y*he.y+q.z*he.z,Q=-(q.x*j+q.y*ne+q.z*te-G)/(q.x*q.x+q.y*q.y+q.z*q.z),(me=(K=(oe=j+q.x*Q)-j)*K+($=(re=ne+q.y*Q)-ne)*$+(L=(Y=te+q.z*Q)-te)*L) 100&&(this.soft=!0),this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=x.b.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new x.b),this._options.mass=S.mass===void 0?0:S.mass,this._options.friction=S.friction===void 0?.2:S.friction,this._options.restitution=S.restitution===void 0?.2:S.restitution,this.soft&&(this._options.mass=this._options.mass>0?this._options.mass:1,this._options.pressure=S.pressure===void 0?200:S.pressure,this._options.stiffness=S.stiffness===void 0?1:S.stiffness,this._options.velocityIterations=S.velocityIterations===void 0?20:S.velocityIterations,this._options.positionIterations=S.positionIterations===void 0?20:S.positionIterations,this._options.fixedPoints=S.fixedPoints===void 0?0:S.fixedPoints,this._options.margin=S.margin===void 0?0:S.margin,this._options.damping=S.damping===void 0?0:S.damping,this._options.path=S.path===void 0?null:S.path,this._options.shape=S.shape===void 0?null:S.shape),this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&U.a.Warn("You must affect impostors to children before affecting impostor to parent.")):U.a.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))):U.a.Error("No object was provided. A physics object is obligatory")}return Object.defineProperty(c.prototype,"isDisposed",{get:function(){return this._isDisposed},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"mass",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0},set:function(T){this.setMass(T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"friction",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0},set:function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"restitution",{get:function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0},set:function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,T)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"pressure",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.setBodyPressure?T.getBodyPressure(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyPressure&&A.setBodyPressure(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"stiffness",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyStiffness?T.getBodyStiffness(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyStiffness&&A.setBodyStiffness(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"velocityIterations",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyVelocityIterations?T.getBodyVelocityIterations(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyVelocityIterations&&A.setBodyVelocityIterations(this,T)}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"positionIterations",{get:function(){if(!this._physicsEngine)return 0;var T=this._physicsEngine.getPhysicsPlugin();return T.getBodyPositionIterations?T.getBodyPositionIterations(this):0},set:function(T){if(this._physicsEngine){var A=this._physicsEngine.getPhysicsPlugin();A.setBodyPositionIterations&&A.setBodyPositionIterations(this,T)}},enumerable:!1,configurable:!0}),c.prototype._init=function(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))},c.prototype._getPhysicsParent=function(){return this.object.parent instanceof u.a?this.object.parent.physicsImpostor:null},c.prototype.isBodyInitRequired=function(){return this._bodyUpdateRequired||!this._physicsBody&&!this._parent},c.prototype.setScalingUpdated=function(){this.forceUpdate()},c.prototype.forceUpdate=function(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()},Object.defineProperty(c.prototype,"physicsBody",{get:function(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody},set:function(T){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=T,this.resetUpdateFlags()},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"parent",{get:function(){return!this._options.ignoreParent&&this._parent?this._parent:null},set:function(T){this._parent=T},enumerable:!1,configurable:!0}),c.prototype.resetUpdateFlags=function(){this._bodyUpdateRequired=!1},c.prototype.getObjectExtendSize=function(){if(this.object.getBoundingInfo){var T=this.object.rotationQuaternion,A=this.object.scaling.clone();this.object.rotationQuaternion=c.IDENTITY_QUATERNION;var S=this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);S&&S.decompose(A,void 0,void 0);var g=this.object.getBoundingInfo().boundingBox.extendSize.scale(2).multiplyInPlace(A);return this.object.rotationQuaternion=T,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),g}return c.DEFAULT_OBJECT_SIZE},c.prototype.getObjectCenter=function(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position},c.prototype.getParam=function(T){return this._options[T]},c.prototype.setParam=function(T,A){this._options[T]=A,this._bodyUpdateRequired=!0},c.prototype.setMass=function(T){this.getParam("mass")!==T&&this.setParam("mass",T),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,T)},c.prototype.getLinearVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):x.e.Zero()},c.prototype.setLinearVelocity=function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,T)},c.prototype.getAngularVelocity=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):x.e.Zero()},c.prototype.setAngularVelocity=function(T){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,T)},c.prototype.executeNativeFunction=function(T){this._physicsEngine&&T(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)},c.prototype.registerBeforePhysicsStep=function(T){this._onBeforePhysicsStepCallbacks.push(T)},c.prototype.unregisterBeforePhysicsStep=function(T){var A=this._onBeforePhysicsStepCallbacks.indexOf(T);A>-1?this._onBeforePhysicsStepCallbacks.splice(A,1):U.a.Warn("Function to remove was not found")},c.prototype.registerAfterPhysicsStep=function(T){this._onAfterPhysicsStepCallbacks.push(T)},c.prototype.unregisterAfterPhysicsStep=function(T){var A=this._onAfterPhysicsStepCallbacks.indexOf(T);A>-1?this._onAfterPhysicsStepCallbacks.splice(A,1):U.a.Warn("Function to remove was not found")},c.prototype.registerOnPhysicsCollide=function(T,A){var S=T instanceof Array?T:[T];this._onPhysicsCollideCallbacks.push({callback:A,otherImpostors:S})},c.prototype.unregisterOnPhysicsCollide=function(T,A){var S=T instanceof Array?T:[T],g=-1;this._onPhysicsCollideCallbacks.some(function(l,h){if(l.callback===A&&l.otherImpostors.length===S.length){var v=l.otherImpostors.every(function(E){return S.indexOf(E)>-1});return v&&(g=h),v}return!1})?this._onPhysicsCollideCallbacks.splice(g,1):U.a.Warn("Function to remove was not found")},c.prototype.getParentsRotation=function(){var T=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);T;)T.rotationQuaternion?this._tmpQuat2.copyFrom(T.rotationQuaternion):x.b.RotationYawPitchRollToRef(T.rotation.y,T.rotation.x,T.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),T=T.parent;return this._tmpQuat},c.prototype.applyForce=function(T,A){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,T,A),this},c.prototype.applyImpulse=function(T,A){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,T,A),this},c.prototype.createJoint=function(T,A,S){var g=new R.e(A,S);return this.addJoint(T,g),this},c.prototype.addJoint=function(T,A){return this._joints.push({otherImpostor:T,joint:A}),this._physicsEngine&&this._physicsEngine.addJoint(this,T,A),this},c.prototype.addAnchor=function(T,A,S,g,l){if(!this._physicsEngine)return this;var h=this._physicsEngine.getPhysicsPlugin();return h.appendAnchor?(this._physicsEngine&&h.appendAnchor(this,T,A,S,g,l),this):this},c.prototype.addHook=function(T,A,S,g){if(!this._physicsEngine)return this;var l=this._physicsEngine.getPhysicsPlugin();return l.appendAnchor?(this._physicsEngine&&l.appendHook(this,T,A,S,g),this):this},c.prototype.sleep=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this},c.prototype.wakeUp=function(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this},c.prototype.clone=function(T){return T?new c(T,this.type,this._options,this._scene):null},c.prototype.dispose=function(){var T=this;this._physicsEngine&&(this._joints.forEach(function(A){T._physicsEngine&&T._physicsEngine.removeJoint(T,A.otherImpostor,A.joint)}),this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0)},c.prototype.setDeltaPosition=function(T){this._deltaPosition.copyFrom(T)},c.prototype.setDeltaRotation=function(T){this._deltaRotation||(this._deltaRotation=new x.b),this._deltaRotation.copyFrom(T),this._deltaRotationConjugated=this._deltaRotation.conjugate()},c.prototype.getBoxSizeToRef=function(T){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,T),this},c.prototype.getRadius=function(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0},c.prototype.syncBoneWithImpostor=function(T,A,S,g,l){var h=c._tmpVecs[0],v=this.object;if(v.rotationQuaternion)if(l){var E=c._tmpQuat;v.rotationQuaternion.multiplyToRef(l,E),T.setRotationQuaternion(E,C.c.WORLD,A)}else T.setRotationQuaternion(v.rotationQuaternion,C.c.WORLD,A);h.x=0,h.y=0,h.z=0,S&&(h.x=S.x,h.y=S.y,h.z=S.z,T.getDirectionToRef(h,A,h),g==null&&(g=S.length()),h.x*=g,h.y*=g,h.z*=g),T.getParent()?(h.addInPlace(v.getAbsolutePosition()),T.setAbsolutePosition(h,A)):(A.setAbsolutePosition(v.getAbsolutePosition()),A.position.x-=h.x,A.position.y-=h.y,A.position.z-=h.z)},c.prototype.syncImpostorWithBone=function(T,A,S,g,l,h){var v=this.object;if(v.rotationQuaternion)if(l){var E=c._tmpQuat;T.getRotationQuaternionToRef(C.c.WORLD,A,E),E.multiplyToRef(l,v.rotationQuaternion)}else T.getRotationQuaternionToRef(C.c.WORLD,A,v.rotationQuaternion);var D=c._tmpVecs[0],w=c._tmpVecs[1];h||((h=c._tmpVecs[2]).x=0,h.y=1,h.z=0),T.getDirectionToRef(h,A,w),T.getAbsolutePositionToRef(A,D),g==null&&S&&(g=S.length()),g!=null&&(D.x+=w.x*g,D.y+=w.y*g,D.z+=w.z*g),v.setAbsolutePosition(D)},c.DEFAULT_OBJECT_SIZE=new x.e(1,1,1),c.IDENTITY_QUATERNION=x.b.Identity(),c._tmpVecs=_.a.BuildArray(3,x.e.Zero),c._tmpQuat=x.b.Identity(),c.NoImpostor=0,c.SphereImpostor=1,c.BoxImpostor=2,c.PlaneImpostor=3,c.MeshImpostor=4,c.CapsuleImpostor=6,c.CylinderImpostor=7,c.ParticleImpostor=8,c.HeightmapImpostor=9,c.ConvexHullImpostor=10,c.CustomImpostor=100,c.RopeImpostor=101,c.ClothImpostor=102,c.SoftbodyImpostor=103,c}()},function(Me,y,f){f.d(y,"a",function(){return _}),f.d(y,"b",function(){return x});var U=f(1),_=function(){function u(M){this.length=0,this.data=new Array(M),this._id=u._GlobalId++}return u.prototype.push=function(M){this.data[this.length++]=M,this.length>this.data.length&&(this.data.length*=2)},u.prototype.forEach=function(M){for(var R=0;R this.data.length&&(this.data.length=2*(this.length+M.length));for(var R=0;R =this.length?-1:R},u.prototype.contains=function(M){return this.indexOf(M)!==-1},u._GlobalId=0,u}(),x=function(u){function M(){var R=u!==null&&u.apply(this,arguments)||this;return R._duplicateId=0,R}return Object(U.d)(M,u),M.prototype.push=function(R){u.prototype.push.call(this,R),R.__smartArrayFlags||(R.__smartArrayFlags={}),R.__smartArrayFlags[this._id]=this._duplicateId},M.prototype.pushNoDuplicate=function(R){return(!R.__smartArrayFlags||R.__smartArrayFlags[this._id]!==this._duplicateId)&&(this.push(R),!0)},M.prototype.reset=function(){u.prototype.reset.call(this),this._duplicateId++},M.prototype.concatWithNoDuplicate=function(R){if(R.length!==0){this.length+R.length>this.data.length&&(this.data.length=2*(this.length+R.length));for(var C=0;C >2,m=(3&u)<<4|(M=g >4,c=(15&M)<<2|(R=g >6,T=63&R,isNaN(M)?c=T=64:isNaN(R)&&(T=64),S+=A.charAt(C)+A.charAt(m)+A.charAt(c)+A.charAt(T);return S},_.PadNumber=function(x,u){for(var M=String(x);M.length0)):!S._pointerCaptures[D.pointerId]&&v.distance>E.distance&&(S.mainSceneTrackerPredicate&&S.mainSceneTrackerPredicate(E.pickedMesh)?(S._notifyObservers(g,E,D),g.skipOnPointerObservable=!0):S._lastPointerEvents[D.pointerId]&&(S.onPointerOutObservable.notifyObservers(D.pointerId),delete S._lastPointerEvents[D.pointerId])),g.type===x.a.POINTERUP&&S._pointerCaptures[D.pointerId]&&(S._pointerCaptures[D.pointerId]=!1))}}}}),this._originalPointerObserver&&T.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)),this.utilityLayerScene.autoClear=!1,this._afterRenderObserver=this.originalScene.onAfterCameraRenderObservable.add(function(g){S.shouldRender&&g==S.getRenderCamera()&&S.render()}),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add(function(){S.dispose()}),this._updateCamera()}return c.prototype.getRenderCamera=function(T){if(this._renderCamera)return this._renderCamera;var A=void 0;return A=this.originalScene.activeCameras&&this.originalScene.activeCameras.length>1?this.originalScene.activeCameras[this.originalScene.activeCameras.length-1]:this.originalScene.activeCamera,T&&A&&A.isRigCamera?A.rigParent:A},c.prototype.setRenderCamera=function(T){this._renderCamera=T},c.prototype._getSharedGizmoLight=function(){return this._sharedGizmoLight||(this._sharedGizmoLight=new M.a("shared gizmo light",new R.e(0,1,0),this.utilityLayerScene),this._sharedGizmoLight.intensity=2,this._sharedGizmoLight.groundColor=C.a.Gray()),this._sharedGizmoLight},Object.defineProperty(c,"DefaultUtilityLayer",{get:function(){return c._DefaultUtilityLayer==null&&(c._DefaultUtilityLayer=new c(u.a.LastCreatedScene),c._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){c._DefaultUtilityLayer=null})),c._DefaultUtilityLayer},enumerable:!1,configurable:!0}),Object.defineProperty(c,"DefaultKeepDepthUtilityLayer",{get:function(){return c._DefaultKeepDepthUtilityLayer==null&&(c._DefaultKeepDepthUtilityLayer=new c(u.a.LastCreatedScene),c._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,c._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce(function(){c._DefaultKeepDepthUtilityLayer=null})),c._DefaultKeepDepthUtilityLayer},enumerable:!1,configurable:!0}),c.prototype._notifyObservers=function(T,A,S){T.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new x.b(T.type,T.event,A),T.type),this._lastPointerEvents[S.pointerId]=!0)},c.prototype.render=function(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var T=this.utilityLayerScene.activeCamera.getScene(),A=this.utilityLayerScene.activeCamera;A._scene=this.utilityLayerScene,A.leftCamera&&(A.leftCamera._scene=this.utilityLayerScene),A.rightCamera&&(A.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),A._scene=T,A.leftCamera&&(A.leftCamera._scene=T),A.rightCamera&&(A.rightCamera._scene=T)}},c.prototype.dispose=function(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterCameraRenderObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()},c.prototype._updateCamera=function(){this.utilityLayerScene.cameraToUseForPointers=this.getRenderCamera(),this.utilityLayerScene.activeCamera=this.getRenderCamera()},c._DefaultUtilityLayer=null,c._DefaultKeepDepthUtilityLayer=null,c}()},function(Me,y,f){f.d(y,"a",function(){return _});var U=f(139),_=function(){function x(){}return x.EnableFor=function(u){u._tags=u._tags||{},u.hasTags=function(){return x.HasTags(u)},u.addTags=function(M){return x.AddTagsTo(u,M)},u.removeTags=function(M){return x.RemoveTagsFrom(u,M)},u.matchesTagsQuery=function(M){return x.MatchesQuery(u,M)}},x.DisableFor=function(u){delete u._tags,delete u.hasTags,delete u.addTags,delete u.removeTags,delete u.matchesTagsQuery},x.HasTags=function(u){if(!u._tags)return!1;var M=u._tags;for(var R in M)if(M.hasOwnProperty(R))return!0;return!1},x.GetTags=function(u,M){if(M===void 0&&(M=!0),!u._tags)return null;if(M){var R=[];for(var C in u._tags)u._tags.hasOwnProperty(C)&&u._tags[C]===!0&&R.push(C);return R.join(" ")}return u._tags},x.AddTagsTo=function(u,M){M&&typeof M=="string"&&M.split(" ").forEach(function(R,C,m){x._AddTagTo(u,R)})},x._AddTagTo=function(u,M){(M=M.trim())!==""&&M!=="true"&&M!=="false"&&(M.match(/[\s]/)||M.match(/^([!]|([|]|[&]){2})/)||(x.EnableFor(u),u._tags[M]=!0))},x.RemoveTagsFrom=function(u,M){if(x.HasTags(u)){var R=M.split(" ");for(var C in R)x._RemoveTagFrom(u,R[C])}},x._RemoveTagFrom=function(u,M){delete u._tags[M]},x.MatchesQuery=function(u,M){return M===void 0||(M===""?x.HasTags(u):U.a.Eval(M,function(R){return x.HasTags(u)&&u._tags[R]}))},x}()},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.IsWindowObjectExist=function(){return typeof window<"u"},_.IsNavigatorAvailable=function(){return typeof navigator<"u"},_.IsDocumentAvailable=function(){return typeof document<"u"},_.GetDOMTextContent=function(x){for(var u="",M=x.firstChild;M;)M.nodeType===3&&(u+=M.textContent),M=M.nextSibling;return u},_}()},function(Me,y,f){f.d(y,"a",function(){return C});var U=f(44),_=f(0),x=f(54),u=f(114),M=f(20),R=f(24),C=function(){function m(c,T,A){A===void 0&&(A=Number.MAX_VALUE),this.origin=c,this.direction=T,this.length=A}return m.prototype.intersectsBoxMinMax=function(c,T,A){A===void 0&&(A=0);var S,g,l,h,v=m._TmpVector3[0].copyFromFloats(c.x-A,c.y-A,c.z-A),E=m._TmpVector3[1].copyFromFloats(T.x+A,T.y+A,T.z+A),D=0,w=Number.MAX_VALUE;if(Math.abs(this.direction.x)<1e-7){if(this.origin.x E.x)return!1}else if(S=1/this.direction.x,g=(v.x-this.origin.x)*S,(l=(E.x-this.origin.x)*S)===-1/0&&(l=1/0),g>l&&(h=g,g=l,l=h),(D=Math.max(g,D))>(w=Math.min(l,w)))return!1;if(Math.abs(this.direction.y)<1e-7){if(this.origin.y E.y)return!1}else if(S=1/this.direction.y,g=(v.y-this.origin.y)*S,(l=(E.y-this.origin.y)*S)===-1/0&&(l=1/0),g>l&&(h=g,g=l,l=h),(D=Math.max(g,D))>(w=Math.min(l,w)))return!1;if(Math.abs(this.direction.z)<1e-7){if(this.origin.z E.z)return!1}else if(S=1/this.direction.z,g=(v.z-this.origin.z)*S,(l=(E.z-this.origin.z)*S)===-1/0&&(l=1/0),g>l&&(h=g,g=l,l=h),(D=Math.max(g,D))>(w=Math.min(l,w)))return!1;return!0},m.prototype.intersectsBox=function(c,T){return T===void 0&&(T=0),this.intersectsBoxMinMax(c.minimum,c.maximum,T)},m.prototype.intersectsSphere=function(c,T){T===void 0&&(T=0);var A=c.center.x-this.origin.x,S=c.center.y-this.origin.y,g=c.center.z-this.origin.z,l=A*A+S*S+g*g,h=c.radius+T,v=h*h;if(l<=v)return!0;var E=A*this.direction.x+S*this.direction.y+g*this.direction.z;return!(E<0)&&l-E*E<=v},m.prototype.intersectsTriangle=function(c,T,A){var S=m._TmpVector3[0],g=m._TmpVector3[1],l=m._TmpVector3[2],h=m._TmpVector3[3],v=m._TmpVector3[4];T.subtractToRef(c,S),A.subtractToRef(c,g),_.e.CrossToRef(this.direction,g,l);var E=_.e.Dot(S,l);if(E===0)return null;var D=1/E;this.origin.subtractToRef(c,h);var w=_.e.Dot(h,l)*D;if(w<0||w>1)return null;_.e.CrossToRef(h,S,v);var N=_.e.Dot(this.direction,v)*D;if(N<0||w+N>1)return null;var I=_.e.Dot(g,v)*D;return I>this.length?null:new u.a(1-w-N,w,I)},m.prototype.intersectsPlane=function(c){var T,A=_.e.Dot(c.normal,this.direction);if(Math.abs(A)<999999997475243e-21)return null;var S=_.e.Dot(c.normal,this.origin);return(T=(-c.d-S)/A)<0?T<-999999997475243e-21?null:0:T},m.prototype.intersectsAxis=function(c,T){switch(T===void 0&&(T=0),c){case"y":return(A=(this.origin.y-T)/this.direction.y)>0?null:new _.e(this.origin.x+this.direction.x*-A,T,this.origin.z+this.direction.z*-A);case"x":return(A=(this.origin.x-T)/this.direction.x)>0?null:new _.e(T,this.origin.y+this.direction.y*-A,this.origin.z+this.direction.z*-A);case"z":var A;return(A=(this.origin.z-T)/this.direction.z)>0?null:new _.e(this.origin.x+this.direction.x*-A,this.origin.y+this.direction.y*-A,T);default:return null}},m.prototype.intersectsMesh=function(c,T){var A=_.c.Matrix[0];return c.getWorldMatrix().invertToRef(A),this._tmpRay?m.TransformToRef(this,A,this._tmpRay):this._tmpRay=m.Transform(this,A),c.intersects(this._tmpRay,T)},m.prototype.intersectsMeshes=function(c,T,A){A?A.length=0:A=[];for(var S=0;S T.distance?1:0},m.prototype.intersectionSegment=function(c,T,A){var S=this.origin,g=_.c.Vector3[0],l=_.c.Vector3[1],h=_.c.Vector3[2],v=_.c.Vector3[3];T.subtractToRef(c,g),this.direction.scaleToRef(m.rayl,h),S.addToRef(h,l),c.subtractToRef(S,v);var E,D,w,N,I=_.e.Dot(g,g),V=_.e.Dot(g,h),X=_.e.Dot(h,h),j=_.e.Dot(g,v),ne=_.e.Dot(h,v),te=I*X-V*V,de=te,pe=te;te de&&(D=de,N=ne+V,pe=X)),N<0?(N=0,-j<0?D=0:-j>I?D=de:(D=-j,de=I)):N>pe&&(N=pe,-j+V<0?D=0:-j+V>I?D=de:(D=-j+V,de=I)),E=Math.abs(D) 0&&w<=this.length&&K.lengthSquared()=m.distance?null:E:null},M.a.prototype._internalPick=function(m,c,T,A,S){if(!x.a)return null;for(var g=null,l=0;l 0&&(m.push(g-1),m.push(g)),g++}var D=new x.a;return D.indices=m,D.positions=c,A&&(D.colors=S),D},x.a.CreateDashedLines=function(C){var m,c,T=C.dashSize||3,A=C.gapSize||1,S=C.dashNb||200,g=C.points,l=new Array,h=new Array,v=U.e.Zero(),E=0,D=0,w=0,N=0,I=0;for(I=0;I 0)if(typeof g[0]=="object")for(var h=0;h C.max||C.min>R.max)},T=function(){function A(S,g,l){this._isLocked=!1,this.boundingBox=new u.a(S,g,l),this.boundingSphere=new M.a(S,g,l)}return A.prototype.reConstruct=function(S,g,l){this.boundingBox.reConstruct(S,g,l),this.boundingSphere.reConstruct(S,g,l)},Object.defineProperty(A.prototype,"minimum",{get:function(){return this.boundingBox.minimum},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"maximum",{get:function(){return this.boundingBox.maximum},enumerable:!1,configurable:!0}),Object.defineProperty(A.prototype,"isLocked",{get:function(){return this._isLocked},set:function(S){this._isLocked=S},enumerable:!1,configurable:!0}),A.prototype.update=function(S){this._isLocked||(this.boundingBox._update(S),this.boundingSphere._update(S))},A.prototype.centerOn=function(S,g){var l=A.TmpVector3[0].copyFrom(S).subtractInPlace(g),h=A.TmpVector3[1].copyFrom(S).addInPlace(g);return this.boundingBox.reConstruct(l,h,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(l,h,this.boundingBox.getWorldMatrix()),this},A.prototype.scale=function(S){return this.boundingBox.scale(S),this.boundingSphere.scale(S),this},A.prototype.isInFrustum=function(S,g){return g===void 0&&(g=x.a.MESHES_CULLINGSTRATEGY_STANDARD),!(g!==x.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION&&g!==x.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY||!this.boundingSphere.isCenterInFrustum(S))||!!this.boundingSphere.isInFrustum(S)&&(!(g!==x.a.MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY&&g!==x.a.MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY)||this.boundingBox.isInFrustum(S))},Object.defineProperty(A.prototype,"diagonalLength",{get:function(){var S=this.boundingBox;return S.maximumWorld.subtractToRef(S.minimumWorld,A.TmpVector3[0]).length()},enumerable:!1,configurable:!0}),A.prototype.isCompletelyInFrustum=function(S){return this.boundingBox.isCompletelyInFrustum(S)},A.prototype._checkCollision=function(S){return S._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)},A.prototype.intersectsPoint=function(S){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(S)&&!!this.boundingBox.intersectsPoint(S)},A.prototype.intersects=function(S,g){if(!M.a.Intersects(this.boundingSphere,S.boundingSphere)||!u.a.Intersects(this.boundingBox,S.boundingBox))return!1;if(!g)return!0;var l=this.boundingBox,h=S.boundingBox;return!!c(l.directions[0],l,h)&&!!c(l.directions[1],l,h)&&!!c(l.directions[2],l,h)&&!!c(h.directions[0],l,h)&&!!c(h.directions[1],l,h)&&!!c(h.directions[2],l,h)&&!!c(_.e.Cross(l.directions[0],h.directions[0]),l,h)&&!!c(_.e.Cross(l.directions[0],h.directions[1]),l,h)&&!!c(_.e.Cross(l.directions[0],h.directions[2]),l,h)&&!!c(_.e.Cross(l.directions[1],h.directions[0]),l,h)&&!!c(_.e.Cross(l.directions[1],h.directions[1]),l,h)&&!!c(_.e.Cross(l.directions[1],h.directions[2]),l,h)&&!!c(_.e.Cross(l.directions[2],h.directions[0]),l,h)&&!!c(_.e.Cross(l.directions[2],h.directions[1]),l,h)&&!!c(_.e.Cross(l.directions[2],h.directions[2]),l,h)},A.TmpVector3=U.a.BuildArray(2,_.e.Zero),A}()},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){}return _.BuildArray=function(x,u){for(var M=[],R=0;R 1)?1:M.arc||1,A=M.slice&&M.slice<=0?1:M.slice||1,S=M.sideOrientation===0?0:M.sideOrientation||x.a.DEFAULTSIDE,g=!!M.dedupTopBottomIndices,l=new U.e(C/2,m/2,c/2),h=2+R,v=2*h,E=[],D=[],w=[],N=[],I=0;I<=h;I++){for(var V=I/h,X=V*Math.PI*A,j=0;j<=v;j++){var ne=j/v,te=ne*Math.PI*2*T,de=U.a.RotationZ(-X),pe=U.a.RotationY(te),ae=U.e.TransformCoordinates(U.e.Up(),de),ee=U.e.TransformCoordinates(ae,pe),K=ee.multiply(l),$=ee.divide(l).normalize();D.push(K.x,K.y,K.z),w.push($.x,$.y,$.z),N.push(ne,V)}if(I>0)for(var L=D.length/3,G=L-2*(v+1);G+v+2 1&&(E.push(G),E.push(G+1),E.push(G+v+1)),(I 0&&this.includedOnlyMeshes.indexOf(A)===-1)&&!(this.excludedMeshes&&this.excludedMeshes.length>0&&this.excludedMeshes.indexOf(A)!==-1)&&(this.includeOnlyWithLayerMask===0||(this.includeOnlyWithLayerMask&A.layerMask)!=0)&&!(this.excludeWithLayerMask!==0&&this.excludeWithLayerMask&A.layerMask)},T.CompareLightsPriority=function(A,S){return A.shadowEnabled!==S.shadowEnabled?(S.shadowEnabled?1:0)-(A.shadowEnabled?1:0):S.renderPriority-A.renderPriority},T.prototype.dispose=function(A,S){S===void 0&&(S=!1),this._shadowGenerator&&(this._shadowGenerator.dispose(),this._shadowGenerator=null),this.getScene().stopAnimation(this);for(var g=0,l=this.getScene().meshes;g 0&&(A.excludedMeshesIds=[],this.excludedMeshes.forEach(function(S){A.excludedMeshesIds.push(S.id)})),this.includedOnlyMeshes.length>0&&(A.includedOnlyMeshesIds=[],this.includedOnlyMeshes.forEach(function(S){A.includedOnlyMeshesIds.push(S.id)})),_.a.AppendSerializedAnimations(this,A),A.ranges=this.serializeAnimationRanges(),A},T.GetConstructorFromName=function(A,S,g){var l=M.a.Construct("Light_Type_"+A,S,g);return l||null},T.Parse=function(A,S){var g=T.GetConstructorFromName(A.type,A.name,S);if(!g)return null;var l=_.a.Parse(g,A,S);if(A.excludedMeshesIds&&(l._excludedMeshesIds=A.excludedMeshesIds),A.includedOnlyMeshesIds&&(l._includedOnlyMeshesIds=A.includedOnlyMeshesIds),A.parentId&&(l._waitingParentId=A.parentId),A.falloffType!==void 0&&(l.falloffType=A.falloffType),A.lightmapMode!==void 0&&(l.lightmapMode=A.lightmapMode),A.animations){for(var h=0;h =0&&this._scene.textures.splice(S,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),T.prototype.dispose.call(this)},A.prototype.serialize=function(){if(!this.name)return null;var S=_.a.Serialize(this);return _.a.AppendSerializedAnimations(this,S),S},A.WhenAllReady=function(S,g){var l=S.length;if(l!==0)for(var h=0;h 1)?1:m.arc||1,w=m.sideOrientation===0?0:m.sideOrientation||u.a.DEFAULTSIDE,N=m.faceUV||new Array(3),I=m.faceColors,V=2+(1+(D!==1&&v?2:0))*(h?l:1);for(S=0;S 1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=u,this._lastSecAccumulated=0,this._lastSecValueCount=0)},x.Enabled=!0,x}()},function(Me,y,f){f.d(y,"b",function(){return A}),f.d(y,"d",function(){return S}),f.d(y,"c",function(){return g}),f.d(y,"a",function(){return l});var U=f(1),_=f(49),x=f(38),u=f(6),M=f(83),R=f(140),C=function(h){function v(){return h!==null&&h.apply(this,arguments)||this}return Object(U.d)(v,h),v._setPrototypeOf=Object.setPrototypeOf||function(E,D){return E.__proto__=D,E},v}(Error),m=f(34),c=f(26),T=f(128),A=function(h){function v(E,D){var w=h.call(this,E)||this;return w.name="LoadFileError",C._setPrototypeOf(w,v.prototype),D instanceof _.a?w.request=D:w.file=D,w}return Object(U.d)(v,h),v}(C),S=function(h){function v(E,D){var w=h.call(this,E)||this;return w.request=D,w.name="RequestFileError",C._setPrototypeOf(w,v.prototype),w}return Object(U.d)(v,h),v}(C),g=function(h){function v(E,D){var w=h.call(this,E)||this;return w.file=D,w.name="ReadFileError",C._setPrototypeOf(w,v.prototype),w}return Object(U.d)(v,h),v}(C),l=function(){function h(){}return h._CleanUrl=function(v){return v=v.replace(/#/gm,"%23")},h.SetCorsBehavior=function(v,E){if((!v||v.indexOf("data:")!==0)&&h.CorsBehavior)if(typeof h.CorsBehavior=="string"||this.CorsBehavior instanceof String)E.crossOrigin=h.CorsBehavior;else{var D=h.CorsBehavior(v);D&&(E.crossOrigin=D)}},h.LoadImage=function(v,E,D,w,N){var I;N===void 0&&(N="");var V=!1;if(v instanceof ArrayBuffer||ArrayBuffer.isView(v)?typeof Blob<"u"?(I=URL.createObjectURL(new Blob([v],{type:N})),V=!0):I="data:"+N+";base64,"+m.a.EncodeArrayBufferToBase64(v):v instanceof Blob?(I=URL.createObjectURL(v),V=!0):(I=h._CleanUrl(v),I=h.PreprocessUrl(v)),typeof Image>"u")return h.LoadFile(I,function(ae){createImageBitmap(new Blob([ae],{type:N})).then(function(ee){E(ee),V&&URL.revokeObjectURL(I)}).catch(function(ee){D&&D("Error while trying to load image: "+v,ee)})},void 0,w||void 0,!0,function(ae,ee){D&&D("Error while trying to load image: "+v,ee)}),null;var X=new Image;h.SetCorsBehavior(I,X);var j=function(){X.removeEventListener("load",j),X.removeEventListener("error",ne),E(X),V&&X.src&&URL.revokeObjectURL(X.src)},ne=function(ae){if(X.removeEventListener("load",j),X.removeEventListener("error",ne),D){var ee=v.toString();D("Error while trying to load image: "+(ee.length<32?ee:ee.slice(0,32)+"..."),ae)}V&&X.src&&URL.revokeObjectURL(X.src)};X.addEventListener("load",j),X.addEventListener("error",ne);var te=function(){X.src=I};if(I.substr(0,5)!=="data:"&&w&&w.enableTexturesOffline)w.open(function(){w&&w.loadImage(I,X)},te);else{if(I.indexOf("file:")!==-1){var de=decodeURIComponent(I.substring(5).toLowerCase());if(M.a.FilesToLoad[de]){try{var pe;try{pe=URL.createObjectURL(M.a.FilesToLoad[de])}catch{pe=URL.createObjectURL(M.a.FilesToLoad[de])}X.src=pe,V=!0}catch{X.src=""}return X}}te()}return X},h.ReadFile=function(v,E,D,w,N){var I=new FileReader,V={onCompleteObservable:new u.c,abort:function(){return I.abort()}};return I.onloadend=function(X){return V.onCompleteObservable.notifyObservers(V)},N&&(I.onerror=function(X){N(new g("Unable to read "+v.name,v))}),I.onload=function(X){E(X.target.result)},D&&(I.onprogress=D),w?I.readAsArrayBuffer(v):I.readAsText(v),V},h.LoadFile=function(v,E,D,w,N,I){if(v.indexOf("file:")!==-1){var V=decodeURIComponent(v.substring(5).toLowerCase());V.indexOf("./")===0&&(V=V.substring(2));var X=M.a.FilesToLoad[V];if(X)return h.ReadFile(X,E,D,N,I?function(j){return I(void 0,new A(j.message,j.file))}:void 0)}return h.RequestFile(v,function(j,ne){E(j,ne?ne.responseURL:void 0)},D,w,N,I?function(j){I(j.request,new A(j.message,j.request))}:void 0)},h.RequestFile=function(v,E,D,w,N,I,V){v=h._CleanUrl(v),v=h.PreprocessUrl(v);var X=h.BaseUrl+v,j=!1,ne={onCompleteObservable:new u.c,abort:function(){return j=!0}},te=function(){var pe=new _.a,ae=null;ne.abort=function(){j=!0,pe.readyState!==(XMLHttpRequest.DONE||4)&&pe.abort(),ae!==null&&(clearTimeout(ae),ae=null)};var ee=function(K){pe.open("GET",X),V&&V(pe),N&&(pe.responseType="arraybuffer"),D&&pe.addEventListener("progress",D);var $=function(){pe.removeEventListener("loadend",$),ne.onCompleteObservable.notifyObservers(ne),ne.onCompleteObservable.clear()};pe.addEventListener("loadend",$);var L=function(){if(!j&&pe.readyState===(XMLHttpRequest.DONE||4)){if(pe.removeEventListener("readystatechange",L),pe.status>=200&&pe.status<300||pe.status===0&&(!x.a.IsWindowObjectExist()||h.IsFileURL()))return void E(N?pe.response:pe.responseText,pe);var G=h.DefaultRetryStrategy;if(G){var Q=G(X,pe,K);if(Q!==-1)return pe.removeEventListener("loadend",$),pe=new _.a,void(ae=setTimeout(function(){return ee(K+1)},Q))}var oe=new S("Error status: "+pe.status+" "+pe.statusText+" - Unable to load "+X,pe);I&&I(oe)}};pe.addEventListener("readystatechange",L),pe.send()};ee(0)};if(w&&w.enableSceneOffline){var de=function(pe){pe&&pe.status>400?I&&I(pe):te()};w.open(function(){w&&w.loadFile(h.BaseUrl+v,function(pe){j||E(pe),ne.onCompleteObservable.notifyObservers(ne)},D?function(pe){j||D(pe)}:void 0,de,N)},de)}else te();return ne},h.IsFileURL=function(){return typeof location<"u"&&location.protocol==="file:"},h.DefaultRetryStrategy=R.a.ExponentialBackoff(),h.BaseUrl="",h.CorsBehavior="anonymous",h.PreprocessUrl=function(v){return v},h}();c.a._FileToolsLoadImage=l.LoadImage.bind(l),c.a._FileToolsLoadFile=l.LoadFile.bind(l),T.a._FileToolsLoadFile=l.LoadFile.bind(l)},function(Me,y,f){f.d(y,"a",function(){return _});var U=f(38),_=function(){function x(){}return Object.defineProperty(x,"Now",{get:function(){return U.a.IsWindowObjectExist()&&window.performance&&window.performance.now?window.performance.now():Date.now()},enumerable:!1,configurable:!0}),x}()},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(x,u,M,R){this.x=x,this.y=u,this.width=M,this.height=R}return _.prototype.toGlobal=function(x,u){return new _(this.x*x,this.y*u,this.width*x,this.height*u)},_.prototype.toGlobalToRef=function(x,u,M){return M.x=this.x*x,M.y=this.y*u,M.width=this.width*x,M.height=this.height*u,this},_.prototype.clone=function(){return new _(this.x,this.y,this.width,this.height)},_}()},function(Me,y,f){var U="helperFunctions",_=`const float PI=3.1415926535897932384626433832795; -const float HALF_MIN=5.96046448e-08; -const float LinearEncodePowerApprox=2.2; -const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox; -const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722); -const float Epsilon=0.0000001; -#define saturate(x) clamp(x,0.0,1.0) -#define absEps(x) abs(x)+Epsilon -#define maxEps(x) max(x,Epsilon) -#define saturateEps(x) clamp(x,Epsilon,1.0) -mat3 transposeMat3(mat3 inMatrix) { -vec3 i0=inMatrix[0]; -vec3 i1=inMatrix[1]; -vec3 i2=inMatrix[2]; -mat3 outMatrix=mat3( -vec3(i0.x,i1.x,i2.x), -vec3(i0.y,i1.y,i2.y), -vec3(i0.z,i1.z,i2.z) -); -return outMatrix; -} - -mat3 inverseMat3(mat3 inMatrix) { -float a00=inMatrix[0][0],a01=inMatrix[0][1],a02=inMatrix[0][2]; -float a10=inMatrix[1][0],a11=inMatrix[1][1],a12=inMatrix[1][2]; -float a20=inMatrix[2][0],a21=inMatrix[2][1],a22=inMatrix[2][2]; -float b01=a22*a11-a12*a21; -float b11=-a22*a10+a12*a20; -float b21=a21*a10-a11*a20; -float det=a00*b01+a01*b11+a02*b21; -return mat3(b01,(-a22*a01+a02*a21),(a12*a01-a02*a11), -b11,(a22*a00-a02*a20),(-a12*a00+a02*a10), -b21,(-a21*a00+a01*a20),(a11*a00-a01*a10))/det; -} -float toLinearSpace(float color) -{ -return pow(color,LinearEncodePowerApprox); -} -vec3 toLinearSpace(vec3 color) -{ -return pow(color,vec3(LinearEncodePowerApprox)); -} -vec4 toLinearSpace(vec4 color) -{ -return vec4(pow(color.rgb,vec3(LinearEncodePowerApprox)),color.a); -} -vec3 toGammaSpace(vec3 color) -{ -return pow(color,vec3(GammaEncodePowerApprox)); -} -vec4 toGammaSpace(vec4 color) -{ -return vec4(pow(color.rgb,vec3(GammaEncodePowerApprox)),color.a); -} -float toGammaSpace(float color) -{ -return pow(color,GammaEncodePowerApprox); -} -float square(float value) -{ -return value*value; -} -float pow5(float value) { -float sq=value*value; -return sq*sq*value; -} -float getLuminance(vec3 color) -{ -return clamp(dot(color,LuminanceEncodeApprox),0.,1.); -} - -float getRand(vec2 seed) { -return fract(sin(dot(seed.xy ,vec2(12.9898,78.233)))*43758.5453); -} -float dither(vec2 seed,float varianceAmount) { -float rand=getRand(seed); -float dither=mix(-varianceAmount/255.0,varianceAmount/255.0,rand); -return dither; -} - -const float rgbdMaxRange=255.0; -vec4 toRGBD(vec3 color) { -float maxRGB=maxEps(max(color.r,max(color.g,color.b))); -float D=max(rgbdMaxRange/maxRGB,1.); -D=clamp(floor(D)/255.0,0.,1.); - -vec3 rgb=color.rgb*D; - -rgb=toGammaSpace(rgb); -return vec4(rgb,D); -} -vec3 fromRGBD(vec4 rgbd) { - -rgbd.rgb=toLinearSpace(rgbd.rgb); - -return rgbd.rgb/rgbd.a; -} -`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){f.d(y,"a",function(){return _});var U=f(0),_=function(){function x(){}return x._RemoveAndStorePivotPoint=function(u){u&&x._PivotCached===0&&(u.getPivotPointToRef(x._OldPivotPoint),x._PivotPostMultiplyPivotMatrix=u._postMultiplyPivotMatrix,x._OldPivotPoint.equalsToFloats(0,0,0)||(u.setPivotMatrix(U.a.IdentityReadOnly),x._OldPivotPoint.subtractToRef(u.getPivotPoint(),x._PivotTranslation),x._PivotTmpVector.copyFromFloats(1,1,1),x._PivotTmpVector.subtractInPlace(u.scaling),x._PivotTmpVector.multiplyInPlace(x._PivotTranslation),u.position.addInPlace(x._PivotTmpVector))),x._PivotCached++},x._RestorePivotPoint=function(u){u&&!x._OldPivotPoint.equalsToFloats(0,0,0)&&x._PivotCached===1&&(u.setPivotPoint(x._OldPivotPoint),u._postMultiplyPivotMatrix=x._PivotPostMultiplyPivotMatrix,x._PivotTmpVector.copyFromFloats(1,1,1),x._PivotTmpVector.subtractInPlace(u.scaling),x._PivotTmpVector.multiplyInPlace(x._PivotTranslation),u.position.subtractInPlace(x._PivotTmpVector)),this._PivotCached--},x._PivotCached=0,x._OldPivotPoint=new U.e,x._PivotTranslation=new U.e,x._PivotTmpVector=new U.e,x._PivotPostMultiplyPivotMatrix=!1,x}()},function(Me,y,f){f.d(y,"a",function(){return R});var U=f(4),_=f(114),x=f(43),u=f(2),M=f(101),R=function(){function C(m,c,T,A,S,g,l,h,v){h===void 0&&(h=!0),v===void 0&&(v=!0),this.materialIndex=m,this.verticesStart=c,this.verticesCount=T,this.indexStart=A,this.indexCount=S,this._materialDefines=null,this._materialEffect=null,this._effectOverride=null,this._linesIndexCount=0,this._linesIndexBuffer=null,this._lastColliderWorldVertices=null,this._lastColliderTransformMatrix=null,this._renderId=0,this._alphaIndex=0,this._distanceToCamera=0,this._currentMaterial=null,this._mesh=g,this._renderingMesh=l||g,v&&g.subMeshes.push(this),this._trianglePlanes=[],this._id=g.subMeshes.length-1,h&&(this.refreshBoundingInfo(),g.computeWorldMatrix(!0))}return Object.defineProperty(C.prototype,"materialDefines",{get:function(){return this._materialDefines},set:function(m){this._materialDefines=m},enumerable:!1,configurable:!0}),Object.defineProperty(C.prototype,"effect",{get:function(){var m;return(m=this._effectOverride)!==null&&m!==void 0?m:this._materialEffect},enumerable:!1,configurable:!0}),C.prototype.setEffect=function(m,c){c===void 0&&(c=null),this._materialEffect!==m?(this._materialDefines=c,this._materialEffect=m):m||(this._materialDefines=null)},C.AddToMesh=function(m,c,T,A,S,g,l,h){return h===void 0&&(h=!0),new C(m,c,T,A,S,g,l,h)},Object.defineProperty(C.prototype,"IsGlobal",{get:function(){return this.verticesStart===0&&this.verticesCount===this._mesh.getTotalVertices()},enumerable:!1,configurable:!0}),C.prototype.getBoundingInfo=function(){return this.IsGlobal?this._mesh.getBoundingInfo():this._boundingInfo},C.prototype.setBoundingInfo=function(m){return this._boundingInfo=m,this},C.prototype.getMesh=function(){return this._mesh},C.prototype.getRenderingMesh=function(){return this._renderingMesh},C.prototype.getReplacementMesh=function(){return this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null},C.prototype.getEffectiveMesh=function(){var m=this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null;return m||this._renderingMesh},C.prototype.getMaterial=function(){var m=this._renderingMesh.material;if(m==null)return this._mesh.getScene().defaultMaterial;if(this._IsMultiMaterial(m)){var c=m.getSubMaterial(this.materialIndex);return this._currentMaterial!==c&&(this._currentMaterial=c,this._materialDefines=null),c}return m},C.prototype._IsMultiMaterial=function(m){return m.getSubMaterial!==void 0},C.prototype.refreshBoundingInfo=function(m){if(m===void 0&&(m=null),this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;if(m||(m=this._renderingMesh.getVerticesData(U.b.PositionKind)),!m)return this._boundingInfo=this._mesh.getBoundingInfo(),this;var c,T=this._renderingMesh.getIndices();if(this.indexStart===0&&this.indexCount===T.length){var A=this._renderingMesh.getBoundingInfo();c={minimum:A.minimum.clone(),maximum:A.maximum.clone()}}else c=Object(M.b)(m,T,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo?this._boundingInfo.reConstruct(c.minimum,c.maximum):this._boundingInfo=new x.a(c.minimum,c.maximum),this},C.prototype._checkCollision=function(m){return this.getBoundingInfo()._checkCollision(m)},C.prototype.updateBoundingInfo=function(m){var c=this.getBoundingInfo();return c||(this.refreshBoundingInfo(),c=this.getBoundingInfo()),c&&c.update(m),this},C.prototype.isInFrustum=function(m){var c=this.getBoundingInfo();return!!c&&c.isInFrustum(m,this._mesh.cullingStrategy)},C.prototype.isCompletelyInFrustum=function(m){var c=this.getBoundingInfo();return!!c&&c.isCompletelyInFrustum(m)},C.prototype.render=function(m){return this._renderingMesh.render(this,m,this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:void 0),this},C.prototype._getLinesIndexBuffer=function(m,c){if(!this._linesIndexBuffer){for(var T=[],A=this.indexStart;A l&&(l=E)}return new C(m,g,l-g+1,c,T,A,S)},C}()},function(Me,y,f){f.d(y,"a",function(){return R});var U=f(1),_=f(8),x=f(10),u=f(2),M=(f(126),f(70)),R=function(C){function m(c,T,A,S,g,l,h){A===void 0&&(A=null),g===void 0&&(g=u.a.TEXTURE_TRILINEAR_SAMPLINGMODE),l===void 0&&(l=u.a.TEXTUREFORMAT_RGBA);var v=C.call(this,null,A,!S,h,g,void 0,void 0,void 0,void 0,l)||this;v.name=c,v.wrapU=x.a.CLAMP_ADDRESSMODE,v.wrapV=x.a.CLAMP_ADDRESSMODE,v._generateMipMaps=S;var E=v._getEngine();if(!E)return v;T.getContext?(v._canvas=T,v._texture=E.createDynamicTexture(T.width,T.height,S,g)):(v._canvas=M.a.CreateCanvas(1,1),T.width||T.width===0?v._texture=E.createDynamicTexture(T.width,T.height,S,g):v._texture=E.createDynamicTexture(T,T,S,g));var D=v.getSize();return v._canvas.width=D.width,v._canvas.height=D.height,v._context=v._canvas.getContext("2d"),v}return Object(U.d)(m,C),m.prototype.getClassName=function(){return"DynamicTexture"},Object.defineProperty(m.prototype,"canRescale",{get:function(){return!0},enumerable:!1,configurable:!0}),m.prototype._recreate=function(c){this._canvas.width=c.width,this._canvas.height=c.height,this.releaseInternalTexture(),this._texture=this._getEngine().createDynamicTexture(c.width,c.height,this._generateMipMaps,this.samplingMode)},m.prototype.scale=function(c){var T=this.getSize();T.width*=c,T.height*=c,this._recreate(T)},m.prototype.scaleTo=function(c,T){var A=this.getSize();A.width=c,A.height=T,this._recreate(A)},m.prototype.getContext=function(){return this._context},m.prototype.clear=function(){var c=this.getSize();this._context.fillRect(0,0,c.width,c.height)},m.prototype.update=function(c,T){T===void 0&&(T=!1),this._getEngine().updateDynamicTexture(this._texture,this._canvas,c===void 0||c,T,this._format||void 0)},m.prototype.drawText=function(c,T,A,S,g,l,h,v){v===void 0&&(v=!0);var E=this.getSize();if(l&&(this._context.fillStyle=l,this._context.fillRect(0,0,E.width,E.height)),this._context.font=S,T==null){var D=this._context.measureText(c);T=(E.width-D.width)/2}if(A==null){var w=parseInt(S.replace(/\D/g,""));A=E.height/2+w/3.65}this._context.fillStyle=g||"",this._context.fillText(c,T,A),v&&this.update(h)},m.prototype.clone=function(){var c=this.getScene();if(!c)return this;var T=this.getSize(),A=new m(this.name,T,c,this._generateMipMaps);return A.hasAlpha=this.hasAlpha,A.level=this.level,A.wrapU=this.wrapU,A.wrapV=this.wrapV,A},m.prototype.serialize=function(){var c=this.getScene();c&&!c.isReady()&&_.a.Warn("The scene must be ready before serializing the dynamic texture");var T=C.prototype.serialize.call(this);return this._IsCanvasElement(this._canvas)&&(T.base64String=this._canvas.toDataURL()),T.invertY=this._invertY,T.samplingMode=this.samplingMode,T},m.prototype._IsCanvasElement=function(c){return c.toDataURL!==void 0},m.prototype._rebuild=function(){this.update()},m}(x.a)},function(Me,y,f){f.d(y,"a",function(){return M});var U=f(0),_=f(9),x=f(7),u=f(16);u.a.CreateBox=function(R){var C,m=[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23],c=[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0],T=[],A=R.width||R.size||1,S=R.height||R.size||1,g=R.depth||R.size||1,l=R.wrap||!1,h=R.topBaseAt===void 0?1:R.topBaseAt,v=R.bottomBaseAt===void 0?0:R.bottomBaseAt,E=[2,0,3,1][h=(h+4)%4],D=[2,0,1,3][v=(v+4)%4],w=[1,-1,1,-1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,-1,1,-1,1,1,1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,-1,1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,-1,-1,-1,1];if(l){m=[2,3,0,2,0,1,4,5,6,4,6,7,9,10,11,9,11,8,12,14,15,12,13,14],w=[-1,1,1,1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,-1,-1,1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,-1,-1,-1];for(var N=[[1,1,1],[-1,1,1],[-1,1,-1],[1,1,-1]],I=[[-1,-1,1],[1,-1,1],[1,-1,-1],[-1,-1,-1]],V=[17,18,19,16],X=[22,23,20,21];E>0;)N.unshift(N.pop()),V.unshift(V.pop()),E--;for(;D>0;)I.unshift(I.pop()),X.unshift(X.pop()),D--;N=N.flat(),I=I.flat(),w=w.concat(N).concat(I),m.push(V[0],V[2],V[3],V[0],V[1],V[2]),m.push(X[0],X[2],X[3],X[0],X[1],X[2])}var j=[A/2,S/2,g/2];C=w.reduce(function(G,Q,oe){return G.concat(Q*j[oe%3])},[]);for(var ne=R.sideOrientation===0?0:R.sideOrientation||u.a.DEFAULTSIDE,te=R.faceUV||new Array(6),de=R.faceColors,pe=[],ae=0;ae<6;ae++)te[ae]===void 0&&(te[ae]=new U.f(0,0,1,1)),de&&de[ae]===void 0&&(de[ae]=new _.b(1,1,1,1));for(var ee=0;ee<6;ee++)if(T.push(te[ee].z,te[ee].w),T.push(te[ee].x,te[ee].w),T.push(te[ee].x,te[ee].y),T.push(te[ee].z,te[ee].y),de)for(var K=0;K<4;K++)pe.push(de[ee].r,de[ee].g,de[ee].b,de[ee].a);u.a._ComputeSides(ne,C,m,c,T,R.frontUVs,R.backUVs);var $=new u.a;if($.indices=m,$.positions=C,$.normals=c,$.uvs=T,de){var L=ne===u.a.DOUBLESIDE?pe.concat(pe):pe;$.colors=L}return $},x.a.CreateBox=function(R,C,m,c,T){m===void 0&&(m=null);var A={size:C,sideOrientation:T,updatable:c};return M.CreateBox(R,A,m)};var M=function(){function R(){}return R.CreateBox=function(C,m,c){c===void 0&&(c=null);var T=new x.a(C,c);return m.sideOrientation=x.a._GetDefaultSideOrientation(m.sideOrientation),T._originalBuilderSideOrientation=m.sideOrientation,u.a.CreateBox(m).applyToMesh(T,m.updatable),T},R}()},function(Me,y,f){f.d(y,"a",function(){return _});var U=f(0),_=function(){function x(u,M,R,C){this.normal=new U.e(u,M,R),this.d=C}return x.prototype.asArray=function(){return[this.normal.x,this.normal.y,this.normal.z,this.d]},x.prototype.clone=function(){return new x(this.normal.x,this.normal.y,this.normal.z,this.d)},x.prototype.getClassName=function(){return"Plane"},x.prototype.getHashCode=function(){var u=this.normal.getHashCode();return u=397*u^(0|this.d)},x.prototype.normalize=function(){var u=Math.sqrt(this.normal.x*this.normal.x+this.normal.y*this.normal.y+this.normal.z*this.normal.z),M=0;return u!==0&&(M=1/u),this.normal.x*=M,this.normal.y*=M,this.normal.z*=M,this.d*=M,this},x.prototype.transform=function(u){var M=x._TmpMatrix;u.invertToRef(M);var R=M.m,C=this.normal.x,m=this.normal.y,c=this.normal.z,T=this.d;return new x(C*R[0]+m*R[1]+c*R[2]+T*R[3],C*R[4]+m*R[5]+c*R[6]+T*R[7],C*R[8]+m*R[9]+c*R[10]+T*R[11],C*R[12]+m*R[13]+c*R[14]+T*R[15])},x.prototype.dotCoordinate=function(u){return this.normal.x*u.x+this.normal.y*u.y+this.normal.z*u.z+this.d},x.prototype.copyFromPoints=function(u,M,R){var C,m=M.x-u.x,c=M.y-u.y,T=M.z-u.z,A=R.x-u.x,S=R.y-u.y,g=R.z-u.z,l=c*g-T*S,h=T*A-m*g,v=m*S-c*A,E=Math.sqrt(l*l+h*h+v*v);return C=E!==0?1/E:0,this.normal.x=l*C,this.normal.y=h*C,this.normal.z=v*C,this.d=-(this.normal.x*u.x+this.normal.y*u.y+this.normal.z*u.z),this},x.prototype.isFrontFacingTo=function(u,M){return U.e.Dot(this.normal,u)<=M},x.prototype.signedDistanceTo=function(u){return U.e.Dot(u,this.normal)+this.d},x.FromArray=function(u){return new x(u[0],u[1],u[2],u[3])},x.FromPoints=function(u,M,R){var C=new x(0,0,0,0);return C.copyFromPoints(u,M,R),C},x.FromPositionAndNormal=function(u,M){var R=new x(0,0,0,0);return M.normalize(),R.normal=M,R.d=-(M.x*u.x+M.y*u.y+M.z*u.z),R},x.SignedDistanceToPlaneFromPositionAndNormal=function(u,M,R){var C=-(M.x*u.x+M.y*u.y+M.z*u.z);return U.e.Dot(R,M)+C},x._TmpMatrix=U.a.Identity(),x}()},function(Me,y,f){f.d(y,"a",function(){return m});var U=f(7),_=f(20),x=f(6),u=f(0),M=f(18),R=f(39),C=f(60),m=(f(84),function(){function c(T){this._useAlternatePickedPointAboveMaxDragAngleDragSpeed=-1.1,this.maxDragAngle=0,this._useAlternatePickedPointAboveMaxDragAngle=!1,this.currentDraggingPointerID=-1,this.dragging=!1,this.dragDeltaRatio=.2,this.updateDragPlane=!0,this._debugMode=!1,this._moving=!1,this.onDragObservable=new x.c,this.onDragStartObservable=new x.c,this.onDragEndObservable=new x.c,this.moveAttached=!0,this.enabled=!0,this.startAndReleaseDragOnPointerEvents=!0,this.detachCameraControls=!0,this.useObjectOrientationForDragging=!0,this.validateDrag=function(S){return!0},this._tmpVector=new u.e(0,0,0),this._alternatePickedPoint=new u.e(0,0,0),this._worldDragAxis=new u.e(0,0,0),this._targetPosition=new u.e(0,0,0),this._attachedToElement=!1,this._startDragRay=new R.a(new u.e,new u.e),this._lastPointerRay={},this._dragDelta=new u.e,this._pointA=new u.e(0,0,0),this._pointC=new u.e(0,0,0),this._localAxis=new u.e(0,0,0),this._lookAt=new u.e(0,0,0),this._options=T||{};var A=0;if(this._options.dragAxis&&A++,this._options.dragPlaneNormal&&A++,A>1)throw"Multiple drag modes specified in dragBehavior options. Only one expected"}return Object.defineProperty(c.prototype,"options",{get:function(){return this._options},set:function(T){this._options=T},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"name",{get:function(){return"PointerDrag"},enumerable:!1,configurable:!0}),c.prototype.init=function(){},c.prototype.attach=function(T,A){var S=this;this._scene=T.getScene(),this.attachedNode=T,c._planeScene||(this._debugMode?c._planeScene=this._scene:(c._planeScene=new _.a(this._scene.getEngine(),{virtual:!0}),c._planeScene.detachControl(),this._scene.onDisposeObservable.addOnce(function(){c._planeScene.dispose(),c._planeScene=null}))),this._dragPlane=U.a.CreatePlane("pointerDragPlane",this._debugMode?1:1e4,c._planeScene,!1,U.a.DOUBLESIDE),this.lastDragPosition=new u.e(0,0,0);var g=A||function(l){return S.attachedNode==l||l.isDescendantOf(S.attachedNode)};this._pointerObserver=this._scene.onPointerObservable.add(function(l,h){if(S.enabled){if(l.type==M.a.POINTERDOWN)S.startAndReleaseDragOnPointerEvents&&!S.dragging&&l.pickInfo&&l.pickInfo.hit&&l.pickInfo.pickedMesh&&l.pickInfo.pickedPoint&&l.pickInfo.ray&&g(l.pickInfo.pickedMesh)&&S._startDrag(l.event.pointerId,l.pickInfo.ray,l.pickInfo.pickedPoint);else if(l.type==M.a.POINTERUP)S.startAndReleaseDragOnPointerEvents&&S.currentDraggingPointerID==l.event.pointerId&&S.releaseDrag();else if(l.type==M.a.POINTERMOVE){var v=l.event.pointerId;if(S.currentDraggingPointerID===c._AnyMouseID&&v!==c._AnyMouseID){var E=l.event;(E.pointerType==="mouse"||!S._scene.getEngine().hostInformation.isMobile&&E instanceof MouseEvent)&&(S._lastPointerRay[S.currentDraggingPointerID]&&(S._lastPointerRay[v]=S._lastPointerRay[S.currentDraggingPointerID],delete S._lastPointerRay[S.currentDraggingPointerID]),S.currentDraggingPointerID=v)}S._lastPointerRay[v]||(S._lastPointerRay[v]=new R.a(new u.e,new u.e)),l.pickInfo&&l.pickInfo.ray&&(S._lastPointerRay[v].origin.copyFrom(l.pickInfo.ray.origin),S._lastPointerRay[v].direction.copyFrom(l.pickInfo.ray.direction),S.currentDraggingPointerID==v&&S.dragging&&S._moveDrag(l.pickInfo.ray))}}}),this._beforeRenderObserver=this._scene.onBeforeRenderObservable.add(function(){S._moving&&S.moveAttached&&(C.a._RemoveAndStorePivotPoint(S.attachedNode),S._targetPosition.subtractToRef(S.attachedNode.absolutePosition,S._tmpVector),S._tmpVector.scaleInPlace(S.dragDeltaRatio),S.attachedNode.getAbsolutePosition().addToRef(S._tmpVector,S._tmpVector),S.validateDrag(S._tmpVector)&&S.attachedNode.setAbsolutePosition(S._tmpVector),C.a._RestorePivotPoint(S.attachedNode))})},c.prototype.releaseDrag=function(){if(this.dragging&&(this.dragging=!1,this.onDragEndObservable.notifyObservers({dragPlanePoint:this.lastDragPosition,pointerId:this.currentDraggingPointerID})),this.currentDraggingPointerID=-1,this._moving=!1,this.detachCameraControls&&this._attachedToElement&&this._scene.activeCamera&&!this._scene.activeCamera.leftCamera){if(this._scene.activeCamera.getClassName()==="ArcRotateCamera"){var T=this._scene.activeCamera;T.attachControl(!T.inputs||T.inputs.noPreventDefault,T._useCtrlForPanning,T._panningMouseButton)}else this._scene.activeCamera.attachControl(!this._scene.activeCamera.inputs||this._scene.activeCamera.inputs.noPreventDefault);this._attachedToElement=!1}},c.prototype.startDrag=function(T,A,S){T===void 0&&(T=c._AnyMouseID),this._startDrag(T,A,S);var g=this._lastPointerRay[T];T===c._AnyMouseID&&(g=this._lastPointerRay[Object.keys(this._lastPointerRay)[0]]),g&&this._moveDrag(g)},c.prototype._startDrag=function(T,A,S){if(this._scene.activeCamera&&!this.dragging&&this.attachedNode){C.a._RemoveAndStorePivotPoint(this.attachedNode),A?(this._startDragRay.direction.copyFrom(A.direction),this._startDragRay.origin.copyFrom(A.origin)):(this._startDragRay.origin.copyFrom(this._scene.activeCamera.position),this.attachedNode.getWorldMatrix().getTranslationToRef(this._tmpVector),this._tmpVector.subtractToRef(this._scene.activeCamera.position,this._startDragRay.direction)),this._updateDragPlanePosition(this._startDragRay,S||this._tmpVector);var g=this._pickWithRayOnDragPlane(this._startDragRay);g&&(this.dragging=!0,this.currentDraggingPointerID=T,this.lastDragPosition.copyFrom(g),this.onDragStartObservable.notifyObservers({dragPlanePoint:g,pointerId:this.currentDraggingPointerID}),this._targetPosition.copyFrom(this.attachedNode.absolutePosition),this.detachCameraControls&&this._scene.activeCamera&&this._scene.activeCamera.inputs&&!this._scene.activeCamera.leftCamera&&(this._scene.activeCamera.inputs.attachedToElement?(this._scene.activeCamera.detachControl(),this._attachedToElement=!0):this._attachedToElement=!1)),C.a._RestorePivotPoint(this.attachedNode)}},c.prototype._moveDrag=function(T){this._moving=!0;var A=this._pickWithRayOnDragPlane(T);if(A){this.updateDragPlane&&this._updateDragPlanePosition(T,A);var S=0;this._options.dragAxis?(this.useObjectOrientationForDragging?u.e.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._worldDragAxis):this._worldDragAxis.copyFrom(this._options.dragAxis),A.subtractToRef(this.lastDragPosition,this._tmpVector),S=u.e.Dot(this._tmpVector,this._worldDragAxis),this._worldDragAxis.scaleToRef(S,this._dragDelta)):(S=this._dragDelta.length(),A.subtractToRef(this.lastDragPosition,this._dragDelta)),this._targetPosition.addInPlace(this._dragDelta),this.onDragObservable.notifyObservers({dragDistance:S,delta:this._dragDelta,dragPlanePoint:A,dragPlaneNormal:this._dragPlane.forward,pointerId:this.currentDraggingPointerID}),this.lastDragPosition.copyFrom(A)}},c.prototype._pickWithRayOnDragPlane=function(T){var A=this;if(!T)return null;var S=Math.acos(u.e.Dot(this._dragPlane.forward,T.direction));if(S>Math.PI/2&&(S=Math.PI-S),this.maxDragAngle>0&&S>this.maxDragAngle){if(this._useAlternatePickedPointAboveMaxDragAngle){this._tmpVector.copyFrom(T.direction),this.attachedNode.absolutePosition.subtractToRef(T.origin,this._alternatePickedPoint),this._alternatePickedPoint.normalize(),this._alternatePickedPoint.scaleInPlace(this._useAlternatePickedPointAboveMaxDragAngleDragSpeed*u.e.Dot(this._alternatePickedPoint,this._tmpVector)),this._tmpVector.addInPlace(this._alternatePickedPoint);var g=u.e.Dot(this._dragPlane.forward,this._tmpVector);return this._dragPlane.forward.scaleToRef(-g,this._alternatePickedPoint),this._alternatePickedPoint.addInPlace(this._tmpVector),this._alternatePickedPoint.addInPlace(this.attachedNode.absolutePosition),this._alternatePickedPoint}return null}var l=c._planeScene.pickWithRay(T,function(h){return h==A._dragPlane});return l&&l.hit&&l.pickedMesh&&l.pickedPoint?l.pickedPoint:null},c.prototype._updateDragPlanePosition=function(T,A){this._pointA.copyFrom(A),this._options.dragAxis?(this.useObjectOrientationForDragging?u.e.TransformCoordinatesToRef(this._options.dragAxis,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragAxis),T.origin.subtractToRef(this._pointA,this._pointC),this._pointC.normalize(),Math.abs(u.e.Dot(this._localAxis,this._pointC))>.999?Math.abs(u.e.Dot(u.e.UpReadOnly,this._pointC))>.999?this._lookAt.copyFrom(u.e.Right()):this._lookAt.copyFrom(u.e.UpReadOnly):(u.e.CrossToRef(this._localAxis,this._pointC,this._lookAt),u.e.CrossToRef(this._localAxis,this._lookAt,this._lookAt),this._lookAt.normalize()),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._lookAt,this._lookAt),this._dragPlane.lookAt(this._lookAt)):this._options.dragPlaneNormal?(this.useObjectOrientationForDragging?u.e.TransformCoordinatesToRef(this._options.dragPlaneNormal,this.attachedNode.getWorldMatrix().getRotationMatrix(),this._localAxis):this._localAxis.copyFrom(this._options.dragPlaneNormal),this._dragPlane.position.copyFrom(this._pointA),this._pointA.addToRef(this._localAxis,this._lookAt),this._dragPlane.lookAt(this._lookAt)):(this._dragPlane.position.copyFrom(this._pointA),this._dragPlane.lookAt(T.origin)),this._dragPlane.position.copyFrom(this.attachedNode.absolutePosition),this._dragPlane.computeWorldMatrix(!0)},c.prototype.detach=function(){this._pointerObserver&&this._scene.onPointerObservable.remove(this._pointerObserver),this._beforeRenderObserver&&this._scene.onBeforeRenderObservable.remove(this._beforeRenderObserver),this.releaseDrag()},c._AnyMouseID=-2,c}())},function(Me,y,f){f.d(y,"a",function(){return _}),f.d(y,"b",function(){return x}),f.d(y,"c",function(){return u});var U=f(1),_=function(){function M(){}return M.KEYDOWN=1,M.KEYUP=2,M}(),x=function(M,R){this.type=M,this.event=R},u=function(M){function R(C,m){var c=M.call(this,C,m)||this;return c.type=C,c.event=m,c.skipOnPointerObservable=!1,c}return Object(U.d)(R,M),R}(x)},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this._defines={},this._currentRank=32,this._maxRank=-1,this._mesh=null}return _.prototype.unBindMesh=function(){this._mesh=null},_.prototype.addFallback=function(x,u){this._defines[x]||(x this._maxRank&&(this._maxRank=x),this._defines[x]=new Array),this._defines[x].push(u)},_.prototype.addCPUSkinningFallback=function(x,u){this._mesh=u,x this._maxRank&&(this._maxRank=x)},Object.defineProperty(_.prototype,"hasMoreFallbacks",{get:function(){return this._currentRank<=this._maxRank},enumerable:!1,configurable:!0}),_.prototype.reduce=function(x,u){if(this._mesh&&this._mesh.computeBonesUsingShaders&&this._mesh.numBoneInfluencers>0){this._mesh.computeBonesUsingShaders=!1,x=x.replace("#define NUM_BONE_INFLUENCERS "+this._mesh.numBoneInfluencers,"#define NUM_BONE_INFLUENCERS 0"),u._bonesComputationForcedToCPU=!0;for(var M=this._mesh.getScene(),R=0;R 0&&(C.computeBonesUsingShaders=!1)}}else{var T=this._defines[this._currentRank];if(T)for(R=0;R =this.subMaterials.length?this.getScene().defaultMaterial:this.subMaterials[m]},C.prototype.getActiveTextures=function(){var m;return(m=R.prototype.getActiveTextures.call(this)).concat.apply(m,this.subMaterials.map(function(c){return c?c.getActiveTextures():[]}))},C.prototype.hasTexture=function(m){var c;if(R.prototype.hasTexture.call(this,m))return!0;for(var T=0;T =0&&A.multiMaterials.splice(S,1),R.prototype.dispose.call(this,m,c)}},C.ParseMultiMaterial=function(m,c){var T=new C(m.name,c);T.id=m.id,x.a&&x.a.AddTagsTo(T,m.tags);for(var A=0;A "u")return new OffscreenCanvas(x,u);var M=document.createElement("canvas");return M.width=x,M.height=u,M},_}()},function(Me,y,f){f.d(y,"a",function(){return S});var U=f(0),_=f(9),x=f(16),u=f(4),M=f(61),R=f(69),C=f(43),m=f(2),c=f(12),T=f(37),A=f(101),S=function(){function g(l,h,v,E,D){E===void 0&&(E=!1),D===void 0&&(D=null),this.delayLoadState=m.a.DELAYLOADSTATE_NONE,this._totalVertices=0,this._isDisposed=!1,this._indexBufferIsUpdatable=!1,this._positionsCache=[],this.useBoundingInfoFromGeometry=!1,this.id=l,this.uniqueId=h.getUniqueId(),this._engine=h.getEngine(),this._meshes=[],this._scene=h,this._vertexBuffers={},this._indices=[],this._updatable=E,v?this.setAllVerticesData(v,E):(this._totalVertices=0,this._indices=[]),this._engine.getCaps().vertexArrayObject&&(this._vertexArrayObjects={}),D&&(this.applyToMesh(D),D.computeWorldMatrix(!0))}return Object.defineProperty(g.prototype,"boundingBias",{get:function(){return this._boundingBias},set:function(l){this._boundingBias?this._boundingBias.copyFrom(l):this._boundingBias=l.clone(),this._updateBoundingInfo(!0,null)},enumerable:!1,configurable:!0}),g.CreateGeometryForMesh=function(l){var h=new g(g.RandomId(),l.getScene());return h.applyToMesh(l),h},Object.defineProperty(g.prototype,"meshes",{get:function(){return this._meshes},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"extend",{get:function(){return this._extend},enumerable:!1,configurable:!0}),g.prototype.getScene=function(){return this._scene},g.prototype.getEngine=function(){return this._engine},g.prototype.isReady=function(){return this.delayLoadState===m.a.DELAYLOADSTATE_LOADED||this.delayLoadState===m.a.DELAYLOADSTATE_NONE},Object.defineProperty(g.prototype,"doNotSerialize",{get:function(){for(var l=0;l 0&&(this._indexBuffer=this._engine.createIndexBuffer(this._indices)),this._indexBuffer&&(this._indexBuffer.references=h),l._syncGeometryWithMorphTargetManager(),l.synchronizeInstances()},g.prototype.notifyUpdate=function(l){this.onGeometryUpdated&&this.onGeometryUpdated(this,l);for(var h=0,v=this._meshes;h 0){for(var h=0;h 0){for(h=0;h 0){for(h=0;h 0){var N=new Float32Array(l,w.positionsAttrDesc.offset,w.positionsAttrDesc.count);h.setVerticesData(u.b.PositionKind,N,!1)}if(w.normalsAttrDesc&&w.normalsAttrDesc.count>0){var I=new Float32Array(l,w.normalsAttrDesc.offset,w.normalsAttrDesc.count);h.setVerticesData(u.b.NormalKind,I,!1)}if(w.tangetsAttrDesc&&w.tangetsAttrDesc.count>0){var V=new Float32Array(l,w.tangetsAttrDesc.offset,w.tangetsAttrDesc.count);h.setVerticesData(u.b.TangentKind,V,!1)}if(w.uvsAttrDesc&&w.uvsAttrDesc.count>0){var X=new Float32Array(l,w.uvsAttrDesc.offset,w.uvsAttrDesc.count);h.setVerticesData(u.b.UVKind,X,!1)}if(w.uvs2AttrDesc&&w.uvs2AttrDesc.count>0){var j=new Float32Array(l,w.uvs2AttrDesc.offset,w.uvs2AttrDesc.count);h.setVerticesData(u.b.UV2Kind,j,!1)}if(w.uvs3AttrDesc&&w.uvs3AttrDesc.count>0){var ne=new Float32Array(l,w.uvs3AttrDesc.offset,w.uvs3AttrDesc.count);h.setVerticesData(u.b.UV3Kind,ne,!1)}if(w.uvs4AttrDesc&&w.uvs4AttrDesc.count>0){var te=new Float32Array(l,w.uvs4AttrDesc.offset,w.uvs4AttrDesc.count);h.setVerticesData(u.b.UV4Kind,te,!1)}if(w.uvs5AttrDesc&&w.uvs5AttrDesc.count>0){var de=new Float32Array(l,w.uvs5AttrDesc.offset,w.uvs5AttrDesc.count);h.setVerticesData(u.b.UV5Kind,de,!1)}if(w.uvs6AttrDesc&&w.uvs6AttrDesc.count>0){var pe=new Float32Array(l,w.uvs6AttrDesc.offset,w.uvs6AttrDesc.count);h.setVerticesData(u.b.UV6Kind,pe,!1)}if(w.colorsAttrDesc&&w.colorsAttrDesc.count>0){var ae=new Float32Array(l,w.colorsAttrDesc.offset,w.colorsAttrDesc.count);h.setVerticesData(u.b.ColorKind,ae,!1,w.colorsAttrDesc.stride)}if(w.matricesIndicesAttrDesc&&w.matricesIndicesAttrDesc.count>0){for(var ee=new Int32Array(l,w.matricesIndicesAttrDesc.offset,w.matricesIndicesAttrDesc.count),K=[],$=0;$ >8),K.push((16711680&L)>>16),K.push(L>>24&255)}h.setVerticesData(u.b.MatricesIndicesKind,K,!1)}if(w.matricesIndicesExtraAttrDesc&&w.matricesIndicesExtraAttrDesc.count>0){for(ee=new Int32Array(l,w.matricesIndicesExtraAttrDesc.offset,w.matricesIndicesExtraAttrDesc.count),K=[],$=0;$ >8),K.push((16711680&L)>>16),K.push(L>>24&255);h.setVerticesData(u.b.MatricesIndicesExtraKind,K,!1)}if(w.matricesWeightsAttrDesc&&w.matricesWeightsAttrDesc.count>0){var G=new Float32Array(l,w.matricesWeightsAttrDesc.offset,w.matricesWeightsAttrDesc.count);h.setVerticesData(u.b.MatricesWeightsKind,G,!1)}if(w.indicesAttrDesc&&w.indicesAttrDesc.count>0){var Q=new Int32Array(l,w.indicesAttrDesc.offset,w.indicesAttrDesc.count);h.setIndices(Q,null)}if(w.subMeshesAttrDesc&&w.subMeshesAttrDesc.count>0){var oe=new Int32Array(l,w.subMeshesAttrDesc.offset,5*w.subMeshesAttrDesc.count);for(h.subMeshes=[],$=0;$ >8),K.push((16711680&W)>>16),K.push(W>>24&255)}h.setVerticesData(u.b.MatricesIndicesKind,K,l.matricesIndices._updatable)}if(l.matricesIndicesExtra)if(l.matricesIndicesExtra._isExpanded)delete l.matricesIndices._isExpanded,h.setVerticesData(u.b.MatricesIndicesExtraKind,l.matricesIndicesExtra,l.matricesIndicesExtra._updatable);else{for(K=[],$=0;$ >8),K.push((16711680&W)>>16),K.push(W>>24&255);h.setVerticesData(u.b.MatricesIndicesExtraKind,K,l.matricesIndicesExtra._updatable)}l.matricesWeights&&(g._CleanMatricesWeights(l,h),h.setVerticesData(u.b.MatricesWeightsKind,l.matricesWeights,l.matricesWeights._updatable)),l.matricesWeightsExtra&&h.setVerticesData(u.b.MatricesWeightsExtraKind,l.matricesWeightsExtra,l.matricesWeights._updatable),h.setIndices(l.indices,null)}if(l.subMeshes){h.subMeshes=[];for(var q=0;q -1){var E=h.getScene().getLastSkeletonByID(l.skeletonId);if(E){v=E.bones.length;for(var D=h.getVerticesData(u.b.MatricesIndicesKind),w=h.getVerticesData(u.b.MatricesIndicesExtraKind),N=l.matricesWeights,I=l.matricesWeightsExtra,V=l.numBoneInfluencer,X=N.length,j=0;j V-1)&&(te=V-1),ne>.001){var ae=1/ne;for(de=0;de<4;de++)N[j+de]*=ae;if(I)for(de=0;de<4;de++)I[j+de]*=ae}else te>=4?(I[j+te-4]=1-ne,w[j+te-4]=v):(N[j+te]=1-ne,D[j+te]=v)}h.setVerticesData(u.b.MatricesIndicesKind,D),l.matricesWeightsExtra&&h.setVerticesData(u.b.MatricesIndicesExtraKind,w)}}}},g.Parse=function(l,h,v){if(h.getGeometryByID(l.id))return null;var E=new g(l.id,h,void 0,l.updatable);return T.a&&T.a.AddTagsTo(E,l.tags),l.delayLoadingFile?(E.delayLoadState=m.a.DELAYLOADSTATE_NOTLOADED,E.delayLoadingFile=v+l.delayLoadingFile,E._boundingInfo=new C.a(U.e.FromArray(l.boundingBoxMinimum),U.e.FromArray(l.boundingBoxMaximum)),E._delayInfo=[],l.hasUVs&&E._delayInfo.push(u.b.UVKind),l.hasUVs2&&E._delayInfo.push(u.b.UV2Kind),l.hasUVs3&&E._delayInfo.push(u.b.UV3Kind),l.hasUVs4&&E._delayInfo.push(u.b.UV4Kind),l.hasUVs5&&E._delayInfo.push(u.b.UV5Kind),l.hasUVs6&&E._delayInfo.push(u.b.UV6Kind),l.hasColors&&E._delayInfo.push(u.b.ColorKind),l.hasMatricesIndices&&E._delayInfo.push(u.b.MatricesIndicesKind),l.hasMatricesWeights&&E._delayInfo.push(u.b.MatricesWeightsKind),E._delayLoadingFunction=x.a.ImportVertexData):x.a.ImportVertexData(l,E),h.pushGeometry(E,!0),E},g}()},function(Me,y,f){f.d(y,"e",function(){return U}),f.d(y,"c",function(){return M}),f.d(y,"a",function(){return R}),f.d(y,"b",function(){return C}),f.d(y,"f",function(){return m}),f.d(y,"g",function(){return c}),f.d(y,"d",function(){return T});var U,_=f(14),x=f(0),u=f(28);(function(A){A[A.CW=0]="CW",A[A.CCW=1]="CCW"})(U||(U={}));var M=function(){function A(){}return A.Interpolate=function(S,g,l,h,v){for(var E=1-3*h+3*g,D=3*h-6*g,w=3*g,N=S,I=0;I<5;I++){var V=N*N;N-=(E*(V*N)+D*V+w*N-S)*(1/(3*E*V+2*D*N+w)),N=Math.min(1,Math.max(0,N))}return 3*Math.pow(1-N,2)*N*l+3*(1-N)*Math.pow(N,2)*v+Math.pow(N,3)},A}(),R=function(){function A(S){this._radians=S,this._radians<0&&(this._radians+=2*Math.PI)}return A.prototype.degrees=function(){return 180*this._radians/Math.PI},A.prototype.radians=function(){return this._radians},A.BetweenTwoPoints=function(S,g){var l=g.subtract(S);return new A(Math.atan2(l.y,l.x))},A.FromRadians=function(S){return new A(S)},A.FromDegrees=function(S){return new A(S*Math.PI/180)},A}(),C=function(A,S,g){this.startPoint=A,this.midPoint=S,this.endPoint=g;var l=Math.pow(S.x,2)+Math.pow(S.y,2),h=(Math.pow(A.x,2)+Math.pow(A.y,2)-l)/2,v=(l-Math.pow(g.x,2)-Math.pow(g.y,2))/2,E=(A.x-S.x)*(S.y-g.y)-(S.x-g.x)*(A.y-S.y);this.centerPoint=new x.d((h*(S.y-g.y)-v*(A.y-S.y))/E,((A.x-S.x)*v-(S.x-g.x)*h)/E),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=R.BetweenTwoPoints(this.centerPoint,this.startPoint);var D=this.startAngle.degrees(),w=R.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),N=R.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();w-D>180&&(w-=360),w-D<-180&&(w+=360),N-w>180&&(N-=360),N-w<-180&&(N+=360),this.orientation=w-D<0?U.CW:U.CCW,this.angle=R.FromDegrees(this.orientation===U.CW?D-N:N-D)},m=function(){function A(S,g){this._points=new Array,this._length=0,this.closed=!1,this._points.push(new x.d(S,g))}return A.prototype.addLineTo=function(S,g){if(this.closed)return this;var l=new x.d(S,g),h=this._points[this._points.length-1];return this._points.push(l),this._length+=l.subtract(h).length(),this},A.prototype.addArcTo=function(S,g,l,h,v){if(v===void 0&&(v=36),this.closed)return this;var E=this._points[this._points.length-1],D=new x.d(S,g),w=new x.d(l,h),N=new C(E,D,w),I=N.angle.radians()/v;N.orientation===U.CW&&(I*=-1);for(var V=N.startAngle.radians()+I,X=0;X 1)return x.d.Zero();for(var g=S*this.length(),l=0,h=0;h =l&&g<=w){var N=D.normalize(),I=g-l;return new x.d(E.x+N.x*I,E.y+N.y*I)}l=w}return x.d.Zero()},A.StartingAt=function(S,g){return new A(S,g)},A}(),c=function(){function A(S,g,l,h){g===void 0&&(g=null),h===void 0&&(h=!1),this.path=S,this._curve=new Array,this._distances=new Array,this._tangents=new Array,this._normals=new Array,this._binormals=new Array,this._pointAtData={id:0,point:x.e.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:x.a.Identity()};for(var v=0;v g){var l=S;S=g,g=l}var h=this.getCurve(),v=this.getPointAt(S),E=this.getPreviousPointIndexAt(S),D=this.getPointAt(g),w=this.getPreviousPointIndexAt(g)+1,N=[];return S!==0&&(E++,N.push(v)),N.push.apply(N,h.slice(E,w)),g===1&&S!==1||N.push(D),new A(N,this.getNormalAt(S),this._raw,this._alignTangentsWithPath)},A.prototype.update=function(S,g,l){g===void 0&&(g=null),l===void 0&&(l=!1);for(var h=0;h g+1;)g++,l=this._curve[S].subtract(this._curve[S-g]);return l},A.prototype._normalVector=function(S,g){var l,h,v=S.length();return v===0&&(v=1),g==null?(h=_.a.WithinEpsilon(Math.abs(S.y)/v,1,u.a)?_.a.WithinEpsilon(Math.abs(S.x)/v,1,u.a)?_.a.WithinEpsilon(Math.abs(S.z)/v,1,u.a)?x.e.Zero():new x.e(0,0,1):new x.e(1,0,0):new x.e(0,-1,0),l=x.e.Cross(S,h)):(l=x.e.Cross(S,g),x.e.CrossToRef(l,S,l)),l.normalize(),l},A.prototype._updatePointAtData=function(S,g){if(g===void 0&&(g=!1),this._pointAtData.id===S)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=S;var l=this.getPoints();if(S<=0)return this._setPointAtData(0,0,l[0],0,g);if(S>=1)return this._setPointAtData(1,1,l[l.length-1],l.length-1,g);for(var h,v=l[0],E=0,D=S*this.length(),w=1;w D){var I=(E-D)/N,V=v.subtract(h),X=h.add(V.scaleInPlace(I));return this._setPointAtData(S,1-I,X,w-1,g)}v=h}return this._pointAtData},A.prototype._setPointAtData=function(S,g,l,h,v){return this._pointAtData.point=l,this._pointAtData.position=S,this._pointAtData.subPosition=g,this._pointAtData.previousPointArrayIndex=h,this._pointAtData.interpolateReady=v,v&&this._updateInterpolationMatrix(),this._pointAtData},A.prototype._updateInterpolationMatrix=function(){this._pointAtData.interpolationMatrix=x.a.Identity();var S=this._pointAtData.previousPointArrayIndex;if(S!==this._tangents.length-1){var g=S+1,l=this._tangents[S].clone(),h=this._normals[S].clone(),v=this._binormals[S].clone(),E=this._tangents[g].clone(),D=this._normals[g].clone(),w=this._binormals[g].clone(),N=x.b.RotationQuaternionFromAxis(h,v,l),I=x.b.RotationQuaternionFromAxis(D,w,E);x.b.Slerp(N,I,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}},A}(),T=function(){function A(S){this._length=0,this._points=S,this._length=this._computeLength(S)}return A.CreateQuadraticBezier=function(S,g,l,h){h=h>2?h:3;for(var v=new Array,E=function(w,N,I,V){return(1-w)*(1-w)*N+2*w*(1-w)*I+w*w*V},D=0;D<=h;D++)v.push(new x.e(E(D/h,S.x,g.x,l.x),E(D/h,S.y,g.y,l.y),E(D/h,S.z,g.z,l.z)));return new A(v)},A.CreateCubicBezier=function(S,g,l,h,v){v=v>3?v:4;for(var E=new Array,D=function(N,I,V,X,j){return(1-N)*(1-N)*(1-N)*I+3*N*(1-N)*(1-N)*V+3*N*N*(1-N)*X+N*N*N*j},w=0;w<=v;w++)E.push(new x.e(D(w/v,S.x,g.x,l.x,h.x),D(w/v,S.y,g.y,l.y,h.y),D(w/v,S.z,g.z,l.z,h.z)));return new A(E)},A.CreateHermiteSpline=function(S,g,l,h,v){for(var E=new Array,D=1/v,w=0;w<=v;w++)E.push(x.e.Hermite(S,g,l,h,w*D));return new A(E)},A.CreateCatmullRomSpline=function(S,g,l){var h=new Array,v=1/g,E=0;if(l){for(var D=S.length,w=0;w 1&&(this._multiview=!0,X.push("#define MULTIVIEW"),this._options.uniforms.indexOf("viewProjection")!==-1&&this._options.uniforms.push("viewProjectionR")===-1&&this._options.uniforms.push("viewProjectionR"));for(var te=0;te 4&&(j.push(u.b.MatricesIndicesExtraKind),j.push(u.b.MatricesWeightsExtraKind));var pe=E.skeleton;de=E.numBoneInfluencers,X.push("#define NUM_BONE_INFLUENCERS "+de),ne.addCPUSkinningFallback(0,E),pe.isUsingTextureForMatrices?(X.push("#define BONETEXTURE"),this._options.uniforms.indexOf("boneTextureWidth")===-1&&this._options.uniforms.push("boneTextureWidth"),this._options.samplers.indexOf("boneSampler")===-1&&this._options.samplers.push("boneSampler")):(X.push("#define BonesPerMesh "+(pe.bones.length+1)),this._options.uniforms.indexOf("mBones")===-1&&this._options.uniforms.push("mBones"))}else X.push("#define NUM_BONE_INFLUENCERS 0");for(var ae in this._textures)if(!this._textures[ae].isReady())return!1;E&&this._shouldTurnAlphaTestOn(E)&&X.push("#define ALPHATEST");var ee=this._shaderPath,K=this._options.uniforms,$=this._options.uniformBuffers,L=this._options.samplers;this.customShaderNameResolve&&(K=K.slice(),$=$.slice(),L=L.slice(),ee=this.customShaderNameResolve(ee,K,$,L,X,j));var G=this._effect,Q=X.join(` -`);return this._cachedDefines!==Q&&(this._cachedDefines=Q,this._effect=V.createEffect(ee,{attributes:j,uniformsNames:K,uniformBuffersNames:$,samplers:L,defines:Q,fallbacks:ne,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{maxSimultaneousMorphTargets:de}},V),this._onEffectCreatedObservable&&(g.effect=this._effect,this._onEffectCreatedObservable.notifyObservers(g))),(N=!(!((w=this._effect)===null||w===void 0)&&w.isReady()))!==null&&N!==void 0&&!N&&(G!==this._effect&&I.resetCachedMaterial(),this._renderId=I.getRenderId(),this._effect._wasPreviouslyReady=!0,!0)},v.prototype.bindOnlyWorldMatrix=function(E,D){var w=this.getScene(),N=D??this._effect;N&&(this._options.uniforms.indexOf("world")!==-1&&N.setMatrix("world",E),this._options.uniforms.indexOf("worldView")!==-1&&(E.multiplyToRef(w.getViewMatrix(),this._cachedWorldViewMatrix),N.setMatrix("worldView",this._cachedWorldViewMatrix)),this._options.uniforms.indexOf("worldViewProjection")!==-1&&(E.multiplyToRef(w.getTransformMatrix(),this._cachedWorldViewProjectionMatrix),N.setMatrix("worldViewProjection",this._cachedWorldViewProjectionMatrix)))},v.prototype.bindForSubMesh=function(E,D,w){this.bind(E,D,w._effectOverride)},v.prototype.bind=function(E,D,w){this.bindOnlyWorldMatrix(E,w);var N=w??this._effect;if(N&&this.getScene().getCachedMaterial()!==this){var I;for(I in this._options.uniforms.indexOf("view")!==-1&&N.setMatrix("view",this.getScene().getViewMatrix()),this._options.uniforms.indexOf("projection")!==-1&&N.setMatrix("projection",this.getScene().getProjectionMatrix()),this._options.uniforms.indexOf("viewProjection")!==-1&&(N.setMatrix("viewProjection",this.getScene().getTransformMatrix()),this._multiview&&N.setMatrix("viewProjectionR",this.getScene()._transformMatrixR)),this.getScene().activeCamera&&this._options.uniforms.indexOf("cameraPosition")!==-1&&N.setVector3("cameraPosition",this.getScene().activeCamera.globalPosition),R.a.BindBonesParameters(D,N),this._textures)N.setTexture(I,this._textures[I]);for(I in this._textureArrays)N.setTextureArray(I,this._textureArrays[I]);for(I in this._ints)N.setInt(I,this._ints[I]);for(I in this._floats)N.setFloat(I,this._floats[I]);for(I in this._floatsArrays)N.setArray(I,this._floatsArrays[I]);for(I in this._colors3)N.setColor3(I,this._colors3[I]);for(I in this._colors3Arrays)N.setArray3(I,this._colors3Arrays[I]);for(I in this._colors4){var V=this._colors4[I];N.setFloat4(I,V.r,V.g,V.b,V.a)}for(I in this._colors4Arrays)N.setArray4(I,this._colors4Arrays[I]);for(I in this._vectors2)N.setVector2(I,this._vectors2[I]);for(I in this._vectors3)N.setVector3(I,this._vectors3[I]);for(I in this._vectors4)N.setVector4(I,this._vectors4[I]);for(I in this._matrices)N.setMatrix(I,this._matrices[I]);for(I in this._matrixArrays)N.setMatrices(I,this._matrixArrays[I]);for(I in this._matrices3x3)N.setMatrix3x3(I,this._matrices3x3[I]);for(I in this._matrices2x2)N.setMatrix2x2(I,this._matrices2x2[I]);for(I in this._vectors2Arrays)N.setArray2(I,this._vectors2Arrays[I]);for(I in this._vectors3Arrays)N.setArray3(I,this._vectors3Arrays[I]);for(I in this._vectors4Arrays)N.setArray4(I,this._vectors4Arrays[I])}var X=this._effect;this._effect=N,this._afterBind(D),this._effect=X},v.prototype._afterBind=function(E){h.prototype._afterBind.call(this,E),this.getScene()._cachedEffect=this._effect},v.prototype.getActiveTextures=function(){var E=h.prototype.getActiveTextures.call(this);for(var D in this._textures)E.push(this._textures[D]);for(var D in this._textureArrays)for(var w=this._textureArrays[D],N=0;N I.snapDistance){var ee=Math.floor(Math.abs(j)/I.snapDistance);j%=I.snapDistance,ae.delta.normalizeToRef(ne),ne.scaleInPlace(I.snapDistance*ee),I.attachedNode.getWorldMatrix().addTranslationFromFloats(ne.x,ne.y,ne.z),I.attachedNode.updateCache(),te.snapDistance=I.snapDistance*ee,I.onSnapObservable.notifyObservers(te)}I._matrixChanged()}}),I.dragBehavior.onDragStartObservable.add(function(){I._dragging=!0}),I.dragBehavior.onDragEndObservable.add(function(){I._dragging=!1});var de=E._getSharedGizmoLight();de.includedOnlyMeshes=de.includedOnlyMeshes.concat(I._rootMesh.getChildMeshes(!1));var pe={gizmoMeshes:V.getChildMeshes(),colliderMeshes:X.getChildMeshes(),material:I._coloredMaterial,hoverMaterial:I._hoverMaterial,disableMaterial:I._disableMaterial,active:!1};return(N=I._parent)===null||N===void 0||N.addToAxisCache(X,pe),I._pointerObserver=E.utilityLayerScene.onPointerObservable.add(function(ae){var ee;if(!I._customMeshSet&&(I._isHovered=pe.colliderMeshes.indexOf((ee=ae?.pickInfo)===null||ee===void 0?void 0:ee.pickedMesh)!=-1,!I._parent)){var K=I._isHovered||I._dragging?I._hoverMaterial:I._coloredMaterial;pe.gizmoMeshes.forEach(function($){$.material=K,$.color&&($.color=K.diffuseColor)})}}),I}return Object(U.d)(l,g),l._CreateArrow=function(h,v,E,D){E===void 0&&(E=1),D===void 0&&(D=!1);var w=new u.a("arrow",h),N=R.a.CreateCylinder("cylinder",{diameterTop:0,height:.075,diameterBottom:.0375*(1+(E-1)/4),tessellation:96},h),I=R.a.CreateCylinder("cylinder",{diameterTop:.005*E,height:.275,diameterBottom:.005*E,tessellation:96},h);return N.parent=w,N.material=v,N.rotation.x=Math.PI/2,N.position.z+=.3,I.parent=w,I.material=v,I.position.z+=.1375,I.rotation.x=Math.PI/2,D&&(I.visibility=0,N.visibility=0),w},l._CreateArrowInstance=function(h,v){for(var E=new u.a("arrow",h),D=0,w=v.getChildMeshes();D 0 -#ifdef BONETEXTURE -uniform sampler2D boneSampler; -uniform float boneTextureWidth; -#else -uniform mat4 mBones[BonesPerMesh]; -#ifdef BONES_VELOCITY_ENABLED -uniform mat4 mPreviousBones[BonesPerMesh]; -#endif -#endif -attribute vec4 matricesIndices; -attribute vec4 matricesWeights; -#if NUM_BONE_INFLUENCERS>4 -attribute vec4 matricesIndicesExtra; -attribute vec4 matricesWeightsExtra; -#endif -#ifdef BONETEXTURE -#define inline -mat4 readMatrixFromRawSampler(sampler2D smp,float index) -{ -float offset=index*4.0; -float dx=1.0/boneTextureWidth; -vec4 m0=texture2D(smp,vec2(dx*(offset+0.5),0.)); -vec4 m1=texture2D(smp,vec2(dx*(offset+1.5),0.)); -vec4 m2=texture2D(smp,vec2(dx*(offset+2.5),0.)); -vec4 m3=texture2D(smp,vec2(dx*(offset+3.5),0.)); -return mat4(m0,m1,m2,m3); -} -#endif -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="instancesDeclaration",_=`#ifdef INSTANCES -attribute vec4 world0; -attribute vec4 world1; -attribute vec4 world2; -attribute vec4 world3; -#ifdef THIN_INSTANCES -uniform mat4 world; -#endif -#else -uniform mat4 world; -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="instancesVertex",_=`#ifdef INSTANCES -mat4 finalWorld=mat4(world0,world1,world2,world3); -#ifdef THIN_INSTANCES -finalWorld=world*finalWorld; -#endif -#else -mat4 finalWorld=world; -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U=`#if NUM_BONE_INFLUENCERS>0 -mat4 influence; -#ifdef BONETEXTURE -influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0]; -#if NUM_BONE_INFLUENCERS>1 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1]; -#endif -#if NUM_BONE_INFLUENCERS>2 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2]; -#endif -#if NUM_BONE_INFLUENCERS>3 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3]; -#endif -#if NUM_BONE_INFLUENCERS>4 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0]; -#endif -#if NUM_BONE_INFLUENCERS>5 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1]; -#endif -#if NUM_BONE_INFLUENCERS>6 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2]; -#endif -#if NUM_BONE_INFLUENCERS>7 -influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3]; -#endif -#else -influence=mBones[int(matricesIndices[0])]*matricesWeights[0]; -#if NUM_BONE_INFLUENCERS>1 -influence+=mBones[int(matricesIndices[1])]*matricesWeights[1]; -#endif -#if NUM_BONE_INFLUENCERS>2 -influence+=mBones[int(matricesIndices[2])]*matricesWeights[2]; -#endif -#if NUM_BONE_INFLUENCERS>3 -influence+=mBones[int(matricesIndices[3])]*matricesWeights[3]; -#endif -#if NUM_BONE_INFLUENCERS>4 -influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0]; -#endif -#if NUM_BONE_INFLUENCERS>5 -influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1]; -#endif -#if NUM_BONE_INFLUENCERS>6 -influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2]; -#endif -#if NUM_BONE_INFLUENCERS>7 -influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3]; -#endif -#endif -finalWorld=finalWorld*influence; -#endif`;f(5).a.IncludesShadersStore.bonesVertex=U},function(Me,y,f){f.d(y,"a",function(){return R});var U=f(0),_=f(7),x=f(4),u=f(16),M=f(43);u.a.CreateRibbon=function(C){var m=C.pathArray,c=C.closeArray||!1,T=C.closePath||!1,A=C.invertUV||!1,S=Math.floor(m[0].length/2),g=C.offset||S;g=g>S?S:Math.floor(g);var l,h,v,E,D=C.sideOrientation===0?0:C.sideOrientation||u.a.DEFAULTSIDE,w=C.uvs,N=C.colors,I=[],V=[],X=[],j=[],ne=[],te=[],de=[],pe=[],ae=[],ee=[];if(m.length<2){var K=[],$=[];for(v=0;v 0&&(Q=L[E].subtract(L[E-1]).length()+de[h],ne[h].push(Q),de[h]=Q),E++;T&&(E--,I.push(L[0].x,L[0].y,L[0].z),Q=L[E].subtract(L[0]).length()+de[h],ne[h].push(Q),de[h]=Q),ae[h]=G+k,ee[h]=Y,Y+=G+k}var H,Z,W=null,q=null;for(v=0;v =U.a.ACTION_OnPickTrigger&&M<=U.a.ACTION_OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),x.HasSpecificTrigger=function(u){for(var M in x.Triggers)if(x.Triggers.hasOwnProperty(M)&&parseInt(M)===u)return!0;return!1},x.Triggers={},x}()},function(Me,y,f){f.d(y,"a",function(){return R});var U=f(1),_=f(25),x=f(3),u=f(19),M=f(15),R=function(){function C(m){this._texture=null,this.diffuseBlendLevel=1,this.roughnessBlendLevel=1,this.bumpLevel=1,this._normalBlendMethod=_.a.MATERIAL_NORMALBLENDMETHOD_WHITEOUT,this._isEnabled=!1,this.isEnabled=!1,this._internalMarkAllSubMeshesAsTexturesDirty=m}return C.prototype._markAllSubMeshesAsTexturesDirty=function(){this._internalMarkAllSubMeshesAsTexturesDirty()},C.prototype.isReadyForSubMesh=function(m,c){var T=c.getEngine();return!(m._areTexturesDirty&&c.texturesEnabled&&T.getCaps().standardDerivatives&&this._texture&&u.a.DetailTextureEnabled&&!this._texture.isReady())},C.prototype.prepareDefines=function(m,c){if(this._isEnabled){m.DETAIL_NORMALBLENDMETHOD=this._normalBlendMethod;var T=c.getEngine();m._areTexturesDirty&&(T.getCaps().standardDerivatives&&this._texture&&u.a.DetailTextureEnabled&&this._isEnabled?(M.a.PrepareDefinesForMergedUV(this._texture,m,"DETAIL"),m.DETAIL_NORMALBLENDMETHOD=this._normalBlendMethod):m.DETAIL=!1)}else m.DETAIL=!1},C.prototype.bindForSubMesh=function(m,c,T){this._isEnabled&&(m.useUbo&&T&&m.isSync||this._texture&&u.a.DetailTextureEnabled&&(m.updateFloat4("vDetailInfos",this._texture.coordinatesIndex,this.diffuseBlendLevel,this.bumpLevel,this.roughnessBlendLevel),M.a.BindTextureMatrix(this._texture,m,"detail")),c.texturesEnabled&&this._texture&&u.a.DetailTextureEnabled&&m.setTexture("detailSampler",this._texture))},C.prototype.hasTexture=function(m){return this._texture===m},C.prototype.getActiveTextures=function(m){this._texture&&m.push(this._texture)},C.prototype.getAnimatables=function(m){this._texture&&this._texture.animations&&this._texture.animations.length>0&&m.push(this._texture)},C.prototype.dispose=function(m){var c;m&&((c=this._texture)===null||c===void 0||c.dispose())},C.prototype.getClassName=function(){return"DetailMap"},C.AddUniforms=function(m){m.push("vDetailInfos")},C.AddSamplers=function(m){m.push("detailSampler")},C.PrepareUniformBuffer=function(m){m.addUniform("vDetailInfos",4),m.addUniform("detailMatrix",16)},C.prototype.copyTo=function(m){x.a.Clone(function(){return m},this)},C.prototype.serialize=function(){return x.a.Serialize(this)},C.prototype.parse=function(m,c,T){var A=this;x.a.Parse(function(){return A},m,c,T)},Object(U.c)([Object(x.m)("detailTexture"),Object(x.b)("_markAllSubMeshesAsTexturesDirty")],C.prototype,"texture",void 0),Object(U.c)([Object(x.c)()],C.prototype,"diffuseBlendLevel",void 0),Object(U.c)([Object(x.c)()],C.prototype,"roughnessBlendLevel",void 0),Object(U.c)([Object(x.c)()],C.prototype,"bumpLevel",void 0),Object(U.c)([Object(x.c)(),Object(x.b)("_markAllSubMeshesAsTexturesDirty")],C.prototype,"normalBlendMethod",void 0),Object(U.c)([Object(x.c)(),Object(x.b)("_markAllSubMeshesAsTexturesDirty")],C.prototype,"isEnabled",void 0),C}()},function(Me,y,f){var U="morphTargetsVertexGlobalDeclaration",_=`#ifdef MORPHTARGETS -uniform float morphTargetInfluences[NUM_MORPH_INFLUENCERS]; -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="morphTargetsVertexDeclaration",_=`#ifdef MORPHTARGETS -attribute vec3 position{X}; -#ifdef MORPHTARGETS_NORMAL -attribute vec3 normal{X}; -#endif -#ifdef MORPHTARGETS_TANGENT -attribute vec3 tangent{X}; -#endif -#ifdef MORPHTARGETS_UV -attribute vec2 uv_{X}; -#endif -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){f.d(y,"a",function(){return u});var U=f(25),_=f(4),x=f(2),u=function(){function M(R){this._vertexBuffers={},this._scene=R}return M.prototype._prepareBuffers=function(){if(!this._vertexBuffers[_.b.PositionKind]){var R=[];R.push(1,1),R.push(-1,1),R.push(-1,-1),R.push(1,-1),this._vertexBuffers[_.b.PositionKind]=new _.b(this._scene.getEngine(),R,_.b.PositionKind,!1,!1,2),this._buildIndexBuffer()}},M.prototype._buildIndexBuffer=function(){var R=[];R.push(0),R.push(1),R.push(2),R.push(0),R.push(2),R.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(R)},M.prototype._rebuild=function(){var R=this._vertexBuffers[_.b.PositionKind];R&&(R._rebuild(),this._buildIndexBuffer())},M.prototype._prepareFrame=function(R,C){R===void 0&&(R=null),C===void 0&&(C=null);var m=this._scene.activeCamera;return!!m&&!(!(C=C||m._postProcesses.filter(function(c){return c!=null}))||C.length===0||!this._scene.postProcessesEnabled)&&(C[0].activate(m,R,C!=null),!0)},M.prototype.directRender=function(R,C,m,c,T,A){C===void 0&&(C=null),m===void 0&&(m=!1),c===void 0&&(c=0),T===void 0&&(T=0),A===void 0&&(A=!1);for(var S=this._scene.getEngine(),g=0;g 3?0:v,E);var ae=x.a.CreateRibbon(C,{pathArray:te,closeArray:l,closePath:h,updatable:w,sideOrientation:N,invertUV:V,frontUVs:X||void 0,backUVs:j||void 0},D);return ae._creationDataStorage.pathArray=te,ae._creationDataStorage.path3D=ne,ae._creationDataStorage.cap=v,ae},R}()},function(Me,y,f){f.d(y,"b",function(){return c}),f.d(y,"a",function(){return T});var U=f(1),_=f(9),x=f(4),u=f(7),M=f(151),R=f(25),C=f(73),m=f(15),c=(f(166),f(167),function(A){function S(g,l,h,v,E,D,w){l===void 0&&(l=null),h===void 0&&(h=null),v===void 0&&(v=null);var N=A.call(this,g,l,h,v,E)||this;N.useVertexColor=D,N.useVertexAlpha=w,N.color=new _.a(1,1,1),N.alpha=1,v&&(N.color=v.color.clone(),N.alpha=v.alpha,N.useVertexColor=v.useVertexColor,N.useVertexAlpha=v.useVertexAlpha),N.intersectionThreshold=.1;var I={attributes:[x.b.PositionKind,"world0","world1","world2","world3"],uniforms:["vClipPlane","vClipPlane2","vClipPlane3","vClipPlane4","vClipPlane5","vClipPlane6","world","viewProjection"],needAlphaBlending:!0,defines:[]};return w===!1&&(I.needAlphaBlending=!1),D?(I.defines.push("#define VERTEXCOLOR"),I.attributes.push(x.b.ColorKind)):(I.uniforms.push("color"),N.color4=new _.b),N._colorShader=new C.a("colorShader",N.getScene(),"color",I),N}return Object(U.d)(S,A),S.prototype._addClipPlaneDefine=function(g){var l="#define "+g;this._colorShader.options.defines.indexOf(l)===-1&&this._colorShader.options.defines.push(l)},S.prototype._removeClipPlaneDefine=function(g){var l="#define "+g,h=this._colorShader.options.defines.indexOf(l);h!==-1&&this._colorShader.options.defines.splice(h,1)},S.prototype.isReady=function(){var g=this.getScene();return g.clipPlane?this._addClipPlaneDefine("CLIPPLANE"):this._removeClipPlaneDefine("CLIPPLANE"),g.clipPlane2?this._addClipPlaneDefine("CLIPPLANE2"):this._removeClipPlaneDefine("CLIPPLANE2"),g.clipPlane3?this._addClipPlaneDefine("CLIPPLANE3"):this._removeClipPlaneDefine("CLIPPLANE3"),g.clipPlane4?this._addClipPlaneDefine("CLIPPLANE4"):this._removeClipPlaneDefine("CLIPPLANE4"),g.clipPlane5?this._addClipPlaneDefine("CLIPPLANE5"):this._removeClipPlaneDefine("CLIPPLANE5"),g.clipPlane6?this._addClipPlaneDefine("CLIPPLANE6"):this._removeClipPlaneDefine("CLIPPLANE6"),!!this._colorShader.isReady(this)&&A.prototype.isReady.call(this)},S.prototype.getClassName=function(){return"LinesMesh"},Object.defineProperty(S.prototype,"material",{get:function(){return this._colorShader},set:function(g){},enumerable:!1,configurable:!0}),Object.defineProperty(S.prototype,"checkCollisions",{get:function(){return!1},enumerable:!1,configurable:!0}),S.prototype._bind=function(g,l,h){if(!this._geometry)return this;var v=this._colorShader.getEffect(),E=this.isUnIndexed?null:this._geometry.getIndexBuffer();if(this._geometry._bind(v,E),!this.useVertexColor){var D=this.color,w=D.r,N=D.g,I=D.b;this.color4.set(w,N,I,this.alpha),this._colorShader.setColor4("color",this.color4)}return m.a.BindClipPlane(v,this.getScene()),this},S.prototype._draw=function(g,l,h){if(!this._geometry||!this._geometry.getVertexBuffers()||!this._unIndexed&&!this._geometry.getIndexBuffer())return this;var v=this.getScene().getEngine();return this._unIndexed?v.drawArraysType(R.a.LineListDrawMode,g.verticesStart,g.verticesCount,h):v.drawElementsType(R.a.LineListDrawMode,g.indexStart,g.indexCount,h),this},S.prototype.dispose=function(g){this._colorShader.dispose(!1,!1,!0),A.prototype.dispose.call(this,g)},S.prototype.clone=function(g,l,h){return l===void 0&&(l=null),new S(g,this.getScene(),l,this,h)},S.prototype.createInstance=function(g){return new T(g,this)},S}(u.a)),T=function(A){function S(g,l){var h=A.call(this,g,l)||this;return h.intersectionThreshold=l.intersectionThreshold,h}return Object(U.d)(S,A),S.prototype.getClassName=function(){return"InstancedLinesMesh"},S}(M.a)},function(Me,y,f){f.r(y),f.d(y,"AxesViewer",function(){return R}),f.d(y,"BoneAxesViewer",function(){return c}),f.d(y,"DebugLayerTab",function(){return U}),f.d(y,"DebugLayer",function(){return l}),f.d(y,"PhysicsViewer",function(){return V}),f.d(y,"RayHelper",function(){return j}),f.d(y,"SkeletonViewer",function(){return K});var U,_=f(0),x=f(30),u=f(75),M=f(9),R=function(){function $(L,G,Q,oe,re,Y){if(G===void 0&&(G=1),Q===void 0&&(Q=2),this._scaleLinesFactor=4,this._instanced=!1,this.scene=null,this.scaleLines=1,this.scaleLines=G,!oe){var k=new x.a("",L);k.disableLighting=!0,k.emissiveColor=M.a.Red().scale(.5),oe=u.a._CreateArrow(L,k)}if(!re){var H=new x.a("",L);H.disableLighting=!0,H.emissiveColor=M.a.Green().scale(.5),re=u.a._CreateArrow(L,H)}if(!Y){var Z=new x.a("",L);Z.disableLighting=!0,Z.emissiveColor=M.a.Blue().scale(.5),Y=u.a._CreateArrow(L,Z)}this._xAxis=oe,this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis=re,this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis=Y,this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),Q!=null&&($._SetRenderingGroupId(this._xAxis,Q),$._SetRenderingGroupId(this._yAxis,Q),$._SetRenderingGroupId(this._zAxis,Q)),this.scene=L,this.update(new _.e,_.e.Right(),_.e.Up(),_.e.Forward())}return Object.defineProperty($.prototype,"xAxis",{get:function(){return this._xAxis},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"yAxis",{get:function(){return this._yAxis},enumerable:!1,configurable:!0}),Object.defineProperty($.prototype,"zAxis",{get:function(){return this._zAxis},enumerable:!1,configurable:!0}),$.prototype.update=function(L,G,Q,oe){this._xAxis.position.copyFrom(L),this._xAxis.setDirection(G),this._xAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._yAxis.position.copyFrom(L),this._yAxis.setDirection(Q),this._yAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor),this._zAxis.position.copyFrom(L),this._zAxis.setDirection(oe),this._zAxis.scaling.setAll(this.scaleLines*this._scaleLinesFactor)},$.prototype.createInstance=function(){var L=u.a._CreateArrowInstance(this.scene,this._xAxis),G=u.a._CreateArrowInstance(this.scene,this._yAxis),Q=u.a._CreateArrowInstance(this.scene,this._zAxis),oe=new $(this.scene,this.scaleLines,null,L,G,Q);return oe._instanced=!0,oe},$.prototype.dispose=function(){this._xAxis&&this._xAxis.dispose(!1,!this._instanced),this._yAxis&&this._yAxis.dispose(!1,!this._instanced),this._zAxis&&this._zAxis.dispose(!1,!this._instanced),this.scene=null},$._SetRenderingGroupId=function(L,G){L.getChildMeshes().forEach(function(Q){Q.renderingGroupId=G})},$}(),C=f(1),m=f(23),c=function($){function L(G,Q,oe,re){re===void 0&&(re=1);var Y=$.call(this,G,re)||this;return Y.pos=_.e.Zero(),Y.xaxis=_.e.Zero(),Y.yaxis=_.e.Zero(),Y.zaxis=_.e.Zero(),Y.mesh=oe,Y.bone=Q,Y}return Object(C.d)(L,$),L.prototype.update=function(){if(this.mesh&&this.bone){var G=this.bone;G._markAsDirtyAndCompose(),G.getAbsolutePositionToRef(this.mesh,this.pos),G.getDirectionToRef(m.a.X,this.mesh,this.xaxis),G.getDirectionToRef(m.a.Y,this.mesh,this.yaxis),G.getDirectionToRef(m.a.Z,this.mesh,this.zaxis),$.prototype.update.call(this,this.pos,this.xaxis,this.yaxis,this.zaxis)}},L.prototype.dispose=function(){this.mesh&&(this.mesh=null,this.bone=null,$.prototype.dispose.call(this))},L}(R),T=f(12),A=f(6),S=f(20),g=f(13);Object.defineProperty(S.a.prototype,"debugLayer",{get:function(){return this._debugLayer||(this._debugLayer=new l(this)),this._debugLayer},enumerable:!0,configurable:!0}),function($){$[$.Properties=0]="Properties",$[$.Debug=1]="Debug",$[$.Statistics=2]="Statistics",$[$.Tools=3]="Tools",$[$.Settings=4]="Settings"}(U||(U={}));var l=function(){function $(L){var G=this;this.BJSINSPECTOR=this._getGlobalInspector(),this._scene=L,this._scene.onDisposeObservable.add(function(){G._scene._debugLayer&&G._scene._debugLayer.hide()})}return Object.defineProperty($.prototype,"onPropertyChangedObservable",{get:function(){return this.BJSINSPECTOR&&this.BJSINSPECTOR.Inspector?this.BJSINSPECTOR.Inspector.OnPropertyChangedObservable:(this._onPropertyChangedObservable||(this._onPropertyChangedObservable=new A.c),this._onPropertyChangedObservable)},enumerable:!1,configurable:!0}),$.prototype._createInspector=function(L){if(!this.isVisible()){if(this._onPropertyChangedObservable){for(var G=0,Q=this._onPropertyChangedObservable.observers;G -1&&this._debugMeshMeshes.splice(Y,1),this._numMeshes--,this._numMeshes>0?(this._meshes[oe]=this._meshes[this._numMeshes],this._impostors[oe]=this._impostors[this._numMeshes],this._meshes[this._numMeshes]=null,this._impostors[this._numMeshes]=null):(this._meshes[0]=null,this._impostors[0]=null),G=!0;break}G&&this._numMeshes===0&&this._scene.unregisterBeforeRender(this._renderFunction)}},$.prototype._getDebugMaterial=function(L){return this._debugMaterial||(this._debugMaterial=new x.a("",L),this._debugMaterial.wireframe=!0,this._debugMaterial.emissiveColor=M.a.White(),this._debugMaterial.disableLighting=!0),this._debugMaterial},$.prototype._getDebugBoxMesh=function(L){return this._debugBoxMesh||(this._debugBoxMesh=v.a.CreateBox("physicsBodyBoxViewMesh",{size:1},L),this._debugBoxMesh.rotationQuaternion=_.b.Identity(),this._debugBoxMesh.material=this._getDebugMaterial(L),this._debugBoxMesh.setEnabled(!1)),this._debugBoxMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugSphereMesh=function(L){return this._debugSphereMesh||(this._debugSphereMesh=E.a.CreateSphere("physicsBodySphereViewMesh",{diameter:1},L),this._debugSphereMesh.rotationQuaternion=_.b.Identity(),this._debugSphereMesh.material=this._getDebugMaterial(L),this._debugSphereMesh.setEnabled(!1)),this._debugSphereMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugCylinderMesh=function(L){return this._debugCylinderMesh||(this._debugCylinderMesh=I.a.CreateCylinder("physicsBodyCylinderViewMesh",{diameterTop:1,diameterBottom:1,height:1},L),this._debugCylinderMesh.rotationQuaternion=_.b.Identity(),this._debugCylinderMesh.material=this._getDebugMaterial(L),this._debugCylinderMesh.setEnabled(!1)),this._debugCylinderMesh.createInstance("physicsBodyBoxViewInstance")},$.prototype._getDebugMeshMesh=function(L,G){var Q=new h.a(L.name,G,null,L);return Q.position=_.e.Zero(),Q.setParent(L),Q.material=this._getDebugMaterial(G),this._debugMeshMeshes.push(Q),Q},$.prototype._getDebugMesh=function(L,G){var Q=this;if(!this._utilityLayer||G&&G.parent&&G.parent.physicsImpostor)return null;var oe=null,re=this._utilityLayer.utilityLayerScene;switch(L.type){case w.a.BoxImpostor:oe=this._getDebugBoxMesh(re),L.getBoxSizeToRef(oe.scaling);break;case w.a.SphereImpostor:oe=this._getDebugSphereMesh(re);var Y=L.getRadius();oe.scaling.x=2*Y,oe.scaling.y=2*Y,oe.scaling.z=2*Y;break;case w.a.MeshImpostor:G&&(oe=this._getDebugMeshMesh(G,re));break;case w.a.NoImpostor:G&&G.getChildMeshes().filter(function(H){return H.physicsImpostor?1:0}).forEach(function(H){Q._getDebugBoxMesh(re).parent=H});break;case w.a.CylinderImpostor:oe=this._getDebugCylinderMesh(re);var k=L.object.getBoundingInfo();oe.scaling.x=k.boundingBox.maximum.x-k.boundingBox.minimum.x,oe.scaling.y=k.boundingBox.maximum.y-k.boundingBox.minimum.y,oe.scaling.z=k.boundingBox.maximum.z-k.boundingBox.minimum.z}return oe},$.prototype.dispose=function(){for(var L=this._numMeshes,G=0;G $.DISPLAY_SPHERE_AND_SPURS&&(Ge=$.DISPLAY_LINES),this.displayMode=Ge,this.update(),this._bindObs()}return $.CreateBoneWeightShader=function(L,G){var Q,oe,re,Y,k,H,Z=L.skeleton,W=(Q=L.colorBase)!==null&&Q!==void 0?Q:M.a.Black(),q=(oe=L.colorZero)!==null&&oe!==void 0?oe:M.a.Blue(),he=(re=L.colorQuarter)!==null&&re!==void 0?re:M.a.Green(),ge=(Y=L.colorHalf)!==null&&Y!==void 0?Y:M.a.Yellow(),me=(k=L.colorFull)!==null&&k!==void 0?k:M.a.Red(),_e=(H=L.targetBoneIndex)!==null&&H!==void 0?H:0;ae.a.ShadersStore["boneWeights:"+Z.name+"VertexShader"]=`precision highp float; - - attribute vec3 position; - attribute vec2 uv; - - uniform mat4 view; - uniform mat4 projection; - uniform mat4 worldViewProjection; - - #include - #if NUM_BONE_INFLUENCERS == 0 - attribute vec4 matricesIndices; - attribute vec4 matricesWeights; - #endif - - #include - - varying vec3 vColor; - - uniform vec3 colorBase; - uniform vec3 colorZero; - uniform vec3 colorQuarter; - uniform vec3 colorHalf; - uniform vec3 colorFull; - - uniform float targetBoneIndex; - - void main() { - vec3 positionUpdated = position; - - #include - #include - - vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0); - - vec3 color = colorBase; - float totalWeight = 0.; - if(matricesIndices[0] == targetBoneIndex && matricesWeights[0] > 0.){ - totalWeight += matricesWeights[0]; - } - if(matricesIndices[1] == targetBoneIndex && matricesWeights[1] > 0.){ - totalWeight += matricesWeights[1]; - } - if(matricesIndices[2] == targetBoneIndex && matricesWeights[2] > 0.){ - totalWeight += matricesWeights[2]; - } - if(matricesIndices[3] == targetBoneIndex && matricesWeights[3] > 0.){ - totalWeight += matricesWeights[3]; - } - - color = mix(color, colorZero, smoothstep(0., 0.25, totalWeight)); - color = mix(color, colorQuarter, smoothstep(0.25, 0.5, totalWeight)); - color = mix(color, colorHalf, smoothstep(0.5, 0.75, totalWeight)); - color = mix(color, colorFull, smoothstep(0.75, 1.0, totalWeight)); - vColor = color; - - gl_Position = projection * view * worldPos; - }`,ae.a.ShadersStore["boneWeights:"+Z.name+"FragmentShader"]=` - precision highp float; - varying vec3 vPosition; - - varying vec3 vColor; - - void main() { - vec4 color = vec4(vColor, 1.0); - gl_FragColor = color; - } - `;var be=new te.a("boneWeight:"+Z.name,G,{vertex:"boneWeights:"+Z.name,fragment:"boneWeights:"+Z.name},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorBase","colorZero","colorQuarter","colorHalf","colorFull","targetBoneIndex"]});return be.setColor3("colorBase",W),be.setColor3("colorZero",q),be.setColor3("colorQuarter",he),be.setColor3("colorHalf",ge),be.setColor3("colorFull",me),be.setFloat("targetBoneIndex",_e),be.getClassName=function(){return"BoneWeightShader"},be.transparencyMode=ne.a.MATERIAL_OPAQUE,be},$.CreateSkeletonMapShader=function(L,G){var Q,oe=L.skeleton,re=(Q=L.colorMap)!==null&&Q!==void 0?Q:[{color:new M.a(1,.38,.18),location:0},{color:new M.a(.59,.18,1),location:.2},{color:new M.a(.59,1,.18),location:.4},{color:new M.a(1,.87,.17),location:.6},{color:new M.a(1,.17,.42),location:.8},{color:new M.a(.17,.68,1),location:1}],Y=oe.bones.length+1,k=$._CreateBoneMapColorBuffer(Y,re,G),H=new te.a("boneWeights:"+oe.name,G,{vertexSource:`precision highp float; - - attribute vec3 position; - attribute vec2 uv; - - uniform mat4 view; - uniform mat4 projection; - uniform mat4 worldViewProjection; - uniform float colorMap[`+4*oe.bones.length+`]; - - #include - #if NUM_BONE_INFLUENCERS == 0 - attribute vec4 matricesIndices; - attribute vec4 matricesWeights; - #endif - #include - - varying vec3 vColor; - - void main() { - vec3 positionUpdated = position; - - #include - #include - - vec3 color = vec3(0.); - bool first = true; - - for (int i = 0; i < 4; i++) { - int boneIdx = int(matricesIndices[i]); - float boneWgt = matricesWeights[i]; - - vec3 c = vec3(colorMap[boneIdx * 4 + 0], colorMap[boneIdx * 4 + 1], colorMap[boneIdx * 4 + 2]); - - if (boneWgt > 0.) { - if (first) { - first = false; - color = c; - } else { - color = mix(color, c, boneWgt); - } - } - } - - vColor = color; - - vec4 worldPos = finalWorld * vec4(positionUpdated, 1.0); - - gl_Position = projection * view * worldPos; - }`,fragmentSource:` - precision highp float; - varying vec3 vColor; - - void main() { - vec4 color = vec4( vColor, 1.0 ); - gl_FragColor = color; - } - `},{attributes:["position","normal","matricesIndices","matricesWeights"],uniforms:["world","worldView","worldViewProjection","view","projection","viewProjection","colorMap"]});return H.setFloats("colorMap",k),H.getClassName=function(){return"SkeletonMapShader"},H.transparencyMode=ne.a.MATERIAL_OPAQUE,H},$._CreateBoneMapColorBuffer=function(L,G,Q){var oe=new de.a("temp",{width:L,height:1},Q,!1),re=oe.getContext(),Y=re.createLinearGradient(0,0,L,0);G.forEach(function(W){Y.addColorStop(W.location,W.color.toHexString())}),re.fillStyle=Y,re.fillRect(0,0,L,1),oe.update();for(var k=[],H=re.getImageData(0,0,L,1).data,Z=0;Z $.DISPLAY_SPHERE_AND_SPURS&&(L=$.DISPLAY_LINES),this.options.displayMode=L},enumerable:!1,configurable:!0}),$.prototype._bindObs=function(){var L=this;switch(this.displayMode){case $.DISPLAY_LINES:this._obs=this.scene.onBeforeRenderObservable.add(function(){L._displayLinesUpdate()})}},$.prototype.update=function(){switch(this.displayMode){case $.DISPLAY_LINES:this._displayLinesUpdate();break;case $.DISPLAY_SPHERES:this._buildSpheresAndSpurs(!0);break;case $.DISPLAY_SPHERE_AND_SPURS:this._buildSpheresAndSpurs(!1)}this._buildLocalAxes()},Object.defineProperty($.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(L){this.isEnabled!==L&&(this._isEnabled=L,this.debugMesh&&this.debugMesh.setEnabled(L),L&&!this._obs?this._bindObs():!L&&this._obs&&(this.scene.onBeforeRenderObservable.remove(this._obs),this._obs=null))},enumerable:!1,configurable:!0}),$.prototype._getBonePosition=function(L,G,Q,oe,re,Y){oe===void 0&&(oe=0),re===void 0&&(re=0),Y===void 0&&(Y=0);var k=_.c.Matrix[0],H=G.getParent();if(k.copyFrom(G.getLocalMatrix()),oe!==0||re!==0||Y!==0){var Z=_.c.Matrix[1];_.a.IdentityToRef(Z),Z.setTranslationFromFloats(oe,re,Y),Z.multiplyToRef(k,k)}H&&k.multiplyToRef(H.getAbsoluteTransform(),k),k.multiplyToRef(Q,k),L.x=k.m[12],L.y=k.m[13],L.z=k.m[14]},$.prototype._getLinesForBonesWithLength=function(L,G){for(var Q=L.length,oe=this.mesh._effectiveMesh.position,re=0,Y=0;Y =0;Y--){var k=L[Y],H=k.getParent();if(H&&(this._boneIndices.has(k.getIndex())||this.options.useAllBones)){var Z=this._debugLines[Q];Z||(Z=[_.e.Zero(),_.e.Zero()],this._debugLines[Q]=Z),k.getAbsolutePositionToRef(oe,Z[0]),H.getAbsolutePositionToRef(oe,Z[1]),Z[0].subtractInPlace(re),Z[1].subtractInPlace(re),Q++}}},$.prototype._revert=function(L){this.options.pauseAnimations&&(this.scene.animationsEnabled=L,this.utilityLayer.utilityLayerScene.animationsEnabled=L)},$.prototype._getAbsoluteBindPoseToRef=function(L,G){L!==null&&L._index!==-1?(this._getAbsoluteBindPoseToRef(L.getParent(),G),L.getBindPose().multiplyToRef(G,G)):G.copyFrom(_.a.Identity())},$.prototype._buildSpheresAndSpurs=function(L){var G,Q;L===void 0&&(L=!0),this._debugMesh&&(this._debugMesh.dispose(),this._debugMesh=null,this.ready=!1),this._ready=!1;var oe=(G=this.utilityLayer)===null||G===void 0?void 0:G.utilityLayerScene,re=this.skeleton.bones,Y=[],k=[],H=this.scene.animationsEnabled;try{this.options.pauseAnimations&&(this.scene.animationsEnabled=!1,oe.animationsEnabled=!1),this.options.returnToRest&&this.skeleton.returnToRest(),this.autoUpdateBonesMatrices&&this.skeleton.computeAbsoluteTransforms();for(var Z=Number.NEGATIVE_INFINITY,W=this.options.displayOptions||{},q=function(He){var qe=re[He];if(qe._index===-1||!he._boneIndices.has(qe.getIndex())&&!he.options.useAllBones)return"continue";var Ge=new _.a;he._getAbsoluteBindPoseToRef(qe,Ge);var nt=new _.e;Ge.decompose(void 0,void 0,nt),qe.children.forEach(function(It,Pt){var Ot=new _.a;It.getBindPose().multiplyToRef(Ge,Ot);var on=new _.e;Ot.decompose(void 0,void 0,on);var Zt=_.e.Distance(nt,on);if(Zt>Z&&(Z=Zt),!L){for(var tn=on.clone().subtract(nt.clone()),De=tn.length(),Pn=tn.normalize().scale(De),nn=W.midStep||.165,Cn=W.midStepFactor||.215,Ue=Pn.scale(nn),xn=ee.a.ExtrudeShapeCustom("skeletonViewer",{shape:[new _.e(1,-1,0),new _.e(1,1,0),new _.e(-1,1,0),new _.e(-1,-1,0),new _.e(1,-1,0)],path:[_.e.Zero(),Ue,Pn],scaleFunction:function(Lo){switch(Lo){case 0:case 2:return 0;case 1:return De*Cn}return 0},sideOrientation:h.a.DEFAULTSIDE,updatable:!1},oe),dr=xn.getTotalVertices(),Xe=[],An=[],ti=0;ti9?An.push(It.getIndex(),0,0,0):An.push(qe.getIndex(),0,0,0);xn.position=nt.clone(),xn.setVerticesData(pe.b.MatricesWeightsKind,Xe,!1),xn.setVerticesData(pe.b.MatricesIndicesKind,An,!1),xn.convertToFlatShadedMesh(),k.push(xn)}});for(var $e=W.sphereBaseSize||.2,ct=E.a.CreateSphere("skeletonViewer",{segments:6,diameter:$e,updatable:!0},oe),st=ct.getTotalVertices(),mt=[],St=[],wt=0;wt h-c)&&!(g-v v-T)&&!(l-E E-A)},M.prototype.intersectsSphere=function(R){return M.IntersectsSphere(this.minimumWorld,this.maximumWorld,R.centerWorld,R.radiusWorld)},M.prototype.intersectsMinMax=function(R,C){var m=this.minimumWorld,c=this.maximumWorld,T=m.x,A=m.y,S=m.z,g=c.x,l=c.y,h=c.z,v=R.x,E=R.y,D=R.z,w=C.x,N=C.y,I=C.z;return!(g w)&&!(l N)&&!(h I)},M.Intersects=function(R,C){return R.intersectsMinMax(C.minimumWorld,C.maximumWorld)},M.IntersectsSphere=function(R,C,m,c){var T=M.TmpVector3[0];return _.e.ClampToRef(m,R,C,T),_.e.DistanceSquared(m,T)<=c*c},M.IsCompletelyInFrustum=function(R,C){for(var m=0;m<6;++m)for(var c=C[m],T=0;T<8;++T)if(c.dotCoordinate(R[T])<0)return!1;return!0},M.IsInFrustum=function(R,C){for(var m=0;m<6;++m){for(var c=!0,T=C[m],A=0;A<8;++A)if(T.dotCoordinate(R[A])>=0){c=!1;break}if(c)return!1}return!0},M.TmpVector3=U.a.BuildArray(3,_.e.Zero),M}()},function(Me,y,f){f.d(y,"a",function(){return _});var U=f(38),_=function(){function x(){}return x.SetImmediate=function(u){U.a.IsWindowObjectExist()&&window.setImmediate?window.setImmediate(u):setTimeout(u,1)},x}()},function(Me,y,f){f.d(y,"a",function(){return x});var U=f(0),_=f(2),x=function(){function u(){this.previousWorldMatrices={},this.previousBones={}}return u.AddUniforms=function(M){M.push("previousWorld","previousViewProjection")},u.AddSamplers=function(M){},u.prototype.bindForSubMesh=function(M,R,C,m,c){R.prePassRenderer&&R.prePassRenderer.enabled&&R.prePassRenderer.getIndex(_.a.PREPASS_VELOCITY_TEXTURE_TYPE)!==-1&&(this.previousWorldMatrices[C.uniqueId]||(this.previousWorldMatrices[C.uniqueId]=U.a.Identity()),this.previousViewProjection||(this.previousViewProjection=R.getTransformMatrix()),M.setMatrix("previousWorld",this.previousWorldMatrices[C.uniqueId]),M.setMatrix("previousViewProjection",this.previousViewProjection),this.previousWorldMatrices[C.uniqueId]=m.clone(),this.previousViewProjection=R.getTransformMatrix().clone())},u}()},function(Me,y,f){var U="lightFragmentDeclaration",_=`#ifdef LIGHT{X} -uniform vec4 vLightData{X}; -uniform vec4 vLightDiffuse{X}; -#ifdef SPECULARTERM -uniform vec4 vLightSpecular{X}; -#else -vec4 vLightSpecular{X}=vec4(0.); -#endif -#ifdef SHADOW{X} -#ifdef SHADOWCSM{X} -uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float cascadeBlendFactor{X}; -varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}]; -varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}]; -varying vec4 vPositionFromCamera{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -uniform highp sampler2DArray depthSampler{X}; -uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float penumbraDarkness{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -#else -uniform highp sampler2DArray shadowSampler{X}; -#endif -#ifdef SHADOWCSMDEBUG{X} -const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8] -( -vec3 ( 1.5,0.0,0.0 ), -vec3 ( 0.0,1.5,0.0 ), -vec3 ( 0.0,0.0,5.5 ), -vec3 ( 1.5,0.0,5.5 ), -vec3 ( 1.5,1.5,0.0 ), -vec3 ( 1.0,1.0,1.0 ), -vec3 ( 0.0,1.0,5.5 ), -vec3 ( 0.5,3.5,0.75 ) -); -vec3 shadowDebug{X}; -#endif -#ifdef SHADOWCSMUSESHADOWMAXZ{X} -int index{X}=-1; -#else -int index{X}=SHADOWCSMNUM_CASCADES{X}-1; -#endif -float diff{X}=0.; -#elif defined(SHADOWCUBE{X}) -uniform samplerCube shadowSampler{X}; -#else -varying vec4 vPositionFromLight{X}; -varying float vDepthMetric{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DShadow shadowSampler{X}; -uniform highp sampler2D depthSampler{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DShadow shadowSampler{X}; -#else -uniform sampler2D shadowSampler{X}; -#endif -uniform mat4 lightMatrix{X}; -#endif -uniform vec4 shadowsInfo{X}; -uniform vec2 depthValues{X}; -#endif -#ifdef SPOTLIGHT{X} -uniform vec4 vLightDirection{X}; -uniform vec4 vLightFalloff{X}; -#elif defined(POINTLIGHT{X}) -uniform vec4 vLightFalloff{X}; -#elif defined(HEMILIGHT{X}) -uniform vec3 vLightGround{X}; -#endif -#ifdef PROJECTEDLIGHTTEXTURE{X} -uniform mat4 textureProjectionMatrix{X}; -uniform sampler2D projectionLightSampler{X}; -#endif -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="lightUboDeclaration",_=`#ifdef LIGHT{X} -uniform Light{X} -{ -vec4 vLightData; -vec4 vLightDiffuse; -vec4 vLightSpecular; -#ifdef SPOTLIGHT{X} -vec4 vLightDirection; -vec4 vLightFalloff; -#elif defined(POINTLIGHT{X}) -vec4 vLightFalloff; -#elif defined(HEMILIGHT{X}) -vec3 vLightGround; -#endif -vec4 shadowsInfo; -vec2 depthValues; -} light{X}; -#ifdef PROJECTEDLIGHTTEXTURE{X} -uniform mat4 textureProjectionMatrix{X}; -uniform sampler2D projectionLightSampler{X}; -#endif -#ifdef SHADOW{X} -#ifdef SHADOWCSM{X} -uniform mat4 lightMatrix{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float viewFrustumZ{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float frustumLengths{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float cascadeBlendFactor{X}; -varying vec4 vPositionFromLight{X}[SHADOWCSMNUM_CASCADES{X}]; -varying float vDepthMetric{X}[SHADOWCSMNUM_CASCADES{X}]; -varying vec4 vPositionFromCamera{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -uniform highp sampler2DArray depthSampler{X}; -uniform vec2 lightSizeUVCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float depthCorrection{X}[SHADOWCSMNUM_CASCADES{X}]; -uniform float penumbraDarkness{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DArrayShadow shadowSampler{X}; -#else -uniform highp sampler2DArray shadowSampler{X}; -#endif -#ifdef SHADOWCSMDEBUG{X} -const vec3 vCascadeColorsMultiplier{X}[8]=vec3[8] -( -vec3 ( 1.5,0.0,0.0 ), -vec3 ( 0.0,1.5,0.0 ), -vec3 ( 0.0,0.0,5.5 ), -vec3 ( 1.5,0.0,5.5 ), -vec3 ( 1.5,1.5,0.0 ), -vec3 ( 1.0,1.0,1.0 ), -vec3 ( 0.0,1.0,5.5 ), -vec3 ( 0.5,3.5,0.75 ) -); -vec3 shadowDebug{X}; -#endif -#ifdef SHADOWCSMUSESHADOWMAXZ{X} -int index{X}=-1; -#else -int index{X}=SHADOWCSMNUM_CASCADES{X}-1; -#endif -float diff{X}=0.; -#elif defined(SHADOWCUBE{X}) -uniform samplerCube shadowSampler{X}; -#else -varying vec4 vPositionFromLight{X}; -varying float vDepthMetric{X}; -#if defined(SHADOWPCSS{X}) -uniform highp sampler2DShadow shadowSampler{X}; -uniform highp sampler2D depthSampler{X}; -#elif defined(SHADOWPCF{X}) -uniform highp sampler2DShadow shadowSampler{X}; -#else -uniform sampler2D shadowSampler{X}; -#endif -uniform mat4 lightMatrix{X}; -#endif -#endif -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="imageProcessingDeclaration",_=`#ifdef EXPOSURE -uniform float exposureLinear; -#endif -#ifdef CONTRAST -uniform float contrast; -#endif -#ifdef VIGNETTE -uniform vec2 vInverseScreenSize; -uniform vec4 vignetteSettings1; -uniform vec4 vignetteSettings2; -#endif -#ifdef COLORCURVES -uniform vec4 vCameraColorCurveNegative; -uniform vec4 vCameraColorCurveNeutral; -uniform vec4 vCameraColorCurvePositive; -#endif -#ifdef COLORGRADING -#ifdef COLORGRADING3D -uniform highp sampler3D txColorTransform; -#else -uniform sampler2D txColorTransform; -#endif -uniform vec4 colorTransformSettings; -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="imageProcessingFunctions",_=`#if defined(COLORGRADING) && !defined(COLORGRADING3D) - -#define inline -vec3 sampleTexture3D(sampler2D colorTransform,vec3 color,vec2 sampler3dSetting) -{ -float sliceSize=2.0*sampler3dSetting.x; -#ifdef SAMPLER3DGREENDEPTH -float sliceContinuous=(color.g-sampler3dSetting.x)*sampler3dSetting.y; -#else -float sliceContinuous=(color.b-sampler3dSetting.x)*sampler3dSetting.y; -#endif -float sliceInteger=floor(sliceContinuous); - - -float sliceFraction=sliceContinuous-sliceInteger; -#ifdef SAMPLER3DGREENDEPTH -vec2 sliceUV=color.rb; -#else -vec2 sliceUV=color.rg; -#endif -sliceUV.x*=sliceSize; -sliceUV.x+=sliceInteger*sliceSize; -sliceUV=saturate(sliceUV); -vec4 slice0Color=texture2D(colorTransform,sliceUV); -sliceUV.x+=sliceSize; -sliceUV=saturate(sliceUV); -vec4 slice1Color=texture2D(colorTransform,sliceUV); -vec3 result=mix(slice0Color.rgb,slice1Color.rgb,sliceFraction); -#ifdef SAMPLER3DBGRMAP -color.rgb=result.rgb; -#else -color.rgb=result.bgr; -#endif -return color; -} -#endif -#ifdef TONEMAPPING_ACES - - - - - -const mat3 ACESInputMat=mat3( -vec3(0.59719,0.07600,0.02840), -vec3(0.35458,0.90834,0.13383), -vec3(0.04823,0.01566,0.83777) -); - -const mat3 ACESOutputMat=mat3( -vec3( 1.60475,-0.10208,-0.00327), -vec3(-0.53108,1.10813,-0.07276), -vec3(-0.07367,-0.00605,1.07602) -); -vec3 RRTAndODTFit(vec3 v) -{ -vec3 a=v*(v+0.0245786)-0.000090537; -vec3 b=v*(0.983729*v+0.4329510)+0.238081; -return a/b; -} -vec3 ACESFitted(vec3 color) -{ -color=ACESInputMat*color; - -color=RRTAndODTFit(color); -color=ACESOutputMat*color; - -color=saturate(color); -return color; -} -#endif -vec4 applyImageProcessing(vec4 result) { -#ifdef EXPOSURE -result.rgb*=exposureLinear; -#endif -#ifdef VIGNETTE - -vec2 viewportXY=gl_FragCoord.xy*vInverseScreenSize; -viewportXY=viewportXY*2.0-1.0; -vec3 vignetteXY1=vec3(viewportXY*vignetteSettings1.xy+vignetteSettings1.zw,1.0); -float vignetteTerm=dot(vignetteXY1,vignetteXY1); -float vignette=pow(vignetteTerm,vignetteSettings2.w); - -vec3 vignetteColor=vignetteSettings2.rgb; -#ifdef VIGNETTEBLENDMODEMULTIPLY -vec3 vignetteColorMultiplier=mix(vignetteColor,vec3(1,1,1),vignette); -result.rgb*=vignetteColorMultiplier; -#endif -#ifdef VIGNETTEBLENDMODEOPAQUE -result.rgb=mix(vignetteColor,result.rgb,vignette); -#endif -#endif -#ifdef TONEMAPPING -#ifdef TONEMAPPING_ACES -result.rgb=ACESFitted(result.rgb); -#else -const float tonemappingCalibration=1.590579; -result.rgb=1.0-exp2(-tonemappingCalibration*result.rgb); -#endif -#endif - -result.rgb=toGammaSpace(result.rgb); -result.rgb=saturate(result.rgb); -#ifdef CONTRAST - -vec3 resultHighContrast=result.rgb*result.rgb*(3.0-2.0*result.rgb); -if (contrast<1.0) { - -result.rgb=mix(vec3(0.5,0.5,0.5),result.rgb,contrast); -} else { - -result.rgb=mix(result.rgb,resultHighContrast,contrast-1.0); -} -#endif - -#ifdef COLORGRADING -vec3 colorTransformInput=result.rgb*colorTransformSettings.xxx+colorTransformSettings.yyy; -#ifdef COLORGRADING3D -vec3 colorTransformOutput=texture(txColorTransform,colorTransformInput).rgb; -#else -vec3 colorTransformOutput=sampleTexture3D(txColorTransform,colorTransformInput,colorTransformSettings.yz).rgb; -#endif -result.rgb=mix(result.rgb,colorTransformOutput,colorTransformSettings.www); -#endif -#ifdef COLORCURVES - -float luma=getLuminance(result.rgb); -vec2 curveMix=clamp(vec2(luma*3.0-1.5,luma*-3.0+1.5),vec2(0.0),vec2(1.0)); -vec4 colorCurve=vCameraColorCurveNeutral+curveMix.x*vCameraColorCurvePositive-curveMix.y*vCameraColorCurveNegative; -result.rgb*=colorCurve.rgb; -result.rgb=mix(vec3(luma),result.rgb,colorCurve.a); -#endif -return result; -}`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="clipPlaneFragment",_=`#ifdef CLIPPLANE -if (fClipDistance>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE2 -if (fClipDistance2>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE3 -if (fClipDistance3>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE4 -if (fClipDistance4>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE5 -if (fClipDistance5>0.0) -{ -discard; -} -#endif -#ifdef CLIPPLANE6 -if (fClipDistance6>0.0) -{ -discard; -} -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U="clipPlaneVertex",_=`#ifdef CLIPPLANE -fClipDistance=dot(worldPos,vClipPlane); -#endif -#ifdef CLIPPLANE2 -fClipDistance2=dot(worldPos,vClipPlane2); -#endif -#ifdef CLIPPLANE3 -fClipDistance3=dot(worldPos,vClipPlane3); -#endif -#ifdef CLIPPLANE4 -fClipDistance4=dot(worldPos,vClipPlane4); -#endif -#ifdef CLIPPLANE5 -fClipDistance5=dot(worldPos,vClipPlane5); -#endif -#ifdef CLIPPLANE6 -fClipDistance6=dot(worldPos,vClipPlane6); -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){f.d(y,"a",function(){return U});var U=function(){function _(){this._count=0,this._data={}}return _.prototype.copyFrom=function(x){var u=this;this.clear(),x.forEach(function(M,R){return u.add(M,R)})},_.prototype.get=function(x){var u=this._data[x];if(u!==void 0)return u},_.prototype.getOrAddWithFactory=function(x,u){var M=this.get(x);return M!==void 0||(M=u(x))&&this.add(x,M),M},_.prototype.getOrAdd=function(x,u){var M=this.get(x);return M!==void 0?M:(this.add(x,u),u)},_.prototype.contains=function(x){return this._data[x]!==void 0},_.prototype.add=function(x,u){return this._data[x]===void 0&&(this._data[x]=u,++this._count,!0)},_.prototype.set=function(x,u){return this._data[x]!==void 0&&(this._data[x]=u,!0)},_.prototype.getAndRemove=function(x){var u=this.get(x);return u!==void 0?(delete this._data[x],--this._count,u):null},_.prototype.remove=function(x){return!!this.contains(x)&&(delete this._data[x],--this._count,!0)},_.prototype.clear=function(){this._data={},this._count=0},Object.defineProperty(_.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),_.prototype.forEach=function(x){for(var u in this._data)x(u,this._data[u])},_.prototype.first=function(x){for(var u in this._data){var M=x(u,this._data[u]);if(M)return M}return null},_}()},function(Me,y,f){f.d(y,"a",function(){return x});var U=f(44),_=f(0),x=function(){function u(M,R,C){this.center=_.e.Zero(),this.centerWorld=_.e.Zero(),this.minimum=_.e.Zero(),this.maximum=_.e.Zero(),this.reConstruct(M,R,C)}return u.prototype.reConstruct=function(M,R,C){this.minimum.copyFrom(M),this.maximum.copyFrom(R);var m=_.e.Distance(M,R);R.addToRef(M,this.center).scaleInPlace(.5),this.radius=.5*m,this._update(C||_.a.IdentityReadOnly)},u.prototype.scale=function(M){var R=this.radius*M,C=u.TmpVector3,m=C[0].setAll(R),c=this.center.subtractToRef(m,C[1]),T=this.center.addToRef(m,C[2]);return this.reConstruct(c,T,this._worldMatrix),this},u.prototype.getWorldMatrix=function(){return this._worldMatrix},u.prototype._update=function(M){if(M.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{_.e.TransformCoordinatesToRef(this.center,M,this.centerWorld);var R=u.TmpVector3[0];_.e.TransformNormalFromFloatsToRef(1,1,1,M,R),this.radiusWorld=Math.max(Math.abs(R.x),Math.abs(R.y),Math.abs(R.z))*this.radius}},u.prototype.isInFrustum=function(M){for(var R=this.centerWorld,C=this.radiusWorld,m=0;m<6;m++)if(M[m].dotCoordinate(R)<=-C)return!1;return!0},u.prototype.isCenterInFrustum=function(M){for(var R=this.centerWorld,C=0;C<6;C++)if(M[C].dotCoordinate(R)<0)return!1;return!0},u.prototype.intersectsPoint=function(M){var R=_.e.DistanceSquared(this.centerWorld,M);return!(this.radiusWorld*this.radiusWorld =R&&u===0?x instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,u,new Float32Array(x)):this._gl.bufferSubData(this._gl.ARRAY_BUFFER,u,x):x instanceof Array?this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,new Float32Array(x).subarray(u,u+M)):(x=x instanceof ArrayBuffer?new Uint8Array(x,u,M):new Uint8Array(x.buffer,x.byteOffset+u,M),this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,x)),this._resetVertexBufferBinding()}},function(Me,y,f){var U="fogFragmentDeclaration",_=`#ifdef FOG -#define FOGMODE_NONE 0. -#define FOGMODE_EXP 1. -#define FOGMODE_EXP2 2. -#define FOGMODE_LINEAR 3. -#define E 2.71828 -uniform vec4 vFogInfos; -uniform vec3 vFogColor; -varying vec3 vFogDistance; -float CalcFogFactor() -{ -float fogCoeff=1.0; -float fogStart=vFogInfos.y; -float fogEnd=vFogInfos.z; -float fogDensity=vFogInfos.w; -float fogDistance=length(vFogDistance); -if (FOGMODE_LINEAR == vFogInfos.x) -{ -fogCoeff=(fogEnd-fogDistance)/(fogEnd-fogStart); -} -else if (FOGMODE_EXP == vFogInfos.x) -{ -fogCoeff=1.0/pow(E,fogDistance*fogDensity); -} -else if (FOGMODE_EXP2 == vFogInfos.x) -{ -fogCoeff=1.0/pow(E,fogDistance*fogDistance*fogDensity*fogDensity); -} -return clamp(fogCoeff,0.0,1.0); -} -#endif`;f(5).a.IncludesShadersStore[U]=_},function(Me,y,f){var U=f(26),_=f(27);U.a.prototype.createDynamicTexture=function(x,u,M,R){var C=new _.a(this,_.b.Dynamic);return C.baseWidth=x,C.baseHeight=u,M&&(x=this.needPOTTextures?U.a.GetExponentOfTwo(x,this._caps.maxTextureSize):x,u=this.needPOTTextures?U.a.GetExponentOfTwo(u,this._caps.maxTextureSize):u),C.width=x,C.height=u,C.isReady=!1,C.generateMipMaps=M,C.samplingMode=R,this.updateTextureSamplingMode(R,C),this._internalTexturesCache.push(C),C},U.a.prototype.updateDynamicTexture=function(x,u,M,R,C,m){if(R===void 0&&(R=!1),m===void 0&&(m=!1),x){var c=this._gl,T=c.TEXTURE_2D,A=this._bindTextureDirectly(T,x,!0,m);this._unpackFlipY(M===void 0?x.invertY:M),R&&c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,1);var S=this._getWebGLTextureType(x.type),g=this._getInternalFormat(C||x.format),l=this._getRGBABufferInternalSizedFormat(x.type,g);c.texImage2D(T,0,l,g,S,u),x.generateMipMaps&&c.generateMipmap(T),A||this._bindTextureDirectly(T,null),R&&c.pixelStorei(c.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),x.isReady=!0}}},function(Me,y,f){f.r(y),f.d(y,"AbstractScene",function(){return U.a}),f.d(y,"AbstractActionManager",function(){return _.a}),f.d(y,"Action",function(){return C}),f.d(y,"ActionEvent",function(){return m.a}),f.d(y,"ActionManager",function(){return pe}),f.d(y,"Condition",function(){return T}),f.d(y,"ValueCondition",function(){return A}),f.d(y,"PredicateCondition",function(){return S}),f.d(y,"StateCondition",function(){return g}),f.d(y,"SwitchBooleanAction",function(){return v}),f.d(y,"SetStateAction",function(){return E}),f.d(y,"SetValueAction",function(){return D}),f.d(y,"IncrementValueAction",function(){return w}),f.d(y,"PlayAnimationAction",function(){return N}),f.d(y,"StopAnimationAction",function(){return I}),f.d(y,"DoNothingAction",function(){return V}),f.d(y,"CombineAction",function(){return X}),f.d(y,"ExecuteCodeAction",function(){return j}),f.d(y,"SetParentAction",function(){return ne}),f.d(y,"PlaySoundAction",function(){return ae}),f.d(y,"StopSoundAction",function(){return ee}),f.d(y,"InterpolateValueAction",function(){return H}),f.d(y,"Animatable",function(){return ke}),f.d(y,"_IAnimationState",function(){return Y}),f.d(y,"Animation",function(){return k}),f.d(y,"TargetedAnimation",function(){return We}),f.d(y,"AnimationGroup",function(){return je}),f.d(y,"AnimationPropertiesOverride",function(){return He}),f.d(y,"EasingFunction",function(){return Ge}),f.d(y,"CircleEase",function(){return nt}),f.d(y,"BackEase",function(){return $e}),f.d(y,"BounceEase",function(){return ct}),f.d(y,"CubicEase",function(){return st}),f.d(y,"ElasticEase",function(){return mt}),f.d(y,"ExponentialEase",function(){return St}),f.d(y,"PowerEase",function(){return wt}),f.d(y,"QuadraticEase",function(){return It}),f.d(y,"QuarticEase",function(){return Pt}),f.d(y,"QuinticEase",function(){return Ot}),f.d(y,"SineEase",function(){return on}),f.d(y,"BezierCurveEase",function(){return Zt}),f.d(y,"RuntimeAnimation",function(){return me}),f.d(y,"AnimationEvent",function(){return tn}),f.d(y,"AnimationKeyInterpolation",function(){return K}),f.d(y,"AnimationRange",function(){return G}),f.d(y,"KeepAssets",function(){return Pn}),f.d(y,"InstantiatedEntries",function(){return nn}),f.d(y,"AssetContainer",function(){return Cn}),f.d(y,"Analyser",function(){return xn}),f.d(y,"AudioEngine",function(){return dr}),f.d(y,"AudioSceneComponent",function(){return ni}),f.d(y,"Sound",function(){return ti}),f.d(y,"SoundTrack",function(){return Lo}),f.d(y,"WeightedSound",function(){return If}),f.d(y,"AutoRotationBehavior",function(){return dl}),f.d(y,"BouncingBehavior",function(){return fl}),f.d(y,"FramingBehavior",function(){return pl}),f.d(y,"AttachToBoxBehavior",function(){return Df}),f.d(y,"FadeInOutBehavior",function(){return Lf}),f.d(y,"MultiPointerScaleBehavior",function(){return Nf}),f.d(y,"PointerDragBehavior",function(){return yi.a}),f.d(y,"SixDofDragBehavior",function(){return _l}),f.d(y,"Bone",function(){return Be}),f.d(y,"BoneIKController",function(){return wf}),f.d(y,"BoneLookController",function(){return Ff}),f.d(y,"Skeleton",function(){return No}),f.d(y,"ArcRotateCameraGamepadInput",function(){return ja}),f.d(y,"ArcRotateCameraKeyboardMoveInput",function(){return Ha}),f.d(y,"ArcRotateCameraMouseWheelInput",function(){return Wa}),f.d(y,"ArcRotateCameraPointersInput",function(){return Xa}),f.d(y,"ArcRotateCameraVRDeviceOrientationInput",function(){return Ya}),f.d(y,"FlyCameraKeyboardInput",function(){return Ka}),f.d(y,"FlyCameraMouseInput",function(){return Qa}),f.d(y,"FollowCameraKeyboardMoveInput",function(){return qa}),f.d(y,"FollowCameraMouseWheelInput",function(){return Za}),f.d(y,"FollowCameraPointersInput",function(){return Ja}),f.d(y,"FreeCameraDeviceOrientationInput",function(){return is}),f.d(y,"FreeCameraGamepadInput",function(){return rs}),f.d(y,"FreeCameraKeyboardMoveInput",function(){return $a}),f.d(y,"FreeCameraMouseInput",function(){return es}),f.d(y,"FreeCameraMouseWheelInput",function(){return ts}),f.d(y,"FreeCameraTouchInput",function(){return ns}),f.d(y,"FreeCameraVirtualJoystickInput",function(){return as}),f.d(y,"CameraInputTypes",function(){return hn}),f.d(y,"CameraInputsManager",function(){return $r}),f.d(y,"Camera",function(){return gt.a}),f.d(y,"TargetCamera",function(){return Ni}),f.d(y,"FreeCamera",function(){return Yn}),f.d(y,"FreeCameraInputsManager",function(){return eo}),f.d(y,"TouchCamera",function(){return ss}),f.d(y,"ArcRotateCamera",function(){return Ji}),f.d(y,"ArcRotateCameraInputsManager",function(){return wo}),f.d(y,"DeviceOrientationCamera",function(){return Fo}),f.d(y,"FlyCamera",function(){return Vf}),f.d(y,"FlyCameraInputsManager",function(){return El}),f.d(y,"FollowCamera",function(){return Al}),f.d(y,"ArcFollowCamera",function(){return Pl}),f.d(y,"FollowCameraInputsManager",function(){return Sl}),f.d(y,"GamepadCamera",function(){return Bo}),f.d(y,"AnaglyphArcRotateCamera",function(){return Il}),f.d(y,"AnaglyphFreeCamera",function(){return Dl}),f.d(y,"AnaglyphGamepadCamera",function(){return Ll}),f.d(y,"AnaglyphUniversalCamera",function(){return Nl}),f.d(y,"StereoscopicArcRotateCamera",function(){return wl}),f.d(y,"StereoscopicFreeCamera",function(){return Fl}),f.d(y,"StereoscopicGamepadCamera",function(){return Bl}),f.d(y,"StereoscopicUniversalCamera",function(){return Ul}),f.d(y,"UniversalCamera",function(){return _r}),f.d(y,"VirtualJoysticksCamera",function(){return Vl}),f.d(y,"VRCameraMetrics",function(){return mr}),f.d(y,"VRDeviceOrientationArcRotateCamera",function(){return jl}),f.d(y,"VRDeviceOrientationFreeCamera",function(){return Uo}),f.d(y,"VRDeviceOrientationGamepadCamera",function(){return Hl}),f.d(y,"OnAfterEnteringVRObservableEvent",function(){return Qf}),f.d(y,"VRExperienceHelper",function(){return Kl}),f.d(y,"WebVRFreeCamera",function(){return ko}),f.d(y,"Collider",function(){return Ql}),f.d(y,"DefaultCollisionCoordinator",function(){return ql}),f.d(y,"PickingInfo",function(){return nr.a}),f.d(y,"IntersectionInfo",function(){return qf.a}),f.d(y,"_MeshCollisionData",function(){return Zf.a}),f.d(y,"BoundingBox",function(){return ms.a}),f.d(y,"BoundingInfo",function(){return Vi.a}),f.d(y,"BoundingSphere",function(){return Zl.a}),f.d(y,"Octree",function(){return no}),f.d(y,"OctreeBlock",function(){return Jl}),f.d(y,"OctreeSceneComponent",function(){return Ts}),f.d(y,"Ray",function(){return fn.a}),f.d(y,"AxesViewer",function(){return ir.AxesViewer}),f.d(y,"BoneAxesViewer",function(){return ir.BoneAxesViewer}),f.d(y,"DebugLayerTab",function(){return ir.DebugLayerTab}),f.d(y,"DebugLayer",function(){return ir.DebugLayer}),f.d(y,"PhysicsViewer",function(){return ir.PhysicsViewer}),f.d(y,"RayHelper",function(){return ir.RayHelper}),f.d(y,"SkeletonViewer",function(){return ir.SkeletonViewer}),f.d(y,"DeviceInputSystem",function(){return $l}),f.d(y,"DeviceType",function(){return Kt}),f.d(y,"PointerInput",function(){return gs}),f.d(y,"DualShockInput",function(){return vs}),f.d(y,"XboxInput",function(){return bs}),f.d(y,"SwitchInput",function(){return ys}),f.d(y,"DeviceSource",function(){return eu}),f.d(y,"DeviceSourceManager",function(){return Jf}),f.d(y,"Constants",function(){return h.a}),f.d(y,"ThinEngine",function(){return Bt.a}),f.d(y,"Engine",function(){return Ue.a}),f.d(y,"EngineStore",function(){return te.a}),f.d(y,"NullEngineOptions",function(){return tu.b}),f.d(y,"NullEngine",function(){return tu.a}),f.d(y,"_OcclusionDataStorage",function(){return iu}),f.d(y,"_forceTransformFeedbackToBundle",function(){return $f}),f.d(y,"EngineView",function(){return ep}),f.d(y,"WebGLPipelineContext",function(){return np.a}),f.d(y,"WebGL2ShaderProcessor",function(){return ru.a}),f.d(y,"NativeEngine",function(){return sp}),f.d(y,"ShaderCodeInliner",function(){return Ss}),f.d(y,"PerformanceConfigurator",function(){return cp.a}),f.d(y,"KeyboardEventTypes",function(){return Zi.a}),f.d(y,"KeyboardInfo",function(){return Zi.b}),f.d(y,"KeyboardInfoPre",function(){return Zi.c}),f.d(y,"PointerEventTypes",function(){return Tt.a}),f.d(y,"PointerInfoBase",function(){return Tt.c}),f.d(y,"PointerInfoPre",function(){return Tt.d}),f.d(y,"PointerInfo",function(){return Tt.b}),f.d(y,"ClipboardEventTypes",function(){return Ho}),f.d(y,"ClipboardInfo",function(){return lp}),f.d(y,"DaydreamController",function(){return Ps}),f.d(y,"GearVRController",function(){return Cs}),f.d(y,"GenericController",function(){return Wo}),f.d(y,"OculusTouchController",function(){return xs}),f.d(y,"PoseEnabledControllerType",function(){return ri}),f.d(y,"PoseEnabledControllerHelper",function(){return wi}),f.d(y,"PoseEnabledController",function(){return pr}),f.d(y,"ViveController",function(){return cu}),f.d(y,"WebVRController",function(){return Bi}),f.d(y,"WindowsMotionController",function(){return Xo}),f.d(y,"XRWindowsMotionController",function(){return hp}),f.d(y,"StickValues",function(){return Bf}),f.d(y,"Gamepad",function(){return dn}),f.d(y,"GenericPad",function(){return bl}),f.d(y,"GamepadManager",function(){return Rl}),f.d(y,"GamepadSystemSceneComponent",function(){return Ol}),f.d(y,"Xbox360Button",function(){return Rn}),f.d(y,"Xbox360Dpad",function(){return $i}),f.d(y,"Xbox360Pad",function(){return Cl}),f.d(y,"DualShockButton",function(){return Gn}),f.d(y,"DualShockDpad",function(){return er}),f.d(y,"DualShockPad",function(){return xl}),f.d(y,"AxisDragGizmo",function(){return Yo.a}),f.d(y,"AxisScaleGizmo",function(){return oo}),f.d(y,"BoundingBoxGizmo",function(){return lu}),f.d(y,"Gizmo",function(){return wn.a}),f.d(y,"GizmoManager",function(){return dp}),f.d(y,"PlaneRotationGizmo",function(){return Ko}),f.d(y,"PositionGizmo",function(){return hu}),f.d(y,"RotationGizmo",function(){return uu}),f.d(y,"ScaleGizmo",function(){return du}),f.d(y,"LightGizmo",function(){return fp}),f.d(y,"CameraGizmo",function(){return _p}),f.d(y,"PlaneDragGizmo",function(){return Qo}),f.d(y,"EnvironmentHelper",function(){return Ls}),f.d(y,"PhotoDome",function(){return xp}),f.d(y,"_forceSceneHelpersToBundle",function(){return v_}),f.d(y,"VideoDome",function(){return b_}),f.d(y,"EngineInstrumentation",function(){return y_}),f.d(y,"SceneInstrumentation",function(){return T_}),f.d(y,"_TimeToken",function(){return nu}),f.d(y,"EffectLayer",function(){return po}),f.d(y,"EffectLayerSceneComponent",function(){return Ou}),f.d(y,"GlowLayer",function(){return ra}),f.d(y,"HighlightLayer",function(){return Gs}),f.d(y,"Layer",function(){return O_}),f.d(y,"LayerSceneComponent",function(){return Iu}),f.d(y,"LensFlare",function(){return Du}),f.d(y,"LensFlareSystem",function(){return zs}),f.d(y,"LensFlareSystemSceneComponent",function(){return Lu}),f.d(y,"Light",function(){return xi.a}),f.d(y,"ShadowLight",function(){return qo}),f.d(y,"ShadowGenerator",function(){return Un}),f.d(y,"CascadedShadowGenerator",function(){return js}),f.d(y,"ShadowGeneratorSceneComponent",function(){return ku}),f.d(y,"DirectionalLight",function(){return Os}),f.d(y,"HemisphericLight",function(){return Vo.a}),f.d(y,"PointLight",function(){return Hs}),f.d(y,"SpotLight",function(){return Ms}),f.d(y,"DefaultLoadingScreen",function(){return Gu}),f.d(y,"_BabylonLoaderRegistered",function(){return K_}),f.d(y,"BabylonFileLoaderConfiguration",function(){return la}),f.d(y,"SceneLoaderAnimationGroupLoadingMode",function(){return Pi}),f.d(y,"SceneLoader",function(){return Ut}),f.d(y,"SceneLoaderFlags",function(){return Ci.a}),f.d(y,"BackgroundMaterial",function(){return so}),f.d(y,"ColorCurves",function(){return q_.a}),f.d(y,"EffectFallbacks",function(){return Sr.a}),f.d(y,"Effect",function(){return ze.a}),f.d(y,"FresnelParameters",function(){return $u}),f.d(y,"ImageProcessingConfigurationDefines",function(){return yn.b}),f.d(y,"ImageProcessingConfiguration",function(){return yn.a}),f.d(y,"Material",function(){return Ht.a}),f.d(y,"MaterialDefines",function(){return Jo.a}),f.d(y,"ThinMaterialHelper",function(){return eh.a}),f.d(y,"MaterialHelper",function(){return et.a}),f.d(y,"MultiMaterial",function(){return rr.a}),f.d(y,"PBRMaterialDefines",function(){return ws}),f.d(y,"PBRBaseMaterial",function(){return _n}),f.d(y,"PBRBaseSimpleMaterial",function(){return Qs}),f.d(y,"PBRMaterial",function(){return uo}),f.d(y,"PBRMetallicRoughnessMaterial",function(){return th}),f.d(y,"PBRSpecularGlossinessMaterial",function(){return nh}),f.d(y,"PushMaterial",function(){return $o.a}),f.d(y,"ShaderMaterial",function(){return ua.a}),f.d(y,"StandardMaterialDefines",function(){return Ft.b}),f.d(y,"StandardMaterial",function(){return Ft.a}),f.d(y,"BaseTexture",function(){return zn.a}),f.d(y,"ColorGradingTexture",function(){return ih}),f.d(y,"CubeTexture",function(){return ai}),f.d(y,"DynamicTexture",function(){return Ti.a}),f.d(y,"EquiRectangularCubeTexture",function(){return rh}),f.d(y,"HDRFiltering",function(){return Wu}),f.d(y,"HDRCubeTexture",function(){return aa}),f.d(y,"HtmlElementTexture",function(){return Z_}),f.d(y,"InternalTextureSource",function(){return xt.b}),f.d(y,"InternalTexture",function(){return xt.a}),f.d(y,"_DDSTextureLoader",function(){return gu}),f.d(y,"_ENVTextureLoader",function(){return vu}),f.d(y,"_KTXTextureLoader",function(){return bu}),f.d(y,"_TGATextureLoader",function(){return oh}),f.d(y,"_BasisTextureLoader",function(){return ah}),f.d(y,"MirrorTexture",function(){return Ds}),f.d(y,"MultiRenderTarget",function(){return qs}),f.d(y,"TexturePacker",function(){return em}),f.d(y,"TexturePackerFrame",function(){return Zs}),f.d(y,"CustomProceduralTexture",function(){return nm}),f.d(y,"NoiseProceduralTexture",function(){return ch}),f.d(y,"ProceduralTexture",function(){return go}),f.d(y,"ProceduralTextureSceneComponent",function(){return sh}),f.d(y,"RawCubeTexture",function(){return rm}),f.d(y,"RawTexture",function(){return ii}),f.d(y,"RawTexture2DArray",function(){return om}),f.d(y,"RawTexture3D",function(){return am}),f.d(y,"RefractionTexture",function(){return sm}),f.d(y,"RenderTargetTexture",function(){return sn}),f.d(y,"Texture",function(){return we.a}),f.d(y,"VideoTexture",function(){return Ru}),f.d(y,"UniformBuffer",function(){return kl.a}),f.d(y,"MaterialFlags",function(){return ht.a}),f.d(y,"NodeMaterialBlockTargets",function(){return xe}),f.d(y,"NodeMaterialBlockConnectionPointTypes",function(){return le}),f.d(y,"NodeMaterialBlockConnectionPointMode",function(){return bn}),f.d(y,"NodeMaterialSystemValues",function(){return bt}),f.d(y,"NodeMaterialModes",function(){return Mn}),f.d(y,"NodeMaterialConnectionPointCompatibilityStates",function(){return li}),f.d(y,"NodeMaterialConnectionPointDirection",function(){return Tn}),f.d(y,"NodeMaterialConnectionPoint",function(){return da}),f.d(y,"NodeMaterialBlock",function(){return pt}),f.d(y,"NodeMaterialDefines",function(){return To}),f.d(y,"NodeMaterial",function(){return ga}),f.d(y,"VertexOutputBlock",function(){return vo}),f.d(y,"BonesBlock",function(){return fh}),f.d(y,"InstancesBlock",function(){return ph}),f.d(y,"MorphTargetsBlock",function(){return _h}),f.d(y,"LightInformationBlock",function(){return mh}),f.d(y,"FragmentOutputBlock",function(){return Lr}),f.d(y,"ImageProcessingBlock",function(){return gh}),f.d(y,"PerturbNormalBlock",function(){return vh}),f.d(y,"DiscardBlock",function(){return bh}),f.d(y,"FrontFacingBlock",function(){return yh}),f.d(y,"DerivativeBlock",function(){return Th}),f.d(y,"FragCoordBlock",function(){return Eh}),f.d(y,"ScreenSizeBlock",function(){return Sh}),f.d(y,"FogBlock",function(){return Ah}),f.d(y,"LightBlock",function(){return Ph}),f.d(y,"TextureBlock",function(){return Ch}),f.d(y,"ReflectionTextureBlock",function(){return xh}),f.d(y,"CurrentScreenBlock",function(){return $s}),f.d(y,"InputBlock",function(){return At}),f.d(y,"AnimatedInputBlockTypes",function(){return ji}),f.d(y,"MultiplyBlock",function(){return pa}),f.d(y,"AddBlock",function(){return Rh}),f.d(y,"ScaleBlock",function(){return Oh}),f.d(y,"ClampBlock",function(){return Mh}),f.d(y,"CrossBlock",function(){return Ih}),f.d(y,"DotBlock",function(){return Dh}),f.d(y,"TransformBlock",function(){return fa}),f.d(y,"RemapBlock",function(){return ic}),f.d(y,"NormalizeBlock",function(){return Lh}),f.d(y,"TrigonometryBlockOperations",function(){return rn}),f.d(y,"TrigonometryBlock",function(){return uc}),f.d(y,"ColorMergerBlock",function(){return Nh}),f.d(y,"VectorMergerBlock",function(){return bo}),f.d(y,"ColorSplitterBlock",function(){return lc}),f.d(y,"VectorSplitterBlock",function(){return wh}),f.d(y,"LerpBlock",function(){return Fh}),f.d(y,"DivideBlock",function(){return Bh}),f.d(y,"SubtractBlock",function(){return Uh}),f.d(y,"StepBlock",function(){return Vh}),f.d(y,"OneMinusBlock",function(){return fc}),f.d(y,"ViewDirectionBlock",function(){return pc}),f.d(y,"FresnelBlock",function(){return kh}),f.d(y,"MaxBlock",function(){return Gh}),f.d(y,"MinBlock",function(){return zh}),f.d(y,"DistanceBlock",function(){return jh}),f.d(y,"LengthBlock",function(){return Hh}),f.d(y,"NegateBlock",function(){return Wh}),f.d(y,"PowBlock",function(){return Xh}),f.d(y,"RandomNumberBlock",function(){return Yh}),f.d(y,"ArcTan2Block",function(){return Kh}),f.d(y,"SmoothStepBlock",function(){return Qh}),f.d(y,"ReciprocalBlock",function(){return qh}),f.d(y,"ReplaceColorBlock",function(){return Zh}),f.d(y,"PosterizeBlock",function(){return Jh}),f.d(y,"WaveBlockKind",function(){return or}),f.d(y,"WaveBlock",function(){return $h}),f.d(y,"GradientBlockColorStep",function(){return va}),f.d(y,"GradientBlock",function(){return ed}),f.d(y,"NLerpBlock",function(){return td}),f.d(y,"WorleyNoise3DBlock",function(){return nd}),f.d(y,"SimplexPerlin3DBlock",function(){return id}),f.d(y,"NormalBlendBlock",function(){return rd}),f.d(y,"Rotate2dBlock",function(){return od}),f.d(y,"ReflectBlock",function(){return ad}),f.d(y,"RefractBlock",function(){return sd}),f.d(y,"DesaturateBlock",function(){return cd}),f.d(y,"PBRMetallicRoughnessBlock",function(){return ld}),f.d(y,"SheenBlock",function(){return _c}),f.d(y,"AnisotropyBlock",function(){return mc}),f.d(y,"ReflectionBlock",function(){return gc}),f.d(y,"ClearCoatBlock",function(){return ba}),f.d(y,"RefractionBlock",function(){return vc}),f.d(y,"SubSurfaceBlock",function(){return ya}),f.d(y,"ParticleTextureBlock",function(){return ec}),f.d(y,"ParticleRampGradientBlock",function(){return tc}),f.d(y,"ParticleBlendMultiplyBlock",function(){return nc}),f.d(y,"ModBlock",function(){return ud}),f.d(y,"NodeMaterialOptimizer",function(){return dm}),f.d(y,"PropertyTypeForEdition",function(){return Lt}),f.d(y,"editableInPropertyPage",function(){return Vt}),f.d(y,"EffectRenderer",function(){return ju}),f.d(y,"EffectWrapper",function(){return Hu}),f.d(y,"ShadowDepthWrapper",function(){return _m}),f.d(y,"Scalar",function(){return $.a}),f.d(y,"extractMinAndMaxIndexed",function(){return hd.b}),f.d(y,"extractMinAndMax",function(){return hd.a}),f.d(y,"Space",function(){return ye.c}),f.d(y,"Axis",function(){return ye.a}),f.d(y,"Coordinate",function(){return ye.b}),f.d(y,"Color3",function(){return M.a}),f.d(y,"Color4",function(){return M.b}),f.d(y,"TmpColors",function(){return M.c}),f.d(y,"ToGammaSpace",function(){return Gt.b}),f.d(y,"ToLinearSpace",function(){return Gt.c}),f.d(y,"Epsilon",function(){return Gt.a}),f.d(y,"Frustum",function(){return zl.a}),f.d(y,"Orientation",function(){return qe.e}),f.d(y,"BezierCurve",function(){return qe.c}),f.d(y,"Angle",function(){return qe.a}),f.d(y,"Arc2",function(){return qe.b}),f.d(y,"Path2",function(){return qe.f}),f.d(y,"Path3D",function(){return qe.g}),f.d(y,"Curve3",function(){return qe.d}),f.d(y,"Plane",function(){return vr.a}),f.d(y,"Size",function(){return oe.a}),f.d(y,"Vector2",function(){return u.d}),f.d(y,"Vector3",function(){return u.e}),f.d(y,"Vector4",function(){return u.f}),f.d(y,"Quaternion",function(){return u.b}),f.d(y,"Matrix",function(){return u.a}),f.d(y,"TmpVectors",function(){return u.c}),f.d(y,"PositionNormalVertex",function(){return Is}),f.d(y,"PositionNormalTextureVertex",function(){return pp}),f.d(y,"Viewport",function(){return Kn.a}),f.d(y,"SphericalHarmonics",function(){return Es}),f.d(y,"SphericalPolynomial",function(){return ro}),f.d(y,"AbstractMesh",function(){return Dt.a}),f.d(y,"Buffer",function(){return Oe.a}),f.d(y,"VertexBuffer",function(){return Oe.b}),f.d(y,"DracoCompression",function(){return gm}),f.d(y,"CSG",function(){return ym}),f.d(y,"Geometry",function(){return Ws.a}),f.d(y,"GroundMesh",function(){return zo}),f.d(y,"TrailMesh",function(){return Tm}),f.d(y,"InstancedMesh",function(){return Em.a}),f.d(y,"LinesMesh",function(){return So.b}),f.d(y,"InstancedLinesMesh",function(){return So.a}),f.d(y,"_CreationDataStorage",function(){return De.b}),f.d(y,"_InstancesBatch",function(){return De.c}),f.d(y,"Mesh",function(){return De.a}),f.d(y,"VertexData",function(){return ft.a}),f.d(y,"MeshBuilder",function(){return Pm}),f.d(y,"SimplificationSettings",function(){return Cm}),f.d(y,"SimplificationQueue",function(){return gd}),f.d(y,"SimplificationType",function(){return Co}),f.d(y,"QuadraticErrorSimplification",function(){return bd}),f.d(y,"SimplicationQueueSceneComponent",function(){return yd}),f.d(y,"Polygon",function(){return Am}),f.d(y,"PolygonMeshBuilder",function(){return _d}),f.d(y,"SubMesh",function(){return Eo.a}),f.d(y,"MeshLODLevel",function(){return Mm.a}),f.d(y,"TransformNode",function(){return Er.a}),f.d(y,"BoxBuilder",function(){return Tr.a}),f.d(y,"TiledBoxBuilder",function(){return pd}),f.d(y,"DiscBuilder",function(){return Ta}),f.d(y,"RibbonBuilder",function(){return Ao.a}),f.d(y,"SphereBuilder",function(){return Fn.a}),f.d(y,"HemisphereBuilder",function(){return Zo}),f.d(y,"CylinderBuilder",function(){return pi.a}),f.d(y,"TorusBuilder",function(){return gr}),f.d(y,"TorusKnotBuilder",function(){return Tc}),f.d(y,"LinesBuilder",function(){return cn.a}),f.d(y,"PolygonBuilder",function(){return Po}),f.d(y,"ShapeBuilder",function(){return ca.a}),f.d(y,"LatheBuilder",function(){return Sc}),f.d(y,"PlaneBuilder",function(){return Rs.a}),f.d(y,"TiledPlaneBuilder",function(){return md}),f.d(y,"GroundBuilder",function(){return Ui}),f.d(y,"TubeBuilder",function(){return Ac}),f.d(y,"PolyhedronBuilder",function(){return ao}),f.d(y,"IcoSphereBuilder",function(){return Pc}),f.d(y,"DecalBuilder",function(){return Cc}),f.d(y,"CapsuleBuilder",function(){return xc}),f.d(y,"DataBuffer",function(){return ou.a}),f.d(y,"WebGLDataBuffer",function(){return Im.a}),f.d(y,"MorphTarget",function(){return Xu}),f.d(y,"MorphTargetManager",function(){return sa}),f.d(y,"RecastJSPlugin",function(){return Dm}),f.d(y,"RecastJSCrowd",function(){return Td}),f.d(y,"Node",function(){return Q.a}),f.d(y,"Database",function(){return Ed}),f.d(y,"BaseParticleSystem",function(){return yo}),f.d(y,"BoxParticleEmitter",function(){return Nr}),f.d(y,"ConeParticleEmitter",function(){return rc}),f.d(y,"CylinderParticleEmitter",function(){return _a}),f.d(y,"CylinderDirectedParticleEmitter",function(){return oc}),f.d(y,"HemisphericParticleEmitter",function(){return ac}),f.d(y,"PointParticleEmitter",function(){return sc}),f.d(y,"SphereParticleEmitter",function(){return ma}),f.d(y,"SphereDirectedParticleEmitter",function(){return cc}),f.d(y,"CustomParticleEmitter",function(){return wr}),f.d(y,"MeshParticleEmitter",function(){return hh}),f.d(y,"GPUParticleSystem",function(){return ar}),f.d(y,"Particle",function(){return Ad}),f.d(y,"ParticleHelper",function(){return km}),f.d(y,"ParticleSystem",function(){return ln}),f.d(y,"ParticleSystemSet",function(){return Ea}),f.d(y,"SolidParticle",function(){return Mc}),f.d(y,"ModelShape",function(){return Ic}),f.d(y,"DepthSortedParticle",function(){return Pd}),f.d(y,"SolidParticleVertex",function(){return Cd}),f.d(y,"SolidParticleSystem",function(){return Gm}),f.d(y,"CloudPoint",function(){return xd}),f.d(y,"PointsGroup",function(){return Sa}),f.d(y,"PointColor",function(){return En}),f.d(y,"PointsCloudSystem",function(){return zm}),f.d(y,"SubEmitterType",function(){return Fr}),f.d(y,"SubEmitter",function(){return xo}),f.d(y,"PhysicsEngine",function(){return Ir}),f.d(y,"PhysicsEngineSceneComponent",function(){return Rd}),f.d(y,"PhysicsHelper",function(){return jm}),f.d(y,"PhysicsRadialExplosionEventOptions",function(){return Ur}),f.d(y,"PhysicsUpdraftEventOptions",function(){return Dc}),f.d(y,"PhysicsVortexEventOptions",function(){return Lc}),f.d(y,"PhysicsRadialImpulseFalloff",function(){return Ro}),f.d(y,"PhysicsUpdraftMode",function(){return Br}),f.d(y,"PhysicsImpostor",function(){return Ct.a}),f.d(y,"PhysicsJoint",function(){return en.e}),f.d(y,"DistanceJoint",function(){return en.a}),f.d(y,"MotorEnabledJoint",function(){return en.d}),f.d(y,"HingeJoint",function(){return en.c}),f.d(y,"Hinge2Joint",function(){return en.b}),f.d(y,"CannonJSPlugin",function(){return Ks}),f.d(y,"AmmoJSPlugin",function(){return Ku}),f.d(y,"OimoJSPlugin",function(){return Yu}),f.d(y,"AnaglyphPostProcess",function(){return ls}),f.d(y,"BlackAndWhitePostProcess",function(){return Md}),f.d(y,"BloomEffect",function(){return Fc}),f.d(y,"BloomMergePostProcess",function(){return wc}),f.d(y,"BlurPostProcess",function(){return gn}),f.d(y,"ChromaticAberrationPostProcess",function(){return Bc}),f.d(y,"CircleOfConfusionPostProcess",function(){return Uc}),f.d(y,"ColorCorrectionPostProcess",function(){return Id}),f.d(y,"ConvolutionPostProcess",function(){return Dd}),f.d(y,"DepthOfFieldBlurPostProcess",function(){return Aa}),f.d(y,"DepthOfFieldEffectBlurLevel",function(){return sr}),f.d(y,"DepthOfFieldEffect",function(){return Vc}),f.d(y,"DepthOfFieldMergePostProcessOptions",function(){return tg}),f.d(y,"DepthOfFieldMergePostProcess",function(){return Ld}),f.d(y,"DisplayPassPostProcess",function(){return Nd}),f.d(y,"ExtractHighlightsPostProcess",function(){return Nc}),f.d(y,"FilterPostProcess",function(){return wd}),f.d(y,"FxaaPostProcess",function(){return Oo}),f.d(y,"GrainPostProcess",function(){return kc}),f.d(y,"HighlightsPostProcess",function(){return cg}),f.d(y,"ImageProcessingPostProcess",function(){return Go}),f.d(y,"MotionBlurPostProcess",function(){return Gc}),f.d(y,"PassPostProcess",function(){return Fi}),f.d(y,"PassCubePostProcess",function(){return jf}),f.d(y,"PostProcess",function(){return _t}),f.d(y,"PostProcessManager",function(){return hs.a}),f.d(y,"RefractionPostProcess",function(){return Bd}),f.d(y,"DefaultRenderingPipeline",function(){return kd}),f.d(y,"LensRenderingPipeline",function(){return gg}),f.d(y,"SSAO2RenderingPipeline",function(){return Gd}),f.d(y,"SSAORenderingPipeline",function(){return Eg}),f.d(y,"StandardRenderingPipeline",function(){return zd}),f.d(y,"PostProcessRenderEffect",function(){return Rt}),f.d(y,"PostProcessRenderPipeline",function(){return Vr}),f.d(y,"PostProcessRenderPipelineManager",function(){return Ud}),f.d(y,"PostProcessRenderPipelineManagerSceneComponent",function(){return Vd}),f.d(y,"SharpenPostProcess",function(){return zc}),f.d(y,"StereoscopicInterlacePostProcessI",function(){return xg}),f.d(y,"StereoscopicInterlacePostProcess",function(){return Rg}),f.d(y,"TonemappingOperator",function(){return cr}),f.d(y,"TonemapPostProcess",function(){return Mg}),f.d(y,"VolumetricLightScatteringPostProcess",function(){return jd}),f.d(y,"VRDistortionCorrectionPostProcess",function(){return us}),f.d(y,"VRMultiviewToSingleviewPostProcess",function(){return ds}),f.d(y,"ScreenSpaceReflectionPostProcess",function(){return jc}),f.d(y,"ScreenSpaceCurvaturePostProcess",function(){return Hd}),f.d(y,"ReflectionProbe",function(){return Qu}),f.d(y,"BoundingBoxRenderer",function(){return Wd}),f.d(y,"DepthRenderer",function(){return oa}),f.d(y,"DepthRendererSceneComponent",function(){return Xd}),f.d(y,"EdgesRenderer",function(){return Hc}),f.d(y,"LineEdgesRenderer",function(){return Yd}),f.d(y,"GeometryBufferRenderer",function(){return ui}),f.d(y,"GeometryBufferRendererSceneComponent",function(){return Fd}),f.d(y,"PrePassRenderer",function(){return Wc}),f.d(y,"PrePassRendererSceneComponent",function(){return Kd}),f.d(y,"SubSurfaceSceneComponent",function(){return qd}),f.d(y,"OutlineRenderer",function(){return Zd}),f.d(y,"RenderingGroup",function(){return jg.a}),f.d(y,"RenderingGroupInfo",function(){return to.a}),f.d(y,"RenderingManager",function(){return to.b}),f.d(y,"UtilityLayerRenderer",function(){return On.a}),f.d(y,"Scene",function(){return _e.a}),f.d(y,"SceneComponentConstants",function(){return at.a}),f.d(y,"Stage",function(){return at.b}),f.d(y,"Sprite",function(){return Jd}),f.d(y,"SpriteManager",function(){return ef}),f.d(y,"SpriteMap",function(){return Qg}),f.d(y,"SpritePackedManager",function(){return qg}),f.d(y,"SpriteSceneComponent",function(){return $d}),f.d(y,"AlphaState",function(){return Zg.a}),f.d(y,"DepthCullingState",function(){return Jg.a}),f.d(y,"StencilState",function(){return $g.a}),f.d(y,"AndOrNotEvaluator",function(){return ev.a}),f.d(y,"AssetTaskState",function(){return mi}),f.d(y,"AbstractAssetTask",function(){return gi}),f.d(y,"AssetsProgressEvent",function(){return tf}),f.d(y,"ContainerAssetTask",function(){return nf}),f.d(y,"MeshAssetTask",function(){return rf}),f.d(y,"TextFileAssetTask",function(){return of}),f.d(y,"BinaryFileAssetTask",function(){return af}),f.d(y,"ImageAssetTask",function(){return sf}),f.d(y,"TextureAssetTask",function(){return cf}),f.d(y,"CubeTextureAssetTask",function(){return lf}),f.d(y,"HDRCubeTextureAssetTask",function(){return uf}),f.d(y,"EquiRectangularCubeTextureAssetTask",function(){return hf}),f.d(y,"AssetsManager",function(){return tv}),f.d(y,"BasisTranscodeConfiguration",function(){return J_}),f.d(y,"BasisTools",function(){return mo}),f.d(y,"DDSTools",function(){return Gi}),f.d(y,"expandToProperty",function(){return L.b}),f.d(y,"serialize",function(){return L.c}),f.d(y,"serializeAsTexture",function(){return L.m}),f.d(y,"serializeAsColor3",function(){return L.e}),f.d(y,"serializeAsFresnelParameters",function(){return L.h}),f.d(y,"serializeAsVector2",function(){return L.n}),f.d(y,"serializeAsVector3",function(){return L.o}),f.d(y,"serializeAsMeshReference",function(){return L.k}),f.d(y,"serializeAsColorCurves",function(){return L.g}),f.d(y,"serializeAsColor4",function(){return L.f}),f.d(y,"serializeAsImageProcessingConfiguration",function(){return L.i}),f.d(y,"serializeAsQuaternion",function(){return L.l}),f.d(y,"serializeAsMatrix",function(){return L.j}),f.d(y,"serializeAsCameraReference",function(){return L.d}),f.d(y,"SerializationHelper",function(){return L.a}),f.d(y,"Deferred",function(){return nv}),f.d(y,"EnvironmentTextureTools",function(){return Ai}),f.d(y,"MeshExploder",function(){return iv}),f.d(y,"FilesInput",function(){return rv}),f.d(y,"CubeMapToSphericalPolynomialTools",function(){return jo}),f.d(y,"HDRTools",function(){return zu}),f.d(y,"PanoramaToCubeMapTools",function(){return Xs}),f.d(y,"KhronosTextureContainer",function(){return ia}),f.d(y,"EventState",function(){return x.a}),f.d(y,"Observer",function(){return x.d}),f.d(y,"MultiObserver",function(){return x.b}),f.d(y,"Observable",function(){return x.c}),f.d(y,"PerformanceMonitor",function(){return df.a}),f.d(y,"RollingAverage",function(){return df.b}),f.d(y,"PromisePolyfill",function(){return ov.a}),f.d(y,"SceneOptimization",function(){return vi}),f.d(y,"TextureOptimization",function(){return Pa}),f.d(y,"HardwareScalingOptimization",function(){return Yc}),f.d(y,"ShadowsOptimization",function(){return Ca}),f.d(y,"PostProcessesOptimization",function(){return xa}),f.d(y,"LensFlaresOptimization",function(){return Ra}),f.d(y,"CustomOptimization",function(){return ff}),f.d(y,"ParticlesOptimization",function(){return Oa}),f.d(y,"RenderTargetsOptimization",function(){return Kc}),f.d(y,"MergeMeshesOptimization",function(){return Ma}),f.d(y,"SceneOptimizerOptions",function(){return Qc}),f.d(y,"SceneOptimizer",function(){return av}),f.d(y,"SceneSerializer",function(){return Zc}),f.d(y,"SmartArray",function(){return fi.a}),f.d(y,"SmartArrayNoDuplicate",function(){return fi.b}),f.d(y,"StringDictionary",function(){return Tl.a}),f.d(y,"Tags",function(){return sv.a}),f.d(y,"TextureTools",function(){return cv}),f.d(y,"TGATools",function(){return ha}),f.d(y,"Tools",function(){return Xe.b}),f.d(y,"className",function(){return Xe.c}),f.d(y,"AsyncLoop",function(){return Xe.a}),f.d(y,"VideoRecorder",function(){return lv}),f.d(y,"JoystickAxis",function(){return an}),f.d(y,"VirtualJoystick",function(){return os}),f.d(y,"WorkerPool",function(){return Bs}),f.d(y,"Logger",function(){return l.a}),f.d(y,"_TypeStore",function(){return R.a}),f.d(y,"FilesInputStore",function(){return As.a}),f.d(y,"DeepCopier",function(){return de.a}),f.d(y,"PivotTools",function(){return kn.a}),f.d(y,"PrecisionDate",function(){return be.a}),f.d(y,"ScreenshotTools",function(){return Mo}),f.d(y,"WebRequest",function(){return re.a}),f.d(y,"InspectableType",function(){return Xc}),f.d(y,"BRDFTextureTools",function(){return ea}),f.d(y,"RGBDTextureTools",function(){return fu}),f.d(y,"ColorGradient",function(){return Rc}),f.d(y,"Color3Gradient",function(){return Sd}),f.d(y,"FactorGradient",function(){return Oc}),f.d(y,"GradientHelper",function(){return In}),f.d(y,"PerfCounter",function(){return jn.a}),f.d(y,"RetryStrategy",function(){return uv.a}),f.d(y,"CanvasGenerator",function(){return fs.a}),f.d(y,"LoadFileError",function(){return io.b}),f.d(y,"RequestFileError",function(){return io.d}),f.d(y,"ReadFileError",function(){return io.c}),f.d(y,"FileTools",function(){return io.a}),f.d(y,"StringTools",function(){return Qn.a}),f.d(y,"DataReader",function(){return hv}),f.d(y,"MinMaxReducer",function(){return Fu}),f.d(y,"DepthReducer",function(){return Bu}),f.d(y,"DataStorage",function(){return dv}),f.d(y,"SceneRecorder",function(){return fv}),f.d(y,"KhronosTextureContainer2",function(){return Us}),f.d(y,"Trajectory",function(){return pv}),f.d(y,"TrajectoryClassifier",function(){return _v}),f.d(y,"TimerState",function(){return zi}),f.d(y,"setAndStartTimer",function(){return ks}),f.d(y,"AdvancedTimer",function(){return m_}),f.d(y,"CopyTools",function(){return mv.a}),f.d(y,"WebXRCamera",function(){return yu}),f.d(y,"WebXREnterExitUIButton",function(){return Pu}),f.d(y,"WebXREnterExitUIOptions",function(){return __}),f.d(y,"WebXREnterExitUI",function(){return Cu}),f.d(y,"WebXRExperienceHelper",function(){return Tu}),f.d(y,"WebXRInput",function(){return Au}),f.d(y,"WebXRInputSource",function(){return Su}),f.d(y,"WebXRManagedOutputCanvasOptions",function(){return ps}),f.d(y,"WebXRManagedOutputCanvas",function(){return Wl}),f.d(y,"WebXRState",function(){return pn}),f.d(y,"WebXRTrackingState",function(){return tr}),f.d(y,"WebXRSessionManager",function(){return _s}),f.d(y,"WebXRDefaultExperienceOptions",function(){return g_}),f.d(y,"WebXRDefaultExperience",function(){return xu}),f.d(y,"WebXRFeatureName",function(){return si}),f.d(y,"WebXRFeaturesManager",function(){return qn}),f.d(y,"WebXRAbstractFeature",function(){return ci}),f.d(y,"WebXRHitTestLegacy",function(){return Da}),f.d(y,"WebXRAnchorSystem",function(){return La}),f.d(y,"WebXRPlaneDetector",function(){return Na}),f.d(y,"WebXRBackgroundRemover",function(){return wa}),f.d(y,"WebXRMotionControllerTeleportation",function(){return fo}),f.d(y,"WebXRControllerPointerSelection",function(){return ho}),f.d(y,"IWebXRControllerPhysicsOptions",function(){return bv}),f.d(y,"WebXRControllerPhysics",function(){return Fa}),f.d(y,"WebXRHitTest",function(){return Ba}),f.d(y,"WebXRFeaturePointSystem",function(){return Ua}),f.d(y,"WebXRHand",function(){return gf}),f.d(y,"WebXRHandTracking",function(){return Va}),f.d(y,"WebXRAbstractMotionController",function(){return Rr}),f.d(y,"WebXRControllerComponent",function(){return xr}),f.d(y,"WebXRGenericTriggerMotionController",function(){return Vs}),f.d(y,"WebXRMicrosoftMixedRealityController",function(){return vf}),f.d(y,"WebXRMotionControllerManager",function(){return Bn}),f.d(y,"WebXROculusTouchMotionController",function(){return $c}),f.d(y,"WebXRHTCViveMotionController",function(){return bf}),f.d(y,"WebXRProfiledMotionController",function(){return Eu});var U=f(35),_=f(91),x=f(6),u=f(0),M=f(9),R=f(11),C=function(){function r(t,e){this.triggerOptions=t,this.onBeforeExecuteObservable=new x.c,t.parameter?(this.trigger=t.trigger,this._triggerParameter=t.parameter):t.trigger?this.trigger=t.trigger:this.trigger=t,this._nextActiveAction=this,this._condition=e}return r.prototype._prepare=function(){},r.prototype.getTriggerParameter=function(){return this._triggerParameter},r.prototype._executeCurrent=function(t){if(this._nextActiveAction._condition){var e=this._nextActiveAction._condition,n=this._actionManager.getScene().getRenderId();if(e._evaluationId===n){if(!e._currentResult)return}else{if(e._evaluationId=n,!e.isValid())return void(e._currentResult=!1);e._currentResult=!0}}this.onBeforeExecuteObservable.notifyObservers(this),this._nextActiveAction.execute(t),this.skipToNextActiveAction()},r.prototype.execute=function(t){},r.prototype.skipToNextActiveAction=function(){this._nextActiveAction._child?(this._nextActiveAction._child._actionManager||(this._nextActiveAction._child._actionManager=this._actionManager),this._nextActiveAction=this._nextActiveAction._child):this._nextActiveAction=this},r.prototype.then=function(t){return this._child=t,t._actionManager=this._actionManager,t._prepare(),t},r.prototype._getProperty=function(t){return this._actionManager._getProperty(t)},r.prototype._getEffectiveTarget=function(t,e){return this._actionManager._getEffectiveTarget(t,e)},r.prototype.serialize=function(t){},r.prototype._serialize=function(t,e){var n={type:1,children:[],name:t.name,properties:t.properties||[]};if(this._child&&this._child.serialize(n),this._condition){var i=this._condition.serialize();return i.children.push(n),e&&e.children.push(i),i}return e&&e.children.push(n),n},r._SerializeValueAsString=function(t){return typeof t=="number"?t.toString():typeof t=="boolean"?t?"true":"false":t instanceof u.d?t.x+", "+t.y:t instanceof u.e?t.x+", "+t.y+", "+t.z:t instanceof M.a?t.r+", "+t.g+", "+t.b:t instanceof M.b?t.r+", "+t.g+", "+t.b+", "+t.a:t},r._GetTargetProperty=function(t){return{name:"target",targetType:t._isMesh?"MeshProperties":t._isLight?"LightProperties":t._isCamera?"CameraProperties":"SceneProperties",value:t._isScene?"Scene":t.name}},r}();R.a.RegisteredTypes["BABYLON.Action"]=C;var m=f(47),c=f(1),T=function(){function r(t){this._actionManager=t}return r.prototype.isValid=function(){return!0},r.prototype._getProperty=function(t){return this._actionManager._getProperty(t)},r.prototype._getEffectiveTarget=function(t,e){return this._actionManager._getEffectiveTarget(t,e)},r.prototype.serialize=function(){},r.prototype._serialize=function(t){return{type:2,children:[],name:t.name,properties:t.properties}},r}(),A=function(r){function t(e,n,i,o,a){a===void 0&&(a=t.IsEqual);var s=r.call(this,e)||this;return s.propertyPath=i,s.value=o,s.operator=a,s._target=n,s._effectiveTarget=s._getEffectiveTarget(n,s.propertyPath),s._property=s._getProperty(s.propertyPath),s}return Object(c.d)(t,r),Object.defineProperty(t,"IsEqual",{get:function(){return t._IsEqual},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsDifferent",{get:function(){return t._IsDifferent},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsGreater",{get:function(){return t._IsGreater},enumerable:!1,configurable:!0}),Object.defineProperty(t,"IsLesser",{get:function(){return t._IsLesser},enumerable:!1,configurable:!0}),t.prototype.isValid=function(){switch(this.operator){case t.IsGreater:return this._effectiveTarget[this._property]>this.value;case t.IsLesser:return this._effectiveTarget[this._property] -1&&this._scene.actionManagers.splice(e,1)},t.prototype.getScene=function(){return this._scene},t.prototype.hasSpecificTriggers=function(e){for(var n=0;n -1)return!0}return!1},t.prototype.hasSpecificTriggers2=function(e,n){for(var i=0;i =t.OnPickTrigger&&n.trigger<=t.OnPointerOutTrigger)return!0}return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasPickTriggers",{get:function(){for(var e=0;e =t.OnPickTrigger&&n.trigger<=t.OnPickUpTrigger)return!0}return!1},enumerable:!1,configurable:!0}),t.prototype.registerAction=function(e){return e.trigger===t.OnEveryFrameTrigger&&this.getScene().actionManager!==this?(l.a.Warn("OnEveryFrameTrigger can only be used with scene.actionManager"),null):(this.actions.push(e),t.Triggers[e.trigger]?t.Triggers[e.trigger]++:t.Triggers[e.trigger]=1,e._actionManager=this,e._prepare(),e)},t.prototype.unregisterAction=function(e){var n=this.actions.indexOf(e);return n!==-1&&(this.actions.splice(n,1),t.Triggers[e.trigger]-=1,t.Triggers[e.trigger]===0&&delete t.Triggers[e.trigger],e._actionManager=null,!0)},t.prototype.processTrigger=function(e,n){for(var i=0;i 0;if(F.type===2?ce.push(o):ce.push(z),ve){for(var Te=new Array,Re=0;Re 0){var P=b.properties[0].value,O=b.properties[0].targetType===null?P:i.getMeshByName(P);O._meshId&&(O.mesh=i.getMeshByID(O._meshId)),p={trigger:t[b.name],parameter:O}}else p=t[b.name];for(var B=0;B =0?e:0;var s=0,d=a._keys[0],p=a._keys.length-1,b=a._keys[p],P={referenceValue:d.value,referencePosition:u.c.Vector3[0],referenceQuaternion:u.c.Quaternion[0],referenceScaling:u.c.Vector3[1],keyPosition:u.c.Vector3[2],keyQuaternion:u.c.Quaternion[1],keyScaling:u.c.Vector3[3]},O=!1,B=d.frame,F=b.frame;if(n){var z=a.getRange(n);z&&(B=z.from,F=z.to)}var J=d.frame===B,ie=b.frame===F;if(a._keys.length===1){var se=a._getKeyValue(a._keys[0]);P.referenceValue=se.clone?se.clone():se,O=!0}else e<=d.frame?(se=a._getKeyValue(d.value),P.referenceValue=se.clone?se.clone():se,O=!0):e>=b.frame&&(se=a._getKeyValue(b.value),P.referenceValue=se.clone?se.clone():se,O=!0);for(var ce=0;!O||!J||!ie&&ce =ue.frame&&e<=fe.frame){if(se=void 0,e===ue.frame)se=a._getKeyValue(ue.value);else if(e===fe.frame)se=a._getKeyValue(fe.value);else{var ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};se=a._interpolate(e,ve)}P.referenceValue=se.clone?se.clone():se,O=!0}if(!J&&B>=ue.frame&&B<=fe.frame){if(B===ue.frame)s=ce;else if(B===fe.frame)s=ce+1;else{ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT};var Te={frame:B,value:(se=a._interpolate(B,ve)).clone?se.clone():se};a._keys.splice(ce+1,0,Te),s=ce+1}J=!0}!ie&&F>=ue.frame&&F<=fe.frame&&(F===ue.frame?p=ce:F===fe.frame?p=ce+1:(ve={key:ce,repeatCount:0,loopMode:this.ANIMATIONLOOPMODE_CONSTANT},Te={frame:F,value:(se=a._interpolate(F,ve)).clone?se.clone():se},a._keys.splice(ce+1,0,Te),p=ce+1),ie=!0),ce++}for(a.dataType===r.ANIMATIONTYPE_QUATERNION?P.referenceValue.normalize().conjugateInPlace():a.dataType===r.ANIMATIONTYPE_MATRIX&&(P.referenceValue.decompose(P.referenceScaling,P.referenceQuaternion,P.referencePosition),P.referenceQuaternion.normalize().conjugateInPlace()),ce=s;ce<=p;ce++)if(Te=a._keys[ce],!ce||a.dataType===r.ANIMATIONTYPE_FLOAT||Te.value!==d.value)switch(a.dataType){case r.ANIMATIONTYPE_MATRIX:Te.value.decompose(P.keyScaling,P.keyQuaternion,P.keyPosition),P.keyPosition.subtractInPlace(P.referencePosition),P.keyScaling.divideInPlace(P.referenceScaling),P.referenceQuaternion.multiplyToRef(P.keyQuaternion,P.keyQuaternion),u.a.ComposeToRef(P.keyScaling,P.keyQuaternion,P.keyPosition,Te.value);break;case r.ANIMATIONTYPE_QUATERNION:P.referenceValue.multiplyToRef(Te.value,Te.value);break;case r.ANIMATIONTYPE_VECTOR2:case r.ANIMATIONTYPE_VECTOR3:case r.ANIMATIONTYPE_COLOR3:case r.ANIMATIONTYPE_COLOR4:Te.value.subtractToRef(P.referenceValue,Te.value);break;case r.ANIMATIONTYPE_SIZE:Te.value.width-=P.referenceValue.width,Te.value.height-=P.referenceValue.height;break;default:Te.value-=P.referenceValue}return a},r.TransitionTo=function(t,e,n,i,o,a,s,d){if(d===void 0&&(d=null),s<=0)return n[t]=e,d&&d(),null;var p=o*(s/1e3);a.setKeys([{frame:0,value:n[t].clone?n[t].clone():n[t]},{frame:p,value:e}]),n.animations||(n.animations=[]),n.animations.push(a);var b=i.beginAnimation(n,0,p,!1);return b.onAnimationEnd=d,b},Object.defineProperty(r.prototype,"runtimeAnimations",{get:function(){return this._runtimeAnimations},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"hasRunningRuntimeAnimations",{get:function(){for(var t=0,e=this._runtimeAnimations;t =0;a--)this._keys[a].frame>=i&&this._keys[a].frame<=o&&this._keys.splice(a,1);this._ranges[t]=null}},r.prototype.getRange=function(t){return this._ranges[t]},r.prototype.getKeys=function(){return this._keys},r.prototype.getHighestFrame=function(){for(var t=0,e=0,n=this._keys.length;e 0)return e.highLimitValue.clone?e.highLimitValue.clone():e.highLimitValue;var n=this._keys;if(n.length===1)return this._getKeyValue(n[0].value);var i=e.key;if(n[i].frame>=t)for(;i-1>=0&&n[i].frame>=t;)i--;for(var o=i;o =t){e.key=o;var s=n[o],d=this._getKeyValue(s.value);if(s.interpolation===K.STEP)return d;var p=this._getKeyValue(a.value),b=s.outTangent!==void 0&&a.inTangent!==void 0,P=a.frame-s.frame,O=(t-s.frame)/P,B=this.getEasingFunction();switch(B!=null&&(O=B.ease(O)),this.dataType){case r.ANIMATIONTYPE_FLOAT:var F=b?this.floatInterpolateFunctionWithTangents(d,s.outTangent*P,p,a.inTangent*P,O):this.floatInterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return F;case r.ANIMATIONLOOPMODE_RELATIVE:return e.offsetValue*e.repeatCount+F}break;case r.ANIMATIONTYPE_QUATERNION:var z=b?this.quaternionInterpolateFunctionWithTangents(d,s.outTangent.scale(P),p,a.inTangent.scale(P),O):this.quaternionInterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return z;case r.ANIMATIONLOOPMODE_RELATIVE:return z.addInPlace(e.offsetValue.scale(e.repeatCount))}return z;case r.ANIMATIONTYPE_VECTOR3:var J=b?this.vector3InterpolateFunctionWithTangents(d,s.outTangent.scale(P),p,a.inTangent.scale(P),O):this.vector3InterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return J;case r.ANIMATIONLOOPMODE_RELATIVE:return J.add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_VECTOR2:var ie=b?this.vector2InterpolateFunctionWithTangents(d,s.outTangent.scale(P),p,a.inTangent.scale(P),O):this.vector2InterpolateFunction(d,p,O);switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return ie;case r.ANIMATIONLOOPMODE_RELATIVE:return ie.add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_SIZE:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.sizeInterpolateFunction(d,p,O);case r.ANIMATIONLOOPMODE_RELATIVE:return this.sizeInterpolateFunction(d,p,O).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_COLOR3:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.color3InterpolateFunction(d,p,O);case r.ANIMATIONLOOPMODE_RELATIVE:return this.color3InterpolateFunction(d,p,O).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_COLOR4:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:return this.color4InterpolateFunction(d,p,O);case r.ANIMATIONLOOPMODE_RELATIVE:return this.color4InterpolateFunction(d,p,O).add(e.offsetValue.scale(e.repeatCount))}case r.ANIMATIONTYPE_MATRIX:switch(e.loopMode){case r.ANIMATIONLOOPMODE_CYCLE:case r.ANIMATIONLOOPMODE_CONSTANT:if(r.AllowMatricesInterpolation)return this.matrixInterpolateFunction(d,p,O,e.workValue);case r.ANIMATIONLOOPMODE_RELATIVE:return d}}break}}return this._getKeyValue(n[n.length-1].value)},r.prototype.matrixInterpolateFunction=function(t,e,n,i){return r.AllowMatrixDecomposeForInterpolation?i?(u.a.DecomposeLerpToRef(t,e,n,i),i):u.a.DecomposeLerp(t,e,n):i?(u.a.LerpToRef(t,e,n,i),i):u.a.Lerp(t,e,n)},r.prototype.clone=function(){var t=new r(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys),this._ranges)for(var e in t._ranges={},this._ranges){var n=this._ranges[e];n&&(t._ranges[e]=n.clone())}return t},r.prototype.setKeys=function(t){this._keys=t.slice(0)},r.prototype.serialize=function(){var t={};t.name=this.name,t.property=this.targetProperty,t.framePerSecond=this.framePerSecond,t.dataType=this.dataType,t.loopBehavior=this.loopMode,t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed;var e=this.dataType;t.keys=[];for(var n=this.getKeys(),i=0;i =1&&(s=p.values[1]),p.values.length>=2&&(d=p.values[2]);break;case r.ANIMATIONTYPE_QUATERNION:if(e=u.b.FromArray(p.values),p.values.length>=8){var b=u.b.FromArray(p.values.slice(4,8));b.equals(u.b.Zero())||(s=b)}if(p.values.length>=12){var P=u.b.FromArray(p.values.slice(8,12));P.equals(u.b.Zero())||(d=P)}break;case r.ANIMATIONTYPE_MATRIX:e=u.a.FromArray(p.values);break;case r.ANIMATIONTYPE_COLOR3:e=M.a.FromArray(p.values);break;case r.ANIMATIONTYPE_COLOR4:e=M.b.FromArray(p.values);break;case r.ANIMATIONTYPE_VECTOR3:default:e=u.e.FromArray(p.values)}var O={};O.frame=p.frame,O.value=e,s!=null&&(O.inTangent=s),d!=null&&(O.outTangent=d),a.push(O)}if(i.setKeys(a),t.ranges)for(n=0;n 0&&P.forEach(function(O){o._events.push(O._clone())}),this._enableBlending=t&&t.animationPropertiesOverride?t.animationPropertiesOverride.enableBlending:this._animation.enableBlending}return Object.defineProperty(r.prototype,"currentFrame",{get:function(){return this._currentFrame},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"weight",{get:function(){return this._weight},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentValue",{get:function(){return this._currentValue},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"targetPath",{get:function(){return this._targetPath},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"target",{get:function(){return this._currentActiveTarget},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isAdditive",{get:function(){return this._host&&this._host.isAdditive},enumerable:!1,configurable:!0}),r.prototype._preparePath=function(t,e){e===void 0&&(e=0);var n=this._animation.targetPropertyPath;if(n.length>1){for(var i=t[n[0]],o=1;o -1&&this._animation.runtimeAnimations.splice(t,1)},r.prototype.setValue=function(t,e){if(this._targetIsArray)for(var n=0;n e[e.length-1].frame&&(t=e[e.length-1].frame);var n=this._events;if(n.length)for(var i=0;i this._maxFrame)&&(e=this._minFrame),(n this._maxFrame)&&(n=this._maxFrame);var b,P,O=n-e,B=t*(s.framePerSecond*o)/1e3+this._ratioOffset,F=0;if(this._previousDelay=t,this._previousRatio=B,!i&&n>=e&&B>=O)p=!1,F=s._getKeyValue(this._maxValue);else if(!i&&e>=n&&B<=O)p=!1,F=s._getKeyValue(this._minValue);else if(this._animationState.loopMode!==k.ANIMATIONLOOPMODE_CYCLE){var z=n.toString()+e.toString();if(!this._offsetsCache[z]){this._animationState.repeatCount=0,this._animationState.loopMode=k.ANIMATIONLOOPMODE_CYCLE;var J=s._interpolate(e,this._animationState),ie=s._interpolate(n,this._animationState);switch(this._animationState.loopMode=this._getCorrectLoopMode(),s.dataType){case k.ANIMATIONTYPE_FLOAT:this._offsetsCache[z]=ie-J;break;case k.ANIMATIONTYPE_QUATERNION:this._offsetsCache[z]=ie.subtract(J);break;case k.ANIMATIONTYPE_VECTOR3:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_VECTOR2:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_SIZE:this._offsetsCache[z]=ie.subtract(J);case k.ANIMATIONTYPE_COLOR3:this._offsetsCache[z]=ie.subtract(J)}this._highLimitsCache[z]=ie}F=this._highLimitsCache[z],b=this._offsetsCache[z]}if(b===void 0)switch(s.dataType){case k.ANIMATIONTYPE_FLOAT:b=0;break;case k.ANIMATIONTYPE_QUATERNION:b=Z;break;case k.ANIMATIONTYPE_VECTOR3:b=W;break;case k.ANIMATIONTYPE_VECTOR2:b=q;break;case k.ANIMATIONTYPE_SIZE:b=he;break;case k.ANIMATIONTYPE_COLOR3:b=ge}if(this._host&&this._host.syncRoot){var se=this._host.syncRoot;P=e+(n-e)*((se.masterFrame-se.fromFrame)/(se.toFrame-se.fromFrame))}else P=p&&O!==0?e+B%O:n;var ce=this._events;if((O>0&&this.currentFrame>P||O<0&&this.currentFrame >0,this._animationState.highLimitValue=F,this._animationState.offsetValue=b;var fe=s._interpolate(P,this._animationState);if(this.setValue(fe,a),ce.length){for(ue=0;ue
0&&P>=ce[ue].frame&&ce[ue].frame>=e||O<0&&P<=ce[ue].frame&&ce[ue].frame<=e){var ve=ce[ue];ve.isDone||(ve.onlyOnce&&(ce.splice(ue,1),ue--),ve.isDone=!0,ve.action(P))}}return p||(this._stopped=!0),p},r}(),_e=f(20),be=f(57),Pe=f(44),ye=f(23),Be=function(r){function t(e,n,i,o,a,s,d){i===void 0&&(i=null),o===void 0&&(o=null),a===void 0&&(a=null),s===void 0&&(s=null),d===void 0&&(d=null);var p=r.call(this,e,n.getScene())||this;return p.name=e,p.children=new Array,p.animations=new Array,p._index=null,p._absoluteTransform=new u.a,p._invertedAbsoluteTransform=new u.a,p._scalingDeterminant=1,p._worldTransform=new u.a,p._needToDecompose=!0,p._needToCompose=!1,p._linkedTransformNode=null,p._waitingTransformNodeId=null,p._skeleton=n,p._localMatrix=o?o.clone():u.a.Identity(),p._restPose=a||p._localMatrix.clone(),p._bindPose=p._localMatrix.clone(),p._baseMatrix=s||p._localMatrix.clone(),p._index=d,n.bones.push(p),p.setParent(i,!1),(s||o)&&p._updateDifferenceMatrix(),p}return Object(c.d)(t,r),Object.defineProperty(t.prototype,"_matrix",{get:function(){return this._compose(),this._localMatrix},set:function(e){this._localMatrix.copyFrom(e),this._needToDecompose=!0},enumerable:!1,configurable:!0}),t.prototype.getClassName=function(){return"Bone"},t.prototype.getSkeleton=function(){return this._skeleton},t.prototype.getParent=function(){return this._parent},t.prototype.getChildren=function(){return this.children},t.prototype.getIndex=function(){return this._index===null?this.getSkeleton().bones.indexOf(this):this._index},t.prototype.setParent=function(e,n){if(n===void 0&&(n=!0),this._parent!==e){if(this._parent){var i=this._parent.children.indexOf(this);i!==-1&&this._parent.children.splice(i,1)}this._parent=e,this._parent&&this._parent.children.push(this),n&&this._updateDifferenceMatrix(),this.markAsDirty()}},t.prototype.getLocalMatrix=function(){return this._compose(),this._localMatrix},t.prototype.getBaseMatrix=function(){return this._baseMatrix},t.prototype.getRestPose=function(){return this._restPose},t.prototype.setRestPose=function(e){this._restPose.copyFrom(e)},t.prototype.getBindPose=function(){return this._bindPose},t.prototype.setBindPose=function(e){this._bindPose.copyFrom(e)},t.prototype.getWorldMatrix=function(){return this._worldTransform},t.prototype.returnToRest=function(){this._skeleton._numBonesWithLinkedTransformNode>0?this.updateMatrix(this._restPose,!1,!1):this.updateMatrix(this._restPose,!1,!0)},t.prototype.getInvertedAbsoluteTransform=function(){return this._invertedAbsoluteTransform},t.prototype.getAbsoluteTransform=function(){return this._absoluteTransform},t.prototype.linkTransformNode=function(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++},t.prototype.getTransformNode=function(){return this._linkedTransformNode},Object.defineProperty(t.prototype,"position",{get:function(){return this._decompose(),this._localPosition},set:function(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotation",{get:function(){return this.getRotation()},set:function(e){this.setRotation(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotationQuaternion",{get:function(){return this._decompose(),this._localRotation},set:function(e){this.setRotationQuaternion(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaling",{get:function(){return this.getScale()},set:function(e){this.setScale(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"animationPropertiesOverride",{get:function(){return this._skeleton.animationPropertiesOverride},enumerable:!1,configurable:!0}),t.prototype._decompose=function(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=u.e.Zero(),this._localRotation=u.b.Zero(),this._localPosition=u.e.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))},t.prototype._compose=function(){this._needToCompose&&(this._localScaling?(this._needToCompose=!1,u.a.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix)):this._needToCompose=!1)},t.prototype.updateMatrix=function(e,n,i){n===void 0&&(n=!0),i===void 0&&(i=!0),this._baseMatrix.copyFrom(e),n&&this._updateDifferenceMatrix(),i?(this._needToCompose=!1,this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose()):this.markAsDirty()},t.prototype._updateDifferenceMatrix=function(e,n){if(n===void 0&&(n=!0),e||(e=this._baseMatrix),this._parent?e.multiplyToRef(this._parent._absoluteTransform,this._absoluteTransform):this._absoluteTransform.copyFrom(e),this._absoluteTransform.invertToRef(this._invertedAbsoluteTransform),n)for(var i=0;i -1&&(this._scene._activeAnimatables.splice(e,1),this._scene._activeAnimatables.push(this))}return this},r.prototype.getAnimations=function(){return this._runtimeAnimations},r.prototype.appendAnimations=function(t,e){for(var n=this,i=0;i -1){for(var i=(a=this._runtimeAnimations).length-1;i>=0;i--){var o=a[i];t&&o.animation.name!=t||e&&!e(o.target)||(o.dispose(),a.splice(i,1))}a.length==0&&(this._scene._activeAnimatables.splice(n,1),this._raiseOnAnimationEnd())}}else if((i=this._scene._activeAnimatables.indexOf(this))>-1){this._scene._activeAnimatables.splice(i,1);var a=this._runtimeAnimations;for(i=0;i 0)return;this._animationTimeLast=r}this.deltaTime=this.useConstantAnimationDeltaTime?16:(r-this._animationTimeLast)*this.animationTimeScale,this._animationTimeLast=r;var t=this._activeAnimatables;if(t.length!==0){this._animationTime+=this.deltaTime;for(var e=this._animationTime,n=0;n e&&i>0&&(i*=-1),s&&this.stopAnimation(r,void 0,d),a||(a=new ke(this,r,t,e,n,i,o,void 0,p,b));var P=!d||d(r);if(r.animations&&P&&a.appendAnimations(r,r.animations),r.getAnimatables)for(var O=r.getAnimatables(),B=0;B n&&o>0&&(o*=-1),new ke(this,r,e,n,i,o,a,t,s,d)},_e.a.prototype.beginDirectHierarchyAnimation=function(r,t,e,n,i,o,a,s,d,p){p===void 0&&(p=!1);var b=r.getDescendants(t),P=[];P.push(this.beginDirectAnimation(r,e,n,i,o,a,s,d,p));for(var O=0,B=b;O 0)i.copyFrom(n);else if(r.animations.length===1){if(u.b.SlerpToRef(n,e.currentValue,Math.min(1,r.totalWeight),i),r.totalAdditiveWeight===0)return i}else if(r.animations.length>1){var o=1,a=void 0,s=void 0;if(r.totalWeight<1){var d=1-r.totalWeight;s=[],(a=[]).push(n),s.push(d)}else{if(r.animations.length===2&&(u.b.SlerpToRef(r.animations[0].currentValue,r.animations[1].currentValue,r.animations[1].weight/r.totalWeight,t),r.totalAdditiveWeight===0))return t;a=[],s=[],o=r.totalWeight}for(var p=0;p =p&&a.frame<=b&&(n?(d=a.value.clone(),z?(s=d.getTranslation(),d.setTranslation(s.scaleInPlace(J))):ie&&i?(s=d.getTranslation(),d.setTranslation(s.multiplyInPlace(i))):d=a.value):d=a.value,se.push({frame:a.frame+e,value:d}));return this.animations[0].createRange(t,p+e,b+e),!0};var We=function(){function r(){}return r.prototype.getClassName=function(){return"TargetedAnimation"},r.prototype.serialize=function(){var t={};return t.animation=this.animation.serialize(),t.targetId=this.target.id,t},r}(),je=function(){function r(t,e){e===void 0&&(e=null),this.name=t,this._targetedAnimations=new Array,this._animatables=new Array,this._from=Number.MAX_VALUE,this._to=-Number.MAX_VALUE,this._speedRatio=1,this._loopAnimation=!1,this._isAdditive=!1,this.onAnimationEndObservable=new x.c,this.onAnimationLoopObservable=new x.c,this.onAnimationGroupLoopObservable=new x.c,this.onAnimationGroupEndObservable=new x.c,this.onAnimationGroupPauseObservable=new x.c,this.onAnimationGroupPlayObservable=new x.c,this._scene=e||te.a.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._scene.addAnimationGroup(this)}return Object.defineProperty(r.prototype,"from",{get:function(){return this._from},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"to",{get:function(){return this._to},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isStarted",{get:function(){return this._isStarted},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isPlaying",{get:function(){return this._isStarted&&!this._isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"speedRatio",{get:function(){return this._speedRatio},set:function(t){if(this._speedRatio!==t){this._speedRatio=t;for(var e=0;e i[0].frame&&(this._from=i[0].frame),this._tot){var s={frame:t,value:o.value,inTangent:o.inTangent,outTangent:o.outTangent,interpolation:o.interpolation};i.splice(0,0,s)}a.frame i&&this._speedRatio>0&&(this._speedRatio=-e);return this._isStarted=!0,this._isPaused=!1,this.onAnimationGroupPlayObservable.notifyObservers(this),this},r.prototype.pause=function(){if(!this._isStarted)return this;this._isPaused=!0;for(var t=0;t -1&&this._scene.animationGroups.splice(t,1),this.onAnimationEndObservable.clear(),this.onAnimationGroupEndObservable.clear(),this.onAnimationGroupPauseObservable.clear(),this.onAnimationGroupPlayObservable.clear(),this.onAnimationLoopObservable.clear(),this.onAnimationGroupLoopObservable.clear()},r.prototype._checkAnimationGroupEnded=function(t){var e=this._animatables.indexOf(t);e>-1&&this._animatables.splice(e,1),this._animatables.length===0&&(this._isStarted=!1,this.onAnimationGroupEndObservable.notifyObservers(this))},r.prototype.clone=function(t,e){for(var n=new r(t||this.name,this._scene),i=0,o=this._targetedAnimations;i =.5?.5*(1-this.easeInCore(2*(1-t)))+.5:.5*this.easeInCore(2*t)},r.EASINGMODE_EASEIN=0,r.EASINGMODE_EASEOUT=1,r.EASINGMODE_EASEINOUT=2,r}(),nt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e=Math.max(0,Math.min(1,e)),1-Math.sqrt(1-e*e)},t}(Ge),$e=function(r){function t(e){e===void 0&&(e=1);var n=r.call(this)||this;return n.amplitude=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.amplitude);return Math.pow(e,3)-e*n*Math.sin(3.141592653589793*e)},t}(Ge),ct=function(r){function t(e,n){e===void 0&&(e=3),n===void 0&&(n=2);var i=r.call(this)||this;return i.bounces=e,i.bounciness=n,i}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.bounces),i=this.bounciness;i<=1&&(i=1.001);var o=Math.pow(i,n),a=1-i,s=(1-o)/a+.5*o,d=e*s,p=Math.log(-d*(1-i)+1)/Math.log(i),b=Math.floor(p),P=b+1,O=(1-Math.pow(i,b))/(a*s),B=.5*(O+(1-Math.pow(i,P))/(a*s)),F=e-B,z=B-O;return-Math.pow(1/i,n-b)/(z*z)*(F-z)*(F+z)},t}(Ge),st=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e},t}(Ge),mt=function(r){function t(e,n){e===void 0&&(e=3),n===void 0&&(n=3);var i=r.call(this)||this;return i.oscillations=e,i.springiness=n,i}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.oscillations),i=Math.max(0,this.springiness);return(i==0?e:(Math.exp(i*e)-1)/(Math.exp(i)-1))*Math.sin((6.283185307179586*n+1.5707963267948966)*e)},t}(Ge),St=function(r){function t(e){e===void 0&&(e=2);var n=r.call(this)||this;return n.exponent=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return this.exponent<=0?e:(Math.exp(this.exponent*e)-1)/(Math.exp(this.exponent)-1)},t}(Ge),wt=function(r){function t(e){e===void 0&&(e=2);var n=r.call(this)||this;return n.power=e,n}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){var n=Math.max(0,this.power);return Math.pow(e,n)},t}(Ge),It=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e},t}(Ge),Pt=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e*e},t}(Ge),Ot=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return e*e*e*e*e},t}(Ge),on=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return 1-Math.sin(1.5707963267948966*(1-e))},t}(Ge),Zt=function(r){function t(e,n,i,o){e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=1),o===void 0&&(o=1);var a=r.call(this)||this;return a.x1=e,a.y1=n,a.x2=i,a.y2=o,a}return Object(c.d)(t,r),t.prototype.easeInCore=function(e){return qe.c.Interpolate(e,this.x1,this.y1,this.x2,this.y2)},t}(Ge),tn=function(){function r(t,e,n){this.frame=t,this.action=e,this.onlyOnce=n,this.isDone=!1}return r.prototype._clone=function(){return new r(this.frame,this.action,this.onlyOnce)},r}(),De=f(7),Pn=function(r){function t(){return r!==null&&r.apply(this,arguments)||this}return Object(c.d)(t,r),t}(U.a),nn=function(){this.rootNodes=[],this.skeletons=[],this.animationGroups=[]},Cn=function(r){function t(e){var n=r.call(this)||this;return n._wasAddedToScene=!1,n.scene=e,n.sounds=[],n.effectLayers=[],n.layers=[],n.lensFlareSystems=[],n.proceduralTextures=[],n.reflectionProbes=[],e.onDisposeObservable.add(function(){n._wasAddedToScene||n.dispose()}),n}return Object(c.d)(t,r),t.prototype.instantiateModelsToScene=function(e,n){var i=this;n===void 0&&(n=!1);var o={},a={},s=new nn,d=[],p=[],b={doNotInstantiate:!0},P=function(O,B){if(o[O.uniqueId]=B.uniqueId,a[B.uniqueId]=B,e&&(B.name=e(O.name)),B instanceof De.a){var F=B;if(F.morphTargetManager){var z=O.morphTargetManager;F.morphTargetManager=z.clone();for(var J=0;J -1&&d.animations.splice(J,1)}},b=0,P=s.animations;b 0&&(B=!0,this._soundLoaded(e));break;case"String":O.push(e);case"Array":O.length===0&&(O=e);for(var F=0;F 0&&(this._htmlAudioElement.currentTime=0)):this._streamingSource.disconnect(),this.isPlaying=!1;else if(Ue.a.audioEngine.audioContext&&this._soundSource){var n=t?Ue.a.audioEngine.audioContext.currentTime+t:Ue.a.audioEngine.audioContext.currentTime;this._soundSource.stop(n),this._soundSource.onended=function(){e.isPlaying=!1},this.isPaused||(this._startOffset=0)}}},r.prototype.pause=function(){this.isPlaying&&(this.isPaused=!0,this._streaming?this._htmlAudioElement?this._htmlAudioElement.pause():this._streamingSource.disconnect():Ue.a.audioEngine.audioContext&&(this.stop(0),this._startOffset+=Ue.a.audioEngine.audioContext.currentTime-this._startTime))},r.prototype.setVolume=function(t,e){Ue.a.audioEngine.canUseWebAudio&&this._soundGain&&(e&&Ue.a.audioEngine.audioContext?(this._soundGain.gain.cancelScheduledValues(Ue.a.audioEngine.audioContext.currentTime),this._soundGain.gain.setValueAtTime(this._soundGain.gain.value,Ue.a.audioEngine.audioContext.currentTime),this._soundGain.gain.linearRampToValueAtTime(t,Ue.a.audioEngine.audioContext.currentTime+e)):this._soundGain.gain.value=t),this._volume=t},r.prototype.setPlaybackRate=function(t){this._playbackRate=t,this.isPlaying&&(this._streaming&&this._htmlAudioElement?this._htmlAudioElement.playbackRate=this._playbackRate:this._soundSource&&(this._soundSource.playbackRate.value=this._playbackRate))},r.prototype.getVolume=function(){return this._volume},r.prototype.attachToMesh=function(t){var e=this;this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null),this._connectedTransformNode=t,this.spatialSound||(this.spatialSound=!0,this._createSpatialParameters(),this.isPlaying&&this.loop&&(this.stop(),this.play(0,this._offset,this._length))),this._onRegisterAfterWorldMatrixUpdate(this._connectedTransformNode),this._registerFunc=function(n){return e._onRegisterAfterWorldMatrixUpdate(n)},this._connectedTransformNode.registerAfterWorldMatrixUpdate(this._registerFunc)},r.prototype.detachFromMesh=function(){this._connectedTransformNode&&this._registerFunc&&(this._connectedTransformNode.unregisterAfterWorldMatrixUpdate(this._registerFunc),this._registerFunc=null,this._connectedTransformNode=null)},r.prototype._onRegisterAfterWorldMatrixUpdate=function(t){if(this._positionInEmitterSpace)t.worldMatrixFromCache.invertToRef(u.c.Matrix[0]),this.setPosition(u.c.Matrix[0].getTranslation());else if(t.getBoundingInfo){var e=t.getBoundingInfo();this.setPosition(e.boundingSphere.centerWorld)}else this.setPosition(t.absolutePosition);Ue.a.audioEngine.canUseWebAudio&&this._isDirectional&&this.isPlaying&&this._updateDirection()},r.prototype.clone=function(){var t=this;if(this._streaming)return null;var e=function(){t._isReadyToPlay?(i._audioBuffer=t.getAudioBuffer(),i._isReadyToPlay=!0,i.autoplay&&i.play(0,t._offset,t._length)):window.setTimeout(e,300)},n={autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,useCustomAttenuation:this.useCustomAttenuation,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel},i=new r(this.name+"_cloned",new ArrayBuffer(0),this._scene,null,n);return this.useCustomAttenuation&&i.setAttenuationFunction(this._customAttenuationFunction),i.setPosition(this._position),i.setPlaybackRate(this._playbackRate),e(),i},r.prototype.getAudioBuffer=function(){return this._audioBuffer},r.prototype.getSoundSource=function(){return this._soundSource},r.prototype.getSoundGain=function(){return this._soundGain},r.prototype.serialize=function(){var t={name:this.name,url:this.name,autoplay:this.autoplay,loop:this.loop,volume:this._volume,spatialSound:this.spatialSound,maxDistance:this.maxDistance,rolloffFactor:this.rolloffFactor,refDistance:this.refDistance,distanceModel:this.distanceModel,playbackRate:this._playbackRate,panningModel:this._panningModel,soundTrackId:this.soundTrackId,metadata:this.metadata};return this.spatialSound&&(this._connectedTransformNode&&(t.connectedMeshId=this._connectedTransformNode.id),t.position=this._position.asArray(),t.refDistance=this.refDistance,t.distanceModel=this.distanceModel,t.isDirectional=this._isDirectional,t.localDirectionToMesh=this._localDirection.asArray(),t.coneInnerAngle=this._coneInnerAngle,t.coneOuterAngle=this._coneOuterAngle,t.coneOuterGain=this._coneOuterGain),t},r.Parse=function(t,e,n,i){var o,a=t.name;o=t.url?n+t.url:n+a;var s,d={autoplay:t.autoplay,loop:t.loop,volume:t.volume,spatialSound:t.spatialSound,maxDistance:t.maxDistance,rolloffFactor:t.rolloffFactor,refDistance:t.refDistance,distanceModel:t.distanceModel,playbackRate:t.playbackRate};if(i){var p=function(){i._isReadyToPlay?(s._audioBuffer=i.getAudioBuffer(),s._isReadyToPlay=!0,s.autoplay&&s.play(0,s._offset,s._length)):window.setTimeout(p,300)};s=new r(a,new ArrayBuffer(0),e,null,d),p()}else s=new r(a,o,e,function(){e._removePendingData(s)},d),e._addPendingData(s);if(t.position){var b=u.e.FromArray(t.position);s.setPosition(b)}if(t.isDirectional&&(s.setDirectionalCone(t.coneInnerAngle||360,t.coneOuterAngle||360,t.coneOuterGain||0),t.localDirectionToMesh)){var P=u.e.FromArray(t.localDirectionToMesh);s.setLocalDirectionToMesh(P)}if(t.connectedMeshId){var O=e.getMeshByID(t.connectedMeshId);O&&s.attachToMesh(O)}return t.metadata&&(s.metadata=t.metadata),s},r._SceneComponentInitialization=function(t){throw An.a.WarnImport("AudioSceneComponent")},r}(),Lo=function(){function r(t,e){e===void 0&&(e={}),this.id=-1,this._isInitialized=!1,this._scene=t,this.soundCollection=new Array,this._options=e,!this._options.mainTrack&&this._scene.soundTracks&&(this._scene.soundTracks.push(this),this.id=this._scene.soundTracks.length-1)}return r.prototype._initializeSoundTrackAudioGraph=function(){Ue.a.audioEngine.canUseWebAudio&&Ue.a.audioEngine.audioContext&&(this._outputAudioNode=Ue.a.audioEngine.audioContext.createGain(),this._outputAudioNode.connect(Ue.a.audioEngine.masterGain),this._options&&this._options.volume&&(this._outputAudioNode.gain.value=this._options.volume),this._isInitialized=!0)},r.prototype.dispose=function(){if(Ue.a.audioEngine&&Ue.a.audioEngine.canUseWebAudio){for(this._connectedAnalyser&&this._connectedAnalyser.stopDebugCanvas();this.soundCollection.length;)this.soundCollection[0].dispose();this._outputAudioNode&&this._outputAudioNode.disconnect(),this._outputAudioNode=null}},r.prototype.addSound=function(t){this._isInitialized||this._initializeSoundTrackAudioGraph(),Ue.a.audioEngine.canUseWebAudio&&this._outputAudioNode&&t.connectToSoundTrackAudioNode(this._outputAudioNode),t.soundTrackId&&(t.soundTrackId===-1?this._scene.mainSoundTrack.removeSound(t):this._scene.soundTracks&&this._scene.soundTracks[t.soundTrackId].removeSound(t)),this.soundCollection.push(t),t.soundTrackId=this.id},r.prototype.removeSound=function(t){var e=this.soundCollection.indexOf(t);e!==-1&&this.soundCollection.splice(e,1)},r.prototype.setVolume=function(t){Ue.a.audioEngine.canUseWebAudio&&this._outputAudioNode&&(this._outputAudioNode.gain.value=t)},r.prototype.switchPanningModelToHRTF=function(){if(Ue.a.audioEngine.canUseWebAudio)for(var t=0;t 0?e.activeCameras[0]:e.activeCamera){this._cachedCameraPosition.equals(o.globalPosition)||(this._cachedCameraPosition.copyFrom(o.globalPosition),n.audioContext.listener.setPosition(o.globalPosition.x,o.globalPosition.y,o.globalPosition.z)),o.rigCameras&&o.rigCameras.length>0&&(o=o.rigCameras[0]);var a=u.a.Invert(o.getViewMatrix()),s=u.e.TransformNormal(e.useRightHandedSystem?r._CameraDirectionRH:r._CameraDirectionLH,a);s.normalize(),isNaN(s.x)||isNaN(s.y)||isNaN(s.z)||this._cachedCameraDirection.equals(s)||(this._cachedCameraDirection.copyFrom(s),n.audioContext.listener.setOrientation(s.x,s.y,s.z,0,1,0))}else n.audioContext.listener.setPosition(0,0,0)}var d;for(d=0;d 0?1/o:0,p=0;p 0},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(i){i.type!==Tt.a.POINTERDOWN?i.type===Tt.a.POINTERUP&&(e._isPointerDown=!1):e._isPointerDown=!0}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){var i=be.a.Now,o=0;e._lastFrameTime!=null&&(o=i-e._lastFrameTime),e._lastFrameTime=i,e._applyUserInteraction();var a=i-e._lastInteractionTime-e._idleRotationWaitTime,s=Math.max(Math.min(a/e._idleRotationSpinupTime,1),0);e._cameraRotationSpeed=e._idleRotationSpeed*s,e._attachedCamera&&(e._attachedCamera.alpha-=e._cameraRotationSpeed*(o/1e3))})},r.prototype.detach=function(){if(this._attachedCamera){var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._attachedCamera=null}},r.prototype._userIsZooming=function(){return!!this._attachedCamera&&this._attachedCamera.inertialRadiusOffset!==0},r.prototype._shouldAnimationStopForInteraction=function(){if(!this._attachedCamera)return!1;var t=!1;return this._lastFrameRadius===this._attachedCamera.radius&&this._attachedCamera.inertialRadiusOffset!==0&&(t=!0),this._lastFrameRadius=this._attachedCamera.radius,this._zoomStopsAnimation?t:this._userIsZooming()},r.prototype._applyUserInteraction=function(){this._userIsMoving()&&!this._shouldAnimationStopForInteraction()&&(this._lastInteractionTime=be.a.Now)},r.prototype._userIsMoving=function(){return!!this._attachedCamera&&(this._attachedCamera.inertialAlphaOffset!==0||this._attachedCamera.inertialBetaOffset!==0||this._attachedCamera.inertialRadiusOffset!==0||this._attachedCamera.inertialPanningX!==0||this._attachedCamera.inertialPanningY!==0||this._isPointerDown)},r}(),fl=function(){function r(){this.transitionDuration=450,this.lowerRadiusTransitionRange=2,this.upperRadiusTransitionRange=-2,this._autoTransitionRange=!1,this._radiusIsAnimating=!1,this._radiusBounceTransition=null,this._animatables=new Array}return Object.defineProperty(r.prototype,"name",{get:function(){return"Bouncing"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"autoTransitionRange",{get:function(){return this._autoTransitionRange},set:function(t){var e=this;if(this._autoTransitionRange!==t){this._autoTransitionRange=t;var n=this._attachedCamera;n&&(t?this._onMeshTargetChangedObserver=n.onMeshTargetChangedObservable.add(function(i){if(i){i.computeWorldMatrix(!0);var o=i.getBoundingInfo().diagonalLength;e.lowerRadiusTransitionRange=.05*o,e.upperRadiusTransitionRange=.05*o}}):this._onMeshTargetChangedObserver&&n.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver))}},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t,this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){e._attachedCamera&&(e._isRadiusAtLimit(e._attachedCamera.lowerRadiusLimit)&&e._applyBoundRadiusAnimation(e.lowerRadiusTransitionRange),e._isRadiusAtLimit(e._attachedCamera.upperRadiusLimit)&&e._applyBoundRadiusAnimation(e.upperRadiusTransitionRange))})},r.prototype.detach=function(){this._attachedCamera&&(this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null)},r.prototype._isRadiusAtLimit=function(t){return!!this._attachedCamera&&this._attachedCamera.radius===t&&!this._radiusIsAnimating},r.prototype._applyBoundRadiusAnimation=function(t){var e=this;if(this._attachedCamera){this._radiusBounceTransition||(r.EasingFunction.setEasingMode(r.EasingMode),this._radiusBounceTransition=k.CreateAnimation("radius",k.ANIMATIONTYPE_FLOAT,60,r.EasingFunction)),this._cachedWheelPrecision=this._attachedCamera.wheelPrecision,this._attachedCamera.wheelPrecision=1/0,this._attachedCamera.inertialRadiusOffset=0,this.stopAllAnimations(),this._radiusIsAnimating=!0;var n=k.TransitionTo("radius",this._attachedCamera.radius+t,this._attachedCamera,this._attachedCamera.getScene(),60,this._radiusBounceTransition,this.transitionDuration,function(){return e._clearAnimationLocks()});n&&this._animatables.push(n)}},r.prototype._clearAnimationLocks=function(){this._radiusIsAnimating=!1,this._attachedCamera&&(this._attachedCamera.wheelPrecision=this._cachedWheelPrecision)},r.prototype.stopAllAnimations=function(){for(this._attachedCamera&&(this._attachedCamera.animations=[]);this._animatables.length;)this._animatables[0].onAnimationEnd=null,this._animatables[0].stop(),this._animatables.shift()},r.EasingFunction=new $e(.3),r.EasingMode=Ge.EASINGMODE_EASEOUT,r}(),pl=function(){function r(){this._mode=r.FitFrustumSidesMode,this._radiusScale=1,this._positionScale=.5,this._defaultElevation=.3,this._elevationReturnTime=1500,this._elevationReturnWaitTime=1e3,this._zoomStopsAnimation=!1,this._framingTime=1500,this.autoCorrectCameraLimitsAndSensibility=!0,this._isPointerDown=!1,this._lastInteractionTime=-1/0,this._animatables=new Array,this._betaIsAnimating=!1}return Object.defineProperty(r.prototype,"name",{get:function(){return"Framing"},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"mode",{get:function(){return this._mode},set:function(t){this._mode=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"radiusScale",{get:function(){return this._radiusScale},set:function(t){this._radiusScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"positionScale",{get:function(){return this._positionScale},set:function(t){this._positionScale=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"defaultElevation",{get:function(){return this._defaultElevation},set:function(t){this._defaultElevation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elevationReturnTime",{get:function(){return this._elevationReturnTime},set:function(t){this._elevationReturnTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"elevationReturnWaitTime",{get:function(){return this._elevationReturnWaitTime},set:function(t){this._elevationReturnWaitTime=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"zoomStopsAnimation",{get:function(){return this._zoomStopsAnimation},set:function(t){this._zoomStopsAnimation=t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"framingTime",{get:function(){return this._framingTime},set:function(t){this._framingTime=t},enumerable:!1,configurable:!0}),r.prototype.init=function(){},r.prototype.attach=function(t){var e=this;this._attachedCamera=t;var n=this._attachedCamera.getScene();r.EasingFunction.setEasingMode(r.EasingMode),this._onPrePointerObservableObserver=n.onPrePointerObservable.add(function(i){i.type!==Tt.a.POINTERDOWN?i.type===Tt.a.POINTERUP&&(e._isPointerDown=!1):e._isPointerDown=!0}),this._onMeshTargetChangedObserver=t.onMeshTargetChangedObservable.add(function(i){i&&e.zoomOnMesh(i)}),this._onAfterCheckInputsObserver=t.onAfterCheckInputsObservable.add(function(){e._applyUserInteraction(),e._maintainCameraAboveGround()})},r.prototype.detach=function(){if(this._attachedCamera){var t=this._attachedCamera.getScene();this._onPrePointerObservableObserver&&t.onPrePointerObservable.remove(this._onPrePointerObservableObserver),this._onAfterCheckInputsObserver&&this._attachedCamera.onAfterCheckInputsObservable.remove(this._onAfterCheckInputsObserver),this._onMeshTargetChangedObserver&&this._attachedCamera.onMeshTargetChangedObservable.remove(this._onMeshTargetChangedObserver),this._attachedCamera=null}},r.prototype.zoomOnMesh=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null),t.computeWorldMatrix(!0);var i=t.getBoundingInfo().boundingBox;this.zoomOnBoundingInfo(i.minimumWorld,i.maximumWorld,e,n)},r.prototype.zoomOnMeshHierarchy=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null),t.computeWorldMatrix(!0);var i=t.getHierarchyBoundingVectors(!0);this.zoomOnBoundingInfo(i.min,i.max,e,n)},r.prototype.zoomOnMeshesHierarchy=function(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=null);for(var i=new u.e(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),o=new u.e(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=0;a