<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>groupInfo</key>
	<dict>
		<key>expandAfterMode</key>
		<integer>0</integer>
		<key>groupName</key>
		<string>Ascii Memes</string>
		<key>notes</key>
		<string>Please reach out to jeff@smilesoftware.com if there are any other ASCII memes you'd like added to this group.</string>
	</dict>
	<key>snippetsTE2</key>
	<array>
		<dict>
			<key>abbreviation</key>
			<string>stairs</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>Kick Down Stair</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>%filltext:name=Beginning Text:width=20%
 ○ 
く|)へ
    〉 
 ￣￣┗┓              %filltext:name=Ending Text:width=20%
 　 　   ┗┓　     ヾ○ｼ
  　　        ┗┓   ヘ/ 　 　 
 　                 ┗┓ノ 
　 　 　 　 　    ┗┓</string>
			<key>snippetType</key>
			<integer>0</integer>
			<key>uuidString</key>
			<string>6AF55F4C-E97F-4CE2-9D76-8EFE1269EB78</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>hey</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>Psst…hey kid</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>var lineLimit = 24

var message = `%fillarea:name=Message:width=30:height=5%`;
var messageWords = message.split(/\s/)

var lines = []
lines.push("")

var lineCt = 0
var currentLineIndex = 0
for(word of messageWords){
	if((lineCt + word.length) &gt; lineLimit){
		lines.push(word)
		currentLineIndex++
		lineCt = word.length
	}
	else{
		lines[currentLineIndex] += " " + word
		lineCt += (word.length + 1)
	}
}

// center text
for(var i = 0; i &lt; lines.length; i++){
	var lineLength = lines[i].length
        var paddingNeeded = Math.floor((lineLimit-lineLength)/2.0)
	
	var padding = ""
	for(var j = 0; j &lt; paddingNeeded; j++) padding += " "

	lines[i] = padding + lines[i] + padding
}

// center message at index 9, if possible
var outputLines = []
for(var i = 0; i &lt; 15; i++){outputLines.push("")}

var startIndex = 9 - Math.floor(lines.length/2.0)
var endIndex = startIndex + lines.length - 1

if(endIndex &gt;= outputLines.length){
	endIndex -= (endIndex - outputLines.length)
	startIndex -= (endIndex - outputLines.length)
}

if(startIndex &lt; 0) TextExpander.appendOutput("Error: Too much text!")

for(var i = startIndex; i &lt;= endIndex; i++){
	outputLines[i] = lines[i-startIndex]
}

var output = `┳┻|
┻┳|
┳┻|  psst! hey kid!
┻┳|
┳┻|      ${outputLines[0]}
┻┳|      ${outputLines[1]}
┳┻|      ${outputLines[2]}
┻┳|      ${outputLines[3]}
┳┻|      ${outputLines[4]}
┻┳|      ${outputLines[5]}
┳┻|      ${outputLines[6]}
┻┳|      ${outputLines[7]}
┳┻| _    ${outputLines[8]}
┻┳| •.•) ${outputLines[9]}
┳┻|⊂ﾉ    ${outputLines[10]}
┻┳|      ${outputLines[11]}
┳┻|      ${outputLines[12]}
┻┳|      ${outputLines[13]}
┳┻|      ${outputLines[14]}`;

output;%filltop%</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>E0FB709C-C2EB-4C78-B87D-057F1D3E20E4</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>sign</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>Bunny with Sign</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>var lineLimit = 20

var message = `%filltext:name=Message:width=20%`;
var messageWords = message.split(/\s/)

var lines = []
lines.push("")

var lineCt = 0
var currentLineIndex = 0
for(word of messageWords){
	if((lineCt + word.length) &gt; lineLimit){
		lines.push(word)
		currentLineIndex++
		lineCt = word.length
	}
	else{
		lines[currentLineIndex] += " " + word
		lineCt += (word.length + 1)
	}
}

// center text
for(var i = 0; i &lt; lines.length; i++){
	var lineLength = lines[i].length
        var paddingNeeded = Math.floor((lineLimit-lineLength)/2.0)
	
	var padding = ""
	for(var j = 0; j &lt; paddingNeeded; j++) padding += " "

	lines[i] = padding + lines[i] + padding
}

// center message at index 1, if possible
var outputLines = []
for(var i = 0; i &lt; 3; i++){outputLines.push("")}

var startIndex = 1 - Math.floor(lines.length/2.0)
var endIndex = startIndex + lines.length - 1

if(endIndex &gt;= outputLines.length){
	endIndex -= (endIndex - outputLines.length)
	startIndex -= (endIndex - outputLines.length)
}

