Add files via upload

This commit is contained in:
Xameren 2025-01-28 16:06:02 +01:00 committed by GitHub
parent 3bbce7e33e
commit 164cf7a12d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 494 additions and 0 deletions

67
404.html Normal file
View file

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 Not found</title>
<style>
body {
background-color: black;
color: white;
text-decoration: none;
}
.about {
margin: 20px 5%;
padding: 20px;
background-color: #0d0d0d8a;
border-radius: 15px;
text-align: left;
color: #e4e4e4;
text-align: center;
}
hr {
border: 1px solid #2f0000
}
pre {
line-height: 0.5; font-size: 12px;
}
</style>
</head>
<body>
<div class="about" aria-label="404 not found" aria-hidden=true>
<hr>
<pre>
__ __ _______ __ __ <br>
| | | | | _ | | | | | <br>
| |__| | | | | | | |__| | <br>
| | | | | | | | <br>
|_____ | | | | | |_____ | <br>
| | | | | | | | <br>
| | | |_| | | | <br>
|__| |_______| |__| <br>
</pre>
<pre>
____ __ ________ _______<br>
| \| | | __ | |_ _|<br>
| | | | | | | | | | <br>
| |\ | | | | | | | <br>
| | \ | | |__| | | | <br>
|__| \__| |________| |__| <br>
</pre>
<pre>
______ ________ __ __ ____ __ _____ <br>
| ____| | __ | | | | | | \| | | _ \ <br>
| |____ | | | | | | | | | | | | | | \ |<br>
| ____| | | | | | | | | | |\ | | | | |<br>
| | | |__| | | |__| | | | \ | | |_/ |<br>
|_| |________| |________| |__| \__| |_____/ <br>
</pre>
<hr>
</div>
<div class="about">
I either deleted it, or it just simply doesnt exist. <br><br>Either way, I think that you should go back to <a href="https://xameren.fsky.io/" style="text-decoration: none; color: rgb(196, 180, 240)">the homepage</a>
</div>
</body>
</html>

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

399
index.html Normal file
View file

