2 lines
8.0 KiB
JavaScript
2 lines
8.0 KiB
JavaScript
"use strict";(self.webpackChunkphotos=self.webpackChunkphotos||[]).push([["src_views_PhotosTab_vue"],{67713:(t,e,i)=>{i.d(e,{Z:()=>s});var a=i(87537),o=i.n(a),n=i(23645),r=i.n(n)()(o());r.push([t.id,".location-map[data-v-dd85876e]{position:relative;margin:16px;border-radius:var(--border-radius-large);height:250px;width:90%}","",{version:3,sources:["webpack://./src/components/LocationMap.vue"],names:[],mappings:"AAEA,+BACC,iBAAA,CACA,WAAA,CACA,wCAAA,CACA,YAAA,CACA,SAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.location-map {\n\tposition: relative;\n\tmargin: 16px;\n\tborder-radius: var(--border-radius-large);\n\theight: 250px;\n\twidth: 90%;\n}\n'],sourceRoot:""}]);const s=r},23017:(t,e,i)=>{i.d(e,{Z:()=>s});var a=i(87537),o=i.n(a),n=i(23645),r=i.n(n)()(o());r.push([t.id,".photo-details-container[data-v-90f03c4c]{padding:8px}.photo-details-container .photo-detail[data-v-90f03c4c]{margin:16px 0;display:flex;flex-direction:row}.photo-details-container .photo-detail--secondary[data-v-90f03c4c]{color:var(--color-text-lighter)}.photo-details-container .photo-detail__gps[data-v-90f03c4c]{flex-direction:column}.photo-details-container .photo-detail__gps__title[data-v-90f03c4c]{display:flex}.photo-details-container .photo-detail__gps__map[data-v-90f03c4c]{display:flex}.photo-details-container .photo-detail .material-design-icon[data-v-90f03c4c]{margin-right:8px}","",{version:3,sources:["webpack://./src/views/PhotosTab.vue"],names:[],mappings:"AAEA,0CACC,WAAA,CAEA,wDACC,aAAA,CACA,YAAA,CACA,kBAAA,CAEA,mEACC,+BAAA,CAGD,6DACC,qBAAA,CAEA,oEACC,YAAA,CAGD,kEACC,YAAA,CAIF,8EACC,gBAAA",sourcesContent:['$sizes: ("400": ("count": 3, "marginTop": 66, "marginW": 8), "700": ("count": 4, "marginTop": 66, "marginW": 8), "1024": ("count": 5, "marginTop": 66, "marginW": 44), "1280": ("count": 4, "marginTop": 66, "marginW": 44), "1440": ("count": 5, "marginTop": 88, "marginW": 66), "1600": ("count": 6, "marginTop": 88, "marginW": 66), "2048": ("count": 7, "marginTop": 88, "marginW": 66), "2560": ("count": 8, "marginTop": 88, "marginW": 88), "3440": ("count": 9, "marginTop": 88, "marginW": 88), "max": ("count": 10, "marginTop": 88, "marginW": 88));\n\n.photo-details-container {\n\tpadding: 8px;\n\n\t.photo-detail {\n\t\tmargin: 16px 0;\n\t\tdisplay: flex;\n\t\tflex-direction: row;\n\n\t\t&--secondary {\n\t\t\tcolor: var(--color-text-lighter);\n\t\t}\n\n\t\t&__gps {\n\t\t\tflex-direction: column;\n\n\t\t\t&__title {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\n\t\t\t&__map {\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t.material-design-icon {\n\t\t\tmargin-right: 8px;\n\t\t}\n\t}\n}\n'],sourceRoot:""}]);const s=r},27245:(t,e,i)=>{i.d(e,{default:()=>D});var a=i(5991),o=i(42161),n=i(47414),r=i(31352),s=i(69141),l=i(57883),p=i(53193),d=i(32727),c=i(75352),m=i(48380),u=i(24616);i(83302),i(20623),i(9836);const g={name:"LocationMap",components:{LControlAttribution:p.Z,LTileLayer:d.Z,LMap:c.Z,LMarker:m.Z,LTooltip:u.Z},props:{latitude:{type:Number,required:!0},longitude:{type:Number,required:!0},name:{type:String,default:""}},data:()=>({url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",previewZoom:13,attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}),computed:{center(){return[this.latitude,this.longitude]}}};var h=i(93379),f=i.n(h),A=i(7795),_=i.n(A),v=i(90569),C=i.n(v),x=i(3565),T=i.n(x),b=i(19216),I=i.n(b),W=i(44589),Z=i.n(W),y=i(67713),L={};L.styleTagTransform=Z(),L.setAttributes=T(),L.insert=C().bind(null,"head"),L.domAPI=_(),L.insertStyleElement=I();f()(y.Z,L);y.Z&&y.Z.locals&&y.Z.locals;var M=i(51900);const k=(0,M.Z)(g,(function(){var t=this,e=t._self._c;return e("LMap",{staticClass:"location-map",attrs:{zoom:t.previewZoom,center:t.center,options:{scrollWheelZoom:!1,zoomControl:!1,dragging:!1,attributionControl:!1}},on:{scroll:function(t){t.preventDefault()}}},[e("LTileLayer",{attrs:{url:t.url}}),t._v(" "),e("LControlAttribution",{attrs:{position:"bottomright",prefix:t.attribution}}),t._v(" "),e("LMarker",{attrs:{"lat-lng":t.center}},[e("LTooltip",{attrs:{options:{direction:"top",permanent:"true",offset:[-16,-14]}}},[t._v("\n\t\t\t"+t._s(t.name)+"\n\t\t")])],1)],1)}),[],!1,null,"dd85876e",null).exports,E={name:"PhotosTab",components:{CalendarOutline:a.Z,MapMarker:o.Z,CameraIris:n.Z,LocationMap:k},data:()=>({fileInfo:null,url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",previewZoom:13,linkZoom:18,attribution:'© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'}),computed:{exif(){return this.fileInfo["metadata-photos-exif"]},ifd0(){return this.fileInfo["metadata-photos-ifd0"]},place(){return this.fileInfo["metadata-photos-place"]},gps(){const t=this.fileInfo["metadata-photos-gps"];if(t)return{latitude:Number.parseFloat(t.latitude||0),longitude:Number.parseFloat(t.longitude||0),altitude:Number.parseFloat(t.altitude||0)}},originalDateTime(){return 1e3*this.fileInfo["metadata-photos-original_date_time"]},takenDate(){return(0,l.Z)(this.originalDateTime).format("ll")},takenTime(){return(0,l.Z)(this.originalDateTime).format("LT")},focal(){var t;if(null===(t=this.exif)||void 0===t||!t.FNumber)return 0;const[e,i]=this.exif.FNumber.split("/");return e/i},focalLength(){var t;if(null===(t=this.exif)||void 0===t||!t.FocalLength)return 0;const[e,i]=this.exif.FocalLength.split("/");return e/i},size(){return(0,s.sS)(this.fileInfo.size)},normalizedExposureTime(){var t;if(null===(t=this.exif)||void 0===t||!t.ExposureTime)return 0;const[e,i]=this.exif.ExposureTime.split("/");return Math.round(i/e)},irisInfo(){const t=[];return this.focal&&t.push("ƒ/".concat(this.focal)),this.normalizedExposureTime&&t.push("1/".concat(this.normalizedExposureTime)),this.focalLength&&t.push("".concat(this.focalLength,"mm")),this.exif&&this.exif.ISOSpeedRatings&&t.push("ISO".concat(this.exif.ISOSpeedRatings)),t.join(" ⸱ ")},pixelCount(){let t=this.ifd0.ImageWidth*this.ifd0.ImageLength,e=0;for(;t/1e3>1;)t/=1e3,e++;return"".concat(Math.round(t)," ").concat(["","K","M"][e],"P")}},methods:{async update(t){this.fileInfo=t},t:r.Iu}};var w=i(23017),z={};z.styleTagTransform=Z(),z.setAttributes=T(),z.insert=C().bind(null,"head"),z.domAPI=_(),z.insertStyleElement=I();f()(w.Z,z);w.Z&&w.Z.locals&&w.Z.locals;const D=(0,M.Z)(E,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"photo-details-container"},[t.originalDateTime||t.ifd0&&t.ifd0.ImageWidth&&t.ifd0.ImageLength?e("div",{staticClass:"photo-detail photo-detail__file"},[e("CalendarOutline"),t._v(" "),e("span",[t.originalDateTime?e("div",[t._v(t._s(t.t("photos","Taken on {date} at {time}",{date:t.takenDate,time:t.takenTime})))]):t._e(),t._v(" "),e("div",{staticClass:"photo-detail--secondary"},[t._v(t._s(t.size)),t.ifd0&&t.ifd0.ImageWidth&&t.ifd0.ImageLength?e("span",[t._v(" ⸱ "+t._s(t.pixelCount)+" ⸱ "+t._s(t.ifd0.ImageWidth)+" x "+t._s(t.ifd0.ImageLength))]):t._e()])])],1):t._e(),t._v(" "),t.place?e("div",{staticClass:"photo-detail photo-detail__gps"},[e("div",{staticClass:"photo-detail__gps__title"},[e("MapMarker"),t._v(" "+t._s(t.place)+"\n\t\t")],1),t._v(" "),e("LocationMap",{staticClass:"photo-detail__gps__map",attrs:{latitude:t.gps.latitude,longitude:t.gps.longitude,name:t.place}})],1):t._e(),t._v(" "),t.ifd0&&(t.ifd0.Make||t.ifd0.Model)||0!==t.irisInfo.length?e("div",{staticClass:"photo-detail photo-detail__camera"},[e("CameraIris"),t._v(" "),e("span",[t.ifd0.Make||t.ifd0.Model?e("div",[t._v(t._s(t.ifd0.Make)+" "+t._s(t.ifd0.Model))]):t._e(),t._v(" "),0!==t.irisInfo.length?e("div",{staticClass:"photo-detail--secondary"},[t._v(t._s(t.irisInfo))]):t._e()])],1):t._e()])}),[],!1,null,"90f03c4c",null).exports}}]);
|
|
//# sourceMappingURL=photos-src_views_PhotosTab_vue.js.map?v=42019a2438955310e352
|