{"version":3,"sources":["webpack:///./src/components/modules/media/components/pdfObject/indexold.vue","webpack:///src/components/modules/media/components/pdfObject/indexold.vue","webpack:///./src/components/modules/media/components/pdfObject/indexold.vue?bbdb","webpack:///./src/components/modules/media/components/pdfObject/indexold.vue?601a"],"names":["render","_vm","this","_c","_self","fileReady","style","concat","minusHeight","attrs","propFileId","_e","staticRenderFns","name","props","type","Number","default","force","Boolean","data","PDFJS_URL","file","deletingFileId","mounted","configure","methods","undefined","$store","state","app","activeGroup","init","_this","self","_id","$route","params","id","fileInheritedDetail","store","then","res","options","pdfOpenParams","pagemode","isMobile","navpanes","toolbar","statusbar","view","page","forcePDFJS","$nextTick","PDFObject","embed","link","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAQF,EAAII,UAAWF,EAAG,MAAM,CAACA,EAAG,MAAM,CAACG,MAAK,wBAAAC,OAA0BN,EAAIO,YAAW,OAAOC,MAAM,CAAC,GAAI,OAAAF,OAAQN,EAAIS,iBAAkBT,EAAIU,MAErMC,EAAkB,G,uDCUP,GACfC,KAAA,SACAC,MAAA,CACAJ,WAAA,CACAK,KAAAC,OACAC,QAAA,yBAEAT,YAAA,CACAO,KAAAC,OACAC,QAAA,wBAEAC,MAAA,CACAH,KAAAI,QACAF,QAAA,uBAGAG,KAAA,WACA,OACAC,UAAA,0DACAhB,WAAA,EACAiB,KAAA,GACAC,eAAA,IAIAC,QAAA,WACA,KAAAC,aAEAC,QAAA,CACAD,UAAA,gBAEAE,GAAA,KAAAC,OAAAC,MAAAC,IAAAC,YAAAV,WACA,SAAAO,OAAAC,MAAAC,IAAAC,YAAAV,YAEA,KAAAA,UAAA,KAAAO,OAAAC,MAAAC,IAAAC,YAAAV,WAGA,KAAAW,QAEAA,KAAA,eAAAC,EAAA,KACAC,EAAA,KACAC,EAAA,KAAAzB,gBACAiB,GAAAQ,IACAA,EAAA,KAAAC,OAAAC,OAAAC,IAGAC,eAAA,CAAAF,OAAA,CAAAC,GAAAH,GAAAK,MAAA,KAAAZ,SAAAa,MACA,SAAAC,GACA,MAAAA,EAAA,CACAT,EAAAX,KAAAoB,EAAAtB,KAAAE,KACAW,EAAA5B,WAAA,EAEA,IAAAsC,EAAA,CACAC,cAAA,CACAC,SAAAZ,EAAAL,OAAAC,MAAAC,IAAAgB,SAAA,YACAC,SAAA,EACAC,QAAA,EACAC,UAAA,EACAC,KAAA,QAEAC,KAAA,EACAC,YAAA,EACA/B,UAAAa,EAAAb,WAGAY,EAAAoB,WAAA,WACAC,IAAAC,MACAtB,EAAAX,KAAAkC,KAAA,QAAAjD,OACA0B,EAAAvB,YACAiC,aCjF6Y,I,YCOzYc,EAAY,eACd,EACAzD,EACAY,GACA,EACA,KACA,KACA,MAIa,aAAA6C,E","file":"js/chunk-2d0ae589.502325ad.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.fileReady)?_c('div',[_c('div',{style:(`height: calc(100vh - ${_vm.minusHeight}px)`),attrs:{\"id\":`pdf_${_vm.propFileId}`}})]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div v-if=\"fileReady\">\n    <div\n      :id=\"`pdf_${propFileId}`\"\n      :style=\"`height: calc(100vh - ${minusHeight}px)`\"\n    ></div>\n  </div>\n</template>\n<script>\nimport { fileInheritedDetail } from \"@/api/media\";\nimport PDFObject from \"pdfobject\";\n\nexport default {\n  name: \"detail\",\n  props: {\n    propFileId: {\n      type: Number,\n      default: () => null\n    },\n    minusHeight: {\n      type: Number,\n      default: () => 115\n    },\n    force: {\n      type: Boolean,\n      default: () => false\n    }\n  },\n  data() {\n    return {\n      PDFJS_URL: \"https://res.gosmart.mn/static/pdfobject/web/viewer.html\",\n      fileReady: false,\n      file: {},\n      deletingFileId: 0\n    };\n  },\n\n  mounted() {\n    this.configure();\n  },\n  methods: {\n    configure() {\n      if (\n        this.$store.state.app.activeGroup.PDFJS_URL != undefined &&\n        this.$store.state.app.activeGroup.PDFJS_URL != \"\"\n      ) {\n        this.PDFJS_URL = this.$store.state.app.activeGroup.PDFJS_URL;\n      }\n\n      this.init();\n    },\n    init() {\n      let self = this;\n      let _id = this.propFileId;\n      if (_id == undefined) {\n        _id = this.$route.params.id;\n      }\n\n      fileInheritedDetail({ params: { id: _id }, store: this.$store }).then(\n        res => {\n          if (res != false) {\n            this.file = res.data.file;\n            this.fileReady = true;\n\n            var options = {\n              pdfOpenParams: {\n                pagemode: this.$store.state.app.isMobile ? \"\" : \"thumbs\",\n                navpanes: 0,\n                toolbar: 0,\n                statusbar: 0,\n                view: \"FitH\"\n              },\n              page: 1,\n              forcePDFJS: true,\n              PDFJS_URL: self.PDFJS_URL\n            };\n            //console.log(this.file.link);\n            this.$nextTick(() => {\n              PDFObject.embed(\n                this.file.link,\n                `#pdf_${this.propFileId}`,\n                options\n              );\n            });\n          }\n        }\n      );\n    }\n  }\n};\n</script>\n","import mod from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./indexold.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./indexold.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./indexold.vue?vue&type=template&id=1f009275\"\nimport script from \"./indexold.vue?vue&type=script&lang=js\"\nexport * from \"./indexold.vue?vue&type=script&lang=js\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}