@ -0,0 +1,399 @@
<!doctype html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="A nice and simple personal website made by Xameren"><meta name="keywords" content="HTML, CSS, Python, Xameren"><title>Xameren's website</title><style>@keyframes fadeIn{0%{opacity:0}100%{opacity:1}}body{background-color:#00151a;color:#c8c8c8;font-family:Arial,sans-serif;margin:0;padding:0}body{animation:fadeIn 750ms ease-in}h1{text-align:center;margin:20px 0;color:#d2d2d2}#aboutme{color:#d2d2d2}h2{font-size:24px;margin-top:10px}h3{line-break:none;color:#c8c8c8}.container{display:flex;justify-content:center;margin:20px;border:solid rgba(255,0,0,0)}.container a{text-decoration:none}.box{background-color:rgba(1,46,46,.45);border-radius:15px;padding:20px;width:200px;margin:0 10px;text-align:center;box-shadow:0 0 25px rgba(0,114,137,0);border-width:2px;border-style:solid;border-color:#003a2f;padding-bottom:2rem;color:#c8c8c8;transition:border .5s linear}.box h3{color:#c8c8c8}.box p{font-weight:400}#badge,#gaming,#tech{padding-left:2%;padding-right:2%}#badge:hover,#gaming:hover,#tech:hover{border-color:#004e40}#gaming:hover{animation-name:glow-in-gaming;animation-duration:.25s;animation-fill-mode:forwards}#youtube:hover{border-color:rgba(255,0,0,.5);transition:border .25s linear}#discord:hover{border-color:rgba(114,137,218,.5);transition:border .25s linear}#github:hover{border-color:rgba(171,172,172,.5);transition:border .25s linear}#xmpp:hover{border-color:rgba(0,145,89,.75);transition:border .25s linear}.about{margin:20px 25%;padding:20px;background-color:rgba(1,46,46,.45);border-radius:15px;text-align:left;color:#e4e4e4;border-width:2px;border-style:solid;border-color:#003a2f;transition:border .5s linear}@media (max-width:768px){.box{padding:20px;width:130px;margin:0 10px;font-size:13px;white-space:nowrap}.container{margin:5px}.about{margin:20px 5%;padding:20px;background-color:rgba(1,46,46,.45);border-radius:15px;text-align:left;color:#e4e4e4}}.tabbed{margin-left:20px}hr{border:1px solid #004438}#gaming img,#tech img{image-rendering:pixelated;height:16px;width:16px;opacity:.9}#badge img:hover{opacity:1;transition:opacity .1s linear}#badge img{opacity:.5;transition:opacity 1s linear;padding:2px;width:88px;height:31px}#badge{text-decoration:none}a{text-decoration:none;color:#e4e4e4}#code-background{background-color:#00151a;color:rgba(255,255,255,.2);opacity:.5;font-family:'Courier New',monospace;font-size:14px;top:0;left:0;z-index:-1;width:100%;height:100%;overflow:hidden;position:fixed}.snowflake{color:#fff;font-size:1.2rem;position:fixed;top:-10%;animation:fall 5s linear infinite;z-index:-2}@keyframes fall{to{transform:translateY(200vh)}}</style></head><body>
<div id="code-background">
<pre id="code-text">
</pre><noscript id="code-text">I see that you are a based JavaScript denier</noscript></div><div><h1>Xameren</h1><div style="text-align:center">
<span style="display:inline;line-height:0;line-height:0;column-gap:0;padding:0;margin:0">Welcome, visitor number </span>
<img src="/counter.svg" style="display:inline;height:1em;vertical-align:top;line-height:0;column-gap:0;padding:0;margin:0" alt="">
</div>
<div class="container">
<a href="https://www.youtube.com/@XAMEREN">
<div class="box" id="youtube">
<h3>YouTube</h3>@Xameren→
</div>
</a>
<a href="https://github.com/Xameren">
<div class="box" id="github">
<h3>GitHub</h3>Xameren→
</div>
</a>
</div>
<div class="container">
<a href="xmpp:xameren@telepath.im">
<div class="box" id="xmpp">
<h3>XMPP</h3>xameren@telepath.im→
</div>
</a>
<a href="https://discord.com/users/527918645729558548">
<div class="box" id="discord">
<b>
<h3>Discord</h3>
</b>Xameren →
</div>
</a>
</div>
<h2 style="text-align:center" id="aboutme">About Me</h2>
<div class="about" id="tech">
<p></p>
<div style="overflow:hidden;align-items:center;display:flex;justify-content:center;margin-bottom:20px">
<img src="assets/images/code.png" loading="lazy" alt="-" style="height:24px;width:24px;vertical-align:top;margin-right:5px">
<h2 style="text-align:center;vertical-align:bottom;margin:0">Tech skills</h2>
</div>
<hr>
<h3>Front-end dev - HTML and CSS</h3>
<span>Over the years I have been casually learning HTML and CSS in my free time. I have made several, now discontinued and deleted websites. <br>I do not know, nor am I willing to learn javascript. <br>Currently, I have no motivation or projects for me to continue with my learning in this subject. <br>
<br>Front-end projects: <p class="tabbed">
<a href="https://xameren.fsky.io">
<img src="assets/images/mywebsite.png" loading="lazy" alt="-"> This website → <br>
</a>
</span>
</p>
<hr>
<h3>Python</h3>
<span>I have just started learning python about a month ago from the time of writing this. <br>I made a bunch of converters, a text analyser and a Casino (Both are a part of FOSS). <br>The casino has over 1200 lines of goofy, unoptimised code. <br>Still learning python tho, it's quite fun. <br>
<br>Python projects: <p class="tabbed">
<a href="https://github.com/Xameren/Casino">
<img src="assets/images/slot.png" loading="lazy" alt="-"> A casino → <br>
</a>
<a href="https://github.com/Xameren/Txt-File-Analyser">
<img src="assets/images/txt.png" loading="lazy" alt="-"> A text file analyser → <br>
</a>
<a href="https://github.com/Xameren/CS2-evaluation/">
<img src="assets/images/cs2.png"> A CS2 rating script → </a>
</span>
<hr>
</p>
</div>
<div class="about" id="gaming">
<div style="overflow:hidden;align-items:center;display:flex;justify-content:center;margin-bottom:20px">
<img src="assets/images/game.png" loading="lazy" alt="-" style="height:24px;width:24px;vertical-align:top;margin-right:5px">
<h2 style="text-align:center;vertical-align:bottom;margin:0">Gaming</h2>
</div>
<h3>
<hr>CSGO/CS2
</h3>
<span>I have been playing CSGO ever since 2019. I currently have the playtime of over 1000 hours in this game, but am still really bad at it. <br>I am a Silver 4 on most maps which I play, GN Master on wingman and 3500 elo in premier. Note that i dont play premier that much because i keep getting griefers in my games. <br>My inventory is valued at around 40 dollars. <br>
<br>My CS2 stats: <p class="tabbed"></p>
<ul>
<img src="assets/images/analytics.png" loading="lazy" alt="-"> HLTV: 1.03 <br>
<img src="assets/images/crosshair.png" loading="lazy" alt="-"> KD: 0.88 <br>
<img src="assets/images/trophy.png" loading="lazy" alt="-"> WR: 45% <br>
<img src="assets/images/bullet.png" loading="lazy" alt="-"> ADR: 82
</ul>
</span>
<hr>
<h3>Tetr.io</h3>
<span>I have also been playing Tetr.io which is basically a tetris game. I have the playtime of almost 100 hours here. <br>My best rank would be A-, although right now i am unranked. <br>
<br>My tetr.io stats: <br>
<p class="tabbed"></p>
<ul>
<img src="assets/images/clock.png" loading="lazy" alt="-"> Quick play: 820.4m <br>
<img src="assets/images/40line.png" loading="lazy" alt="-"> 40 Line: 1:23.933 <br>
<img src="assets/images/lightning.png" loading="lazy" alt="-"> Blitz: 68 184 <br>
<img src="assets/images/xp.png" loading="lazy" alt="-"> Current XP: 890 000 (top 4%)
</ul>
</span>
<p></p>
<hr>
<h3>Chess</h3>
<span>Another game which i have been playing is chess, where I have played 100's of games. <br>I have been playing chess since 2021 and i would say that i got pretty good at it. <br>
<br>My chess ratings: <br>
<p class="tabbed"></p>
<ul>
<img src="assets/images/puzzle.png" loading="lazy" alt="-"> Puzzles: 2000 <br>
<img src="assets/images/clock.png" loading="lazy" alt="-"> Rapid: 1000 <br>
<img src="assets/images/bullet.png" loading="lazy" alt="-"> Bullet: 800 <br>
<img src="assets/images/lightning.png" loading="lazy" alt="-"> Blitz: 600 <br>
</ul>
</span>
<p></p>
<hr>
<p></p>
</div>
<div class="about" id="badge">
<h2 style="text-align:center">88x31 Badges</h2>
<hr>
<a href="https://xameren.fsky.io/">
<img src="assets/88x31/xameren.png" alt="Xameren's badge" loading="lazy">
</a>
<a href="https://xameren.fsky.io/">
<img src="assets/88x31/qart.png" loading="lazy" alt="QR code" style="height: 31px;width: 31px;padding-left: 10px;">
<br>
<br>
</a>
<a href="https://fsky.io/">
<img src="assets/88x31/fsky.png" loading="lazy" alt="FSKY's badge">
</a>
<a href="https://telepath.im/">
<img src="assets/88x31/telepath.png" loading="lazy" alt="Telepath's badge">
</a>
<a href="https://ari.lt/">
<img src="assets/88x31/arilt.png" loading="lazy" alt="Ari's badge">
</a>
<a href="https://moody.im">
<img src="assets/88x31/georgemoody.png" loading="lazy" alt="Georgemoody's badge">
</a>
<a href="https://h2.gay/">
<img src="https://h2.gay/images/88x31.gif" loading="lazy" alt="Hydrogen's badge">
</a>
<a href="https://freetards.xyz/">
<img src="assets/88x31/lda.png" loading="lazy" alt="LDA's badge">
</a>
<a href="https://purplebored.pl/">
<img src="assets/88x31/purplebored.png" loading="lazy" alt="Purplebored's badge" height="88" width="31">
</a>
<a href="https://arrayinamatrix.xyz/">
<img src="assets/88x31/array.gif" loading="lazy" alt="Array in a Matrix badge">
</a>
<a href="https://emort.al">
<img src="assets/88x31/emortal.png" loading="lazy" alt="Emortal's's badge">
</a>
<a href="https://malgow.net/">
<img src="assets/88x31/malgow.png" loading="lazy" alt="Malgow's badge">
</a>
<a href="https://www.youtube.com/@liropro2786">
<img src="assets/88x31/liro.png" loading="lazy" alt="Liro's badge">
</a>
<a href="https://aleksey-kon-games.fsky.io/">
<img src="assets/88x31/aleksey.png" loading="lazy" alt="Aleksey's badge">
</a>
</div>
</div>
<script src="/typed.js"></script>
<script>let randomNumber = Math.floor(Math.random() * 3) + 1;
if (randomNumber === 1) {
var options = {
strings: [`
def FileMenu():
print("\\033[H\\033[J", end="")
Words = text.split()
WordCount = Counter(Words)
x = "[()],"
y = " :"
TranslateTable = str.maketrans(x, y)
LongestWord = max(Words, key=len)
SmallestWord = min(Words, key=len)
Sentences = [s.strip() for s in re.split(r'[.!?]+', text) if s.strip()]
SentenceCount = len(Sentences) - 1
CharCountNS = sum(len(word) for word in Words)
CharCount = len(text)
print("====== Sentences =======")
print(f"Number of sentences: {SentenceCount}")
print(f"Longest sentence: {max(Sentences, key=len)}")
print(f"Shortest sentence: {min(Sentences, key=len)}\\n")
print("======== Words =========")
print(f"Number of words: {len(Words)}")
print(f"Longest word: {LongestWord}")
print(f"Shortest word: {SmallestWord}\\n")
print("====== Characters ======")
print(f"Character count (no spaces): {CharCountNS}")
print(f"Character count: {CharCount}\\n")
print("======== Other =========")
print("The 5 most common words:")
print(str(WordCount.most_common(5)).replace("), (", "\\n ").translate(TranslateTable))
# i spent too much time here for what i should have...
print("\\n========================")
print("Press enter to choose another file")
input()
def MainMenu(): # amazing menu
global text, FirstTime
while True:
print("\\033[H\\033[J", end="")
if FirstTime == True:
print("Welcome to the Xameren's text file analyser")
FirstTime = False
print("Please enter your file name (for example, \"xameren\", not \"xameren.txt\")")
filechosen = input()
try:
with open(f'{filechosen}.txt', 'r') as file:
text = file.read()
FileMenu()
except Exception as e:
print("Please enter a valid file")
print("error: ", e )
print("\\nIf it shows a \"file missing\" error, but file exists, please restart the app")
time.sleep(5)`
],
typeSpeed: 1,
loop: true
}
}
else if (randomNumber === 2) {
var options = {
strings: [`def Roulette():
global money, wins_roulette, xp
def is_odd(number):
return number % 2 != 0
print("\\033[H\\033[J", end="")
print("🎲 Welcome to Roulette 🎲")
print("The goal of roulette is to predict the spot which the \\"ball\\" will land.\\nYou can bet on specific numbers, colors or whenever the result is odd or even")
print(f"\\nCurrent balance: {money}")
print("Enter your bet or say \\"Color\\" for the color table")
inputlist = ["red", "black", "odd", "even", "1st12", "2nd12", "3rd12"]
userinputroulette = ""
while True:
try:
input_payout_or_bet = input()
bet_roulette = int(input_payout_or_bet)
if -1 &lt; bet_roulette &lt; money+1:
money -= bet_roulette
break
else:
print("Please select a valid bet")
except ValueError:
if input_payout_or_bet.lower() == "color":
print("= Color table =")
print("Red: ", RouletteRed)
print("Black: ", RouletteBlack)
print("Enter your bet or say \\"Color\\" for the color table")
if input_payout_or_bet == "xameren":
print("xamarin???")
else:
print("Please select a valid bet")
print("\\033[H\\033[J", end="")
print("| Select the bet |")
print("+---------------------------+")
print("| Red | Black || Odd | Even |")
print("|===========================|")
print("| 1st 12 | 2nd 12 | 3rd 12 |")
print("|===========================|")
print("| Individual numbers (0-36) |")
print("+---------------------------+")
while True:
try:
input_roulette = input()
if input_roulette in inputlist or -1 &lt; int(input_roulette) &lt; 37:
break
else:
print("Please select a valid option")
except ValueError:
if input_payout_or_bet.lower() == "color":
print("= Color table =")
print("Red: ", RouletteRed)
print("Black: ", RouletteBlack)
print("Enter your bet or say \\"Color\\" for the color table")
else:
print("Please select a valid bet")
userinputroulette = input_roulette
roulette_speed = 0
decor = 1
print("\\033[H\\033[J", end="")
for i in range(random.randint(15, 51)): # change to 1 when testing, the result is 15. The default is random.randint(15, 51)
start_index = i % len(RouletteWheelNumbers)
the_roulette = RouletteWheelNumbers[start_index:start_index+5]
if len(the_roulette) &lt; 5:
the_roulette += RouletteWheelNumbers[:5 - len(the_roulette)]
the_roulette_colors = RouletteWheelColors[start_index:start_index+5]
if len(the_roulette_colors) &lt; 5:
the_roulette_colors += RouletteWheelColors[:5 - len(the_roulette_colors)]
`],
typeSpeed: 1,
loop: true
};
}
else if (randomNumber === 3) {
var options = {
strings: [`def rating(Newkills, NewDeaths, NewAssists, NewHS, NewDamage, NewRounds, NewWin, AddMatchTotal, MatchDate = "N/A"):
global TotalRating, Rounds, Kills, Deaths, Assists, HS, Damage, Matches, TotalAssistRating, TotalDamageRating, TotalHSrating,TotalKillRating, GameList, TotalTotalRating, Wins, Draws, Losses
KillRating = round((Newkills/NewDeaths)/2, 3)
AssistRating = round(NewAssists/8, 3)
HSrating = round(NewHS/100, 3)
DamageRating = NewDamage/(135*NewRounds)
KillRating = min(Newkills/(NewRounds*1.25), 1)*0.4+min((Newkills/NewDeaths)/1.25, 1)*0.4-min(NewDeaths/NewRounds, 1)*0.2
AssistRating= min(NewAssists/(NewRounds*0.5), 1)*0.6+min(NewAssists/(NewAssists+Newkills), 1)*0.4
HSrating = NewHS/100*0.6+min(NewHS/100*Newkills/Newkills, 1)*0.4
DamageRating = min(NewDamage/(NewRounds*125), 1)*0.5+min(Newkills/(NewRounds*1.25), 1)*0.3+min(NewDamage/Newkills/125, 1)*0.2
if AddMatchTotal:
MatchDate = datetime.now().strftime("%d/%m/%Y")
if NewWin == "y":
Wins += 1
elif NewWin == "draw":
Draws += 1
elif NewWin == "n":
Losses += 1
if KillRating > 1:
KillRating = 1
if AssistRating > 1:
AssistRating = 1
if HSrating > 1:
HSrating = 1
if DamageRating > 1:
DamageRating = 1
TotalRating = KillRating*0.3+DamageRating*0.3+HSrating*0.2+AssistRating*0.2
if AddMatchTotal:
Kills += Newkills
Deaths += NewDeaths
Assists += NewAssists
HS += NewHS
Damage += NewDamage
Rounds += NewRounds
TotalAssistRating += AssistRating
TotalDamageRating += DamageRating
TotalHSrating += HSrating
TotalKillRating += KillRating
TotalTotalRating += 0.4*KillRating+0.3*DamageRating+0.2*HSrating+0.1*AssistRating
Matches += 1
TotalTotalRating = 0.4*TotalKillRating+0.3*TotalDamageRating+0.2*TotalHSrating+0.1*TotalAssistRating
GameList.insert(0, f"K: {Newkills}, D: {NewDeaths}, A: {NewAssists}, HS: {NewHS}, DMG: {NewDamage}, Rounds: {NewRounds}, Win: {NewWin}, Date: {MatchDate}")
matchstats(Newkills, NewDeaths, NewAssists, NewHS, NewDamage, NewRounds, NewWin, AssistRating, HSrating, KillRating, DamageRating, TotalRating, MatchDate)
def mainmenu():
while True:
save()
print("\\033[H\\033[J", end="")
print(f"Welcome, {BOLD}{Username}{END}")
print("What would you like to do?")
print("s) Show my profile")
print("a) Add a match")
print("r) Remove a match")
print("q) Quit")
inputmenu = input("Your choise: ").lower()
if inputmenu == "s":
profile()
if inputmenu == "a":
addmatch()
if inputmenu == "r":
removematch()
elif inputmenu == "q":
sys.exit()
`],
typeSpeed: 1,
loop: true
};
}
var typed = new Typed("#code-text", options);</script>
<script>// Generate snowflakes dynamically
const snowContainer = document.createElement("div");
document.body.appendChild(snowContainer);
for (let i = -30; i < 100; i++) {
const snowflake = document.createElement("div");
snowflake.textContent = "❄";
snowflake.classList.add("snowflake");
snowflake.style.left = Math.random() * 100 + "vw";
snowflake.style.top = Math.random() * (-100) + "%";
snowflake.style.animationDuration = Math.random() * 5 + 7 + "s";
snowflake.style.opacity = Math.random();
snowContainer.appendChild(snowflake);
}</script></body></html>

