2020//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121'use strict' ;
2222
23- function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
24-
2523( function ( factory ) {
2624 if ( typeof define === 'function' && define . amd ) {
2725 // AMD. Register as an anonymous module.
@@ -34,23 +32,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'd
3432 factory ( window , document ) ;
3533 }
3634} ) ( function ( ) {
37- var _modulesUtilsEs6 = require ( './modules/utils.es6' ) ;
38-
39- var _modulesUtilsEs62 = _interopRequireDefault ( _modulesUtilsEs6 ) ;
40-
41- var _modulesEmoticonsEmojiEs6 = require ( './modules/emoticons/emoji.es6' ) ;
42-
43- var _modulesEmoticonsEmojiEs62 = _interopRequireDefault ( _modulesEmoticonsEmojiEs6 ) ;
44-
45- var _modulesEmoticonsSmileyEs6 = require ( './modules/emoticons/smiley.es6' ) ;
46-
47- var _modulesEmoticonsSmileyEs62 = _interopRequireDefault ( _modulesEmoticonsSmileyEs6 ) ;
35+ var utils = require ( './modules/utils.es6' ) ;
36+ var Emoji = require ( './modules/emoticons/emoji.es6' ) ;
37+ var Smiley = require ( './modules/emoticons/smiley.es6' ) ;
38+ var Url = require ( './modules/url.es6' ) ;
4839
49- console . log ( _modulesEmoticonsEmojiEs62 [ 'default' ] , _modulesUtilsEs62 [ 'default' ] , _modulesEmoticonsSmileyEs62 [ 'default' ] ) ;
40+ console . log ( Emoji , utils , Smiley , Url ) ;
5041} ) ;
5142//SOFTWARE.
5243
53- } , { "./modules/emoticons/emoji.es6" :2 , "./modules/emoticons/smiley.es6" :3 , "./modules/utils .es6" :4 } ] , 2 :[ function ( require , module , exports ) {
44+ } , { "./modules/emoticons/emoji.es6" :2 , "./modules/emoticons/smiley.es6" :3 , "./modules/url .es6" :4 , "./modules/utils.es6" : 5 } ] , 2 :[ function ( require , module , exports ) {
5445'use strict' ;
5546
5647function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
@@ -187,7 +178,44 @@ var Smiley = (function () {
187178
188179module . exports = Smiley ;
189180
190- } , { "../utils.es6" :4 } ] , 4 :[ function ( require , module , exports ) {
181+ } , { "../utils.es6" :5 } ] , 4 :[ function ( require , module , exports ) {
182+ 'use strict' ;
183+
184+ function _interopRequireDefault ( obj ) { return obj && obj . __esModule ? obj : { 'default' : obj } ; }
185+
186+ function _classCallCheck ( instance , Constructor ) { if ( ! ( instance instanceof Constructor ) ) { throw new TypeError ( 'Cannot call a class as a function' ) ; } }
187+
188+ var _modulesUtilsEs6 = require ( '../modules/utils.es6' ) ;
189+
190+ var _modulesUtilsEs62 = _interopRequireDefault ( _modulesUtilsEs6 ) ;
191+
192+ var Url = ( function ( ) {
193+ function Url ( input , options ) {
194+ _classCallCheck ( this , Url ) ;
195+
196+ this . input = input ;
197+ this . options = options ;
198+ this . urlRegex = / ( ( h r e f | s r c ) = [ " ' ] | ) ( \b ( h t t p s ? | f t p | f i l e ) : \/ \/ [ - A - Z 0 - 9 + & @ # \/ % ? = ~ _ | ! : , . ; ] * [ - A - Z 0 - 9 + & @ # \/ % = ~ _ | ] ) | (?: h t t p s ? : \/ \/ ) ? (?: (?: 0 r z \. t w ) | (?: 1 l i n k \. i n ) | (?: 1 u r l \. c o m ) | (?: 2 \. g p ) | (?: 2 b i g \. a t ) | (?: 2 t u \. u s ) | (?: 3 \. l y ) | (?: 3 0 7 \. t o ) | (?: 4 m s \. m e ) | (?: 4 s q \. c o m ) | (?: 4 u r l \. c c ) | (?: 6 u r l \. c o m ) | (?: 7 \. l y ) | (?: a \. g g ) | (?: a \. n f ) | (?: a a \. c x ) | (?: a b c u r l \. n e t ) | (?: a d \. v u ) | (?: a d f \. l y ) | (?: a d j i x \. c o m ) | (?: a f x \. c c ) | (?: a l l \. f u s e u r l .c o m ) | (?: a l t u r l \. c o m ) | (?: a m z n \. t o ) | (?: a r \. g y ) | (?: a r s t \. c h ) | (?: a t u \. c a ) | (?: a z c \. c c ) | (?: b 2 3 \. r u ) | (?: b 2 l \. m e ) | (?: b a c n \. m e ) | (?: b c o o l \. b z ) | (?: b i n g e d \. i t ) | (?: b i t \. l y ) | (?: b i z j \. u s ) | (?: b l o a t \. m e ) | (?: b r a v o \. l y ) | (?: b s a \. l y ) | (?: b u d u r l \. c o m ) | (?: c a n u r l \. c o m ) | (?: c h i l p \. i t ) | (?: c h z b \. g r ) | (?: c l \. l k ) | (?: c l \. l y ) | (?: c l c k \. r u ) | (?: c l i \. g s ) | (?: c l i c c a m i \. i n f o ) | (?: c l i c k t h r u \. c a ) | (?: c l o p \. i n ) | (?: c o n t a \. c c ) | (?: c o r t \. a s ) | (?: c o t \. a g ) | (?: c r k s \. m e ) | (?: c t v r \. u s ) | (?: c u t t \. u s ) | (?: d a i \. l y ) | (?: d e c e n t u r l \. c o m ) | (?: d f l 8 \. m e ) | (?: d i g b i g \. c o m ) | (?: d i g g \. c o m ) | (?: d i s q \. u s ) | (?: d l d \. b z ) | (?: d l v r \. i t ) | (?: d o \. m y ) | (?: d o i o p \. c o m ) | (?: d o p e n \. u s ) | (?: e a s y u r i \. c o m ) | (?: e a s y u r l \. n e t ) | (?: e e p u r l \. c o m ) | (?: e w e r i \. c o m ) | (?: f a \. b y ) | (?: f a v \. m e ) | (?: f b \. m e ) | (?: f b s h a r e \. m e ) | (?: f f \. i m ) | (?: f f f \. t o ) | (?: f i r e \. t o ) | (?: f i r s t u r l \. d e ) | (?: f i r s t u r l \. n e t ) | (?: f l i c \. k r ) | (?: f l q \. u s ) | (?: f l y 2 \. w s ) | (?: f o n \. g s ) | (?: f r e a k \. t o ) | (?: f u s e u r l \. c o m ) | (?: f u z z y \. t o ) | (?: f w d 4 \. m e ) | (?: f w i b \. n e t ) | (?: g \. r o .l t ) | (?: g i z m o \. d o ) | (?: g l \. a m ) | (?: g o \. 9 n l .c o m ) | (?: g o \. i g n .c o m ) | (?: g o \. u s a .g o v ) | (?: g o o \. g l ) | (?: g o s h r i n k \. c o m ) | (?: g u r l \. e s ) | (?: h e x \. i o ) | (?: h i d e r e f e r \. c o m ) | (?: h m m \. p h ) | (?: h r e f \. i n ) | (?: h s b l i n k s \. c o m ) | (?: h t x t \. i t ) | (?: h u f f \. t o ) | (?: h u l u \. c o m ) | (?: h u r l \. m e ) | (?: h u r l \. w s ) | (?: i c a n h a z \. c o m ) | (?: i d e k \. n e t ) | (?: i l i x \. i n ) | (?: i s \. g d ) | (?: i t s \. m y ) | (?: i x \. l t ) | (?: j \. m p ) | (?: j i j r \. c o m ) | (?: k l \. a m ) | (?: k l c k \. m e ) | (?: k o r t a \. n u ) | (?: k r u n c h d \. c o m ) | (?: l 9 k \. n e t ) | (?: l a t \. m s ) | (?: l i i p \. t o ) | (?: l i l t e x t \. c o m ) | (?: l i n k b e e \. c o m ) | (?: l i n k b u n \. c h ) | (?: l i u r l \. c n ) | (?: l n - s \. n e t ) | (?: l n - s \. r u ) | (?: l n k \. g d ) | (?: l n k \. m s ) | (?: l n k d \. i n ) | (?: l n k u r l \. c o m ) | (?: l r u \. j p ) | (?: l t \. t l ) | (?: l u r l \. n o ) | (?: m a c t e \. c h ) | (?: m a s h \. t o ) | (?: m e r k y \. d e ) | (?: m i g r e \. m e ) | (?: m i n i u r l \. c o m ) | (?: m i n u r l \. f r ) | (?: m k e \. m e ) | (?: m o b y \. t o ) | (?: m o o u r l \. c o m ) | (?: m r t e \. c h ) | (?: m y l o c \. m e ) | (?: m y u r l \. i n ) | (?: n \. p r ) | (?: n b c \. c o ) | (?: n b l o \. g s ) | (?: n n \. n f ) | (?: n o t \. m y ) | (?: n o t l o n g \. c o m ) | (?: n s f w \. i n ) | (?: n u t s h e l l u r l \. c o m ) | (?: n x y \. i n ) | (?: n y t i \. m s ) | (?: o - x \. f r ) | (?: o c 1 \. u s ) | (?: o m \. l y ) | (?: o m f \. g d ) | (?: o m o i k a n e \. n e t ) | (?: o n \. c n n .c o m ) | (?: o n \. m k t w .n e t ) | (?: o n f o r b \. e s ) | (?: o r z \. s e ) | (?: o w \. l y ) | (?: p i n g \. f m ) | (?: p l i \. g s ) | (?: p n t \. m e ) | (?: p o l i t i \. c o ) | (?: p o s t \. l y ) | (?: p p \. g g ) | (?: p r o f i l e \. t o ) | (?: p t i t u r l \. c o m ) | (?: p u b \. v i t r u e .c o m ) | (?: q l n k \. n e t ) | (?: q t e \. m e ) | (?: q u \. t c ) | (?: q y \. f i ) | (?: r \. i m ) | (?: r b 6 \. m e ) | (?: r e a d \. b i ) | (?: r e a d t h i s \. c a ) | (?: r e a l l y t i n y u r l \. c o m ) | (?: r e d i r \. e c ) | (?: r e d i r e c t s \. c a ) | (?: r e d i r x \. c o m ) | (?: r e t w t \. m e ) | (?: r i \. m s ) | (?: r i c k r o l l \. i t ) | (?: r i z \. g d ) | (?: r t \. n u ) | (?: r u \. l y ) | (?: r u b y u r l \. c o m ) | (?: r u r l \. o r g ) | (?: r w w \. t w ) | (?: s 4 c \. i n ) | (?: s 7 y \. u s ) | (?: s a f e \. m n ) | (?: s a m e u r l \. c o m ) | (?: s d u t \. u s ) | (?: s h a r \. e s ) | (?: s h i n k \. d e ) | (?: s h o r l \. c o m ) | (?: s h o r t \. i e ) | (?: s h o r t \. t o ) | (?: s h o r t l i n k s \. c o .u k ) | (?: s h o r t u r l \. c o m ) | (?: s h o u t \. t o ) | (?: s h o w \. m y ) | (?: s h r i n k i f y \. c o m ) | (?: s h r i n k r \. c o m ) | (?: s h r t \. f r ) | (?: s h r t \. s t ) | (?: s h r t e n \. c o m ) | (?: s h r u n k i n \. c o m ) | (?: s i m u r l \. c o m ) | (?: s l a t e \. m e ) | (?: s m a l l r \. c o m ) | (?: s m s h \. m e ) | (?: s m u r l \. n a m e ) | (?: s n \. i m ) | (?: s n i p r \. c o m ) | (?: s n i p u r l \. c o m ) | (?: s n u r l \. c o m ) | (?: s p 2 \. r o ) | (?: s p e d r \. c o m ) | (?: s r n k \. n e t ) | (?: s r s \. l i ) | (?: s t a r t u r l \. c o m ) | (?: s u \. p r ) | (?: s u r l \. c o .u k ) | (?: s u r l \. h u ) | (?: t \. c n ) | (?: t \. c o ) | (?: t \. l h .c o m ) | (?: t a \. g d ) | (?: t b d \. l y ) | (?: t c r n \. c h ) | (?: t g r \. m e ) | (?: t g r \. p h ) | (?: t i g h t u r l \. c o m ) | (?: t i n i u r i \. c o m ) | (?: t i n y \. c c ) | (?: t i n y \. l y ) | (?: t i n y \. p l ) | (?: t i n y l i n k \. i n ) | (?: t i n y u r i \. c a ) | (?: t i n y u r l \. c o m ) | (?: t l \. g d ) | (?: t m i \. m e ) | (?: t n i j \. o r g ) | (?: t n w \. t o ) | (?: t n y \. c o m ) | (?: t o \. l y ) | (?: t o g o t o \. u s ) | (?: t o t c \. u s ) | (?: t o y s r \. u s ) | (?: t p m \. l y ) | (?: t r \. i m ) | (?: t r a \. k z ) | (?: t r u n c \. i t ) | (?: t w h u b \. c o m ) | (?: t w i r l \. a t ) | (?: t w i t c l i c k s \. c o m ) | (?: t w i t t e r u r l \. n e t ) | (?: t w i t t e r u r l \. o r g ) | (?: t w i t u r l \. d e ) | (?: t w u r l \. c c ) | (?: t w u r l \. n l ) | (?: u \. m a v r e v .c o m ) | (?: u \. n u ) | (?: u 7 6 \. o r g ) | (?: u b 0 \. c c ) | (?: u l u \. l u ) | (?: u p d a t i n g \. m e ) | (?: u r 1 \. c a ) | (?: u r l \. a z ) | (?: u r l \. c o .u k ) | (?: u r l \. i e ) | (?: u r l 3 6 0 \. m e ) | (?: u r l 4 \. e u ) | (?: u r l b o r g \. c o m ) | (?: u r l b r i e f \. c o m ) | (?: u r l c o v e r \. c o m ) | (?: u r l c u t \. c o m ) | (?: u r l e n c o \. d e ) | (?: u r l i \. n l ) | (?: u r l s \. i m ) | (?: u r l s h o r t e n i n g s e r v i c e f o r t w i t t e r \. c o m ) | (?: u r l x \. i e ) | (?: u r l z e n \. c o m ) | (?: u s a t \. l y ) | (?: u s e \. m y ) | (?: v b \. l y ) | (?: v g n \. a m ) | (?: v l \. a m ) | (?: v m \. l c ) | (?: w 5 5 \. d e ) | (?: w a p o \. s t ) | (?: w a p u r l \. c o .u k ) | (?: w i p i \. e s ) | (?: w p \. m e ) | (?: x \. v u ) | (?: x r \. c o m ) | (?: x r l \. i n ) | (?: x r l \. u s ) | (?: x u r l \. e s ) | (?: x u r l \. j p ) | (?: y \. a h o o .i t ) | (?: y a t u c \. c o m ) | (?: y e \. p e ) | (?: y e p \. i t ) | (?: y f r o g \. c o m ) | (?: y h o o \. i t ) | (?: y i y d \. c o m ) | (?: y o u t u \. b e ) | (?: y u a r e l \. c o m ) | (?: z 0 p \. d e ) | (?: z i \. m a ) | (?: z i \. m u ) | (?: z i p m y u r l \. c o m ) | (?: z u d \. m e ) | (?: z u r l \. w s ) | (?: z z \. g d ) | (?: z z a n g \. k r ) | (?: › \. w s ) | (?: ✩ \. w s ) | (?: ✿ \. w s ) | (?: ❥ \. w s ) | (?: ➔ \. w s ) | (?: ➞ \. w s ) | (?: ➡ \. w s ) | (?: ➨ \. w s ) | (?: ➯ \. w s ) | (?: ➹ \. w s ) | (?: ➽ \. w s ) ) \/ [ a - z 0 - 9 ] * / gi;
199+ }
200+
201+ Url . prototype . process = function process ( ) {
202+ var _this = this ;
203+
204+ return this . input . replace ( this . urlRegex , function ( match ) {
205+ var extension = match . split ( '.' ) [ match . split ( '.' ) . length - 1 ] ;
206+ if ( _this . options . linkExclude . indexOf ( extension ) === - 1 ) {
207+ return '<a href="' + _modulesUtilsEs62 [ 'default' ] . toUrl ( match ) + '" target="' + _this . options . linkTarget + '">' + match + '</a>' ;
208+ }
209+ return match ;
210+ } ) ;
211+ } ;
212+
213+ return Url ;
214+ } ) ( ) ;
215+
216+ module . exports = Url ;
217+
218+ } , { "../modules/utils.es6" :5 } ] , 5 :[ function ( require , module , exports ) {
191219'use strict' ;
192220
193221var utils = {
0 commit comments