# Copy files
rm -rf "./temp"
mkdir "./temp"
wget "https://github.com/NicolasFlamel1/mwcwallet.com/archive/refs/heads/master.zip"
unzip "./master"
cp -r "./mwcwallet.com-master/public_html/." "./temp/"
chmod 777 -R "./temp/"
# Get version
VERSION=$(grep -Po "(?<=VERSION_NUMBER = \").*(?=\";)" "./temp/backend/common.php")
# Compile index.html
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/index.html" > "./temp/index.html"
sed -i "//d" "./temp/index.html"
sed -i "//d" "./temp/index.html"
sed -i "//d" "./temp/index.html"
sed -i "//d" "./temp/index.html"
sed -i "//d" "./temp/index.html"
sed -i "//d" "./temp/index.html"
sed -i "//d" "./temp/index.html"
# Compile styles
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/fonts/btc/btc.css" > "./temp/fonts/btc/btc.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/fonts/eth/eth.css" > "./temp/fonts/eth/eth.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/fonts/font_awesome/font_awesome.css" > "./temp/fonts/font_awesome/font_awesome.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/fonts/grin/grin.css" > "./temp/fonts/grin/grin.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/fonts/mwc/mwc.css" > "./temp/fonts/mwc/mwc.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/fonts/open_sans/open_sans.css" > "./temp/fonts/open_sans/open_sans.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/styles/section.css" > "./temp/styles/section.css"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/styles/unlocked.css" > "./temp/styles/unlocked.css"
# Compile scripts
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/scripts/camera_worker.js" > "./temp/scripts/camera_worker.js"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/scripts/output_worker.js" > "./temp/scripts/output_worker.js"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/scripts/slate_worker.js" > "./temp/scripts/slate_worker.js"
SERVER_NAME="mwcwallet.com" HTTPS="on" NO_FILE_VERSIONS="" NO_FILE_CHECKSUMS="" NO_MINIFIED_FILES="" HTTPS_SERVER_ADDRESS="https://mwcwallet.com" TOR_SERVER_ADDRESS="http://mwcwalletmiq3gdkmfbqlytxunvlxyli4m6zrqozk7xjc353ewqb6bad.onion" php "./mwcwallet.com-master/public_html/scripts/languages.js" > "./temp/scripts/languages.js"
# Inline images
sed -i "s#href=\"\./images/mask_images/mask_image\.svg\"#href=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/mask_images/mask_image.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/america\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/america.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/france\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/france.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/china\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/china.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/greece\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/greece.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/germany\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/germany.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/netherlands\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/netherlands.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/countries/czech_republic\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/countries/czech_republic.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#src=\"\./images/app_icons/app_icon\.svg\"#src=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-57x57\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-57x57.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-76x76\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-76x76.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-114x114\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-114x114.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-120x120\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-120x120.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-144x144\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-144x144.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-152x152\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-152x152.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-167x167\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-167x167.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/touch_icons/touch_icon-180x180\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/touch_icons/touch_icon-180x180.png" | openssl base64 -A`\"#g" "./temp/index.html"
sed -i "s#href=\"\./favicon\.ico\"#href=\"data:image/x-icon;base64,`cat "./mwcwallet.com-master/public_html/favicon.ico" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-16x16\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-16x16.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-24x24\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-24x24.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-32x32\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-32x32.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-48x48\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-48x48.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-64x64\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-64x64.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-114x114\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-114x114.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-120x120\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-120x120.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-128x128\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-128x128.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-144x144\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-144x144.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-152x152\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-152x152.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-180x180\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-180x180.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-192x192\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-192x192.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon-256x256\.png\"#href=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon-256x256.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#href=\"\./images/app_icons/app_icon\.svg\"#href=\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/app_icons/app_icon.svg" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#content=\"\./images/tile_images/tile_image-70x70\.png\"#content=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/tile_images/tile_image-70x70.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#content=\"\./images/tile_images/tile_image-150x150\.png\"#content=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/tile_images/tile_image-150x150.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#content=\"\./images/tile_images/tile_image-310x150\.png\"#content=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/tile_images/tile_image-310x150.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#content=\"\./images/tile_images/tile_image-310x310\.png\"#content=\"data:image/png;base64,`cat "./mwcwallet.com-master/public_html/images/tile_images/tile_image-310x310.png" | openssl base64 -A`\"#" "./temp/index.html"
sed -i "s#url(\"\./images/logo_big\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/logo_big.svg" | openssl base64 -A`\")#" "./temp/index.html"
sed -i "s#url(\"\./images/logo_small\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/logo_small.svg" | openssl base64 -A`\")#" "./temp/index.html"
sed -i "s#url(\"\.\./images/circle\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/circle.svg" | openssl base64 -A`\")#" "./temp/styles/section.css"
sed -i "s#url(\"\.\./images/down_arrow\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/down_arrow.svg" | openssl base64 -A`\")#" "./temp/styles/section.css"
sed -i "s#url(\"\.\./images/logo_small\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/logo_small.svg" | openssl base64 -A`\")#" "./temp/styles/unlocked.css"
sed -i "s#url(\"\.\./images/whale\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/whale.svg" | openssl base64 -A`\")#" "./temp/styles/unlocked.css"
sed -i "s#url(\"\.\./images/ledger\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/ledger.svg" | openssl base64 -A`\")#" "./temp/styles/unlocked.css"
sed -i "s#url(\"\.\./images/usb\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/usb.svg" | openssl base64 -A`\")#" "./temp/styles/unlocked.css"
sed -i "s#url(\"\.\./images/bluetooth\.svg\")#url(\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/bluetooth.svg" | openssl base64 -A`\")#" "./temp/styles/unlocked.css"
sed -i "s#\"\.\" + getResource(StartupImagesCreator\.LOGO_FILE_LOCATION)#\"data:image/svg+xml;base64,`cat "./mwcwallet.com-master/public_html/images/logo_small.svg" | openssl base64 -A`\"#" "./temp/scripts/startup_images_creator.js"
# Inline shaders
sed -i "s#\"\.\" + getResource(Logo\.VERTEX_SHADER_FILE_LOCATION)#\"data:text/plain;base64,`cat "./mwcwallet.com-master/public_html/shaders/logo.vert" | openssl base64 -A`\"#" "./temp/scripts/logo.js"
sed -i "s#\"\.\" + getResource(Logo\.FRAGMENT_SHADER_FILE_LOCATION)#\"data:text/plain;base64,`cat "./mwcwallet.com-master/public_html/shaders/logo.frag" | openssl base64 -A`\"#" "./temp/scripts/logo.js"
# Inline models
sed -i -f - "./temp/scripts/logo.js" << EOF
s#"\." + getResource(Logo\.MODEL_FILE_LOCATION)#"data:application/json;base64,`cat "./mwcwallet.com-master/public_html/models/mwc.json" | openssl base64 -A`"#
EOF
# Inline fonts
sed -i "s#url(\"\.\./\.\./fonts/btc/btc\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/btc/btc.woff" | openssl base64 -A`\")#" "./temp/fonts/btc/btc.css"
sed -i "s#url(\"\.\./\.\./fonts/btc/btc\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/btc/btc.woff2" | openssl base64 -A`\")#" "./temp/fonts/btc/btc.css"
sed -i "s#url(\"\.\./\.\./fonts/eth/eth\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/eth/eth.woff" | openssl base64 -A`\")#" "./temp/fonts/eth/eth.css"
sed -i "s#url(\"\.\./\.\./fonts/eth/eth\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/eth/eth.woff2" | openssl base64 -A`\")#" "./temp/fonts/eth/eth.css"
sed -i "s#url(\"\.\./\.\./fonts/font_awesome/font_awesome-5\.15\.4\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/font_awesome/font_awesome-5.15.4.woff" | openssl base64 -A`\")#" "./temp/fonts/font_awesome/font_awesome.css"
sed -i "s#url(\"\.\./\.\./fonts/font_awesome/font_awesome-5\.15\.4\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/font_awesome/font_awesome-5.15.4.woff2" | openssl base64 -A`\")#" "./temp/fonts/font_awesome/font_awesome.css"
sed -i -f - "./temp/fonts/font_awesome/font_awesome.css" << EOF
s#url("\.\./\.\./fonts/font_awesome/font_awesome_solid-5\.15\.4\.woff")#url("data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/font_awesome/font_awesome_solid-5.15.4.woff" | openssl base64 -A`")#
EOF
sed -i "s#url(\"\.\./\.\./fonts/font_awesome/font_awesome_solid-5\.15\.4\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/font_awesome/font_awesome_solid-5.15.4.woff2" | openssl base64 -A`\")#" "./temp/fonts/font_awesome/font_awesome.css"
sed -i "s#url(\"\.\./\.\./fonts/grin/grin\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/grin/grin.woff" | openssl base64 -A`\")#" "./temp/fonts/grin/grin.css"
sed -i "s#url(\"\.\./\.\./fonts/grin/grin\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/grin/grin.woff2" | openssl base64 -A`\")#" "./temp/fonts/grin/grin.css"
sed -i "s#url(\"\.\./\.\./fonts/mwc/mwc\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/mwc/mwc.woff" | openssl base64 -A`\")#" "./temp/fonts/mwc/mwc.css"
sed -i "s#url(\"\.\./\.\./fonts/mwc/mwc\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/mwc/mwc.woff2" | openssl base64 -A`\")#" "./temp/fonts/mwc/mwc.css"
sed -i "s#url(\"\.\./\.\./fonts/open_sans/open_sans-1\.10\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/open_sans/open_sans-1.10.woff" | openssl base64 -A`\")#" "./temp/fonts/open_sans/open_sans.css"
sed -i "s#url(\"\.\./\.\./fonts/open_sans/open_sans-1\.10\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/open_sans/open_sans-1.10.woff2" | openssl base64 -A`\")#" "./temp/fonts/open_sans/open_sans.css"
sed -i "s#url(\"\.\./\.\./fonts/open_sans/open_sans_semibold-1\.10\.woff\")#url(\"data:font/woff;base64,`cat "./mwcwallet.com-master/public_html/fonts/open_sans/open_sans_semibold-1.10.woff" | openssl base64 -A`\")#" "./temp/fonts/open_sans/open_sans.css"
sed -i "s#url(\"\.\./\.\./fonts/open_sans/open_sans_semibold-1\.10\.woff2\")#url(\"data:font/woff2;base64,`cat "./mwcwallet.com-master/public_html/fonts/open_sans/open_sans_semibold-1.10.woff2" | openssl base64 -A`\")#" "./temp/fonts/open_sans/open_sans.css"
# Inline WASM
sed -i "s#\"\.\" + getResource(\"\./scripts/secp256k1-zkp-0\.0\.29\.wasm\")#\"data:application/wasm;base64,`cat "./mwcwallet.com-master/public_html/scripts/secp256k1-zkp-0.0.29.wasm" | openssl base64 -A`\"#" "./temp/scripts/secp256k1-zkp-0.0.29.js"
sed -i "s#\"\.\" + getResource(\"\./scripts/BLAKE2b-0\.0\.2\.wasm\")#\"data:application/wasm;base64,`cat "./mwcwallet.com-master/public_html/scripts/BLAKE2b-0.0.2.wasm" | openssl base64 -A`\"#" "./temp/scripts/BLAKE2b-0.0.2.js"
sed -i "s#\"\.\" + getResource(\"\./scripts/Ed25519-0\.0\.22\.wasm\")#\"data:application/wasm;base64,`cat "./mwcwallet.com-master/public_html/scripts/Ed25519-0.0.22.wasm" | openssl base64 -A`\"#" "./temp/scripts/Ed25519-0.0.22.js"
sed -i "s#\"\.\" + getResource(\"\./scripts/X25519-0\.0\.23\.wasm\")#\"data:application/wasm;base64,`cat "./mwcwallet.com-master/public_html/scripts/X25519-0.0.23.wasm" | openssl base64 -A`\"#" "./temp/scripts/X25519-0.0.23.js"
sed -i "s#\"\.\" + getResource(\"\./scripts/SMAZ-0\.0\.31\.wasm\")#\"data:application/wasm;base64,`cat "./mwcwallet.com-master/public_html/scripts/SMAZ-0.0.31.wasm" | openssl base64 -A`\"#" "./temp/scripts/SMAZ-0.0.31.js"
# Inline styles
sed -i -e "//r ./temp/fonts/open_sans/open_sans.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/fonts/font_awesome/font_awesome.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/fonts/mwc/mwc.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/fonts/btc/btc.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/fonts/eth/eth.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/fonts/grin/grin.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/normalize.css-8.0.1.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/common.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/tetris.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/logo.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/application.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/unlocked.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/sections.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/settings_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/about_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/transaction_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/account_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/wallet_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/send_payment_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/log_section.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/message.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/install_app.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/cookie_acceptance.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/maintenance_notification.css" -e "//i " -e "//d" "./temp/index.html"
sed -i -e "//r ./temp/styles/language.css" -e "//i " -e "//d" "./temp/index.html"
# Inline web workers
sed -i -e "/importScripts(\"\.\.\/scripts\/BLAKE2b-0\.0\.2\.js\");/r ./temp/scripts/BLAKE2b-0.0.2.js" -e "/importScripts(\"\.\.\/scripts\/BLAKE2b-0\.0\.2\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/Ed25519-0\.0\.22\.js\");/r ./temp/scripts/Ed25519-0.0.22.js" -e "/importScripts(\"\.\.\/scripts\/Ed25519-0\.0\.22\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/js-sha3-0\.8\.0\.js\");/r ./temp/scripts/js-sha3-0.8.0.js" -e "/importScripts(\"\.\.\/scripts\/js-sha3-0\.8\.0\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/js-sha256-0\.9\.0\.js\");/r ./temp/scripts/js-sha256-0.9.0.js" -e "/importScripts(\"\.\.\/scripts\/js-sha256-0\.9\.0\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/secp256k1-zkp-0\.0\.29\.js\");/r ./temp/scripts/secp256k1-zkp-0.0.29.js" -e "/importScripts(\"\.\.\/scripts\/secp256k1-zkp-0\.0\.29\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/SMAZ-0\.0\.31\.js\");/r ./temp/scripts/SMAZ-0.0.31.js" -e "/importScripts(\"\.\.\/scripts\/SMAZ-0\.0\.31\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/hi-base32-0\.5\.1\.js\");/r ./temp/scripts/hi-base32-0.5.1.js" -e "/importScripts(\"\.\.\/scripts\/hi-base32-0\.5\.1\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/bech32-2\.0\.0\.js\");/r ./temp/scripts/bech32-2.0.0.js" -e "/importScripts(\"\.\.\/scripts\/bech32-2\.0\.0\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/base58\.js\");/r ./temp/scripts/base58.js" -e "/importScripts(\"\.\.\/scripts\/base58\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/bignumber\.js-9\.1\.1\.js\");/r ./temp/scripts/bignumber.js-9.1.1.js" -e "/importScripts(\"\.\.\/scripts\/bignumber\.js-9\.1\.1\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/common\.js\");/r ./temp/scripts/common.js" -e "/importScripts(\"\.\.\/scripts\/common\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/consensus\.js\");/r ./temp/scripts/consensus.js" -e "/importScripts(\"\.\.\/scripts\/consensus\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/bit_reader\.js\");/r ./temp/scripts/bit_reader.js" -e "/importScripts(\"\.\.\/scripts\/bit_reader\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/bit_writer\.js\");/r ./temp/scripts/bit_writer.js" -e "/importScripts(\"\.\.\/scripts\/bit_writer\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/crypto\.js\");/r ./temp/scripts/crypto.js" -e "/importScripts(\"\.\.\/scripts\/crypto\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/tor\.js\");/r ./temp/scripts/tor.js" -e "/importScripts(\"\.\.\/scripts\/tor\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/mqs\.js\");/r ./temp/scripts/mqs.js" -e "/importScripts(\"\.\.\/scripts\/mqs\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/slatepack\.js\");/r ./temp/scripts/slatepack.js" -e "/importScripts(\"\.\.\/scripts\/slatepack\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/uuid\.js\");/r ./temp/scripts/uuid.js" -e "/importScripts(\"\.\.\/scripts\/uuid\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/hash\.js\");/r ./temp/scripts/hash.js" -e "/importScripts(\"\.\.\/scripts\/hash\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/slate\.js\");/r ./temp/scripts/slate.js" -e "/importScripts(\"\.\.\/scripts\/slate\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/slate_participant\.js\");/r ./temp/scripts/slate_participant.js" -e "/importScripts(\"\.\.\/scripts\/slate_participant\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/slate_input\.js\");/r ./temp/scripts/slate_input.js" -e "/importScripts(\"\.\.\/scripts\/slate_input\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/slate_output\.js\");/r ./temp/scripts/slate_output.js" -e "/importScripts(\"\.\.\/scripts\/slate_output\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/slate_kernel\.js\");/r ./temp/scripts/slate_kernel.js" -e "/importScripts(\"\.\.\/scripts\/slate_kernel\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/identifier\.js\");/r ./temp/scripts/identifier.js" -e "/importScripts(\"\.\.\/scripts\/identifier\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/output\.js\");/r ./temp/scripts/output.js" -e "/importScripts(\"\.\.\/scripts\/output\.js\");/d" "./temp/scripts/slate_worker.js"
sed -i "/" "./temp/index.html"
sed -i "s/Slate\.WORKER_FILE_LOCATION/window[\"URL\"].createObjectURL(new Blob([document\.getElementById(\"slate_worker\")[\"textContent\"]], {\"type\": \"application\/javascript\"}))/" "./temp/scripts/slate.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/BLAKE2b-0\.0\.2\.js\");/r ./temp/scripts/BLAKE2b-0.0.2.js" -e "/importScripts(\"\.\.\/scripts\/BLAKE2b-0\.0\.2\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/secp256k1-zkp-0\.0\.29\.js\");/r ./temp/scripts/secp256k1-zkp-0.0.29.js" -e "/importScripts(\"\.\.\/scripts\/secp256k1-zkp-0\.0\.29\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/bignumber\.js-9\.1\.1\.js\");/r ./temp/scripts/bignumber.js-9.1.1.js" -e "/importScripts(\"\.\.\/scripts\/bignumber\.js-9\.1\.1\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/common\.js\");/r ./temp/scripts/common.js" -e "/importScripts(\"\.\.\/scripts\/common\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/crypto\.js\");/r ./temp/scripts/crypto.js" -e "/importScripts(\"\.\.\/scripts\/crypto\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/identifier\.js\");/r ./temp/scripts/identifier.js" -e "/importScripts(\"\.\.\/scripts\/identifier\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/proof_builder\.js\");/r ./temp/scripts/proof_builder.js" -e "/importScripts(\"\.\.\/scripts\/proof_builder\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/legacy_proof_builder\.js\");/r ./temp/scripts/legacy_proof_builder.js" -e "/importScripts(\"\.\.\/scripts\/legacy_proof_builder\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/new_proof_builder\.js\");/r ./temp/scripts/new_proof_builder.js" -e "/importScripts(\"\.\.\/scripts\/new_proof_builder\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/view_proof_builder\.js\");/r ./temp/scripts/view_proof_builder.js" -e "/importScripts(\"\.\.\/scripts\/view_proof_builder\.js\");/d" "./temp/scripts/output_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/output\.js\");/r ./temp/scripts/output.js" -e "/importScripts(\"\.\.\/scripts\/output\.js\");/d" "./temp/scripts/output_worker.js"
sed -i "/" "./temp/index.html"
sed -i "s/Output\.WORKER_FILE_LOCATION/window[\"URL\"].createObjectURL(new Blob([document\.getElementById(\"output_worker\")[\"textContent\"]], {\"type\": \"application\/javascript\"}))/" "./temp/scripts/output.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/camera\.js\");/r ./temp/scripts/camera.js" -e "/importScripts(\"\.\.\/scripts\/camera\.js\");/d" "./temp/scripts/camera_worker.js"
sed -i -e "/importScripts(\"\.\.\/scripts\/jsQR-1\.4\.0\.js\");/r ./temp/scripts/jsQR-1.4.0.js" -e "/importScripts(\"\.\.\/scripts\/jsQR-1\.4\.0\.js\");/d" "./temp/scripts/camera_worker.js"
sed -i "/" "./temp/index.html"
sed -i "s/Camera\.WORKER_FILE_LOCATION/window[\"URL\"].createObjectURL(new Blob([document\.getElementById(\"camera_worker\")[\"textContent\"]], {\"type\": \"application\/javascript\"}))/" "./temp/scripts/camera.js"
# Inline scripts
sed -i -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/" -e "/