3
robots.txt Normal file
View file

@ -0,0 +1,3 @@
# helo kind compootahs
User-agent: *
Disallow: /counter.svg

25
typed.js Normal file
View file

@ -0,0 +1,25 @@
/* The MIT License (MIT)
Copyright (c) 2023 Matt Boldt
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. */
!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):(t||self).Typed=s()}(this,function(){function t(){return t=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var e=arguments[s];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}return t},t.apply(this,arguments)}var s={strings:["These are the default values...","You know what you should do?","Use your own!","Have a great day!"],stringsElement:null,typeSpeed:0,startDelay:0,backSpeed:0,smartBackspace:!0,shuffle:!1,backDelay:700,fadeOut:!1,fadeOutClass:"typed-fade-out",fadeOutDelay:500,loop:!1,loopCount:Infinity,showCursor:!0,cursorChar:"|",autoInsertCss:!0,attr:null,bindInputFocusEvents:!1,contentType:"html",onBegin:function(t){},onComplete:function(t){},preStringTyped:function(t,s){},onStringTyped:function(t,s){},onLastStringBackspaced:function(t){},onTypingPaused:function(t,s){},onTypingResumed:function(t,s){},onReset:function(t){},onStop:function(t,s){},onStart:function(t,s){},onDestroy:function(t){}},e=new(/*#__PURE__*/function(){function e(){}var n=e.prototype;return n.load=function(e,n,i){if(e.el="string"==typeof i?document.querySelector(i):i,e.options=t({},s,n),e.isInput="input"===e.el.tagName.toLowerCase(),e.attr=e.options.attr,e.bindInputFocusEvents=e.options.bindInputFocusEvents,e.showCursor=!e.isInput&&e.options.showCursor,e.cursorChar=e.options.cursorChar,e.cursorBlinking=!0,e.elContent=e.attr?e.el.getAttribute(e.attr):e.el.textContent,e.contentType=e.options.contentType,e.typeSpeed=e.options.typeSpeed,e.startDelay=e.options.startDelay,e.backSpeed=e.options.backSpeed,e.smartBackspace=e.options.smartBackspace,e.backDelay=e.options.backDelay,e.fadeOut=e.options.fadeOut,e.fadeOutClass=e.options.fadeOutClass,e.fadeOutDelay=e.options.fadeOutDelay,e.isPaused=!1,e.strings=e.options.strings.map(function(t){return t.trim()}),e.stringsElement="string"==typeof e.options.stringsElement?document.querySelector(e.options.stringsElement):e.options.stringsElement,e.stringsElement){e.strings=[],e.stringsElement.style.cssText="clip: rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px;";var r=Array.prototype.slice.apply(e.stringsElement.children),o=r.length;if(o)for(var a=0;a<o;a+=1)e.strings.push(r[a].innerHTML.trim())}for(var u in e.strPos=0,e.currentElContent=this.getCurrentElContent(e),e.currentElContent&&e.currentElContent.length>0&&(e.strPos=e.currentElContent.length-1,e.strings.unshift(e.currentElContent)),e.sequence=[],e.strings)e.sequence[u]=u;e.arrayPos=0,e.stopNum=0,e.loop=e.options.loop,e.loopCount=e.options.loopCount,e.curLoop=0,e.shuffle=e.options.shuffle,e.pause={status:!1,typewrite:!0,curString:"",curStrPos:0},e.typingComplete=!1,e.autoInsertCss=e.options.autoInsertCss,e.autoInsertCss&&(this.appendCursorAnimationCss(e),this.appendFadeOutAnimationCss(e))},n.getCurrentElContent=function(t){return t.attr?t.el.getAttribute(t.attr):t.isInput?t.el.value:"html"===t.contentType?t.el.innerHTML:t.el.textContent},n.appendCursorAnimationCss=function(t){var s="data-typed-js-cursor-css";if(t.showCursor&&!document.querySelector("["+s+"]")){var e=document.createElement("style");e.setAttribute(s,"true"),e.innerHTML="\n .typed-cursor{\n opacity: 1;\n }\n .typed-cursor.typed-cursor--blink{\n animation: typedjsBlink 0.7s infinite;\n -webkit-animation: typedjsBlink 0.7s infinite;\n animation: typedjsBlink 0.7s infinite;\n }\n @keyframes typedjsBlink{\n 50% { opacity: 0.0; }\n }\n @-webkit-keyframes typedjsBlink{\n 0% { opacity: 1; }\n 50% { opacity: 0.0; }\n 100% { opacity: 1; }\n }\n ",document.body.appendChild(e)}},n.appendFadeOutAnimationCss=function(t){var s="data-typed-fadeout-js-css";if(t.fadeOut&&!document.querySelector("["+s+"]")){var e=document.createElement("style");e.setAttribute(s,"true"),e.innerHTML="\n .typed-fade-out{\n opacity: 0;\n transition: opacity .25s;\n }\n .typed-cursor.typed-cursor--blink.typed-fade-out{\n -webkit-animation: 0;\n animation: 0;\n }\n ",document.body.appendChild(e)}},e}()),n=new(/*#__PURE__*/function(){function t(){}var s=t.prototype;return s.typeHtmlChars=function(t,s,e){if("html"!==e.contentType)return s;var n=t.substring(s).charAt(0);if("<"===n||"&"===n){var i;for(i="<"===n?">":";";t.substring(s+1).charAt(0)!==i&&!(1+ ++s>t.length););s++}return s},s.backSpaceHtmlChars=function(t,s,e){if("html"!==e.contentType)return s;var n=t.substring(s).charAt(0);if(">"===n||";"===n){var i;for(i=">"===n?"<":"&";t.substring(s-1).charAt(0)!==i&&!(--s<0););s--}return s},t}());/*#__PURE__*/
return function(){function t(t,s){e.load(this,s,t),this.begin()}var s=t.prototype;return s.toggle=function(){this.pause.status?this.start():this.stop()},s.stop=function(){this.typingComplete||this.pause.status||(this.toggleBlinking(!0),this.pause.status=!0,this.options.onStop(this.arrayPos,this))},s.start=function(){this.typingComplete||this.pause.status&&(this.pause.status=!1,this.pause.typewrite?this.typewrite(this.pause.curString,this.pause.curStrPos):this.backspace(this.pause.curString,this.pause.curStrPos),this.options.onStart(this.arrayPos,this))},s.destroy=function(){this.reset(!1),this.options.onDestroy(this)},s.reset=function(t){void 0===t&&(t=!0),clearInterval(this.timeout),this.replaceText(""),this.cursor&&this.cursor.parentNode&&(this.cursor.parentNode.removeChild(this.cursor),this.cursor=null),this.strPos=0,this.arrayPos=0,this.curLoop=0,t&&(this.insertCursor(),this.options.onReset(this),this.begin())},s.begin=function(){var t=this;this.options.onBegin(this),this.typingComplete=!1,this.shuffleStringsIfNeeded(this),this.insertCursor(),this.bindInputFocusEvents&&this.bindFocusEvents(),this.timeout=setTimeout(function(){0===t.strPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],t.strPos):t.backspace(t.strings[t.sequence[t.arrayPos]],t.strPos)},this.startDelay)},s.typewrite=function(t,s){var e=this;this.fadeOut&&this.el.classList.contains(this.fadeOutClass)&&(this.el.classList.remove(this.fadeOutClass),this.cursor&&this.cursor.classList.remove(this.fadeOutClass));var i=this.humanizer(this.typeSpeed),r=1;!0!==this.pause.status?this.timeout=setTimeout(function(){s=n.typeHtmlChars(t,s,e);var i=0,o=t.substring(s);if("^"===o.charAt(0)&&/^\^\d+/.test(o)){var a=1;a+=(o=/\d+/.exec(o)[0]).length,i=parseInt(o),e.temporaryPause=!0,e.options.onTypingPaused(e.arrayPos,e),t=t.substring(0,s)+t.substring(s+a),e.toggleBlinking(!0)}if("`"===o.charAt(0)){for(;"`"!==t.substring(s+r).charAt(0)&&(r++,!(s+r>t.length)););var u=t.substring(0,s),p=t.substring(u.length+1,s+r),c=t.substring(s+r+1);t=u+p+c,r--}e.timeout=setTimeout(function(){e.toggleBlinking(!1),s>=t.length?e.doneTyping(t,s):e.keepTyping(t,s,r),e.temporaryPause&&(e.temporaryPause=!1,e.options.onTypingResumed(e.arrayPos,e))},i)},i):this.setPauseStatus(t,s,!0)},s.keepTyping=function(t,s,e){0===s&&(this.toggleBlinking(!1),this.options.preStringTyped(this.arrayPos,this));var n=t.substring(0,s+=e);this.replaceText(n),this.typewrite(t,s)},s.doneTyping=function(t,s){var e=this;this.options.onStringTyped(this.arrayPos,this),this.toggleBlinking(!0),this.arrayPos===this.strings.length-1&&(this.complete(),!1===this.loop||this.curLoop===this.loopCount)||(this.timeout=setTimeout(function(){e.backspace(t,s)},this.backDelay))},s.backspace=function(t,s){var e=this;if(!0!==this.pause.status){if(this.fadeOut)return this.initFadeOut();this.toggleBlinking(!1);var i=this.humanizer(this.backSpeed);this.timeout=setTimeout(function(){s=n.backSpaceHtmlChars(t,s,e);var i=t.substring(0,s);if(e.replaceText(i),e.smartBackspace){var r=e.strings[e.arrayPos+1];e.stopNum=r&&i===r.substring(0,s)?s:0}s>e.stopNum?(s--,e.backspace(t,s)):s<=e.stopNum&&(e.arrayPos++,e.arrayPos===e.strings.length?(e.arrayPos=0,e.options.onLastStringBackspaced(),e.shuffleStringsIfNeeded(),e.begin()):e.typewrite(e.strings[e.sequence[e.arrayPos]],s))},i)}else this.setPauseStatus(t,s,!1)},s.complete=function(){this.options.onComplete(this),this.loop?this.curLoop++:this.typingComplete=!0},s.setPauseStatus=function(t,s,e){this.pause.typewrite=e,this.pause.curString=t,this.pause.curStrPos=s},s.toggleBlinking=function(t){this.cursor&&(this.pause.status||this.cursorBlinking!==t&&(this.cursorBlinking=t,t?this.cursor.classList.add("typed-cursor--blink"):this.cursor.classList.remove("typed-cursor--blink")))},s.humanizer=function(t){return Math.round(Math.random()*t/2)+t},s.shuffleStringsIfNeeded=function(){this.shuffle&&(this.sequence=this.sequence.sort(function(){return Math.random()-.5}))},s.initFadeOut=function(){var t=this;return this.el.className+=" "+this.fadeOutClass,this.cursor&&(this.cursor.className+=" "+this.fadeOutClass),setTimeout(function(){t.arrayPos++,t.replaceText(""),t.strings.length>t.arrayPos?t.typewrite(t.strings[t.sequence[t.arrayPos]],0):(t.typewrite(t.strings[0],0),t.arrayPos=0)},this.fadeOutDelay)},s.replaceText=function(t){this.attr?this.el.setAttribute(this.attr,t):this.isInput?this.el.value=t:"html"===this.contentType?this.el.innerHTML=t:this.el.textContent=t},s.bindFocusEvents=function(){var t=this;this.isInput&&(this.el.addEventListener("focus",function(s){t.stop()}),this.el.addEventListener("blur",function(s){t.el.value&&0!==t.el.value.length||t.start()}))},s.insertCursor=function(){this.showCursor&&(this.cursor||(this.cursor=document.createElement("span"),this.cursor.className="typed-cursor",this.cursor.setAttribute("aria-hidden",!0),this.cursor.innerHTML=this.cursorChar,this.el.parentNode&&this.el.parentNode.insertBefore(this.cursor,this.el.nextSibling)))},t}()});
//# sourceMappingURL=typed.umd.js.map