!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("Clock",[],e):"object"==typeof exports?exports.Clock=e():t.Clock=e()}(this,function(){return function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,e),n.l=!0,n.exports}var o={};return e.m=t,e.c=o,e.i=function(t){return t},e.d=function(t,o,r){e.o(t,o)||Object.defineProperty(t,o,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var o=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(o,"a",o),o},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="/dist/",e(e.s=2)}([function(t,e,o){o(5);var r=o(8)(o(1),o(9),"data-v-7e3f7126",null);t.exports=r.exports},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={data:function(){return{timeList:[12,1,2,3,4,5,6,7,8,9,10,11],transform:"scale(1)",hourRotate:"rotatez(0deg)",minuteRotate:"rotatez(0deg)",secondRotate:"rotatez(0deg)"}},props:["time","color","border","bg","size"],computed:{clockStyle:function(){return{height:this.size,width:this.size,color:this.color,border:this.border,background:this.bg}}},watch:{time:function(){this.show()}},methods:{show:function(){var t=this;this.showTime(),this._timer&&clearInterval(this._timer),this.time||(this._timer=setInterval(function(){t.showTime()},1e3))},showTime:function(){var t=void 0;if(this.time)t=this.time.split(":");else{var e=new Date;t=[e.getHours(),e.getMinutes(),e.getSeconds()]}var o=+t[0];o=o>11?o-12:o;var r=+t[1],n=+t[2]||0,a=30*o+6*r/360*30,i=6*r,s=6*n;this.hourRotate="rotatez("+a+"deg)",this.minuteRotate="rotatez("+i+"deg)",this.secondRotate="rotatez("+s+"deg)"}},mounted:function(){var t=this.$el.clientWidth/120;t=t>3?3:t,this.transform="scale("+t+")",this.show()},destroyed:function(){this._timer&&clearInterval(this._timer)}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),n=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=n.default,"undefined"!=typeof window&&window.Vue&&window.Vue.component("clock",n.default)},function(t,e,o){e=t.exports=o(4)(),e.push([t.i,'.clock[data-v-7e3f7126]{position:relative;display:inline-block;vertical-align:middle;width:150px;height:150px;border:2px solid;border-radius:100%;text-align:center;font-size:14px}.clock .hour[data-v-7e3f7126]{position:absolute;top:0;left:50%;display:block;width:20px;height:50%;margin-left:-10px;padding-top:4%;font-weight:400;transform-origin:bottom;user-select:none;box-sizing:border-box}.clock .hour>span[data-v-7e3f7126]{display:block}.clock .hour>span>i[data-v-7e3f7126]{display:block;font-style:normal}.clock .hour[data-v-7e3f7126]:nth-of-type(2){transform:rotatez(30deg)}.clock .hour:nth-of-type(2)>span[data-v-7e3f7126]{transform:rotatez(-30deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(3){transform:rotatez(60deg)}.clock .hour:nth-of-type(3)>span[data-v-7e3f7126]{transform:rotatez(-60deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(4){transform:rotatez(90deg)}.clock .hour:nth-of-type(4)>span[data-v-7e3f7126]{transform:rotatez(-90deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(5){transform:rotatez(120deg)}.clock .hour:nth-of-type(5)>span[data-v-7e3f7126]{transform:rotatez(-120deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(6){transform:rotatez(150deg)}.clock .hour:nth-of-type(6)>span[data-v-7e3f7126]{transform:rotatez(-150deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(7){transform:rotatez(180deg)}.clock .hour:nth-of-type(7)>span[data-v-7e3f7126]{transform:rotatez(-180deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(8){transform:rotatez(210deg)}.clock .hour:nth-of-type(8)>span[data-v-7e3f7126]{transform:rotatez(-210deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(9){transform:rotatez(240deg)}.clock .hour:nth-of-type(9)>span[data-v-7e3f7126]{transform:rotatez(-240deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(10){transform:rotatez(270deg)}.clock .hour:nth-of-type(10)>span[data-v-7e3f7126]{transform:rotatez(-270deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(11){transform:rotatez(300deg)}.clock .hour:nth-of-type(11)>span[data-v-7e3f7126]{transform:rotatez(-300deg)}.clock .hour[data-v-7e3f7126]:nth-of-type(12){transform:rotatez(330deg)}.clock .hour:nth-of-type(12)>span[data-v-7e3f7126]{transform:rotatez(-330deg)}.clock .clock-circle[data-v-7e3f7126]{position:absolute;top:50%;left:50%;width:16px;height:16px;transform:translate(-50%,-50%);border:2px solid #666;border-radius:100%;background-color:#fff;z-index:1;box-sizing:border-box}.clock .clock-circle[data-v-7e3f7126]:before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);display:block;content:"";width:4px;height:4px;border-radius:100%;background-color:#666}.clock .clock-hour[data-v-7e3f7126],.clock .clock-minute[data-v-7e3f7126],.clock .clock-second[data-v-7e3f7126]{position:absolute;top:15%;left:50%;display:block;width:2px;height:35%;margin-left:-1px;border-radius:5px;transform-origin:bottom;background-color:#666}.clock .clock-hour[data-v-7e3f7126]{top:30%;width:4px;height:20%;margin-left:-2px}.clock .clock-second[data-v-7e3f7126]{width:1px}.clock.is-small[data-v-7e3f7126]{width:80px;height:80px;border-width:1px;font-size:12px}.clock.is-small .clock-circle[data-v-7e3f7126]{width:10px;height:10px;border-width:1px}.clock.is-small .clock-circle[data-v-7e3f7126]:before{width:2px;height:2px}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var o=this[e];o[2]?t.push("@media "+o[2]+"{"+o[1]+"}"):t.push(o[1])}return t.join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},n=0;n<this.length;n++){var a=this[n][0];"number"==typeof a&&(r[a]=!0)}for(n=0;n<e.length;n++){var i=e[n];"number"==typeof i[0]&&r[i[0]]||(o&&!i[2]?i[2]=o:o&&(i[2]="("+i[2]+") and ("+o+")"),t.push(i))}},t}},function(t,e,o){var r=o(3);"string"==typeof r&&(r=[[t.i,r,""]]);var n={hmr:!0};n.transform=void 0,n.insertInto=void 0;o(6)(r,n);r.locals&&(t.exports=r.locals)},function(t,e,o){function r(t,e){for(var o=0;o<t.length;o++){var r=t[o],n=v[r.id];if(n){n.refs++;for(var a=0;a<n.parts.length;a++)n.parts[a](r.parts[a]);for(;a<r.parts.length;a++)n.parts.push(u(r.parts[a],e))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(u(r.parts[a],e));v[r.id]={id:r.id,refs:1,parts:i}}}}function n(t,e){for(var o=[],r={},n=0;n<t.length;n++){var a=t[n],i=e.base?a[0]+e.base:a[0],s=a[1],c=a[2],f=a[3],l={css:s,media:c,sourceMap:f};r[i]?r[i].parts.push(l):o.push(r[i]={id:i,parts:[l]})}return o}function a(t,e){var o=y(t.insertInto);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=x[x.length-1];if("top"===t.insertAt)r?r.nextSibling?o.insertBefore(e,r.nextSibling):o.appendChild(e):o.insertBefore(e,o.firstChild),x.push(e);else if("bottom"===t.insertAt)o.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var n=y(t.insertAt.before,o);o.insertBefore(e,n)}}function i(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=x.indexOf(t);e>=0&&x.splice(e,1)}function s(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var o=l();o&&(t.attrs.nonce=o)}return f(e,t.attrs),a(t,e),e}function c(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",f(e,t.attrs),a(t,e),e}function f(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}function l(){return o.nc}function u(t,e){var o,r,n,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var f=k++;o=g||(g=s(e)),r=d.bind(null,o,f,!1),n=d.bind(null,o,f,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=c(e),r=h.bind(null,o,e),n=function(){i(o),o.href&&URL.revokeObjectURL(o.href)}):(o=s(e),r=p.bind(null,o),n=function(){i(o)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else n()}}function d(t,e,o,r){var n=o?"":r.css;if(t.styleSheet)t.styleSheet.cssText=z(e,n);else{var a=document.createTextNode(n),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(a,i[e]):t.appendChild(a)}}function p(t,e){var o=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}function h(t,e,o){var r=o.css,n=o.sourceMap,a=void 0===e.convertToAbsoluteUrls&&n;(e.convertToAbsoluteUrls||a)&&(r=w(r)),n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var i=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}var v={},m=function(t){var e;return function(){return void 0===e&&(e=t.apply(this,arguments)),e}}(function(){return window&&document&&document.all&&!window.atob}),b=function(t,e){return e?e.querySelector(t):document.querySelector(t)},y=function(t){var e={};return function(t,o){if("function"==typeof t)return t();if(void 0===e[t]){var r=b.call(this,t,o);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),g=null,k=0,x=[],w=o(7);t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");e=e||{},e.attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=m()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var o=n(t,e);return r(o,e),function(t){for(var a=[],i=0;i<o.length;i++){var s=o[i],c=v[s.id];c.refs--,a.push(c)}if(t){r(n(t,e),e)}for(var i=0;i<a.length;i++){var c=a[i];if(0===c.refs){for(var f=0;f<c.parts.length;f++)c.parts[f]();delete v[c.id]}}}};var z=function(){var t=[];return function(e,o){return t[e]=o,t.filter(Boolean).join("\n")}}()},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var o=e.protocol+"//"+e.host,r=o+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var n=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(n))return t;var a;return a=0===n.indexOf("//")?n:0===n.indexOf("/")?o+n:r+n.replace(/^\.\//,""),"url("+JSON.stringify(a)+")"})}},function(t,e){t.exports=function(t,e,o,r){var n,a=t=t||{},i=typeof t.default;"object"!==i&&"function"!==i||(n=t,a=t.default);var s="function"==typeof a?a.options:a;if(e&&(s.render=e.render,s.staticRenderFns=e.staticRenderFns),o&&(s._scopeId=o),r){var c=Object.create(s.computed||null);Object.keys(r).forEach(function(t){var e=r[t];c[t]=function(){return e}}),s.computed=c}return{esModule:n,exports:a,options:s}}},function(t,e){t.exports={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"clock",style:t.clockStyle},[o("div",{staticClass:"clock-circle"}),t._v(" "),o("div",{staticClass:"clock-hour",style:{transform:t.hourRotate}}),t._v(" "),o("div",{staticClass:"clock-minute",style:{transform:t.minuteRotate}}),t._v(" "),o("div",{staticClass:"clock-second",style:{transform:t.secondRotate}}),t._v(" "),t._l(t.timeList,function(e){return o("b",{key:e,staticClass:"hour"},[o("span",[o("i",{style:{transform:t.transform}},[t._v(t._s(e))])])])})],2)},staticRenderFns:[]}}])});
//# sourceMappingURL=vue-clock.min.js.map
|