<script src="js/axios.js"></script>
<script src="js/jwt-decode.min.js"></script>
<script src="js/vue.min.js"></script>
<script src="js/httpVueLoader.js"></script>
<script src="js/vue-giffer.js"></script>

<?php
if (isset($is_report_download) && $is_report_download) {
	echo '<script type="text/javascript" src="js/Blob.js"></script>';
	echo '<script type="text/javascript" src="js/shim.min.js"></script>';
	echo '<script type="text/javascript" src="js/xlsx.full.min.js"></script>';
	echo '<script type="text/javascript" src="js/FileSaver.min.js"></script>';
	echo '<script type="text/javascript" src="js/html2canvas.min.js"></script>';
	echo '<script type="text/javascript" src="js/jspdf.min.js"></script>';
}
if (isset($is_echarts) && $is_echarts) {
	echo '<script type="text/javascript" src="js/echarts.min.js"></script>';
	echo '<script type="text/javascript" src="js/vue-echarts.min.js"></script>';
}
if (isset($is_swiper) && $is_swiper) {
	echo '<link rel="stylesheet" href="css/swiper4.5.1.min.css"/>';
	echo '<script type="text/javascript" src="js/swiper4.5.1.min.js"></script>';
	echo '<script type="text/javascript" src="js/vue-awesome-swiper.js"></script>';
}
if (isset($is_googlemap) && $is_googlemap) {
	echo '<script type="text/javascript" src="js/lodash.min.js"></script>';
	echo '<script type="text/javascript" src="js/vue-google-maps.js"></script>';
}
if (isset($is_video) && $is_video) {
	echo '<link rel="stylesheet" href="css/video-js.css"/>';
	echo '<script type="text/javascript" src="js/video.js"></script>';
	echo '<script type="text/javascript" src="js/vue-video-player.js"></script>';
}
if (isset($is_draggable) && $is_draggable) {
	echo '<script type="text/javascript" src="js/Sortable.min.js"></script>';
	echo '<script type="text/javascript" src="js/vuedraggable.umd.min.js"></script>';
}
?>
<script src="js/vue-gantt-chart.umd.min.js"></script>
<!--<script src="https://unpkg.com/html5-qrcode@2.0.9/dist/html5-qrcode.min.js"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5-qrcode/2.2.1/html5-qrcode.min.js"></script>
<script src="js/socket.io.js"></script>
<script src="js/sunware-expansion.js"></script>
<script src="js/OPCTechs_Soft.js"></script>
<script src="js/mqttws31-1.0.1.min.js"></script>
<script src="js/OPCTechs_MQTT.js"></script>
<script src="js/quasar.ie.polyfills.umd.min.js"></script>
<script src="js/quasar.mat.umd.min.js"></script>
<script src="cfg/Var_Config.js"></script>
<script src="js/lodash.min.js"></script>
<script src="js/moment.min.js"></script>
<script src="js/moment-with-locales.min.js"></script>
<script src="js/vue2-datepicker.js"></script>
<script src="js/vue2-datepicker-locale/zh-tw.js"></script>

<!-------------------------- 公用mixins //---------------------------->
<script src="js/mixins/mixins_common.js"></script>
<script src="js/mixins/mixins_layout.js"></script>
<script src="js/mixins/mixins_solar.js"></script>
<!-------------------------- /公用mixins //---------------------------->

<!-------------------------- 多國語系 //---------------------------->
<script src="js/quasar.i18n.en-us.umd.min.js"></script>
<script src="js/quasar.i18n.zh-hant.umd.min.js"></script>
<script src="js/vue-i18n.js"></script>
<!-- 依需要加入字典檔 //-->
<script src="js/lang/i18n_messages_en-us.js"></script>
<script src="js/lang/i18n_messages_zh-hant.js"></script>
<!-- /依需要加入字典檔 //-->
<script src="js/mixins/mixins_i18n.js"></script>
<!-------------------------- /多國語系 //---------------------------->

<script src="js/vue-touch-keyboard.js"></script>
<script src="js/base_function.js"></script>
<?php
$js_file = sprintf("./js/page_function/%s.js", pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_FILENAME));
if (is_file($js_file)) {
	echo sprintf('<script src="%s"></script>', $js_file);
}
unset($js_file);

$css_file = sprintf("./css/%s.css", pathinfo($_SERVER['SCRIPT_NAME'], PATHINFO_FILENAME));
if (is_file($css_file)) {
	echo sprintf('<link href="%s" rel="stylesheet" type="text/css">', $css_file);
}
unset($css_file);
?>
<script>
"use strict";

Quasar.i18n.set(Quasar.i18n.zhHant);
// 引入函式
var funs = [base_function,$$mixins_common,$$mixins_layout,$$mixins_i18n,$$mixins_solar];
if (typeof page_function == "object") {
	funs.push(page_function);
}
// 引入組件
var cpns = {};
<?php
if (isset($is_echarts) && $is_echarts) {
	echo "cpns['echart'] = VueECharts;";
}
if (isset($is_swiper) && $is_swiper) {
	echo "Vue.use(window.VueAwesomeSwiper);";
}
if (isset($is_googlemap) && $is_googlemap) {
	echo "delete Object.prototype.forEach;";
	echo "cpns['google-map'] = VueGoogleMaps.Map;";
	echo "cpns['google-marker'] = VueGoogleMaps.Marker;";
	echo "cpns['google-info-window'] = VueGoogleMaps.InfoWindow;";
	echo "Vue.use(VueGoogleMaps, { load : { key: 'AIzaSyBBgyVgWY5GtvBmod9n9glaeV6OmDVZgwk', libraries: 'places' } });";
}
if (isset($is_video) && $is_video) {
	echo "Vue.use(window.VueVideoPlayer);";
}
?>
Vue.use(window.VueTouchKeyboard);
Vue.use(window.VueGanttChart);

// Vue初始
var vm = new Vue({
	el: "#q-app",
	mixins: funs,
	components: cpns
});
</script>