final code
1
build/app/intermediates/flutter/release/.last_build_id
Normal file
@@ -0,0 +1 @@
|
||||
75300ac3d4d5df0759c921f3ebfaeb3d
|
||||
BIN
build/app/intermediates/flutter/release/arm64-v8a/app.so
Normal file
BIN
build/app/intermediates/flutter/release/armeabi-v7a/app.so
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"assets/fonts/Nunito-Bold.ttf":["assets/fonts/Nunito-Bold.ttf"],"assets/fonts/Nunito-BoldItalic.ttf":["assets/fonts/Nunito-BoldItalic.ttf"],"assets/fonts/Nunito-ExtraBold.ttf":["assets/fonts/Nunito-ExtraBold.ttf"],"assets/fonts/Nunito-ExtraBoldItalic.ttf":["assets/fonts/Nunito-ExtraBoldItalic.ttf"],"assets/fonts/Nunito-Italic.ttf":["assets/fonts/Nunito-Italic.ttf"],"assets/fonts/Nunito-Light.ttf":["assets/fonts/Nunito-Light.ttf"],"assets/fonts/Nunito-LightItalic.ttf":["assets/fonts/Nunito-LightItalic.ttf"],"assets/fonts/Nunito-Medium.ttf":["assets/fonts/Nunito-Medium.ttf"],"assets/fonts/Nunito-MediumItalic.ttf":["assets/fonts/Nunito-MediumItalic.ttf"],"assets/fonts/Nunito-Regular.ttf":["assets/fonts/Nunito-Regular.ttf"],"assets/fonts/Nunito-SemiBold.ttf":["assets/fonts/Nunito-SemiBold.ttf"],"assets/fonts/Nunito-SemiBoldItalic.ttf":["assets/fonts/Nunito-SemiBoldItalic.ttf"],"assets/images/cart.jpg":["assets/images/cart.jpg"],"assets/images/cartempty.jpg":["assets/images/cartempty.jpg"],"assets/images/pngs/onboard_man.png":["assets/images/pngs/onboard_man.png"],"assets/images/pngs/placeHolder.png":["assets/images/pngs/placeHolder.png"],"assets/images/pngs/splash.png":["assets/images/pngs/splash.png"],"assets/images/svgs/add.svg":["assets/images/svgs/add.svg"],"assets/images/svgs/back.svg":["assets/images/svgs/back.svg"],"assets/images/svgs/remove.svg":["assets/images/svgs/remove.svg"],"assets/images/svgs/splash.svg":["assets/images/svgs/splash.svg"],"assets/images/wishlist.jpg":["assets/images/wishlist.jpg"],"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/flutter_google_places/assets/google_black.png":["packages/flutter_google_places/assets/google_black.png"],"packages/flutter_google_places/assets/google_white.png":["packages/flutter_google_places/assets/google_white.png"],"packages/flutter_inappwebview/assets/t_rex_runner/t-rex.css":["packages/flutter_inappwebview/assets/t_rex_runner/t-rex.css"],"packages/flutter_inappwebview/assets/t_rex_runner/t-rex.html":["packages/flutter_inappwebview/assets/t_rex_runner/t-rex.html"],"packages/flutter_inappwebview_web/assets/web/web_support.js":["packages/flutter_inappwebview_web/assets/web/web_support.js"],"packages/flutter_rating_stars/assets/star_off.png":["packages/flutter_rating_stars/assets/star_off.png"],"packages/fluttertoast/assets/toastify.css":["packages/fluttertoast/assets/toastify.css"],"packages/fluttertoast/assets/toastify.js":["packages/fluttertoast/assets/toastify.js"],"packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf":["packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf"]}
|
||||
@@ -0,0 +1 @@
|
||||
[{"family":"MaterialIcons","fonts":[{"asset":"fonts/MaterialIcons-Regular.otf"}]},{"family":"Nunito","fonts":[{"asset":"assets/fonts/Nunito-Regular.ttf"},{"asset":"assets/fonts/Nunito-Italic.ttf"},{"asset":"assets/fonts/Nunito-Light.ttf"},{"asset":"assets/fonts/Nunito-LightItalic.ttf"},{"asset":"assets/fonts/Nunito-Medium.ttf"},{"asset":"assets/fonts/Nunito-MediumItalic.ttf"},{"asset":"assets/fonts/Nunito-SemiBold.ttf"},{"asset":"assets/fonts/Nunito-SemiBoldItalic.ttf"},{"asset":"assets/fonts/Nunito-Bold.ttf"},{"asset":"assets/fonts/Nunito-BoldItalic.ttf"},{"asset":"assets/fonts/Nunito-ExtraBold.ttf"},{"asset":"assets/fonts/Nunito-ExtraBoldItalic.ttf"}]},{"family":"packages/cupertino_icons/CupertinoIcons","fonts":[{"asset":"packages/cupertino_icons/assets/CupertinoIcons.ttf"}]},{"family":"packages/material_design_icons_flutter/Material Design Icons","fonts":[{"asset":"packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf"}]}]
|
||||
BIN
build/app/intermediates/flutter/release/flutter_assets/NOTICES.Z
Normal file
|
After Width: | Height: | Size: 2.6 MiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 148 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15 7H9V1C9 0.447719 8.55228 0 8 0C7.44772 0 7 0.447719 7 1V7H1C0.447719 7 0 7.44772 0 8C0 8.55228 0.447719 9 1 9H7V15C7 15.5523 7.44772 16 8 16C8.55228 16 9 15.5523 9 15V9H15C15.5523 9 16 8.55228 16 8C16 7.44772 15.5523 7 15 7Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 357 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="9" height="18" viewBox="0 0 9 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.00009 16.92L1.48009 10.4C0.710088 9.62999 0.710088 8.36999 1.48009 7.59999L8.00009 1.07999" stroke="#1A1A1A" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 313 B |
@@ -0,0 +1,3 @@
|
||||
<svg width="12" height="3" viewBox="0 0 12 3" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<line x1="1.25" y1="1.75" x2="10.75" y2="1.75" stroke="#979899" stroke-width="2.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 209 B |
|
After Width: | Height: | Size: 122 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
@@ -0,0 +1,59 @@
|
||||
#main-frame-error {
|
||||
box-sizing: border-box;
|
||||
padding: 0 10%;
|
||||
font-size: 1em;
|
||||
line-height: 1.55;
|
||||
margin: 0 auto;
|
||||
max-width: 600px;
|
||||
padding-top: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
#main-content {
|
||||
font-size: 1em;
|
||||
line-height: 1.55;
|
||||
margin: 0 auto;
|
||||
max-width: 600px;
|
||||
padding-top: 100px;
|
||||
width: 100%;
|
||||
}
|
||||
#t-rex-icon {
|
||||
font-size: 1em;
|
||||
line-height: 1.55;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100%;
|
||||
height: 72px;
|
||||
margin: 0 0 40px;
|
||||
width: 72px;
|
||||
display: inline-block;
|
||||
content: -webkit-image-set(
|
||||
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABIAQMAAABvIyEEAAAABlBMVEUAAABTU1OoaSf/AAAAAXRSTlMAQObYZgAAAGxJREFUeF7tyMEJwkAQRuFf5ipMKxYQiJ3Z2nSwrWwBA0+DQZcdxEOueaePp9+dQZFB7GpUcURSVU66yVNFj6LFICatThZB6r/ko/pbRpUgilY0Cbw5sNmb9txGXUKyuH7eV25x39DtJXUNPQGJtWFV+BT/QAAAAABJRU5ErkJggg==)
|
||||
1x,
|
||||
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACQBAMAAAAVaP+LAAAAGFBMVEUAAABTU1NNTU1TU1NPT09SUlJSUlJTU1O8B7DEAAAAB3RSTlMAoArVKvVgBuEdKgAAAJ1JREFUeF7t1TEOwyAMQNG0Q6/UE+RMXD9d/tC6womIFSL9P+MnAYOXeTIzMzMzMzMzaz8J9Ri6HoITmuHXhISE8nEh9yxDh55aCEUoTGbbQwjqHwIkRAEiIaG0+0AA9VBMaE89Rogeoww936MQrWdBr4GN/z0IAdQ6nQ/FIpRXDwHcA+JIJcQowQAlFUA0MfQpXLlVQfkzR4igS6ENjknm/wiaGhsAAAAASUVORK5CYII=)
|
||||
2x
|
||||
);
|
||||
position: relative;
|
||||
visibility: hidden;
|
||||
}
|
||||
#offline-resources {
|
||||
display: none;
|
||||
}
|
||||
#main-frame-error > .runner-container {
|
||||
height: 150px;
|
||||
max-width: 600px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
top: 35px;
|
||||
width: 44px;
|
||||
}
|
||||
#main-frame-error > .controller {
|
||||
background: rgba(247, 247, 247, 0.1);
|
||||
height: 100vh;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100vw;
|
||||
z-index: 9;
|
||||
}
|
||||
#main-frame-error .hidden {
|
||||
display: none;
|
||||
}
|
||||
@@ -0,0 +1,589 @@
|
||||
window.flutter_inappwebview = {
|
||||
webViews: {},
|
||||
createFlutterInAppWebView: function(viewId, iframeId) {
|
||||
var webView = {
|
||||
viewId: viewId,
|
||||
iframeId: iframeId,
|
||||
iframe: null,
|
||||
iframeContainer: null,
|
||||
windowAutoincrementId: 0,
|
||||
windows: {},
|
||||
isFullscreen: false,
|
||||
documentTitle: null,
|
||||
functionMap: {},
|
||||
settings: {},
|
||||
disableContextMenuHandler: function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
return false;
|
||||
},
|
||||
prepare: function(settings) {
|
||||
webView.settings = settings;
|
||||
var iframe = document.getElementById(iframeId);
|
||||
var iframeContainer = document.getElementById(iframeId + '-container');
|
||||
|
||||
document.addEventListener('fullscreenchange', function(event) {
|
||||
// document.fullscreenElement will point to the element that
|
||||
// is in fullscreen mode if there is one. If there isn't one,
|
||||
// the value of the property is null.
|
||||
if (document.fullscreenElement && document.fullscreenElement.id == iframeId) {
|
||||
webView.isFullscreen = true;
|
||||
window.flutter_inappwebview.nativeCommunication('onEnterFullscreen', viewId);
|
||||
} else if (!document.fullscreenElement && webView.isFullscreen) {
|
||||
webView.isFullscreen = false;
|
||||
window.flutter_inappwebview.nativeCommunication('onExitFullscreen', viewId);
|
||||
} else {
|
||||
webView.isFullscreen = false;
|
||||
}
|
||||
});
|
||||
|
||||
if (iframe != null) {
|
||||
webView.iframe = iframe;
|
||||
webView.iframeContainer = iframeContainer;
|
||||
iframe.addEventListener('load', function (event) {
|
||||
webView.windowAutoincrementId = 0;
|
||||
webView.windows = {};
|
||||
|
||||
var url = iframe.src;
|
||||
try {
|
||||
url = iframe.contentWindow.location.href;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
window.flutter_inappwebview.nativeCommunication('onLoadStart', viewId, [url]);
|
||||
|
||||
try {
|
||||
var oldLogs = {
|
||||
'log': iframe.contentWindow.console.log,
|
||||
'debug': iframe.contentWindow.console.debug,
|
||||
'error': iframe.contentWindow.console.error,
|
||||
'info': iframe.contentWindow.console.info,
|
||||
'warn': iframe.contentWindow.console.warn
|
||||
};
|
||||
for (var k in oldLogs) {
|
||||
(function(oldLog) {
|
||||
iframe.contentWindow.console[oldLog] = function() {
|
||||
var message = '';
|
||||
for (var i in arguments) {
|
||||
if (message == '') {
|
||||
message += arguments[i];
|
||||
} else {
|
||||
message += ' ' + arguments[i];
|
||||
}
|
||||
}
|
||||
oldLogs[oldLog].call(iframe.contentWindow.console, ...arguments);
|
||||
window.flutter_inappwebview.nativeCommunication('onConsoleMessage', viewId, [oldLog, message]);
|
||||
}
|
||||
})(k);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
try {
|
||||
var originalPushState = iframe.contentWindow.history.pushState;
|
||||
iframe.contentWindow.history.pushState = function (state, unused, url) {
|
||||
originalPushState.call(iframe.contentWindow.history, state, unused, url);
|
||||
var iframeUrl = iframe.src;
|
||||
try {
|
||||
iframeUrl = iframe.contentWindow.location.href;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
window.flutter_inappwebview.nativeCommunication('onUpdateVisitedHistory', viewId, [iframeUrl]);
|
||||
};
|
||||
|
||||
var originalReplaceState = iframe.contentWindow.history.replaceState;
|
||||
iframe.contentWindow.history.replaceState = function (state, unused, url) {
|
||||
originalReplaceState.call(iframe.contentWindow.history, state, unused, url);
|
||||
var iframeUrl = iframe.src;
|
||||
try {
|
||||
iframeUrl = iframe.contentWindow.location.href;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
window.flutter_inappwebview.nativeCommunication('onUpdateVisitedHistory', viewId, [iframeUrl]);
|
||||
};
|
||||
|
||||
var originalOpen = iframe.contentWindow.open;
|
||||
iframe.contentWindow.open = function (url, target, windowFeatures) {
|
||||
var newWindow = originalOpen.call(iframe.contentWindow, ...arguments);
|
||||
var windowId = webView.windowAutoincrementId;
|
||||
webView.windowAutoincrementId++;
|
||||
webView.windows[windowId] = newWindow;
|
||||
window.flutter_inappwebview.nativeCommunication('onCreateWindow', viewId, [windowId, url, target, windowFeatures]).then(function(){}, function(handledByClient) {
|
||||
if (handledByClient) {
|
||||
newWindow.close();
|
||||
}
|
||||
});
|
||||
return newWindow;
|
||||
};
|
||||
|
||||
var originalPrint = iframe.contentWindow.print;
|
||||
iframe.contentWindow.print = function() {
|
||||
var iframeUrl = iframe.src;
|
||||
try {
|
||||
iframeUrl = iframe.contentWindow.location.href;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
window.flutter_inappwebview.nativeCommunication('onPrintRequest', viewId, [iframeUrl]);
|
||||
originalPrint.call(iframe.contentWindow);
|
||||
};
|
||||
|
||||
webView.functionMap = {
|
||||
"window.open": iframe.contentWindow.open,
|
||||
"window.print": iframe.contentWindow.print,
|
||||
"window.history.pushState": iframe.contentWindow.history.pushState,
|
||||
"window.history.replaceState": iframe.contentWindow.history.replaceState,
|
||||
}
|
||||
|
||||
var initialTitle = iframe.contentDocument.title;
|
||||
var titleEl = iframe.contentDocument.querySelector('title');
|
||||
webView.documentTitle = initialTitle;
|
||||
window.flutter_inappwebview.nativeCommunication('onTitleChanged', viewId, [initialTitle]);
|
||||
if (titleEl != null) {
|
||||
new MutationObserver(function(mutations) {
|
||||
var title = mutations[0].target.innerText;
|
||||
if (title != webView.documentTitle) {
|
||||
webView.documentTitle = title;
|
||||
window.flutter_inappwebview.nativeCommunication('onTitleChanged', viewId, [title]);
|
||||
}
|
||||
}).observe(
|
||||
titleEl,
|
||||
{ subtree: true, characterData: true, childList: true }
|
||||
);
|
||||
}
|
||||
|
||||
var oldPixelRatio = iframe.contentWindow.devicePixelRatio;
|
||||
iframe.contentWindow.addEventListener('resize', function (e) {
|
||||
var newPixelRatio = iframe.contentWindow.devicePixelRatio;
|
||||
if(newPixelRatio !== oldPixelRatio){
|
||||
window.flutter_inappwebview.nativeCommunication('onZoomScaleChanged', viewId, [oldPixelRatio, newPixelRatio]);
|
||||
oldPixelRatio = newPixelRatio;
|
||||
}
|
||||
});
|
||||
|
||||
iframe.contentWindow.addEventListener('popstate', function (event) {
|
||||
var iframeUrl = iframe.src;
|
||||
try {
|
||||
iframeUrl = iframe.contentWindow.location.href;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
window.flutter_inappwebview.nativeCommunication('onUpdateVisitedHistory', viewId, [iframeUrl]);
|
||||
});
|
||||
|
||||
iframe.contentWindow.addEventListener('scroll', function (event) {
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
try {
|
||||
x = iframe.contentWindow.scrollX;
|
||||
y = iframe.contentWindow.scrollY;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
window.flutter_inappwebview.nativeCommunication('onScrollChanged', viewId, [x, y]);
|
||||
});
|
||||
|
||||
iframe.contentWindow.addEventListener('focus', function (event) {
|
||||
window.flutter_inappwebview.nativeCommunication('onWindowFocus', viewId);
|
||||
});
|
||||
|
||||
iframe.contentWindow.addEventListener('blur', function (event) {
|
||||
window.flutter_inappwebview.nativeCommunication('onWindowBlur', viewId);
|
||||
});
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if (!webView.settings.javaScriptCanOpenWindowsAutomatically) {
|
||||
iframe.contentWindow.open = function() {
|
||||
throw new Error('JavaScript cannot open windows automatically');
|
||||
};
|
||||
}
|
||||
|
||||
if (!webView.settings.verticalScrollBarEnabled && !webView.settings.horizontalScrollBarEnabled) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.id = "settings.verticalScrollBarEnabled-settings.horizontalScrollBarEnabled";
|
||||
style.innerHTML = "body::-webkit-scrollbar { width: 0px; height: 0px; }";
|
||||
iframe.contentDocument.head.append(style);
|
||||
}
|
||||
|
||||
if (webView.settings.disableVerticalScroll) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.id = "settings.disableVerticalScroll";
|
||||
style.innerHTML = "body { overflow-y: hidden; }";
|
||||
iframe.contentDocument.head.append(style);
|
||||
}
|
||||
|
||||
if (webView.settings.disableHorizontalScroll) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.id = "settings.disableHorizontalScroll";
|
||||
style.innerHTML = "body { overflow-x: hidden; }";
|
||||
iframe.contentDocument.head.append(style);
|
||||
}
|
||||
|
||||
if (webView.settings.disableContextMenu) {
|
||||
iframe.contentWindow.addEventListener('contextmenu', webView.disableContextMenuHandler);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
window.flutter_inappwebview.nativeCommunication('onLoadStop', viewId, [url]);
|
||||
});
|
||||
}
|
||||
},
|
||||
setSettings: function(newSettings) {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
if (webView.settings.javaScriptCanOpenWindowsAutomatically != newSettings.javaScriptCanOpenWindowsAutomatically) {
|
||||
if (!newSettings.javaScriptCanOpenWindowsAutomatically) {
|
||||
iframe.contentWindow.open = function() {
|
||||
throw new Error('JavaScript cannot open windows automatically');
|
||||
};
|
||||
} else {
|
||||
iframe.contentWindow.open = webView.functionMap["window.open"];
|
||||
}
|
||||
}
|
||||
|
||||
if (webView.settings.verticalScrollBarEnabled != newSettings.verticalScrollBarEnabled &&
|
||||
webView.settings.horizontalScrollBarEnabled != newSettings.horizontalScrollBarEnabled) {
|
||||
if (!newSettings.verticalScrollBarEnabled && !newSettings.horizontalScrollBarEnabled) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.id = "settings.verticalScrollBarEnabled-settings.horizontalScrollBarEnabled";
|
||||
style.innerHTML = "body::-webkit-scrollbar { width: 0px; height: 0px; }";
|
||||
iframe.contentDocument.head.append(style);
|
||||
} else {
|
||||
var styleElement = iframe.contentDocument.getElementById("settings.verticalScrollBarEnabled-settings.horizontalScrollBarEnabled");
|
||||
if (styleElement) { styleElement.remove() }
|
||||
}
|
||||
}
|
||||
|
||||
if (webView.settings.disableVerticalScroll != newSettings.disableVerticalScroll) {
|
||||
if (newSettings.disableVerticalScroll) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.id = "settings.disableVerticalScroll";
|
||||
style.innerHTML = "body { overflow-y: hidden; }";
|
||||
iframe.contentDocument.head.append(style);
|
||||
} else {
|
||||
var styleElement = iframe.contentDocument.getElementById("settings.disableVerticalScroll");
|
||||
if (styleElement) { styleElement.remove() }
|
||||
}
|
||||
}
|
||||
|
||||
if (webView.settings.disableHorizontalScroll != newSettings.disableHorizontalScroll) {
|
||||
if (newSettings.disableHorizontalScroll) {
|
||||
var style = iframe.contentDocument.createElement('style');
|
||||
style.id = "settings.disableHorizontalScroll";
|
||||
style.innerHTML = "body { overflow-x: hidden; }";
|
||||
iframe.contentDocument.head.append(style);
|
||||
} else {
|
||||
var styleElement = iframe.contentDocument.getElementById("settings.disableHorizontalScroll");
|
||||
if (styleElement) { styleElement.remove() }
|
||||
}
|
||||
}
|
||||
|
||||
if (webView.settings.disableContextMenu != newSettings.disableContextMenu) {
|
||||
if (newSettings.disableContextMenu) {
|
||||
iframe.contentWindow.addEventListener('contextmenu', webView.disableContextMenuHandler);
|
||||
} else {
|
||||
iframe.contentWindow.removeEventListener('contextmenu', webView.disableContextMenuHandler);
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
||||
webView.settings = newSettings;
|
||||
},
|
||||
reload: function() {
|
||||
var iframe = webView.iframe;
|
||||
if (iframe != null && iframe.contentWindow != null) {
|
||||
try {
|
||||
iframe.contentWindow.location.reload();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
iframe.contentWindow.location.href = iframe.src;
|
||||
}
|
||||
}
|
||||
},
|
||||
goBack: function() {
|
||||
var iframe = webView.iframe;
|
||||
if (iframe != null) {
|
||||
try {
|
||||
iframe.contentWindow.history.back();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
goForward: function() {
|
||||
var iframe = webView.iframe;
|
||||
if (iframe != null) {
|
||||
try {
|
||||
iframe.contentWindow.history.forward();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
goBackOrForward: function(steps) {
|
||||
var iframe = webView.iframe;
|
||||
if (iframe != null) {
|
||||
try {
|
||||
iframe.contentWindow.history.go(steps);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
evaluateJavascript: function(source) {
|
||||
var iframe = webView.iframe;
|
||||
var result = null;
|
||||
if (iframe != null) {
|
||||
try {
|
||||
result = JSON.stringify(iframe.contentWindow.eval(source));
|
||||
} catch (e) {}
|
||||
}
|
||||
return result;
|
||||
},
|
||||
stopLoading: function(steps) {
|
||||
var iframe = webView.iframe;
|
||||
if (iframe != null) {
|
||||
try {
|
||||
iframe.contentWindow.stop();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
},
|
||||
getUrl: function() {
|
||||
var iframe = webView.iframe;
|
||||
var url = iframe.src;
|
||||
try {
|
||||
url = iframe.contentWindow.location.href;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return url;
|
||||
},
|
||||
getTitle: function() {
|
||||
var iframe = webView.iframe;
|
||||
var title = null;
|
||||
try {
|
||||
title = iframe.contentDocument.title;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return title;
|
||||
},
|
||||
injectJavascriptFileFromUrl: function(urlFile, scriptHtmlTagAttributes) {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
var d = iframe.contentDocument;
|
||||
var script = d.createElement('script');
|
||||
for (var key of Object.keys(scriptHtmlTagAttributes)) {
|
||||
if (scriptHtmlTagAttributes[key] != null) {
|
||||
script[key] = scriptHtmlTagAttributes[key];
|
||||
}
|
||||
}
|
||||
if (script.id != null) {
|
||||
script.onload = function() {
|
||||
window.flutter_inappwebview.nativeCommunication('onInjectedScriptLoaded', webView.viewId, [script.id]);
|
||||
}
|
||||
script.onerror = function() {
|
||||
window.flutter_inappwebview.nativeCommunication('onInjectedScriptError', webView.viewId, [script.id]);
|
||||
}
|
||||
}
|
||||
script.src = urlFile;
|
||||
if (d.body != null) {
|
||||
d.body.appendChild(script);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
injectCSSCode: function(source) {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
var d = iframe.contentDocument;
|
||||
var style = d.createElement('style');
|
||||
style.innerHTML = source;
|
||||
if (d.head != null) {
|
||||
d.head.appendChild(style);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
injectCSSFileFromUrl: function(urlFile, cssLinkHtmlTagAttributes) {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
var d = iframe.contentDocument;
|
||||
var link = d.createElement('link');
|
||||
for (var key of Object.keys(cssLinkHtmlTagAttributes)) {
|
||||
if (cssLinkHtmlTagAttributes[key] != null) {
|
||||
link[key] = cssLinkHtmlTagAttributes[key];
|
||||
}
|
||||
}
|
||||
link.type = 'text/css';
|
||||
var alternateStylesheet = "";
|
||||
if (cssLinkHtmlTagAttributes.alternateStylesheet) {
|
||||
alternateStylesheet = "alternate ";
|
||||
}
|
||||
link.rel = alternateStylesheet + "stylesheet";
|
||||
link.href = urlFile;
|
||||
if (d.head != null) {
|
||||
d.head.appendChild(link);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
scrollTo: function(x, y, animated) {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
if (animated) {
|
||||
iframe.contentWindow.scrollTo({top: y, left: x, behavior: 'smooth'});
|
||||
} else {
|
||||
iframe.contentWindow.scrollTo(x, y);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
scrollBy: function(x, y, animated) {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
if (animated) {
|
||||
iframe.contentWindow.scrollBy({top: y, left: x, behavior: 'smooth'});
|
||||
} else {
|
||||
iframe.contentWindow.scrollBy(x, y);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
printCurrentPage: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
iframe.contentWindow.print();
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
getContentHeight: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentDocument.documentElement.scrollHeight;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getContentWidth: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentDocument.documentElement.scrollWidth;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getSelectedText: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
var txt;
|
||||
var w = iframe.contentWindow;
|
||||
if (w.getSelection) {
|
||||
txt = w.getSelection().toString();
|
||||
} else if (w.document.getSelection) {
|
||||
txt = w.document.getSelection().toString();
|
||||
} else if (w.document.selection) {
|
||||
txt = w.document.selection.createRange().text;
|
||||
}
|
||||
return txt;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getScrollX: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentWindow.scrollX;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getScrollY: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentWindow.scrollY;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return null;
|
||||
},
|
||||
isSecureContext: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentWindow.isSecureContext;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
canScrollVertically: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentDocument.body.scrollHeight > iframe.contentWindow.innerHeight;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
canScrollHorizontally: function() {
|
||||
var iframe = webView.iframe;
|
||||
try {
|
||||
return iframe.contentDocument.body.scrollWidth > iframe.contentWindow.innerWidth;
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getSize: function() {
|
||||
var iframeContainer = webView.iframeContainer;
|
||||
var width = 0.0;
|
||||
var height = 0.0;
|
||||
if (iframeContainer.style.width != null && iframeContainer.style.width != '' && iframeContainer.style.width.indexOf('px') > 0) {
|
||||
width = parseFloat(iframeContainer.style.width);
|
||||
}
|
||||
if (width == null || width == 0.0) {
|
||||
width = iframeContainer.getBoundingClientRect().width;
|
||||
}
|
||||
if (iframeContainer.style.height != null && iframeContainer.style.height != '' && iframeContainer.style.height.indexOf('px') > 0) {
|
||||
height = parseFloat(iframeContainer.style.height);
|
||||
}
|
||||
if (height == null || height == 0.0) {
|
||||
height = iframeContainer.getBoundingClientRect().height;
|
||||
}
|
||||
|
||||
return {
|
||||
width: width,
|
||||
height: height
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
return webView;
|
||||
},
|
||||
getCookieExpirationDate: function(timestamp) {
|
||||
return (new Date(timestamp)).toUTCString();
|
||||
}
|
||||
};
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Minified by jsDelivr using clean-css v4.2.3.
|
||||
* Original file: /npm/toastify-js@1.9.3/src/toastify.css
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Toastify js 1.9.3
|
||||
* https://github.com/apvarun/toastify-js
|
||||
* @license MIT licensed
|
||||
*
|
||||
* Copyright (C) 2018 Varun A P
|
||||
*/
|
||||
.toastify{padding:12px 20px;color:#fff;display:inline-block;box-shadow:0 3px 6px -1px rgba(0,0,0,.12),0 10px 36px -4px rgba(77,96,232,.3);background:-webkit-linear-gradient(315deg,#73a5ff,#5477f5);background:linear-gradient(135deg,#73a5ff,#5477f5);position:fixed;opacity:0;transition:all .4s cubic-bezier(.215,.61,.355,1);border-radius:2px;cursor:pointer;text-decoration:none;max-width:calc(50% - 20px);z-index:2147483647}.toastify.on{opacity:1}.toast-close{opacity:.4;padding:0 5px}.toastify-right{right:15px}.toastify-left{left:15px}.toastify-top{top:-150px}.toastify-bottom{bottom:-150px}.toastify-rounded{border-radius:25px}.toastify-avatar{width:1.5em;height:1.5em;margin:-7px 5px;border-radius:2px}.toastify-center{margin-left:auto;margin-right:auto;left:0;right:0;max-width:fit-content;max-width:-moz-fit-content}@media only screen and (max-width:360px){.toastify-left,.toastify-right{margin-left:auto;margin-right:auto;left:0;right:0;max-width:fit-content}}
|
||||
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Minified by jsDelivr using Terser v5.3.0.
|
||||
* Original file: /npm/toastify-js@1.9.3/src/toastify.js
|
||||
*
|
||||
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
|
||||
*/
|
||||
/*!
|
||||
* Toastify js 1.9.3
|
||||
* https://github.com/apvarun/toastify-js
|
||||
* @license MIT licensed
|
||||
*
|
||||
* Copyright (C) 2018 Varun A P
|
||||
*/
|
||||
!function(t,o){"object"==typeof module && module && module.exports?module.exports=o():t.Toastify=o()}(this,(function(t){var o=function(t){return new o.lib.init(t)};function i(t,o){return o.offset[t]?isNaN(o.offset[t])?o.offset[t]:o.offset[t]+"px":"0px"}function s(t,o){return!(!t||"string"!=typeof o)&&!!(t.className&&t.className.trim().split(/\s+/gi).indexOf(o)>-1)}return o.lib=o.prototype={toastify:"1.9.3",constructor:o,init:function(t){return t||(t={}),this.options={},this.toastElement=null,this.options.text=t.text||"Hi there!",this.options.node=t.node,this.options.duration=0===t.duration?0:t.duration||3e3,this.options.selector=t.selector,this.options.callback=t.callback||function(){},this.options.destination=t.destination,this.options.newWindow=t.newWindow||!1,this.options.close=t.close||!1,this.options.gravity="bottom"===t.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=t.positionLeft||!1,this.options.position=t.position||"",this.options.backgroundColor=t.backgroundColor,this.options.avatar=t.avatar||"",this.options.className=t.className||"",this.options.stopOnFocus=void 0===t.stopOnFocus||t.stopOnFocus,this.options.onClick=t.onClick,this.options.offset=t.offset||{x:0,y:0},this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var t=document.createElement("div");if(t.className="toastify on "+this.options.className,this.options.position?t.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(t.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):t.className+=" toastify-right",t.className+=" "+this.options.gravity,this.options.backgroundColor&&(t.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)t.appendChild(this.options.node);else if(t.innerHTML=this.options.text,""!==this.options.avatar){var o=document.createElement("img");o.src=this.options.avatar,o.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?t.appendChild(o):t.insertAdjacentElement("afterbegin",o)}if(!0===this.options.close){var s=document.createElement("span");s.innerHTML="✖",s.className="toast-close",s.addEventListener("click",function(t){t.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&n>360?t.insertAdjacentElement("afterbegin",s):t.appendChild(s)}if(this.options.stopOnFocus&&this.options.duration>0){var e=this;t.addEventListener("mouseover",(function(o){window.clearTimeout(t.timeOutValue)})),t.addEventListener("mouseleave",(function(){t.timeOutValue=window.setTimeout((function(){e.removeElement(t)}),e.options.duration)}))}if(void 0!==this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&t.addEventListener("click",function(t){t.stopPropagation(),this.options.onClick()}.bind(this)),"object"==typeof this.options.offset){var a=i("x",this.options),p=i("y",this.options),r="left"==this.options.position?a:"-"+a,l="toastify-top"==this.options.gravity?p:"-"+p;t.style.transform="translate("+r+","+l+")"}return t},showToast:function(){var t;if(this.toastElement=this.buildToast(),!(t=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return t.insertBefore(this.toastElement,t.firstChild),o.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(t){t.className=t.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),t.parentNode&&t.parentNode.removeChild(t),this.options.callback.call(t),o.reposition()}.bind(this),400)}},o.reposition=function(){for(var t,o={top:15,bottom:15},i={top:15,bottom:15},n={top:15,bottom:15},e=document.getElementsByClassName("toastify"),a=0;a<e.length;a++){t=!0===s(e[a],"toastify-top")?"toastify-top":"toastify-bottom";var p=e[a].offsetHeight;t=t.substr(9,t.length-1);(window.innerWidth>0?window.innerWidth:screen.width)<=360?(e[a].style[t]=n[t]+"px",n[t]+=p+15):!0===s(e[a],"toastify-left")?(e[a].style[t]=o[t]+"px",o[t]+=p+15):(e[a].style[t]=i[t]+"px",i[t]+=p+15)}return this},o.lib.init.prototype=o.lib,o}));
|
||||