if(startIndex &lt; 0) TextExpander.appendOutput("Error: Too much text!")

for(var i = 0; i &lt; startIndex; i++){
	outputLines[i] = "                          "
}
for(var i = startIndex; i &lt;= endIndex; i++){
	outputLines[i] = lines[i-startIndex]
}
for(var i = endIndex+1; i &lt; outputLines.length; i++){
	outputLines[i] = "                          "
}

var output = `
|￣￣￣￣￣￣￣ |
|${outputLines[0]}|
|${outputLines[1]}|
|${outputLines[2]}|
| ＿＿＿＿＿＿＿| 
(\__/) || 
(•ㅅ•) || 
/ 　 づ`;

output;%filltop%</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>102B300D-7333-4CE4-968A-719A89904D8A</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>buff</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>Buff bunny</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>var lineLimit = 24

var message = `%filltext:name=My...:width=20%`;
var messageWords = message.split(/\s/)

var lines = []
lines.push("")

var lineCt = 0
var currentLineIndex = 0
for(word of messageWords){
	if((lineCt + word.length) &gt; lineLimit){
		lines.push(word)
		currentLineIndex++
		lineCt = word.length
	}
	else{
		lines[currentLineIndex] += " " + word
		lineCt += (word.length + 1)
	}
}

// center message at index 9, if possible
var outputLines = []
for(var i = 0; i &lt; 4; i++){outputLines.push("")}

var startIndex = 0
var endIndex = Math.min(lines.length,outputLines.length)

if(endIndex &gt;= outputLines.length){
	endIndex -= (endIndex - outputLines.length)
	startIndex -= (endIndex - outputLines.length)
}

if(startIndex &lt; 0) TextExpander.appendOutput("Error: Too much text!")

for(var i = startIndex; i &lt; lines.length; i++){
	outputLines[i] = lines[i]
}

var output = `        (\\__/) 
   ⠀  (•ㅅ•)    ${outputLines[0]} 
　＿ノ ヽ ノ＼  __   ${outputLines[1]}
 /　\`/ ⌒Ｙ⌒ Ｙ　ヽ   ${outputLines[2]} 
( 　(三ヽ人　 /　　 |   ${outputLines[3]} 
|　ﾉ⌒＼ ￣￣ヽ　 ノ    
ヽ＿＿＿＞､＿＿_／ 
　　 ｜( 王 ﾉ〈   (\\__/) 
　　 /ﾐ\`ー―彡\   (•ㅅ•)  me`;

output;%filltop%</string>
			<key>snippetType</key>
			<integer>4</integer>
			<key>uuidString</key>
			<string>F3A703A9-8519-4B1A-9783-39265201E11E</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>house</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>In this house we...</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>┏┓
┃┃╱╲ 
┃╱╱╲╲ In this
╱╱╭╮╲╲  house
▔▏┗┛▕▔          we
╱▔▔▔▔▔▔▔▔▔▔╲
%filltext:name=What do we do?:width=20%
╱╱┏┳┓╭╮┏┳┓ ╲╲
▔▏┗┻┛┃┃┗┻┛▕▔

</string>
			<key>snippetType</key>
			<integer>0</integer>
			<key>uuidString</key>
			<string>23219398-5B85-4073-A10A-5A673973D8C1</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>bunny</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>Bunny with heart</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>{\__/}
( • . •)
/ &gt;♥️ %filltext:name=Top line:width=20%

{\__/}
( • - •)
♥️&lt; \  %filltext:name=Bottom line:width=20%</string>
			<key>snippetType</key>
			<integer>0</integer>
			<key>uuidString</key>
			<string>064CA1BB-C842-4247-B8AF-5ADB661BDF52</string>
		</dict>
		<dict>
			<key>abbreviation</key>
			<string>dancer</string>
			<key>abbreviationMode</key>
			<integer>1</integer>
			<key>creationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>label</key>
			<string>Dancer</string>
			<key>modificationDate</key>
			<date>2022-09-15T05:03:01Z</date>
			<key>plainText</key>
			<string>(•_•)
&lt;)   )╯ %filltext:name=Top line:width=20%
 /    \ 

  (•_•)
 \(   (&gt; %filltext:name=Middle line:width=20%
  /    \

 (•_•)
&lt;)   )╯ %filltext:name=Last line:width=20%</string>
			<key>snippetType</key>
			<integer>0</integer>
			<key>uuidString</key>
			<string>C3A5EDE5-4E2F-477B-A411-119C66360BD3</string>
		</dict>
	</array>
</dict>
</plist>
