{"\"Outstanding debut from potentially genre-redefining band\" - FATEA":"mortaltides_public","\"Sure to be one of the most notable debut albums of the year\" - Folk Radio UK":"mortaltides_public","**** Independent on Sunday":"mortaltides_public","**** MAVERICK magazine":"mortaltides_public","**** R2 magazine":"mortaltides_public","01. SWCHS 6th Form Barn gig":"mortaltides_public","01. What Blog?":"fromthewoods_public","02. Brewery Tap Pub, Peterborough - April fools Day":"mortaltides_public","02. We are signed to Wild Sound Recordings":"fromthewoods_public","02Academy":"mortaltides_public","03. Chrishall festival - June 4th 2012":"mortaltides_public","03. First Festival booked!":"mortaltides_public","04. Chesterford's GT - June 22nd":"mortaltides_public","04. New songs coming fast":"mortaltides_public","05. Festivals - summer 2014":"mortaltides_public","05. The Dial at Elmdon - 16.08.12":"mortaltides_public","06. Awards (VOTE!) and EP":"mortaltides_public","06. Brewery Tap - CANCELLED - Peterborough 07.10.12":"mortaltides_public","07. 6th Form Barn Gig SWCHS - 25.10.12":"mortaltides_public","07. We only bloody won it!":"mortaltides_public","08. Earlier With - 21.11.12":"mortaltides_public","08. Road to Blissfields - a win for MT!":"mortaltides_public","09. The Plough Pub - Great Chesterford - TBA":"mortaltides_public","09. BINGO! Kickstarter to pay for STUDIO TIME":"mortaltides_public","1. Upcoming gigs":"mortaltides_public","10. A new Violin is born":"mortaltides_public","10. The Cambridge Junction \"Fiver\" - 20 Sept 2013":"mortaltides_public","11. Cambridge Junction Fiver - 20th December":"mortaltides_public","12. Live session on Cambs local Star radio":"mortaltides_public","13. Cambridge Junction Fiver ACOUSTIC SPECTACULAR - January 25th 2014":"mortaltides_public","14. ... Wait for it... Festival news a'comin":"mortaltides_public","15. Homegrown Festival, Suffolk - 22nd-25th AUGUST 2014":"fromthewoods_public","16. Golden Hind pub - Headlining! 5th April 2014":"mortaltides_public","18. Folk East Festival - 15th Aug - Glemham Hall, Woodbridge":"mortaltides_public","19. Cambridge 105 Radio - live session 27.08.14":"mortaltides_public","2. Past gigs":"mortaltides_public","20. Blues and Rock Weekender 06.09.2014":"mortaltides_public","21. AlexFest at the Alex pub, Gwydir St, Cambridge - 11th October 2014":"mortaltides_public","22. Oct 17th - Portland Arms - NMG AWARDS NIGHT":"mortaltides_public","23. Oct 23rd - Barn gig - SWCHS 6th form":"mortaltides_public","24. Nov 8th MATINEE - EP launch gig Portland Arms!":"mortaltides_public","25. November 15th - Cambridge JUNCTION":"mortaltides_public","26. BBC INTRODUCING - live session for BBC Radio Cambridgeshire":"mortaltides_public","26. Dec 13th 2014 - Cambridge Junction J3 Acoustic Fiver":"mortaltides_public","27. The Finsbury - 11th January 2015":"mortaltides_public","28. ACOUSTIC FIVER - Cambridge Junction TWO - Wed March 4th":"mortaltides_public","28. NMG/Radio Cambridge 105 live session":"mortaltides_public","29. Fiverfest Grand FINAL - Cambridge Junction":"mortaltides_public","30. The TROUBADOUR CLUB, Earls Court - April 10th 2015":"mortaltides_public","31. The MONARCH - Camden, for BLISSFIELDS Saturday 18th April":"mortaltides_public","32. Downing College May Ball, Cambridge - 16th June":"mortaltides_public","33. Kings Affair (Kings College May Ball) June 18th":"mortaltides_public","34. Fete de la Musique - Saffron Walden - 21 June":"mortaltides_public","35. July 3-4, BLISSFIELDS Festival":"mortaltides_public","36. 02 Academy, Islington - July 10th":"mortaltides_public","37. July 23rd - SECRET GARDEN PARTY":"mortaltides_public","38. August 21st/22nd 2015 - Folk East Festival":"mortaltides_public","39. Cambridge Junction - Junkyard Festival":"mortaltides_public","40. Eight Bells, Saffron Walden - 28 August 2015":"mortaltides_public","41. Homegrown Festival - August 29th":"mortaltides_public","42. Sept 18th 2015 - Forest Folk and Roots, Bedford":"mortaltides_public","43. Nov 18th 2015 - Green Note Cafe, Camden":"mortaltides_public","44. Nov 20th - with the Living Room, Hunter Club, Bury St Edmund, Suffolk":"mortaltides_public","45. Dec 04, 2015 - CB2 Bistro with the Living Room":"mortaltides_public","46. Portland Arms - ALBUM LAUNCH - 10th Jan 2016":"mortaltides_public","47. 13.01.16 Tooting Tram and Social - Album LAUNCH!":"mortaltides_public","48. 14.1.16 Rough Trade Record Store 6:00pm in-store":"mortaltides_public","49. 14.1.16 -Troubadour Cafe - Earls Court. Album LAUNCH!":"mortaltides_public","50. 15.1.16 - Fopp (HMV) Cambridge - in-store gig and signing 5:30":"mortaltides_public","51. CANCELLED - 22nd January 2016 - Cambridge Junction - Fiverfest.":"mortaltides_public","52. 24th Feb 2016 - Sebright Arms, Bethnal Green - ALBUM LAUNCH PARTY!":"mortaltides_public","53. March 11th - Cambridge Junction 2 - Folk Fiver":"mortaltides_public","54. Ely Folk Festival - Fri 8th July":"mortaltides_public","55. Secret Garden Party Festival - 24th July":"mortaltides_public","56. Cambridge Folk Festival - Friday July 29th":"mortaltides_public","7/10 Guitarist magazine":"mortaltides_public","About":"mortaltides_public","About the Band":"mortaltides_public","Ain't no Grave":"mortaltides_public","Album: \"Light In / Light Out\"":"mortaltides_public","Amnesty International":"fromthewoods_public","AnalyticsConfig":"mortaltides_public","BBC Introducing":"mortaltides_public","BBC.jpg":"mortaltides_public","BandOnStage":"fromthewoods_public","Basic editing of your Wiki":"fromthewoods_public","Best Folk Albums of 2016 - Telegraph":"mortaltides_public","Blog":"fromthewoods_public","Break of Blue EP cover":"mortaltides_public","BreakofBlueCover":"fromthewoods_public","Canal and Tunnel Session":"mortaltides_public","Canvas - Song in Three Parts":"mortaltides_public","Canvas - lyrics":"fromthewoods_public","CleverTags":"fromthewoods_public","ColorPalette":"mortaltides_public","Comments":"fromthewoods_public","Contact us":"mortaltides_public","Cruellest Kind":"mortaltides_public","Cruellest Kind - lyrics":"mortaltides_public","DefaultTiddlers":"mortaltides_public","DelayWikifiedViewTypePlugin":"pip-ii_public","Discussion":"fromthewoods_public","Discussion and Chat":"fromthewoods_public","Disqus":"fromthewoods_public","DtR_twitter":"mortaltides_public","EP - Break of Blue":"mortaltides_public","Early gigs as From the Woods":"mortaltides_public","EditTemplate":"pip-ii_public","Embedding and iframes":"mortaltides_public","Empty Hearse":"mortaltides_public","EoR2009":"fromthewoods_public","EoR2009_2":"fromthewoods_public","ExtraFiltersPlugin":"filters_public","FATEA":"mortaltides_public","FTW Band portrait":"fromthewoods_public","FTW icon":"fromthewoods_public","Facebook":"mortaltides_public","Feel for Yourself":"mortaltides_public","Feel for Yourself - lyrics":"fromthewoods_public","Fergus Quill":"mortaltides_public","Fergus_byTimCrapnell":"mortaltides_public","FeteDeLaMusique":"mortaltides_public","Fiddle Loops":"mortaltides_public","FolkEast Main Stage":"mortaltides_public","FolkEast2015":"mortaltides_public","FolkEastLineUp":"mortaltides_public","Friends and other bands and stuff":"mortaltides_public","George Brignal":"mortaltides_public","George_byTimCrapnell":"mortaltides_public","George_byTimCrapnell2.jpg":"mortaltides_public","GettingStarted":"mortaltides_public","Gigs":"mortaltides_public","GoldenHind5Apr14":"fromthewoods_public","Google+":"fromthewoods_public","Guitarist":"mortaltides_public","HelloThere":"edit_public","Houses and Drums":"mortaltides_public","Houses and Drums - Lyrics":"fromthewoods_public","HtmlCss":"stub_public","HtmlJavascript":"backups_public","I Grow Cold":"mortaltides_public","I Shall be Released (cover, on a barge)":"mortaltides_public","I don't want to be your friend":"mortaltides_public","Independent review 1":"mortaltides_public","Index":"mortaltides_public","IndyonSunday10.1.16":"mortaltides_public","J2GigPoster":"mortaltides_public","Jed Bevington":"mortaltides_public","Jed_byTimCrapnell":"mortaltides_public","Junkyard2015":"mortaltides_public","LILO":"mortaltides_public","Lightin_album":"mortaltides_public","Links":"fromthewoods_public","Lyrics":"mortaltides_public","MainMenu":"mortaltides_public","MarkupPreHead":"mortaltides_public","Maverick":"mortaltides_public","MortalTidesLOGO":"mortaltides_public","Myriad":"mortaltides_public","Myriad - lyrics":"fromthewoods_public","NMGAwardsPic":"mortaltides_public","NMGFolkRoots":"mortaltides_public","NMGTrophyPic":"mortaltides_public","NMGheader":"mortaltides_public","Naiad":"mortaltides_public","Naiad - lyrics":"fromthewoods_public","No Midas":"mortaltides_public","No Midas - lyrics":"fromthewoods_public","No Surprises (cover, in a tunnel)":"mortaltides_public","Noah Bevington":"mortaltides_public","Noah by Elliot":"mortaltides_public","Noah_byTimCrapnell":"mortaltides_public","NumberSortFilterPlugin":"filters_public","PageTemplate":"mortaltides_public","PaphidesTWEET":"mortaltides_public","PaphidesTWEET2":"mortaltides_public","Photos":"mortaltides_public","PipStudio":"mortaltides_public","Please enter a title...":"fromthewoods_public","PortlandLaunchGig":"mortaltides_public","Prehistory":"fromthewoods_public","Press release":"mortaltides_public","R2":"mortaltides_public","RecentChanges":"fromthewoods_public","Record Player":"mortaltides_public","Record Player - lyrics":"fromthewoods_public","Recording session - July 13-14 2013":"fromthewoods_public","Recording session at Ananda Recording":"fromthewoods_public","Reviews and Quotes":"mortaltides_public","ServerSettings":"backups_public","Shadows":"mortaltides_public","Shadows - lyrics":"fromthewoods_public","Shop":"mortaltides_public","SideBarOptions":"pip-ii_public","SideBarTabs":"pip-ii_public","Simmy":"mortaltides_public","SimpleSearchPlugin":"mortaltides_public","SiteIcon":"mortaltides_public","SiteInfo":"mortaltides_public","SiteManagement":"mortaltides_public","SiteSubtitle":"mortaltides_public","SiteTitle":"mortaltides_public","SiteUrl":"fromthewoods_public","Smells Like Teen Spirit - cover":"mortaltides_public","Songs":"mortaltides_public","SoundCloud":"mortaltides_public","Spires":"mortaltides_public","Spires - lyrics":"fromthewoods_public","Split my Soul":"mortaltides_public","Split my Soul - lyrics":"fromthewoods_public","Starwars":"mortaltides_public","Steady on...":"mortaltides_public","Strong":"fromthewoods_public","Strong - Lyrics":"fromthewoods_public","Studio recordings - Kickstarted, done, dusted.":"mortaltides_public","StyleSheet":"mortaltides_public","StyleSheetHeader":"mortaltides_public","StyleSheetSideBar":"pip-ii_public","StyleSheetTiddlySpace":"mortaltides_public","Telegraph1":"mortaltides_public","Telegraph2":"mortaltides_public","The Band":"mortaltides_public","The Fall":"mortaltides_public","The Fall - Lyrics":"fromthewoods_public","TiddlerEditablePlugin":"pip-ii_public","TiddlySpace":"fromthewoods_public","TiddlyWiki":"fromthewoods_public","ToolbarCommands":"mortaltides_public","Twitter":"mortaltides_public","Upload Pictures":"mortaltides_public","Videos":"fromthewoods_public","ViewTemplate":"mortaltides_public","We changed our name, moved out, left a note...":"fromthewoods_public","Welcome to From the Woods":"mortaltides_public","Welcome to Mortal Tides":"mortaltides_public","What":"mortaltides_public","Where":"mortaltides_public","Who":"mortaltides_public","Why":"mortaltides_public","Wild Sound Recordings":"mortaltides_public","Winter to Spring":"mortaltides_public","YouTube":"mortaltides_public","angular.js":"backups_public","backups":"backups_public","backups.css":"backups_public","backups.js":"backups_public","backupsSetupFlag":"backups_public","edit":"edit_public","edit.css":"edit_public","edit.js":"edit_public","editSetupFlag":"edit_public","editedit.js":"edit_public","extraclusion":"edit_public","folk":"mortaltides_public","from the woods":"mortaltides_public","fromthewoodsSetupFlag":"fromthewoods_public","index":"backups_public","lightinlightout":"mortaltides_public","loading.gif":"pip-ii_public","mortaltidesSetupFlag":"mortaltides_public","pip-iiSetupFlag":"pip-ii_public","stubSetupFlag":"stub_public"}
{"\"Outstanding debut from potentially genre-redefining band\" - FATEA":"\"dac2d7ab88de7ee3acfa3a9006342a5b\"","\"Sure to be one of the most notable debut albums of the year\" - Folk Radio UK":"\"9ec5290bb13f14470da21c7f3e0ff035\"","**** Independent on Sunday":"\"459e2e9b3b0ced098e34f831b8939b17\"","**** MAVERICK magazine":"\"86aa444e4fbfeffecb61f7f1a553c68b\"","**** R2 magazine":"\"256d575df04c11745d24309a5b9ef14f\"","01. SWCHS 6th Form Barn gig":"\"2e66d7b0051e817dd33a9998991fe825\"","01. What Blog?":"\"7eec135a7da6cf77ddcd85c14b630b47\"","02. Brewery Tap Pub, Peterborough - April fools Day":"\"6b59a4d9b516525651478ecf6cc415db\"","02. We are signed to Wild Sound Recordings":"\"d7f3fca5bb55afd8729fba6d00c60203\"","02Academy":"\"ccc16d77c496af402b232fa5c54d6920\"","03. Chrishall festival - June 4th 2012":"\"cc0d26d2fd320601e152dc21a51879a9\"","03. First Festival booked!":"\"0dbf3a658b175879ae2479267244cbfd\"","04. Chesterford's GT - June 22nd":"\"f12331ae024a479d4086125b9afcef25\"","04. New songs coming fast":"\"0142a0afb2f38ccc2253b9541a9733be\"","05. Festivals - summer 2014":"\"52a5e5b2b51e0066f09252841672cdf7\"","05. The Dial at Elmdon - 16.08.12":"\"c321a5e4851487087be61cdc3b5edd4f\"","06. Awards (VOTE!) and EP":"\"9ffc55271759e3a3dab9d7035afc34bf\"","06. Brewery Tap - CANCELLED - Peterborough 07.10.12":"\"a869257b3c8c267676e96373a7dcef6b\"","07. 6th Form Barn Gig SWCHS - 25.10.12":"\"ee15fdc1316ae4f68ea85ae8b7f91f23\"","07. We only bloody won it!":"\"675d8c2f3eaad1a359ea302ec4ba6cf7\"","08. Earlier With - 21.11.12":"\"ac2e01d23c12b91ce33039cf58857346\"","08. Road to Blissfields - a win for MT!":"\"a82c89f4d7ec9359a19424249eedd5b4\"","09. The Plough Pub - Great Chesterford - TBA":"\"59af70be7000fe7ab7eb682d7e09ed0c\"","09. BINGO! Kickstarter to pay for STUDIO TIME":"\"6b8902f7f43cf22ba985d06ab4ce8539\"","1. Upcoming gigs":"\"a0aade5286809d3077ed218ddaa53792\"","10. A new Violin is born":"\"afa1a69a8b046052aee9175ba9c92ccf\"","10. The Cambridge Junction \"Fiver\" - 20 Sept 2013":"\"5668e9da1eb9ec1b49c38b345830fb31\"","11. Cambridge Junction Fiver - 20th December":"\"27f56bd312e07ce41333b8aaf586e516\"","12. Live session on Cambs local Star radio":"\"91c60846dbd233c6375204a53e08e2cb\"","13. Cambridge Junction Fiver ACOUSTIC SPECTACULAR - January 25th 2014":"\"13029c21c7e51a7e781317a1698dece1\"","14. ... Wait for it... Festival news a'comin":"\"bd00e40ca932466c700e0e7d79f39e57\"","15. Homegrown Festival, Suffolk - 22nd-25th AUGUST 2014":"\"1e79be8e85635eec68488b4ae77487f6\"","16. Golden Hind pub - Headlining! 5th April 2014":"\"265399940c706016c441b3a8ee587463\"","18. Folk East Festival - 15th Aug - Glemham Hall, Woodbridge":"\"17ded970aa8e819aae1073ae03175a4e\"","19. Cambridge 105 Radio - live session 27.08.14":"\"cfbfe9dfee0175fa9242b366d1d00f0e\"","2. Past gigs":"\"ba3e1ea555c9fe6f328993a480bb0b14\"","20. Blues and Rock Weekender 06.09.2014":"\"d8e176271cbde6ba383f7afeed8fdabe\"","21. AlexFest at the Alex pub, Gwydir St, Cambridge - 11th October 2014":"\"c59d19c1fcca14a2fec54c0219a8987c\"","22. Oct 17th - Portland Arms - NMG AWARDS NIGHT":"\"7226f9f3228b68d2ad947cfafe98a53d\"","23. Oct 23rd - Barn gig - SWCHS 6th form":"\"e9149f38e8361d08ddfcb4a034c7c479\"","24. Nov 8th MATINEE - EP launch gig Portland Arms!":"\"aaa71214260c4cf02bbd985a4587cbf7\"","25. November 15th - Cambridge JUNCTION":"\"e95b9a2905c48276fc7d65c936d62b16\"","26. BBC INTRODUCING - live session for BBC Radio Cambridgeshire":"\"99d9ff159c9f774de098c6de4b03df25\"","26. Dec 13th 2014 - Cambridge Junction J3 Acoustic Fiver":"\"36c5da8712b50f63aa1fcabbac6d683f\"","27. The Finsbury - 11th January 2015":"\"6de6c4c06a874c4f699e08a6cbdf6c80\"","28. ACOUSTIC FIVER - Cambridge Junction TWO - Wed March 4th":"\"abb9ed0fcf87fbceb632ed1f50425080\"","28. NMG/Radio Cambridge 105 live session":"\"555a96e2ae2b66ab90b0ca3faf4a3f50\"","29. Fiverfest Grand FINAL - Cambridge Junction":"\"8dfea79f65ed9e0f4e49ecaf1ad6762d\"","30. The TROUBADOUR CLUB, Earls Court - April 10th 2015":"\"0371ed4352d2e551f9e3e90c9aa87f84\"","31. The MONARCH - Camden, for BLISSFIELDS Saturday 18th April":"\"98930609fbe7ea7f336aac56b2d97572\"","32. Downing College May Ball, Cambridge - 16th June":"\"456b42499a2158318e3184a1a3d2e9eb\"","33. Kings Affair (Kings College May Ball) June 18th":"\"1dd0cac554ec2a6149c7a2a19137aa85\"","34. Fete de la Musique - Saffron Walden - 21 June":"\"77594bc4c7037eff00ed2891f5e9a20f\"","35. July 3-4, BLISSFIELDS Festival":"\"5198b019bb5491a482e06f0c9e72ccd3\"","36. 02 Academy, Islington - July 10th":"\"2925ef36d3d7aaaab882e735101d922a\"","37. July 23rd - SECRET GARDEN PARTY":"\"613335703b6ca3f8b8e6cfede5e23dab\"","38. August 21st/22nd 2015 - Folk East Festival":"\"453f463bfaba8cfe75f5594dad375669\"","39. Cambridge Junction - Junkyard Festival":"\"584733c77e604a39cdd7e93de72f7bd9\"","40. Eight Bells, Saffron Walden - 28 August 2015":"\"18e6f64c17b5b1bb87df9dab120c5d6d\"","41. Homegrown Festival - August 29th":"\"8db89348a363ac759ed3095dd3a3568e\"","42. Sept 18th 2015 - Forest Folk and Roots, Bedford":"\"99a66d9e852bdd51f849a7900b2719ed\"","43. Nov 18th 2015 - Green Note Cafe, Camden":"\"ca70dc5b0e1905d1525e870c1258ac03\"","44. Nov 20th - with the Living Room, Hunter Club, Bury St Edmund, Suffolk":"\"e94e8b8e9c14f3eb420df86982cbfea2\"","45. Dec 04, 2015 - CB2 Bistro with the Living Room":"\"244bf0d753f5356d1712b08f87a0db83\"","46. Portland Arms - ALBUM LAUNCH - 10th Jan 2016":"\"2b17b12ce07c0c979165f1f66cce18fb\"","47. 13.01.16 Tooting Tram and Social - Album LAUNCH!":"\"6e8fc6456ff74535e6bb8c37926b0659\"","48. 14.1.16 Rough Trade Record Store 6:00pm in-store":"\"2a3fc1b8ff6c2b9ab9603ca3d1a6277e\"","49. 14.1.16 -Troubadour Cafe - Earls Court. Album LAUNCH!":"\"1e89a39d320664316b68f96bf7c06844\"","50. 15.1.16 - Fopp (HMV) Cambridge - in-store gig and signing 5:30":"\"82bf84f3ba7da8932fe317cf1ff57298\"","51. CANCELLED - 22nd January 2016 - Cambridge Junction - Fiverfest.":"\"fbc5cb397accb5802bc46f7a8db7abe9\"","52. 24th Feb 2016 - Sebright Arms, Bethnal Green - ALBUM LAUNCH PARTY!":"\"e7b07190d5a09232c8f3d1795348a1ea\"","53. March 11th - Cambridge Junction 2 - Folk Fiver":"\"5d8a33aa3922a7633cd94669215c38a9\"","54. Ely Folk Festival - Fri 8th July":"\"6d46ab2559923979c0dc86cb15fcd207\"","55. Secret Garden Party Festival - 24th July":"\"cc57979158f54f8cbf757ab5a58c23a8\"","56. Cambridge Folk Festival - Friday July 29th":"\"d7ec91557397ccdafb4e30c8e12de2d0\"","7/10 Guitarist magazine":"\"d9bdf356e50d7c4310d570443b24a212\"","About":"\"5b3fee5af987abdaf6abba91c0212cb6\"","About the Band":"\"72b552ec3d0f53a3845cfc884eaf3c0a\"","Ain't no Grave":"\"72b61eae09a0440a070836ceefe4928b\"","Album: \"Light In / Light Out\"":"\"fd5fb90b5d8967c423ea555b3273cba9\"","Amnesty International":"\"a721cc43e718d672987e4c039cc029df\"","AnalyticsConfig":"\"3205989f270089076215f6f58e632a0d\"","BBC Introducing":"\"5e322c632337adbfc520a4e91ddab192\"","BBC.jpg":"\"2be72cc5e1b8c2f2d55ce0300ea3eeac\"","BandOnStage":"\"347fd4cc184cd7c8d6b5f5fffd113768\"","Basic editing of your Wiki":"\"4b67f72ef3609af59f1a4c51ddcc7ba5\"","Best Folk Albums of 2016 - Telegraph":"\"73573082aa7dfcf33618b5a635278bb5\"","Blog":"\"1530f5da54667dbc4f5472ef187da9b5\"","Break of Blue EP cover":"\"47e80a59984be21cbea5a2133192bfa1\"","BreakofBlueCover":"\"a6cf553d14d3da1b24b63241479b77f0\"","Canal and Tunnel Session":"\"24c07eeabb7410ae486a3500829bd2bd\"","Canvas - Song in Three Parts":"\"62b438427f67fae4770a18563637072f\"","Canvas - lyrics":"\"49147922566669745c3ec58f921fe668\"","CleverTags":"\"765a3997d43dd6a4cc677f94eafcc391\"","ColorPalette":"\"9bfbdb81589c7eacc9f04a65784a4dac\"","Comments":"\"b3e95e7601b0dd51e9d83fe779eb6537\"","Contact us":"\"96c42a022e61bf6259806cd94f60b9f7\"","Cruellest Kind":"\"12625cd44ac5873f151902d176f819af\"","Cruellest Kind - lyrics":"\"00c4522f4bbb75c56b574c69115cc09e\"","DefaultTiddlers":"\"483e8146b335909aee16f4e68eb59468\"","DelayWikifiedViewTypePlugin":"\"ae443058d76c8e6996ec319dc1acca31\"","Discussion":"\"44ccdff3033bba040cedb76abf988843\"","Discussion and Chat":"\"9a2e47901ebd15397b44da39e8ceddb7\"","Disqus":"\"39f98f26667df872a9aa3384a6eef6c8\"","DtR_twitter":"\"d15e63c93eca7667bd9c92d765dc5dd3\"","EP - Break of Blue":"\"722834393493a6c265fb183c14e9b419\"","Early gigs as From the Woods":"\"a1bed31639d83ac5beeb54eaccd8aff7\"","EditTemplate":"\"5f9911f624eeda7a015f3fe3c687dd72\"","Embedding and iframes":"\"fda641fe37f0e18a9b91712adfc243de\"","Empty Hearse":"\"c5c85015bd1cbae038f6a0e52b0a3570\"","EoR2009":"\"a048d47001f2fafcf37833569b158c13\"","EoR2009_2":"\"0594991373b1d60872727dd1ab3e2b38\"","ExtraFiltersPlugin":"\"6aa27443aa7f85a43add7f50c3c6eaee\"","FATEA":"\"27ed74787d192c0f677771c8a53e1790\"","FTW Band portrait":"\"ed26b917c558487d0baabd8b3c17c700\"","FTW icon":"\"0fa7f277462e33f5bd08c301f4c06729\"","Facebook":"\"1508500c51c4bfe2a94fe871d5983fec\"","Feel for Yourself":"\"0793b4c141b483c35fcc1638db248c6f\"","Feel for Yourself - lyrics":"\"a9705ed4e72ba96ad59e5d81cbc33ebd\"","Fergus Quill":"\"eaaad21d3c21945ccfb711cd922515d9\"","Fergus_byTimCrapnell":"\"790c258c71b5318835d002c866fa4cfb\"","FeteDeLaMusique":"\"4c16a2a0f46993a73691c4476d6ddffc\"","Fiddle Loops":"\"4be8a73fdb3212b02343592ea5891818\"","FolkEast Main Stage":"\"1b12d9d3f3b51a87b303ed1893539828\"","FolkEast2015":"\"35eeeb60d89a29c3f37e026f231cb6b4\"","FolkEastLineUp":"\"22683b642cbfb05ff48433352741d7c4\"","Friends and other bands and stuff":"\"97e886bc855a817bd73d6bdc3ab71788\"","George Brignal":"\"a1b16f0c28816f07eff1776e74ee9f39\"","George_byTimCrapnell":"\"8e01221e4e383d3b8490b79a9af84520\"","George_byTimCrapnell2.jpg":"\"b8122e3d00cbce15e7acdde5c965e24c\"","GettingStarted":"\"409a4e351300ab194c53edf5b0dc9d90\"","Gigs":"\"544a9b3ad95b431aef3fd5658a16ff22\"","GoldenHind5Apr14":"\"3fc2bb905b61b1a2b6c5ee6e8df73e8b\"","Google+":"\"f902ca05f60a7e2dcddb07eb5e2d02eb\"","Guitarist":"\"792bb1920cb519a6474fad2075b1c5e8\"","HelloThere":"\"9ca2063b6afc05950eb96a98aef28a50\"","Houses and Drums":"\"ef9dd65d0b353d83ea0276addaf31e7b\"","Houses and Drums - Lyrics":"\"b9744945e0b04c11c944d2c4d2c734f0\"","HtmlCss":"\"7091b9c1d60d9f65db697fe52c88b447\"","HtmlJavascript":"\"9134b5e2a5d7269f84bed5fdf589b6cd\"","I Grow Cold":"\"05252b11f2fbef7cb3f2aa7dee7d665a\"","I Shall be Released (cover, on a barge)":"\"565c9c673d06dc5ad1cd30daa864f511\"","I don't want to be your friend":"\"cfa074a14a0c3f00bf2bb2a2789b6ddc\"","Independent review 1":"\"45b250f7b7d2752d2a57fbff2c84c275\"","Index":"\"6f5e0097f4cf1741ca156853eee3bfce\"","IndyonSunday10.1.16":"\"836082c0b5620c4d2f7741cbf97af40e\"","J2GigPoster":"\"2f4ff3792570f002350b716de6a0ab3b\"","Jed Bevington":"\"19d2370ff066adb0144abb9341053ef9\"","Jed_byTimCrapnell":"\"e189817741d8455069ce2036c3b3861e\"","Junkyard2015":"\"40750515aa726f2a42bce2c66b325920\"","LILO":"\"3b36cb7a0979270c7dd6fa74097723d8\"","Lightin_album":"\"0b7f9f93301c1e888a162b511b23d11f\"","Links":"\"7d93c68182ed91a4dcdc12f4f0bd234d\"","Lyrics":"\"adb38774fc75039b303b326e255d925b\"","MainMenu":"\"6245d762dde6f93ca1a9ecce614eb901\"","MarkupPreHead":"\"38e166254b827e45f2aa81ca7875323d\"","Maverick":"\"a798d83b5218ca0982d4cd4112140f2b\"","MortalTidesLOGO":"\"91ec7b178c788027391e091ebac2602b\"","Myriad":"\"cc8799a4be34c756288b5d4df4bf66f0\"","Myriad - lyrics":"\"07f94d3bb1a3f388d96e0a717258e00d\"","NMGAwardsPic":"\"2d18e388fa31b22ba7d2e3e9cabea564\"","NMGFolkRoots":"\"3c26bf46341bb9ce7dc8153364e52d22\"","NMGTrophyPic":"\"4ba06d56480575ecfc51dabb234c7566\"","NMGheader":"\"c6c98783048b872921f726281be60e07\"","Naiad":"\"e6f6ff3663795ced9a9591938d71ecc5\"","Naiad - lyrics":"\"ace494b08fbc77b55e826b368ffb5187\"","No Midas":"\"657173287b0c50dfa5110199ed36081e\"","No Midas - lyrics":"\"c8b1c1d274559ec22c812d50fbea2e9a\"","No Surprises (cover, in a tunnel)":"\"94ec682b053364936ed9ee4cba7084b2\"","Noah Bevington":"\"e4d8c29f8e5430f6cea75ff8932e774e\"","Noah by Elliot":"\"108d5a072dd76d58afcfd05af2dc657b\"","Noah_byTimCrapnell":"\"1bfdea926aa67b23a01af5b05c81b33d\"","NumberSortFilterPlugin":"\"03fb16394009bd5567fd904c5d704062\"","PageTemplate":"\"01aaded8ae0f9bc22a18433248e97434\"","PaphidesTWEET":"\"0db847258bc298fcf0c336bcdab0551c\"","PaphidesTWEET2":"\"c19694793ac4722671ba2c00da66f8e2\"","Photos":"\"70af2521759222f04ef89984bc020c42\"","PipStudio":"\"504447c3ddce7711aac5fbd9f2b17e5e\"","Please enter a title...":"\"9d821195a2bbffe80779a9d1e6d04e00\"","PortlandLaunchGig":"\"6170dd322f4aa372efd58ebae7e5adf5\"","Prehistory":"\"11993a442de44a9de2860212e26e2b5c\"","Press release":"\"6dacd53d6d9ff2544da28904fba8a444\"","R2":"\"430f937f6da36db9b36769798d38c127\"","RecentChanges":"\"d4b6fc2dcd0132867b0a3411e112a4bf\"","Record Player":"\"22dc915a717e56e19f875e799f117018\"","Record Player - lyrics":"\"efa43b8bb0cfd8735d10160f31006b33\"","Recording session - July 13-14 2013":"\"618780160c620dbd96cff8a45a8607de\"","Recording session at Ananda Recording":"\"a61602496d0dd7447b43b979a593a9d4\"","Reviews and Quotes":"\"bced265eb339fdd8e1118e9339109bc6\"","ServerSettings":"\"36f21739fcec476e768c9896d025c7ee\"","Shadows":"\"6103d44b8e0748bf6486400e6f91654b\"","Shadows - lyrics":"\"8d570604fb481c57140637724332c541\"","Shop":"\"179512e26b4cc37bcdfc0c9eb5ee6402\"","SideBarOptions":"\"1e15bc5e7e44d4857b4728c726c67580\"","SideBarTabs":"\"1f0486034a4badb731c0f48f7c835edd\"","Simmy":"\"675050cb4fbcd3d5399d30cd828575e3\"","SimpleSearchPlugin":"\"55b6e4ad035b8467fb1cc83195beaed5\"","SiteIcon":"\"7ee5a50822c87d5c08e0131c34ad5066\"","SiteInfo":"\"40563a3836a0afad178dc5247e353c1b\"","SiteManagement":"\"9b829093929fcc5a7ad84068d82af51b\"","SiteSubtitle":"\"f75d1de70677b375e02bf8a7616e8a50\"","SiteTitle":"\"3c5c3d779cd697d0e75a85045550c9cd\"","SiteUrl":"\"2a0b324833c0adb81c6b39a2e104e642\"","Smells Like Teen Spirit - cover":"\"ea2ee3e6041a64e9093aff385ee3c007\"","Songs":"\"25a919b0421c04a60841c6ca72cf8e9d\"","SoundCloud":"\"66e4af2182a096b54b12a4d7efc0d8c5\"","Spires":"\"4716240bfd73e6e86e350e69494a8256\"","Spires - lyrics":"\"1dc7f50ee7c06036cc4a7e7c9b3a7c3a\"","Split my Soul":"\"104313060f12ce2aae64b75cd3fd05aa\"","Split my Soul - lyrics":"\"bd6f7d6cc745632cbd9e4a9137ae8949\"","Starwars":"\"6924feeed1b763916a47574502379bdb\"","Steady on...":"\"cbff71e80878a5689650aa9a3820ef4c\"","Strong":"\"e37101f120fdb483ca34782ec15e80fe\"","Strong - Lyrics":"\"94c9b0f8dc1c07f7346c768a41e220e5\"","Studio recordings - Kickstarted, done, dusted.":"\"0706c99ac1aec21bb4b4aa4a67f7219c\"","StyleSheet":"\"aa938c44c7f2d2f0c571f0f1e3beeea4\"","StyleSheetHeader":"\"544eda944b721d4479a49f01bf8c5ee1\"","StyleSheetSideBar":"\"c6518120d9fad2ec765bae371b011010\"","StyleSheetTiddlySpace":"\"7ed9772579bf88389af02392a7d5c142\"","Telegraph1":"\"adc0d9d390b4daecd4f526fe2ba34c4c\"","Telegraph2":"\"a51046afa67f48b7b14bdefed8b630de\"","The Band":"\"e6b0341cb9984e7fb57bdba7e0a2b7e8\"","The Fall":"\"c8dfe96497030d46ac0d7c545767049d\"","The Fall - Lyrics":"\"3a3ef646ec00509abe2300eb828a94ba\"","TiddlerEditablePlugin":"\"9edf4e9716ea548e44b29610f1b7be4f\"","TiddlySpace":"\"7a24346c82988171a6ea16eda799882c\"","TiddlyWiki":"\"fd86a70eeaac38dbf24bb7d0b9d4072c\"","ToolbarCommands":"\"30b9d3bc46e166981cf95d995896ca3e\"","Twitter":"\"693066fb85525bd61352bbaf30899d59\"","Upload Pictures":"\"6af94212f959f1b6c7e5f5dd573ffdbb\"","Videos":"\"0674b9398610d162901ebfbca67b9d24\"","ViewTemplate":"\"6c1258df873ce21d0542b19d872b0c2d\"","We changed our name, moved out, left a note...":"\"df5c4f58b0cf07a371492c1ed4f0b1dc\"","Welcome to From the Woods":"\"70492c4e5f07c23e1c6d79aa0cd2e253\"","Welcome to Mortal Tides":"\"357d84e065db1b3c5a8fed76bdf8858b\"","What":"\"e4d3e535cf46191e3e94edc462308b35\"","Where":"\"bd889f853beab093a8de3405e498511d\"","Who":"\"c3cf0df34d2a6e833f4b4b02f872743e\"","Why":"\"0070e4fdba48276ec05eec5e6a80c186\"","Wild Sound Recordings":"\"2648c3238460b93fd949f2ac9e292381\"","Winter to Spring":"\"05b94d843c8ccc2b5be4286dad0a1fb7\"","YouTube":"\"5f87ed6fa0a556bcaa27db1824dfcfed\"","angular.js":"\"b1657857a451b2fc515b9d58af1d91b0\"","backups":"\"4c75a6badaeeb77fd843827f8c9d8fc8\"","backups.css":"\"ca2cd5e9ee7802ed99dbb9b156bd21c9\"","backups.js":"\"0729d1c5e2bb5568cf6c0037f8329ce6\"","backupsSetupFlag":"\"b3740e617f6e0d93eebbf65963d0a5b1\"","edit":"\"509f6ff1472fb71a192ca2fd444b6b2b\"","edit.css":"\"7e0dc508d800ab033ad61136c3f9e8f0\"","edit.js":"\"66fc905325efe91a05d6e18037228db1\"","editSetupFlag":"\"19bdb35e2e8532e6804d44cdb253d477\"","editedit.js":"\"649bcb448ac87c3bef52719c0f702658\"","extraclusion":"\"a414c8f61c0c0915d55f1a0cc43a24c9\"","folk":"\"251ed9852c932e7846daa12db844de62\"","from the woods":"\"5c1a68d33b879ca27042c4916341db1c\"","fromthewoodsSetupFlag":"\"34a4e5ce82c178b247a6cb1a799b0594\"","index":"\"c7521d99e890357922fc3b0099f275dc\"","lightinlightout":"\"0355deeeece9918adedb9d6cce75ccd2\"","loading.gif":"\"c0cfc0942c78fffec3825992eedc3a9f\"","mortaltidesSetupFlag":"\"071fba47dd61ed25d492172f23021d3a\"","pip-iiSetupFlag":"\"e03f8b520dccb06c1df2257c83eefb8f\"","stubSetupFlag":"\"67c74f940a133568f0ef49ee9e6c460c\""}
https://8y1wh49hn1.execute-api.eu-west-2.amazonaws.com/prod/
4s50tg1b4toisc43c4q42gsceq
eu-west-2:2756d3cb-8b8b-47a9-8248-595a9d254d91
<<image [[FATEA]] width:700 height:900>>
Click to read more <<tag [[Reviews and Quotes]] reviews>>
Click to read more <<tag [[Reviews and Quotes]] reviews>>
<html><div align="center"><iframe src="http://www.folkradio.co.uk/2016/01/mortal-tides-light-in-light-out/" frameborder="0" width="100%" height="600"></iframe></div></html>
Click to read more <<tag [[Reviews and Quotes]] reviews>>
!Independent on Sunday, 10.01.16
<<image [[IndyonSunday10.1.16]] width:300 height:500>>
Click to read more <<tag [[Reviews and Quotes]] reviews>>
<<image [[Maverick]] width:700 height:900>>
Click to read more <<tag [[Reviews and Quotes]] reviews>>
<<image [[R2]] width:700 height:900>>
!13.03.2012
This was our first proper gig... only two songs - lucky 'cos that's all we had ready!
The video is chronic quality, the sound cuts in and out. Noah fluffs his words. George's drums go walkabout. But ''thank you'' for having us, and for being such a warm and welcoming audience for three nerve-bags... it was a real honour to be asked.
<html><iframe width="420" height="315" src="https://youtube.com/embed/cynk7XsPKwA?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Open mic night at The Brewery Tap pub
In Peterborough - our first fully public gig.
Amazing venue - all balconies, girders, brewing vats, and Thai food - and a full on sound system, stage, and lighting rig that was more than a bit intimidating when we first arrived. The pub (largest on-site brewing pub in Europe!) does monthly open mic sessions, and about 150 people were there, very friendly, and some amazing musicians too - highlights: "[[Lizzy C and the Boy on a Box|http://soundcloud.com/flataz]]", and an extraordinary solo unaccompanied folk singer who was only 14 but whose name we missed - brave and authentic.
We played [[Record Player]] and [[Feel for Yourself]], and got a great response from the audience, compere, and pub owner. They asked us back! Video to follow...
<html><div align="center"><iframe src="http://www.oakagroup.com/brewerytap/btwelcome.asp" frameborder="0" width="100%" height="600"></iframe></div></html>
We are absolutely delighted to let our followers know that we have just signed to the new acoustic roots label [[Wild Sound Recordings]] under the experienced leadership of the awesome singer songwriter Polly Paulusma, whose albums and live shows we urge people to explore. We are super proud to be joining Pol's other new signings, the excellent Stylusboy, and Harry Harris.
Our long awaited EP will be released as soon as possible... And the plan is for an album after that...
Half-hour set, in the marquee - cold, wet, but warmly welcomed and went well, we think!
Introduced our newest songs - [[Canvas - Song in Three Parts]], and [[Strong]] for the first time in public. There are [[Videos]] (chronic sound quality, sorry) of the performances of two songs - [[Strong]] and [[Feel for Yourself]].
<html><iframe width="640" height="360" src="https://youtube.com/embed/h_flpYgJxO4?rel=0" frameborder="0" allowfullscreen></iframe></html>
Following our [[last gig at the Cambridge Junction|13. Cambridge Junction Fiver ACOUSTIC SPECTACULAR - January 25th 2014]], it seems scouts from [[Homegrown Festival|15. Homegrown Festival, Suffolk - 22nd-25th AUGUST 2014]] spotted us, and liked what they saw. Thank you - its quite a lot of work getting these songs to walk on their own two feet, so we really appreciate feedback that other people might think they are OK, too.
We are well into the idea of a summer of festivals, so anyone want to recommend us to others, or others to us?
.
!Gt Chesterford Community Centre
An early gig as From the Woods
<html><iframe width="640" height="480" src="http://www.youtube.com/embed/Cvdg3FFfF5s?rel=0" frameborder="0" allowfullscreen></iframe></html>
----
<html><iframe width="640" height="480" src="http://www.youtube.com/embed/mlsmGoFSroA?rel=0" frameborder="0" allowfullscreen></iframe></html>
----
We have got three new songs in the past few weeks - really lining up stuff for album planned for the summer after (ahem...) exams are out the way.
Will be working on some scratch recordings of these in the weeks ahead to share them as drafts.
Got a nice recording of our version of [[Ain't no Grave]] in the bag at the studio in SWCHS (take a free download)... and more recently we just did a recording of our newest song [[Naiad]] in The Bothy, with which we are well pleased... for release later, 'fraid.
In summer 2014, we played our first festival gigs, first at the wonderful [[Folk East Festival|http://www.folkeast.co.uk]] on the Soapbox Stage, thanks to the epic Amy Wragg - to whom thanks. We had great time, and thanks to the audience, too, for being so enthusiastic.
Later in August we played the MAIN STAGE at the [[Homegrown Festival|http://www.hmfeastanglia.co.uk/]] this Sunday (24th August 2014) still listed under our old name of [[from the woods]] - great gig, with a very friendly crowd.
Could get a taste for this...
We are played a full set at the lovely Elmdon Dial pub, in (of all places) Elmdon, on Thursday evening 16th August - great evening, lovely friendly crowd! Planning to return first Thursday in December.
!Record Player
<html><iframe width="853" height="480" src="https://youtube.com/embed/q3k3bsVUTro?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Split my Soul
<html><iframe width="853" height="480" src="https://youtube.com/embed/OUtLTbPu60w?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Strong
<html><iframe width="640" height="480" src="https://youtube.com/embed/blfemT6SXpg?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Canvas
<html><iframe width="640" height="480" src="https://youtube.com/embed/KWVkhTP0fvs?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Feel for Yourself
<html><iframe width="640" height="480" src="https://youtube.com/embed/crL6YcEWjeQ?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Venue
<html><div align="center"><iframe src="http://www.theelmdondial.com/" frameborder="0" width="100%" height="600"></iframe></div></html>
How to find it:
<html><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Elmdon,+United+Kingdom&aq=0&oq=elmdon&sll=52.063636,0.196534&sspn=0.020447,0.037079&ie=UTF8&hq=&hnear=Elmdon,+Essex,+United+Kingdom&t=m&ll=52.051646,0.164108&spn=0.073894,0.145912&z=12&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=Elmdon,+United+Kingdom&aq=0&oq=elmdon&sll=52.063636,0.196534&sspn=0.020447,0.037079&ie=UTF8&hq=&hnear=Elmdon,+Essex,+United+Kingdom&t=m&ll=52.051646,0.164108&spn=0.073894,0.145912&z=12" style="color:#0000FF;text-align:left">View Larger Map</a></small></html>
We're shortlisted for best band 18 and under in the NMG awards...
There's also a public vote for the audience's choice... Voting open NOW... GO ALONG AND VOTE at:
............ http://www.nmgawards.com/?p=180............
Please one vote per household or apparently we get disqualified for cheating!
You can pre-order our [[EP - Break of Blue]] now -released on October 27th
!Sorry! Transport problems - can't make it.
Will try to make it ASAP
----
We hope to do a return performance at the Brewery Tap's excellent open mic night on 7.10.12 (had hoped to do September, but can't do the dates.) A mighty venue, not to be missed... just a hour from Saffron Walden (map below.) Do check this website before you travel to check we are still on for this!
<html><div align="center"><iframe src="http://www.oakagroup.com/brewerytap/btwelcome.asp" frameborder="0" width="100%" height="600"></iframe></div></html>
<html><iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=Brewery+tap+pub,+peterborough&aq=&sll=52.047846,0.160503&sspn=0.081818,0.148315&ie=UTF8&hq=Brewery+tap+pub,&hnear=Peterborough,+United+Kingdom&t=m&ll=52.557568,-0.283241&spn=0.073055,0.145912&z=12&iwloc=A&output=embed"></iframe><br /><small><a href="https://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=Brewery+tap+pub,+peterborough&aq=&sll=52.047846,0.160503&sspn=0.081818,0.148315&ie=UTF8&hq=Brewery+tap+pub,&hnear=Peterborough,+United+Kingdom&t=m&ll=52.557568,-0.283241&spn=0.073055,0.145912&z=12&iwloc=A" style="color:#0000FF;text-align:left">View Larger Map</a></small></html>
Honoured again to play to the sixth form. Played our newest song [[Houses and Drums]] (you can hear a rough home-made recording of it) and then [[Feel for Yourself]], and were able to introduce our newest band member [[Ian Rossuck]] filling out the sound on 'cello. Thanks to all who came and were so positive.
We are a bit spaced by this...
<<slider NMGAwards "22. Oct 17th - Portland Arms - NMG AWARDS NIGHT" "Click for the evidence">>
Great gig with the 6th form at SWCHS in the Saffron Screen - most honoured to be invited to play.
Raspingly poor film- and audio-quality (is this to be our theme tune?) that appears quite selectively to shred the human voice; it was filmed on a dismally faltering mobile... but such a great gig... there may be some better quality footage out there...?
![[Split my Soul]]
<html><iframe width="640" height="480" src="https://youtube.com/embed/PJ60adR7YxM?rel=0" frameborder="0" allowfullscreen></iframe></html>
![[Feel for Yourself]]
<html><iframe width="640" height="480" src="https://youtube.com/embed/iKENtySpMXE?rel=0" frameborder="0" allowfullscreen></iframe></html>
![[Houses and Drums]]
<html><iframe width="640" height="480" src="https://youtube.com/embed/09vfDNj3K8Y?rel=0" frameborder="0" allowfullscreen></iframe></html>
Totally thrilled that we won our final heat of the "Road to Blissfields" competition to select new bands to play at this great Hampshire festival - after playing a [[great gig at the monarch pub|31. The MONARCH - Camden, for BLISSFIELDS Saturday 18th April]] in the heart of Camden, just near the canal and Market.
Can't wait for summer...
We are hoping to agree a date very soon for a gig at [[The Plough pub|http://www.ploughgreatchesterford.co.uk/]], recently reopened under new management and establishing itself as a new hub in the village.
!Back to the studio!
We need to get back into a studio to record a full set of our songs with as much of a "live session" feel as we can possibly achieve.
That don't come cheap - while our label [[Wild Sound Recordings]] will do all the distribution, licensing and marketing, etc, as well as it's owner, Polly Paulusma, providing the production, what they can't pay for up front is studio and production costs - that's where you come in... We opened a KICKSTARTER fundraising project to raise this money - by our calculations we need £2000...
<html><iframe width="300" height="225" src="https://www.kickstarter.com/projects/mortaltides/help-mortal-tides-record-their-music/widget/video.html" frameborder="0" scrolling="no"> </iframe></html>
!BINGO!
We're delighted that we reached our target in just 3 days! All further pledges go towards EXTRA studio and production time so the recordings are even better. With Polly Paulusma of [[Wild Sound Recordings]] producing we are absolutely stoked for this...
<html><iframe frameborder="0" height="420" scrolling="no" src="https://www.kickstarter.com/projects/mortaltides/help-mortal-tides-record-their-music/widget/card.html?v=2" width="220"></iframe></html>
Click here for more details on our <<tag [[1. Upcoming gigs]]>>
Or pick them up via ~SongKick: <html><a href="http://www.songkick.com/artists/8283793" class="songkick-widget" data-theme="light" data-track-button="on" data-detect-style="true" data-background-color="#b6b9d8">Mortal Tides tour dates</a>
<script src="//widget.songkick.com/widget.js"></script></html>
Here's news.
Jed has a new violin, after his grandfather finished making one from scratch, carving the back out of a single piece of french maple. Took him 3 years, and it was born today - here's a little video of its very first notes in the [[Cambridge Violin workshop|http://www.makeviolins.com/]]...
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/kHLz6_z57Xw?rel=0" frameborder="0" allowfullscreen></iframe></html>
We are opened the Fiver at the Junction - the very same stage where no less than St Thom Yorke his very self has played.
Woah! Great night and we are so grateful to so many of you for coming to see us....
For photos see [[Junction - Sept 20th 2013 - Pics]]
<html><object width="480" height="360"><param name="movie" value="//www.youtube.com/v/_ap9LPfYeB4?version=3&hl=en_GB&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/_ap9LPfYeB4?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="480" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<html><div align="center"><iframe src="http://www.junction.co.uk/artist/5872" frameborder="0" width="100%" height="600"></iframe></div></html>
!Back again!
After a blazing debut gig at the Fiver, we were thrilled to have been asked back again so soon... And it was great!
Thanks to all of you who came along... Moshing to folk. It could be the start of something...
We did first public performances of [[No Midas]] and our cover of [[Ain't no Grave]]
!Cambridge Junction "FIVER" gig - Friday DECEMBER 20th from 7:00pm
[img[https://lh4.googleusercontent.com/-6GQb8AS26d4/Up5DJf5QsuI/AAAAAAAALDs/W2zzEp9DqYc/w860-h601-no/FiverFest-+December+-+Cambridge+Junction+20.12.13.jpg]]
|bgcolor(olive): <br>''RADIO STOP PRESS!''<br> FTW interviewed and live session on Tim Willett's ''Star Talent'' show (see below) <br><br>''Cambridgeshire STAR RADIO (107.1 and 107.9 FM, or internet)''<br><br>''The session and interview were broadcast over TWO weeks, on Tuesday 21st January and 28th January, 10pm; podcasts are available from [[here|http://www.star107.co.uk/star-talent.php]] or you can access it all (film and sound!) just below...''<br><br>It was fun, different - nothing like anything we'd done before! - huge thank you to Tim for inviting us on, and for dividing the session into two separate shows - super generous! <br> |
!The interview and session
!!Part 1 - broadcast 21.01.14
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/131052326&color=ff6d00&auto_play=false&show_artwork=true"></iframe></html>
!!Part 2 - broadcast 28.01.14
<html><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/133785792&auto_play=false&hide_related=false&visual=true"></iframe></html>
!No Midas in the studio at Cambridge Star radio (FM 107.9/1):
<html><object width="640" height="480"><param name="movie" value="//www.youtube.com/v/bg9OgJ_1jsQ?version=3&hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/bg9OgJ_1jsQ?version=3&hl=en_GB" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!Spires in studio at Cambridge Star Radio
<html><object width="640" height="480"><param name="movie" value="//www.youtube.com/v/qqAx6qV13eo?version=3&hl=en_GB&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/qqAx6qV13eo?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<html><div align="center"><iframe src="http://www.star107.co.uk/star-talent.php" frameborder="0" width="100%" height="600"></iframe></div></html>
Another "Fiver" event at the Cambridge Junction - this time an ACOUSTIC SPECTACULAR, with the band in the middle of a very strong line up - among some of the best emerging acoustic acts in the region. It was a fantastic evening and we were so grateful to everyone for coming, being so welcoming, and for Gary Brown at the Junction for making it possible.
!Spires
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/vnlr91TicMo?version=3&hl=en_GB&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/vnlr91TicMo?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!Shadows
<html><object width="480" height="360"><param name="movie" value="//www.youtube.com/v/Vh6xvzfwVfk?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/Vh6xvzfwVfk?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="480" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<html><div align="center"><iframe src="http://www.junction.co.uk/artist/5973" frameborder="0" width="100%" height="600"></iframe></div></html>
...Festivals ahoy...
We are planning to play some festivals over the summer... first up we have agreed to do: [[15. Homegrown Festival, Suffolk - 22nd-25th AUGUST 2014]]
and we are planning to do a late night set at the [[17. Cambridge Folk Festival]]... or more if we are allowed
We have been asked to play the [[Homegrown|http://www.homegrownfest.co.uk/]] festival in Suffolk for local up and coming bands - looks like a great weekend - check their website.
<html><div align="center"><iframe src="http://www.hmfeastanglia.co.uk/confirmed/4578478512" frameborder="0" width="100%" height="600"></iframe></div></html>
On Saturday 5th April we are headlining an acoustic lineup at the Golden Hind pub, home of the Cambridge Folk Club, thanks to Tim Willett - please come along and support us!
<<image [[GoldenHind5Apr14]] width:400 height:600>>
<html><div align="center"><iframe src="http://www.johnbarras.com/pub/golden-hind-cambridge/c1754/" frameborder="0" width="100%" height="600"></iframe></div></html>
We were on the Soapbox stage at the FOLK EAST FESTIVAL at GLEMHAM HALL in lovely Suffolk, alongside great acts like the roaring BELLOWHEAD, near the sea, and it was a joy... Thanks [[Amy Wragg|https://twitter.com/getonthesoapbox]] who put such a great show together... Again?
<<image [[FolkEastLineUp]] width:700 height:300>>
It was a BEAUTIFUL stage, entered after emerging from a copse of massive oaks, through a twisted willow tunnel...
<<image [[FolkEast]] width:600 height:400>>
![[Ain't no Grave]]
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/HWG_fQ409L0?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/HWG_fQ409L0?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
![[Naiad]]:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/h5X1SYjpssc?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/h5X1SYjpssc?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
Thanks to Tim Willett of Cambridge 105 FM radio who invited us in for this interview and live session on his [[New Music Generator|http://cambridge105.fm/]] show:
[[The Fall]] at 08:00
[[Houses and Drums]] at 21:20
[[Naiad]] Part 1 at 34:20
<html><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/165236063&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
Great charity gig, with our largest audience yet (500, apparently) for the Ethan Rees Linwood memorial fund (https://www.facebook.com/EthanReesMemorialFund). The band won a place as a support act to the Blues Brothers' Revue - here's [[Houses and Drums]], [[Ain't no Grave]] and [[I Shall be Released|I Shall be Released (cover, on a barge)]] all shot masterfully by Amanda Jane Richards:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/0mbII7vmnRY?hl=en_GB&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/0mbII7vmnRY?hl=en_GB&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
We are playing at the AlexFest - a 2 day music festival in the [[Alexandra Arms|https://plus.google.com/108780660344723779467/about?gl=uk&hl=en]] in Gwydir Street, Cambridge
Great night, thanks to all who were so positive via Twitter afterwards!
<<image [[AlexFestPic.jpg]] width:600 height:400>>
|bgcolor(lightgray): <br><br><<image [[NMGheader]] width:150 height:60>> <<image [[NMGTrophyPic]] width:200 height:300>> <<image [[NMGheader]] width:150 height:60>><br><br> |
Didn't expect THAT! Totally thrilled that the panel of [[judges|http://www.nmgawards.com/?page_id=159]] chose us from the shortlist. And apparently out of 93 in the longlist eligible for the audience choice vote, we were in the top 5, too... staggered. Grateful. Thank you to everyone who voted, and who continues to support us.
|bgcolor(lightgrey): <br> <br> ''@@color(darkblue): WINNERS! BEST BAND UNDER 19yrs, NMG AWARDS...@@'' <br><<image [[NMGAwardsPic]] width:500 height:350>><br> |
not a public gig, but one we're looking forwards to
A matinee gig to launch our [[EP - Break of Blue]] at the famous Portland Arms - musical epicentre on Mitchams Corner... with wonderful support from [[Tom Roddis|https://www.facebook.com/TomRoddisMusic]], [[Melody Causton|https://www.facebook.com/melodycaustonmusic]] and [[Rachel Clark|http://www.rachelclarkmusic.com/]] - all fabulous and award winning performers - deservedly so...
<html><div align="center"><iframe src="http://www.theportlandarms.co.uk/wp/event/mortal-tides-rachel-clark-tom-roddis-matinee-gig/?instance_id=6028" frameborder="0" width="100%" height="300"></iframe></div></html>
Cruellest Kind:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/fwAmRKahJhQ?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/fwAmRKahJhQ?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<slider CruellestKindLyrics "Cruellest Kind - lyrics" "click for lyrics">>
Myriad:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/5iRfC_NyVoo?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/5iRfC_NyVoo?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
Fantastic evening - thanks for all who voted for us... it appears we won the audience vote for best band of the evening - honoured, and true credit to all the other acts - particular respect to Twisted Piglet and our friends the Black Cortinas - bursting onto the public stage in fine form.
Here's our intro, leading into [[Houses and Drums]]... and who's that fifth man on stage, playing electric guitar - welcome Jay Plent!
<html><object width="480" height="360"><param name="movie" value="//www.youtube.com/v/yX99MdsKFZQ?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/yX99MdsKFZQ?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="480" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
Thrilled to have been asked by Tom Simkins to come and record a live session on the bbc radio Cambridgeshire studios... Broadcast on Saturday 20th Dec at 8pm.
|bgcolor(lightgrey): <br>Lovely live footage from the BBC - a live session with Tom Simkins at BBC Introducing in Cambridge - of our newest song, [[Empty Hearse]]:<br><html><iframe width="640" height="360" src="//www.youtube.com/embed/ehSZjPNPnc8?rel=0" frameborder="0" allowfullscreen></iframe></html><br> Here's the second song from that session, another new one [[Cruellest Kind]]: <br> <html><iframe width="640" height="360" src="//www.youtube.com/embed/lMyCeFmtUBU" frameborder="0" allowfullscreen></iframe></html><br><br> |
No less than 5 TV cameras in the studio with us... So there's footage to be had on the BBC Introducing youtube channel...
<<image [[BBC.jpg]] width:600 height:480>>
Saturday 13th Dec at the intimate J3 stage in Cambridge Junction we're doing a stripped back set that will include at least one maybe two or three of the new songs we've been working on, fresh from Noah's pen.
Great evening. We showcased a new song tonight - Empty Hearse. Here it is:
<<slider EmptyHearseslider [[Empty Hearse]] "Click to see video of Empty Hearse">>
.
Great gig at this lovely music venue in Finsbury - our first outing to London. Supporting our friends [[Healyum|http://youtu.be/9wPl8cPaY40]] who are fantastic if you don't know them yet. Not just two siblings... three, and one of them a Jed!
<html><div align="center"><iframe src="http://www.thefinsbury.co.uk" frameborder="0" width="100%" height="600"></iframe></div></html>
We headlined on the beautiful Junction 2 stage for a select audience (seated) for an [[ACOUSTIC FIVER|http://www.junction.co.uk/acoustic-fiver-march]] on Wednesday March 4th 2015.
It was a fantastic opportunity for us to work the sound in that lovely intimate venue... Bog crowd for a Wednesday night, too! Thanks to all who came and supported us - including a great collection of musicians: Rachel Clarke, Soothsayer, Melody Causton, Oscar Corney.
First chance to play our newest song, Noah's ink still wet on the page, [[Winter to Spring]]:
<html><iframe width="640" height="480" src="https://www.youtube.com/embed/Po9UMAvtP_o?rel=0" frameborder="0" allowfullscreen></iframe></html>
<<image [[J2GigPoster]] width:480 height:600>>
<html><div align="center"><iframe src="http://www.junction.co.uk/acoustic-fiver-march" frameborder="0" width="100%" height="600"></iframe></div></html>
Great Opportunity for us from Tim Willett and the studio at CRC. We played straight out for 45 minutes, no retakes, no over-dubs. It is as we played it - bit rough around the edges, but thanks to the guys in the control room who captured it really well.
You can download the whole 1 hour session from here:
<html><div align="center"><iframe src="http://cambridge105.fm/new-music-generator-15-04-2015-2/" frameborder="0" width="100%" height="600"></iframe></div></html>
This was a really great gig - packed Junction and some other great bands playing too - well done to friends The Staycations who played a great set to win the audience vote. Here's some pictures of it, set to a version of Naiad that we recorded at home last summer:
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/BBqYAf4nIK4?rel=0" frameborder="0" allowfullscreen></iframe></html>
After this there's //only one more gig we'll be playing// till the festivals start in the summer ([[30. The TROUBADOUR CLUB, Earls Court - April 10th 2015]])
<html><div align="center"><iframe src="http://www.junction.co.uk/event/fiverfest-grand-final" frameborder="0" width="100%" height="600"></iframe></div></html>
We were absolutely buzzing to be able to play this legendary venue in the West End - the place where so many epic greats have played since it opened in the 50's...
* It's where the British Folk revival kicked off in the 60's.
* It's not so much who's played on that very stage, but who hasn't... Dylan, Martin Carthy, Hendrix, Sandy Denny, Stones, Jimmy Page...
It was a storming evening. Packed house, fantastic warm audience, and the music took off - our best gig, we all agreed.
Here's some photos set to [[Houses and Drums]] from our [[EP - Break of Blue]]:
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/OhIQnnY9nSk?rel=0" frameborder="0" allowfullscreen></iframe></html>
Here's some live footage of [[Cruellest Kind]]:
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/RcCqreP6W6w?rel=0" frameborder="0" allowfullscreen></iframe></html>
!WE WON!
Along with the great band MOK, we won the final heat for inclusion in the line-up for the great Blissfields festival... It was a great gig! Thanks for al who came along to support us, and for the whole audience, whose support must have helped the panel of judges. Yay! we're going to [[BLISSFIELDS|35. July 3-4, BLISSFIELDS Festival]]!
<html><div align="center"><iframe src="http://www.monarchbar.com/" frameborder="0" width="100%" height="600"></iframe></div></html>
A stripped back set with just Noah and Jed.
http://downingball.co.uk/home.html
A stripped back set in the Kings College Chapel - nice!
http://www.kingsaffair.com/
<<image [[FeteDeLaMusique]] width:200 height:150>>
Interrupting our rehearsals for our recording sessions, we played on the old town bandstand in front of a great crowd in our home town Saffron Walden as part of a day long extravaganza of street and stage music.
Click for pics:
<html><table style="width:194px;"><tr><td align="center" style="height:194px;background:url(https://www.gstatic.com/pwa/s/v/lighthousefe_20150712.00_p0/transparent_album_background.gif) no-repeat left"><a href="https://picasaweb.google.com/100078669570401783806/FeteDeLaMusique?authuser=0&feat=embedwebsite"><img src="https://lh3.googleusercontent.com/-XEfowmfK_2U/VYcLp7vIavE/AAAAAAAATq0/nRCOHEq0J5Y/s160-c-Ic42/FeteDeLaMusique.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td></tr><tr><td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="https://picasaweb.google.com/100078669570401783806/FeteDeLaMusique?authuser=0&feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Fete de La Musique</a></td></tr></table></html>
We were totally thrilled to win our heat of the Road to Blissfields competition, playing live at the [[Camden Monarch|31. The MONARCH - Camden, for BLISSFIELDS Saturday 18th April]], to earn a place to play at this lovely festival in Hampshire.
What an epic night in the Larch stage. Started with about 100 watching, ended with about 250 all packed in the triple tipi stage and yelling for more. Joy.
Click for pics:
<html><table style="width:194px;"><tr><td align="center" style="height:194px;background:url(https://www.gstatic.com/pwa/s/v/lighthousefe_20150712.00_p0/transparent_album_background.gif) no-repeat left"><a href="https://picasaweb.google.com/100078669570401783806/Blissfields2015?authuser=0&feat=embedwebsite"><img src="https://lh3.googleusercontent.com/-wW7J9CRwxaE/VZgOGsTNY2E/AAAAAAAATqQ/kEuzVrYwXLs/s160-c-Ic42/Blissfields2015.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td></tr><tr><td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="https://picasaweb.google.com/100078669570401783806/Blissfields2015?authuser=0&feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Blissfields 2015</a></td></tr></table></html>
We were stoked to play at this venue - hope everyone who came had as much fun as we did. What great evening.
<<image [[02Academy]] width:400 height:250>>
Click for pics:<html><table style="width:194px;"><tr><td align="center" style="height:194px;background:url(https://www.gstatic.com/pwa/s/v/lighthousefe_20150712.00_p0/transparent_album_background.gif) no-repeat left"><a href="https://picasaweb.google.com/100078669570401783806/MortalTidesAtO2AcademyIslington?authuser=0&feat=embedwebsite"><img src="https://lh3.googleusercontent.com/-kIVAJAZsBac/VaDuetmYVeE/AAAAAAAATqg/s0FEfaD9VEs/s160-c-Ic42/MortalTidesAtO2AcademyIslington.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td></tr><tr><td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="https://picasaweb.google.com/100078669570401783806/MortalTidesAtO2AcademyIslington?authuser=0&feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Mortal Tides at O2 Academy Islington</a></td></tr></table></html>
Delighted and honoured to be asked to play here! We played on the LIVING ROOM STAGE, courtesy of BBC Introducing - big thanks to Tom Simkins and Phil Pethybridge.
<html><table style="width:194px;"><tr><td align="center" style="height:194px;background:url(https://www.gstatic.com/pwa/s/v/lighthousefe_20150712.00_p0/transparent_album_background.gif) no-repeat left"><a href="https://picasaweb.google.com/100078669570401783806/MortalTidesAtSecretGardenParty?authuser=0&feat=embedwebsite"><img src="https://lh3.googleusercontent.com/-YKmEW5cSm4I/VbP0FHSUZ9E/AAAAAAAATpE/ZMexwB8KR1U/s160-c-Ic42/MortalTidesAtSecretGardenParty.jpg" width="160" height="160" style="margin:1px 0 0 4px;"></a></td></tr><tr><td style="text-align:center;font-family:arial,sans-serif;font-size:11px"><a href="https://picasaweb.google.com/100078669570401783806/MortalTidesAtSecretGardenParty?authuser=0&feat=embedwebsite" style="color:#4D4D4D;font-weight:bold;text-decoration:none;">Mortal Tides at Secret Garden Party</a></td></tr></table></html>
<html><iframe width="560" height="315" src="https://www.youtube.com/embed/5V95k7sYwdo?rel=0" frameborder="0" allowfullscreen></iframe></html>
We returned to Folk East Festival after a fantastic experience last year (see [[18. Folk East Festival - 15th Aug - Glemham Hall, Woodbridge]]), but this year we returned to play the lovely intimate Soapbox stage again as well as being invited ''to open on the main Sunset Stage as last year's "Crossover act"''. Massive honour, and, as by far the biggest stage we've played yet, yep, just a little daunting. Delighted to say we wildly madly loved it, and from the shouts for more at the end we dare to hope that others enjoyed our set too - all songs from our forthcoming [[Sessions album|Studio recordings - Kickstarted, done and (nearly) dusted!]] apart from Dylan's classic "I shall be released" to finish off. Glorious sunshine, donkeys, massive stage and perfect sound system (more than can be said for our video camera) and lots and lots of lovely people shaded under oak trees and dancing at the front - what's //not// to love? Thanks to the wonderful organisers of this festival - such a great festival to play at, such a great spot.
<<image [[FolkEast2015]] width:200 height:320>>
<<image [[FolkEast Main Stage]] width: 450 height: 320>>
Delighted to win a headliner slot with our pals Too Cool Kids to perform here - a long day as we'd opened the main stage at Folk East the same day, but the stage was spectacular and the crowd were great. Lots of good feedback. Bonus: Fergus had lost his voice, but not his bass...
<<image [[Junkyard2015]] width:550 height:390>>
looking forwards to this - we have a 2 hour slot (2 45 min sets) and aim to fill it all... stuff from the forthcoming album, old stuff, and some fun covers that we were invited to do by our generous Kickstarter supporters... Do come along if you are in the area. Home turf, and all that.
http://www.8bells-pub.co.uk/
We return to [[Homegrown Festival|http://hmfeastanglia.co.uk/]] in Suffolk at the end of the summer - we had a lot of fun here last summer and will be raising our game this year, with material from our new album that should be in the bag by then, produced by the great [[Polly Paulusma|Wild Sound Recordings]].
<html><div align="center"><iframe src="http://hmfeastanglia.co.uk/mortal-tides/4588817688" frameborder="0" width="100%" height="600"></iframe></div></html>
Looking forwards to this!
''Venue: ''
The College Arms Bar, College Road, Cranfield, Bedfordshire MK43 0AL / MK43 0SR
<html><div align="center"><iframe src="http://forestfolkandroots.weebly.com/friday-18th-september-2015---mortal-tides-and-gwinny.html" frameborder="0" width="100%" height="600"></iframe></div></html>
As part of the 3rd Birthday celebrations for our label [[Wild Sound Recordings]], brothers Noah and Jed are playing a stripped back acoustic set at the epic ''Green Note Cafe'' (TIME OUT VENUE OF THE YEAR 2015!), alongside label siblings Matthew the Oxx and Dan Wilde. It will be lovely evening n a great venue - do come and support us!
<html><div align="center"><iframe src="http://www.greennote.co.uk/production/matthew-the-oxx-dan-wilde-mortal-tides/" frameborder="0" width="100%" height="600"></iframe></div></html>
Can't wait for this one. We first met the Living Room when we played in their awesome tent at the Secret Garden Party Festival, summer 2015. They run a whle range of wonderful high quality acoustic events, incudng a tent at the Cambridge Folk Festival. Now we're back with them in Bury St Edmund in the lovely Hunter Club (The Hunter Club, 6 St. Andrews Street South, IP33 3PJ Bury St Edmunds).
It will be a great show, leading us into the [[album|Studio recordings - Kickstarted, done and (nearly) dusted!]] release.
See the event page [[here|https://www.facebook.com/events/865159883598730/]]. Tickets are LIMITED so BOOK EARLY!
<html><div align="center"><iframe src="https://www.facebook.com/events/865159883598730/" frameborder="0" width="100%" height="600"></iframe></div></html>
Brilliant intimate venue in Cambridge, with the Living Room - come along to see us do an intimate acoustic show.
Event page [[here|https://www.facebook.com/events/842642405848865/]] the venue is CB2 Bistro, 5/7 Norfolk Street, CB1 2LD Cambridge, United Kingdom. Limited places - book early!
<html><div align="center"><iframe src="http://www.cb2bistro.co.uk/index.html" frameborder="0" width="100%" height="600"></iframe></div></html>
Amazing night! Thanks to Jay Plent who joined us on stage with electric guitar and to the Mortal Tides horn section!
<<image [[PortlandLaunchGig]] width:480 height:600>>
Come and see us at this ubercool venue in S. London on Wednesday evening, headlining a FREE ENTRY show with some fantastic support acts
<html><div align="center"><iframe src="http://tootingtramandsocial.co.uk/events/mortal-tides-album-release-show-mowbeck-rhiannon-mair-free-entry/" frameborder="0" width="100%" height="600"></iframe></div></html>
Celebrating the release of our album which Rough Trade will be stocking, we're doing an intimate stripped back acoustic gig in store on Thursday afternoon at 6pm. 130 Talbot Rd, London W11 1JA
<html><div align="center"><iframe src="http://www.roughtrade.com/events/2016/1/1935" frameborder="0" width="100%" height="600"></iframe></div></html>
<html><div align="center"><iframe src="https://troubadourlondon.yapsody.com/event/index/25332/mortal-tides" frameborder="0" width="100%" height="600"></iframe></div></html>
An in-store gig at fabulous Fopp record store (part of HMV group) in Cambridge to celebrate the formal release of Light In / Light Out!
<html><div align="center"><iframe src="http://www.fopp.com/mortaltides/" frameborder="0" width="100%" height="600"></iframe></div></html>
Really sorry but circumstances beyond our control mean we have to cancel this performance.
We'll be back at the Junction 2 on March 11th, so please forgive us and come then!
<html><div align="center"><iframe src="http://www.petulantpenguin.bigcartel.com/product/petulant-penguin-presents-mortal-tides-lester-clayton" frameborder="0" width="100%" height="600"></iframe></div></html>
A return to the fabulous minstrel-galleried and intimate Junction 2 venue in Cambridge
See [[Ely Folk Festival|http://elyfolkfestival.co.uk]] for more details
We are headlining in MARQUEE 2, on the FRIDAY NIGHT
<html><div align="center"><iframe src="http://elyfolkfestival.co.uk/artists/friday-night-local-bands-showcase/" frameborder="0" width="100%" height="600"></iframe></div></html>
Absolutely thrilled to be asked back by the wonderful Living Room stage to play at the Secret Garden Party again this summer.
We're on the Living Room stage on Sunday evening
Here's some video from last year's gig - since then the album's out, new songs and some well known ones to come.... it's all growing hotter
<html><iframe width="560" height="315" src="https://www.youtube.com/embed/xBbMktq_fok" frameborder="0" allowfullscreen></iframe></html>
BIG excitement to be invited to play at the biggest and best folk festival in the UK - and our local.
We'll be doing a stripped back and intimate retelling of some of the songs from the album and some new material on the Den stage - as they describe it, "the place to see the stars of tomorrow".
https://www.cambridgelivetrust.co.uk/folk-festival/line-up/den
Click to read more <<tag [[Reviews and Quotes]] reviews>>
<<image [[Guitarist]] width:400 height:600>>
![[Contact us]]
![[Reviews and Quotes]]
![[Who]]
![[Where]]
![[What]]
![[Why]]
![[Who]]
![[Where]]
![[What]]
![[Why]]
Thanks to Elliot Hingston for recording and production
!Take a free download on us!
Folk standard... we don't do many covers, but this one we love (live video below):
<html><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/159959739&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
Two versions we'd particularly point at and honour are those by [[Johnny Cash|https://itunes.apple.com/gb/album/aint-no-grave/id354002797?i=354002805]] and by [[Crooked Still|https://itunes.apple.com/gb/album/aint-no-grave/id407776586?i=407776684]].
!At Folk East, 2014
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/HWG_fQ409L0?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/HWG_fQ409L0?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!Released January 2016 - it's all done
<<image [[LILO]] width:480 height:480>>
|bgcolor(darkblue): <br>@@color(lightblue):See the fantastic@@ [[Reviews and Quotes]] @@color(lightblue):in the national press and online@@<br><br> |
!Listen
<html><iframe src="https://embed.spotify.com/?uri=spotify%3Aalbum%3A3CX9gxSCVGcB3Wr2oohtfp" width="300" height="380" frameborder="0" allowtransparency="true"></iframe></html>
!Available from:
[[SPOTIFY|https://open.spotify.com/album/3CX9gxSCVGcB3Wr2oohtfp]]
[[AMAZON|http://www.amazon.co.uk/Light-Out-Mortal-Tides/dp/B017JQXEXC]]
[[iTUNES|https://itunes.apple.com/gb/album/light-in-light-out/id1056655789]]
[[HMV|https://www.hmvdigital.com/releases/5084150]]
[[ROUGH TRADE|http://www.roughtrade.com/albums/100027]]
[[PROPERMUSIC|http://www.propermusic.com/product-details/Mortal-Tides-Light-In-Light-Out-220510]]
<<slider KickstarterAlbum "Studio recordings - Kickstarted, done, dusted." "Backstory on 'Light IN / Light Out' here!">>
|bgcolor(orange): <br>''__Protect the Human__''<br><br>Make [[Amnesty|http://www.amnesty.org.uk/]] your charity of choice<br><br> |
<html><a href=http://www.bbc.co.uk/music/introducing/?uploadedbadge title="Head to bbc.co.uk/introducing, upload your music and you could have your tracks broadcast on BBC Radio"><img src="http://www.bbc.co.uk/music/introducing/images/badges/uploadedbadge.png" border="0" alt="Head to bbc.co.uk/introducing, upload your music and you could have your tracks broadcast on BBC Radio" /></a></html>
!Getting started Editing
You can only edit your wiki if:
(a) you are a member of it
(b) you are logged in.
You log in by clicking the little pink/blue target, top right corner
You start editing a particular page (or "tiddler") by clicking the "edit" button just top right of that individual page (or "tiddler"). This "opens the bonnet" of your page, so you see the "code" that makes it look neat when it is in ordinary "viewing mode".
Just type away!
If you are looking at a page in ''"Edit mode"'' the top box is for the Title, the main middle box is for the Body of the text/content in the page, and the bottom box is for "Tags" - whcih are like Topic headings for that page. (If you are adding tags, check your spellings and get ~CapitalLetters in the right places.)
If you want to make a LINK to another tiddler in your wiki, you put double square brackets (ones like this ''['' ) around it.
Eg. ''{{{[[This would be a link]]}}}'' (if I hadn't used an extra trick to STOP it being a link!)
Here it is as an actual link: [[This would be a link]].
If you make a link that "points" at a page that doesn't actually exist, then the link is not ''bold'' on the page. We call that an "empty link" and if you click it, you get the weird experience of opening a page that says //"this page doesn't exist!"// - if you then edit THAT non-existent page, it becomes a real page.
It is as simple as that.
You will want to see [[How to embed pics and videos]] (that's a link that DOES exist!) and to know a tiny bit about...
!Making new text look smart on the page
If you do write in a TiddlyWiki then it is worth knowing some of this stuff. Learning a few of these very simple "conventions" (the programmers call these conventions //"Mark-up"//) means you can turn text in tiddlers into something much easier on the eye and easier to read!
!Formatting
Tiddlers use a very simple "language" (known as the 'syntax'.) This language tells your browser how to display text when the page (or [[Tiddler]]) is switched from its [[Edit]]ing mode (what I describe as "having the bonnet/hood up, so you can see the workings") back to the standard 'viewing' mode.
The ''"syntax"'' is just "what you type in the Content box of a tiddler" that is switched to [[Edit]] mode. The ''"Output"'' is what you see when the tiddler is switched back into the ordinary viewing mode.
!Basic syntax
|!Option|!Syntax|!Output|
|bold font|{{{''bold''}}}|''bold''|
|italic type|{{{//italic//}}}|//italic//|
|underlined text|{{{__underlined__}}}|__underlined__|
|strikethrough text|{{{--strikethrough--}}}|--strikethrough--|
|superscript text|{{{^^super^^script}}}|^^super^^script|
|subscript text|{{{~~sub~~script}}}|~~sub~~script|
|highlighted text|{{{@@highlighted@@}}}|@@highlighted@@|
|preformatted text|<html><code>{{{preformatted}}}</code></html>|{{{preformatted}}}|
!Other stuff
!!@@color(blue):Headings@@
!!!What you type in the edit box...
{{{
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
}}}
!!!...and what you see in the ordinary "viewing mode"...
<<<
!Heading 1
!!Heading 2
!!!Heading 3
!!!!Heading 4
!!!!!Heading 5
<<<
!!@@color(blue):Lists@@
!!!What you type in the edit box...
{{{
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### unordered list, level 3
; definition list, term
: definition list, description
}}}
!!!...and what you see in the ordinary "viewing mode"...
<<<
* unordered list, level 1
** unordered list, level 2
*** unordered list, level 3
# ordered list, level 1
## ordered list, level 2
### unordered list, level 3
; definition list, term
: definition list, description
<<<
!!@@color(blue):Images, Documents, Video clips@@
See [[How to embed pics and videos]]
!!@@color(Blue):Hyperlinks@@
* A WikiWord (with a capital in the middle of it) is automatically transformed into a hyperlink to a tiddler with the same title. We used these quite a lot in the early stages of writing content, but it makes for an odd reading experience (words apparently jammed together) so we are slowly removing them and using ordinary language links...
** this automatic transformation can be //suppressed// by preceding the respective WikiWord with a "tilde" (i.e. one of these: ~ ): so if I type {{{~WikiWord}}} then it WON'T be an automatic link (look: ~WikiWord.)
* [[Pretty Links]] that can include spaces and look "ordianry" are just enclosed in double square brackets and contain the desired tiddler name: {{{[[Pretty Links]]}}}
** Optionally, a custom title or description can be added, separated by a pipe character ({{{|}}}): {{{[[title|target]]}}}<br>'''N.B.:''' In this case, the target can also be any website (i.e. URL) - i.e. you can make an external link to the tiddlymanuals site like [[this|http://www.tiddlymanuals.com]] by using this code: {{{[[this|http://www.tiddlymanuals.com]]}}}.
!!@@color(blue):Blockquotes@@
!!!What you type in the edit box...
{{{
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
<<<
blockquote
<<<
}}}
!!!...and what you see in the ordinary "viewing mode"...
<<<
> blockquote, level 1
>> blockquote, level 2
>>> blockquote, level 3
> blockquote
<<<
!!@@color(blue):Tables@@
This is a bit more complex, and fiddly, but it works!...
!!!What you type in the edit box...
{{{
|CssClass|k
|!heading column 1|!heading column 2|
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
}}}
''Annotation:''
* The {{{>}}} marker creates a "colspan", causing the current cell to merge with the one to the right.
* The {{{~}}} marker creates a "rowspan", causing the current cell to merge with the one above.
!!!...and what you see in the ordinary "viewing mode"...
<<<
|CssClass|k
|!heading column 1|!heading column 2|
|row 1, column 1|row 1, column 2|
|row 2, column 1|row 2, column 2|
|>|COLSPAN|
|ROWSPAN| … |
|~| … |
|CssProperty:value;…| … |
|caption|c
<<<
!@@color(red):Special Markers@@
* {{{<br>}}} forces a manual line break
* {{{----}}} creates a horizontal ruler
* [[HTML entities|http://www.tiddlywiki.com/#HtmlEntities]]
* {{{<<macroName>>}}} calls the respective [[macro|Macros]]
* To hide text within a tiddler so that it is not displayed, it can be wrapped in {{{/%}}} and {{{%/}}}.<br/>This can be a useful trick for hiding drafts or annotating complex markup.
* To prevent the wiki markup syntax from taking effect for a particular section, that section can be enclosed in three double quotes: e.g. {{{"""WikiWord"""}}}.
!@@color(red):Custom Styling@@
* {{{@@CssProperty:value;CssProperty:value;…@@}}}<br>''N.B.:'' CSS color definitions should use lowercase letters to prevent the inadvertent creation of WikiWords.
* <html><code>{{customCssClass{…}}}</code></html>
* raw HTML can be inserted by enclosing the respective code in HTML tags: {{{<html> … </html>}}}
Click to read more <<tag [[Reviews and Quotes]] reviews>>
<<image [[Telegraph1]] width:400 height:500>>
<<image [[Telegraph2]] width:700 height:500>>
!Summer 2014
!!!I Shall Be Released
Our cover of Dylan's great classic "I shall be Released" - a watery version by a bargebound Noah and Jed. Check out our timing with the in the closing of the song. There's a live version [[here|20. Blues and Rock Weekender 06.09.2014]]
<html><object width="853" height="480"><param name="movie" value="//www.youtube.com/v/Woqxec4F_e4?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/Woqxec4F_e4?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="853" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!!!Myriad
The ending chorus of [[Myriad]] - in a tunnel....
<html><object width="853" height="480"><param name="movie" value="//www.youtube.com/v/V_-CCQtrhSc?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/V_-CCQtrhSc?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="853" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!!!No Surprises
Our cover of the beautiful Radiohead song - check out the last 30 seconds or so for the surprise!
<html><object width="853" height="480"><param name="movie" value="//www.youtube.com/v/rCK7RSmtzdc?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/rCK7RSmtzdc?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="853" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
We haven't played this for ages - should we go back to it?
It comes in three parts, two of which we have recorded - the third is yet to come.
* Noah on vocals, guitar and bass
* Jed on Violin and Piano and backing vocals
* George on Drums and backing vocals
* Song by Noah
!Parts 1 and 2 filmed Live at the Elmdon Dial pub
<html><iframe width="640" height="480" src="https://youtube.com/embed/KWVkhTP0fvs?rel=0" frameborder="0" allowfullscreen></iframe></html>
<<slider CanvasLyrics "Canvas - lyrics" "click for lyrics">>
!Canvas - Part 1
Recorded in the Bothy (22nd April 2012) as a rough cut.
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44013959&show_artwork=true"></iframe></html>
!Canvas - Part 2
Recorded in the Bothy (22nd April 2012) as a rough cut.
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F44014652&show_artwork=true"></iframe></html>
!Canvas - Part 3
Still in the oven...
|bgcolor(beige):''__Canvas__''<br><br>''Act I''<br><br>So struck by the chords that ring through this rain<br>Couldn't remember the words you sang<br>Cold vines in the light swept up the dark<br>Memories thick with the dregs of your past<br><br>Torment and all you came through my door<br>Laid your arms upon the floor<br>These walls feel weak this road seems far<br>The end of it all is less than the start<br><br>''Act II''<br><br>A message in the water, waiting for ripples to form<br>Not a breath in the body left to prepare you for this storm<br>Shards of glass in a broken house lead you to the door<br>A perfect form is all you own to hide away your fear<br><br>''//Bridge//''<br><br>''//Chorus://''<br><br>//I see you traveller//<br>//This painted face ain't lost//<br>//A jagged portrait stands//<br>//A canvas across.//<br><br>Your scriptures lost in these kingdoms past as the years turn old and grey<br>So just a Trojan horse in a story book to clear your conscience away<br>And like an artist over this world you paint away<br>And like an artist over this world you paint away<br><br>''//Chorus//''<br><br>''//Bridge://''<br>I feel it in this earth I feel it in this body breaking up<br>The energy of this ain't worth the time anymore<br>And in another field we drew, these lines that hold into<br>Only strangers here and our hands are clear of this mark.<br><br>''//Chorus//''<br><br>© [[Noah Bevington]] |
/***
|Name:|ExtentTagButtonPlugin|
|Description:|Adds a New tiddler button in the tag drop down|
|Version:|3.2 ($Rev: 3861 $)|
|Date:|$Date: 2008-03-08 10:53:09 +1000 (Sat, 08 Mar 2008) $|
|Source:|http://mptw.tiddlyspot.com/#ExtendTagButtonPlugin|
|Author:|Simon Baird <simon.baird@gmail.com>|
|License|http://mptw.tiddlyspot.com/#TheBSDLicense|
@@I have altered the wording in this plugin to make the instruction more self explanatory than it was: 'Create new page as sub topic of this one' - dickon@@
***/
//{{{
window.onClickTag_mptw_orig = window.onClickTag;
window.onClickTag = function(e) {
window.onClickTag_mptw_orig.apply(this,arguments);
var tag = this.getAttribute("tag");
var title = this.getAttribute("tiddler");
// Thanks Saq, you're a genius :)
var popup = Popup.stack[Popup.stack.length-1].popup;
createTiddlyElement(createTiddlyElement(popup,"li",null,"listBreak"),"div");
wikify("<<newTiddler label:'Create new page as sub topic of this one' tag:'"+tag+"'>>",createTiddlyElement(popup,"li"));
return false;
}
//}}}
/*{{{*/
Background: #f8f4dc
Foreground: #221e06
PrimaryPale: #fefdfa
PrimaryLight: #ede7c4
PrimaryMid: #b6a748
PrimaryDark: #000000
SecondaryPale: #fefafd
SecondaryLight: #edc4df
SecondaryMid: #b64891
SecondaryDark: #534a50
TertiaryPale: #fafefc
TertiaryLight: #c4edd4
TertiaryMid: #48b674
TertiaryDark: #4a534e
Error: #f88
ColorPaletteParameters: HSL([52|88], [0.67|0.53|0.43|0.06],[0.31|0.5|0.85|0.99])
/*}}}*/
Doesn't work yet, but it will in the end... if you want to make a comment about any of our songs, you can do that by opening up the song itself and you'll see there is a comments section as part of the [[SoundCloud]] widget that plays each song in its page. You can also "like" the songs there, too.
Consider making a visit to our [[Facebook page|https://www.facebook.com/pages/From-The-Woods/256377514443939?fref=ts]], too, where you can leave comments galore.
''Message us'' via our [[Facebook]] page, or via our [[Twitter]] feed.
''We have an email address:'' mortaltides@gmail.com and are getting better at checking it...
''Label:'' We are now signed to the indie folk label started by legendary member of the british folkocracy, [[Polly Paulusma|http://www.pollypaulusma.com/]] - [[Wild Sound Recordings]]
!Press
There is a PDF press release [[here|Press release]] or:
<<slider PressSlider "Press release" "Click for Press Release">>
<html><iframe width="640" height="360" src="//www.youtube.com/embed/lMyCeFmtUBU" frameborder="0" allowfullscreen></iframe></html>
<<slider CruellestKindLyrics "Cruellest Kind - lyrics" "click for lyrics">>
''LOOK!'' Someone wonderful liked it:
<<image [[DtR_twitter]] width:400 height:350>>
Live at the wonderful [[Troubadour Club|30. The TROUBADOUR CLUB, Earls Court - April 10th 2015]] in April 2015:
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/RcCqreP6W6w?rel=0" frameborder="0" allowfullscreen></iframe></html>
The song was ready just in time for it's first outing at the [[Portland Arms EP release gig|24. Nov 8th MATINEE - EP launch gig Portland Arms!]].
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/fwAmRKahJhQ?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/fwAmRKahJhQ?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
|bgcolor(beige): <br>Not quite finalised yet... <br><br>Noah at work... <br><br>check back later!<br><br> |
[[Welcome to Mortal Tides]]
/***
|''Name''|DelayWikifiedViewTypePlugin|
!Description
This provides the _wikified view type which hooks into TiddlySpace's scrolling mechanism to only wikify content which is in the window focus. This allows one to open all tiddlers by default without fear of browsing crashing.
***/
//{{{
var w = config.macros.view.views.wikified;
config.macros.view.views._wikified = function(value, place, params, wikifier,
paramString, tiddler) {
var that = this;
var args = arguments;
jQuery("<span />").addClass("wikifying").text("rendering...").appendTo(place);
config.extensions.tiddlyspace.scroller.registerIsVisibleEvent(tiddler.title, function() {
jQuery(place).empty();
w.apply(that, args);
});
};
//}}}
<html> <div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'tiddlymanuals'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
</html>
<html><div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'fromthewoodsband'; // required: replace example with your forum shortname
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a></html>
<html><div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'fromthewoods-tiddlyspace'; //
/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a></html>
|bgcolor(lightgrey): <br>. <<image [[Break of Blue EP cover]] width:300 height:300>> .<br><br> |
<html><iframe style="border: 0; width: 400px; height: 274px;" src="http://bandcamp.com/EmbeddedPlayer/album=411556533/size=large/bgcol=ffffff/linkcol=0687f5/artwork=small/transparent=true/" seamless><a href="http://wildsoundrecs.bandcamp.com/album/break-of-blue-ep">Break Of Blue EP by Mortal Tides</a></iframe></html>
At last. Recorded summer 2013 at the wonderful [[Ananda Studios|Recording session - July 13-14 2013]] ... We are not snappy at getting things released! You can download this at:
* ''[[Amazon|http://www.amazon.co.uk/Break-Blue-EP-Mortal-Tides/dp/B00MG4W9P2/ref=sr_1_1?s=dmusic&ie=UTF8&qid=1408209622&sr=1-1&keywords=Mortal+Tides]]''
* ''[[iTunes|https://itunes.apple.com/gb/album/break-of-blue-ep/id906461512]]''
!Review - FOLK RADIO UK
''http://www.folkradio.co.uk/2014/07/introducing-mortal-tides/''
>//"Whatever their age they’re a welcome addition to the small independent label Wild Sound Records founded by singer songwriter Polly Paulusma (recently reviewed here). Alongside the likes of Maz O’Connor (reviewed here), The Pollyanna Band and Stylusboy this is a label worth keeping an eye on. They’ve certainly an eye for spotting talent as these lads have bucket loads of it, one to definitely watch out for!"//
See more [[Reviews and Quotes]]
<<tag [[Early gigs as From the Woods]]>>
<!--{{{-->
<div class='toolbar'
macro='toolbar [[ToolbarCommands::EditToolbar]]'>
</div>
<div class='heading editorHeading'>
<div class='editor title' macro='edit title'></div>
<div class='tagClear'></div>
</div>
<div class='annotationsBox' macro='annotations'>
<div class='editSpaceSiteIcon'
macro='tiddlerOrigin height:16 width:16 label:no interactive:no'>
</div>
<div class="privacyEdit" macro='setPrivacy label:no interactive:no'></div>
<div class='tagClear'></div>
</div>
<div class='editor' macro='edit text'></div>
<div class='editorFooter'>
<div class='tagTitle'>tags</div>
<div class='editor' macro='edit tags'></div>
<div class='tagAnnotation'>
<span macro='message views.editor.tagPrompt'></span>
<span macro='tagChooser excludeLists'></span>
</div>
</div>
<!--}}}-->
!Either:
For a picture use this code:
| {{{[img[PASTE_THE_URL_OF_THE_PICTURE_HERE]]}}} |
Eg:
[img[https://lh3.googleusercontent.com/-xiGiRLVA5YU/T7g1JzyHv4I/AAAAAAAAEho/mQ__qIHMYTc/s720/IMG_0060.JPG]]
Mount the picture in something like Flickr or Picasaweb. To get the right URL, get the picture up in the hosting service, right-click and select "Copy Picture URL" or something like that...
!Or
Use the EMBED code from somewere like Picasaweb or Flickr and then BRACKET this code with:
|{{{<html>}}} in front, and {{{</html>}}} at the end...|
<html><table style="width:auto;"><tr><td><a href="https://picasaweb.google.com/lh/photo/N1seKNoB9Gkw7Uw9p_j0CtMTjNZETYmyPJy0liipFm0?feat=embedwebsite"><img src="https://lh3.googleusercontent.com/-xiGiRLVA5YU/T7g1JzyHv4I/AAAAAAAAEho/mQ__qIHMYTc/s400/IMG_0060.JPG" height="77" width="400" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="https://picasaweb.google.com/100078669570401783806/ScrapbookPhotos?authuser=0&feat=embedwebsite">Scrapbook Photos</a></td></tr></table></html>
!Or
For video:
...Cut and paste the You tube "embed" code straight in, but ''bracket it'' with @@{{{<html>}}}@@ and @@{{{</html>}}}@@ which gives you this:
!!!Dem boys!
<html><object width="425" height="344"><param name="movie" value="https://youtube.com/v/tW5f4z6qXik&hl=en_GB&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://youtube.com/v/tW5f4z6qXik&hl=en_GB&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></html>
!Or...
Use an Iframe which creates a larger window on the web:
{{{
<html><div align="center"><iframe src="WEBPAGEURLHERE" frameborder="0" width="100%" height="600"></iframe></div></html>
}}}
From a recent BBC Introducing Session with the great Tom Simkin:
<html><iframe width="640" height="360" src="//www.youtube.com/embed/ehSZjPNPnc8?rel=0" frameborder="0" allowfullscreen></iframe></html>
First showcase for this song was at the Cambridge Junction in a lovely intimate gig at the J3 stage - all blackout cloth, candlelit tables, and hush. Some great acts before us, and we rounded the evening off. This is the first time we'd performed Empty Hearse outside our practice space. The evening ended with [[Cruellest Kind]] which worked well as a final send off. Thanks to all who came.
<html><iframe width="480" height="360" src="//www.youtube.com/embed/hHbRRPsKB9A?rel=0" frameborder="0" allowfullscreen></iframe></html>
/*!**
|''Name''|ExtraFilters|
|''Author''|Jon Robson|
|''Version''|0.6.8|
|''Status''|@@experimental@@|
|''Requires''|TiddlySpaceFilters ImageMacroPlugin|
|''CodeRepository''|<...>|
|''License''|[[BSD|http://www.opensource.org/licenses/bsd-license.php]]|
!Notes
* Updates shadow tiddlers to known TiddlySpace shadow tiddlers
* adds the following filters
{{{
[is[tiddler]] - allows you to match all tiddlers - useful for applying the isnot filter (see later)
[is[image]] - returns only image tiddlers (e.g. png, jpeg, gif etc..)
[is[shadow]] - returns if the tiddler is a known shadow tiddler
[is[svg]] - returns only svg tiddlers
[is[tagged]] - returns tiddlers with tags
[isnot[image]] - filters result of previous filters for ones that are not images
[notag[<tag>]] - filters result of previous filters for ones without a tag
[nofield[<field>]] - check for absence of field or field value in previous filters
[has[<field or attribute>]] - match tiddlers which have a field or attribute set.
[and[<filter expression>]] - e.g.[and[tag:foo]] checks all tiddlers from previous filters for a tag foo.
[nobag[foo]] - removes any tiddlers previously returned by a previous filter that belong to the given bag
[is[open]]
[startsWith[title,Foo]] returns all tiddlers who's titles start with Foo.
}}}
***/
//{{{
(function($) {
var _display = Story.prototype.displayTiddler;
Story.prototype.displayTiddler = function() {
var res = _display.apply(this, arguments);
$("[macroName=list]").each(function(i, el) {
config.macros.list.refresh(el);
});
return res;
};
var _close = Story.prototype.closeTiddler;
Story.prototype.closeTiddler = function() {
var res = _close.apply(this, arguments);
$("[macroName=list]").each(function(i, el) {
config.macros.list.refresh(el);
});
return res;
};
config.shadowTiddlers.SiteIcon = "";
config.shadowTiddlers.SiteInfo = "";
config.shadowTiddlers.SystemSettings = "";
config.shadowTiddlers[config.extensions.tiddlyspace.currentSpace.name + "SetupFlag"] = "";
config.filterHelpers["is"].image = config.macros.image.isImageTiddler;
config.filterHelpers["is"].svg = config.macros.image.isSVGTiddler;
config.filterHelpers["is"].tiddler = function(tiddler) {
return tiddler ? true : false;
}
config.filterHelpers["is"].open = function(tiddler) {
return story.getTiddler(tiddler.title) ? true : false;
}
config.filterHelpers["is"].shadow = function(tiddler) {
return tiddler && tiddler.title && tiddler.title in config.shadowTiddlers ? true : false;
}
config.filterHelpers["is"].tagged = function(tiddler) {
return tiddler && tiddler.tags.length > 0 ? true : false;
};
config.filterHelpers["is"].external = function(tiddler) {
var endsWith = config.extensions.BinaryTiddlersPlugin.endsWith;
var fields = tiddler.fields;
var bag = fields["server.bag"] || "";
var local = config.filterHelpers["is"].local(tiddler);
if(!local && endsWith(bag, "_public") || bag.indexOf("_") === -1) {
return true;
} else {
return false;
}
};
config.filterHelpers["is"].privateAndExternal = function(tiddler) {
var endsWith = config.extensions.BinaryTiddlersPlugin.endsWith;
var fields = tiddler.fields;
var bag = fields["server.bag"] || "";
return !config.filterHelpers["is"].local(tiddler) && endsWith(bag, "_private");
};
config.filters.isnot = function(candidates, match) {
var type = match[3];
var results = [];
for (var i = 0; i < candidates.length; i++) {
var tiddler = candidates[i];
var helper = config.filterHelpers.is[type];
if(helper && !helper(tiddler)) {
results.pushUnique(tiddler);
}
}
return results;
};
config.filters.nobag = function(results, match) {
var bag = match[3];
var newResults = [];
for(var i = 0; i < results.length; i++) {
var tiddler = results[i];
if(tiddler.fields["server.bag"] !== bag) {
newResults.push(tiddler);
}
}
return newResults;
};
config.filters.linksTo = function(results, match) {
var name = match[3];
results = this.getTiddlers();
var newResults = [];
for(var i = 0; i < results.length; i++) {
var tiddler = results[i];
var links = tiddler.getLinks("title", "excludeLists");
if(links.contains(name)) {
newResults.push(tiddler);
}
}
return newResults;
};
config.filters.notag = function(results, match) {
var tag = match[3];
var newResults = [];
for(var i = 0; i < results.length; i++) {
var tiddler = results[i];
if(!tiddler.tags.contains(tag)) {
newResults.push(tiddler);
}
}
return newResults;
};
config.filters.nofield = function(results, match) {
var fieldname = match[3];
var newResults = [];
for(var i = 0; i < results.length; i++) {
var tiddler = results[i];
if(!tiddler.fields[fieldname]) {
newResults.push(tiddler);
}
}
return newResults;
};
config.filters.and = function(results, match) {
var args = match[3].split(":");
var negationMode = false;
var handler = args[0];
if(handler.indexOf("!") === 0) {
handler = handler.substr(1);
negationMode = true;
}
var value = args[1];
if(config.filters[handler]) {
var titles = [];
var matches = config.filters[handler].call(this, [], [null, null, handler, value]); // note some filters require second argument :(
for(var i = 0; i < matches.length; i++) {
titles.push(matches[i].title);
}
var newResults = [];
for(var i = 0; i < results.length; i++) {
var tid = results[i];
if(!negationMode && titles.contains(tid.title)) {
newResults.push(tid);
} else if(negationMode && !titles.contains(tid.title)) {
newResults.push(tid);
}
}
return newResults;
} else {
return results;
}
};
config.filters.has = function(results, match) {
var field = match[3];
var results = [];
this.forEachTiddler(function(title, tid) {
if(tid[field] || tid.fields[field]) {
results.push(tid);
}
});
return results;
};
config.filters.startsWith = function(results, match) {
var args = match[3].split(",");
var field, str;
if(args.length === 1) {
field = "title";
str = args[0]
} else {
field = args[0];
str = args[1];
}
var newResults = [];
// use this to keep the current store context
this.forEachTiddler(function(i, tid) {
var val = this.getValue(tid, field);
if(val && val.indexOf(str) === 0) {
newResults.push(tid);
}
})
return newResults;
}
var scanMacro = config.macros.tsScan;
config.filterHelpers.loadingTiddler = new Tiddler("Loading...");
config.filterHelpers.loadingTiddler.text = "loading...";
config.filterHelpers.loadingTiddler.fields["msg.loading"] = "loading...";
config.filterHelpers.url = {};
config.filters.url = function(results, match) {
var url = match[3];
var tiddlers = config.filterHelpers.url[url];
if(tiddlers) {
return tiddlers;
} else if(!status) {
config.filterHelpers.url[url] = [ config.filterHelpers.loadingTiddler ];
$.ajax({type:"get", url: url, dataType: "json", success: function(jstiddlers) {
var tiddlers = scanMacro._tiddlerfy(jstiddlers, {});
config.filterHelpers.url[url] = tiddlers;
refreshDisplay();
}, error: function() {
displayMessage("unable to connect to %0".format(url));
}
});
}
return config.filterHelpers.url[url];
};
}(jQuery));
//}}}
|bgcolor(lightblue): <br> Come and Like our<br> ''[[Facebook|https://www.facebook.com/mortaltides]]'' page<br>which is<br> ''facebook.com/mortaltides''<br><br> |
https://www.facebook.com/mortaltides
.
A studio version of this appears on our [[EP - Break of Blue]]
There's videos of performances at Elmdon Dial, Chrishall and "Earlier With" underneath the soundcloud of an early draft here...
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F34823128&show_artwork=true"></iframe></html>
<<slider FeelForYourselfLyrics "Feel for Yourself - lyrics" "click to reveal lyrics">>
!Earlier With - SWCHS 6th form
<html><iframe width="640" height="480" src="https://youtube.com/embed/iKENtySpMXE?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Elmdon Dial Pub - August 16 2012
<html><iframe width="640" height="480" src="https://youtube.com/embed/crL6YcEWjeQ?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Chrishall Jubilee
<html><iframe width="640" height="360" src="https://youtube.com/embed/sDDwkZQMtIw?rel=0" frameborder="0" allowfullscreen></iframe></html>
Noah - Guitar and lead vocals
George - Percussion and backing vocals
Jed - Fiddle and backing vocals
Song by Noah
|bgcolor(beige):''__Feel for Yourself__''<br><br>Don't speak too late; these words might be your last.<br>For your 'plane is falling, don't want to see it crash.<br>Your world is burning! Your cliffs crumble to the sea<br>You look to the sky, but it won't set you free.<br><br>//Higher dreams, higher thoughts than you ever knew//<br>//Don't stray from your path, you may still find truth//<br>//Oh darkness finds no home, when you//<br>//Feel for yourself, man, listen to your own.//<br><br>Raise your arms, hold your wreath up high!<br>Don't sing to the stars, for you will find no joy!<br>Find your beats, keep your rhythms pure<br>Garnish your soul with speech strong and sure<br><br>//Higher dreams, higher thoughts than you ever knew//<br>//Don't stray from your path, you may still find truth//<br>//Oh darkness finds no home, when you//<br>//Feel for yourself, man, listen to your own.//<br><br>Tune and lyrics © [[Noah Bevington]] |
<<image [[Fergus_byTimCrapnell]] width:400 height:600>> Photo by Tim Crapnell
[img[https://lh4.googleusercontent.com/-5lFIJWMK2hE/UeMDRq4fYLI/AAAAAAAAI6k/2jZ-4c1Dui0/w795-h593-no/IMG_0077.JPG]]
<<image [[Fergus Warm up]] width:400 height:600>>
[img[https://lh6.googleusercontent.com/-4JwaeUYCu_Q/UeMDhPSnMUI/AAAAAAAAI20/AdbVjmUE-nY/w414-h593-no/IMG_0085.JPG]]
[img[https://scontent-a-lhr.xx.fbcdn.net/hphotos-prn1/553137_598860350157663_2088000971_n.jpg]]
Some loops composed and recorded by Jed on 5th November 2012.
<html><iframe width="640" height="480" src="https://youtube.com/embed/o_pDjYrbIWQ?rel=0" frameborder="0" allowfullscreen></iframe></html>
[[TooCoolKid|https://soundcloud.com/too-cool-kid]]
[[Elliot Hingston Photography|http://www.elliot-hingston-photography.co.uk/]]
<<image [[George_byTimCrapnell]] width:600 height:400>> Photo by Tim Crapnell
<<image [[George_byTimCrapnell2.jpg]] width:400 height:600>> Photo by Tim Crapnell
<<image [[George at the altar]] width:600 height:400>>
<<image [[George setting up]] width:400 height:600>>
/%
Hello,
If you choose to change this GettingStarted tiddler, you may wish to add the following to your new content if you expect you space to be included:
<<<
----
Hello,
''This ~GettingStarted tiddler has been customized.''
If you want to see the original system tiddler just click the following link: GettingStarted@system-info at system-info.
<<<
%/
Welcome to your brand new [[TiddlySpace|http://docs.tiddlyspace.com/TiddlySpace]].
You're almost ready to go, there are just a couple of things left to do.
!Customise your space
Go to [[SpaceSettings]] to finish customising your space. When you're done, come back here (just scroll up). Don't worry though, this will still be open when you've finished.
!Further Customisation
For advanced options, the [[ServerSettings]] tiddler is used to enable the following features:
#index: The value is the name of a tiddler that will be presented when loading the space. For example, when set to {{{Hello}}} for the space hello.tiddlyspace.com, navigating to that URL will present the Hello tiddler. If there is no {{{Hello}}} you will get an error.
#editor: The name of an [[editor application|http://docs.tiddlyspace.com/Example%20Tiddler%20Editors]] to edit tiddlers with. Applications come from [[included spaces|http://docs.tiddlyspace.com/How%20do%20I%20include%2Fexclude%20spaces%3F]]
//If you do not need or understand these features there is no need to create a ServerSettings tiddler.//
To edit these options:
* click [[here|ServerSettings]] to open the [[ServerSettings]] tiddler
* click on the edit button (the pencil icon)
* add the options you wish to set
* click on the save button (the tick icon).
An example [[ServerSettings]] tiddler:
{{{
index: HelloThere
editor: /edit#{tiddler}
}}}
The additional text after /edit allows a tiddler to be opened in edit mode e.g:
{{{http://hello.tiddlyspace.com/edit#MyTiddler}}}
!!See Also
* [[ServerSettings shadow tiddler|http://docs.tiddlyspace.com/ServerSettings%20shadow%20tiddler]]
* [[Choosing a non-TiddlyWiki Default Application for your Space|http://docs.tiddlyspace.com/Choosing%20a%20non-TiddlyWiki%20Default%20Application%20for%20your%20Space]]
!Finished customising?
You can [[Start writing]] some [[tiddlers|http://docs.tiddlyspace.com/Tiddler]].
If you're not done tweaking yet though, you can always [[Customise this space|SpaceSettings]] a bit more.
You can also [[access and read other tiddlers in various ways|http://docs.tiddlyspace.com/Viewing%20Tiddlers]].
!Administration
If you'd like to change your password or create another space, visit "Your Account" from the [[Universal Backstage|http://docs.tiddlyspace.com/UniversalBackstage]] (the blue dot in the upper right of the page). If you'd like to add a member or [[include a space|http://docs.tiddlyspace.com/How%20do%20I%20include%2Fexclude%20spaces%3F]] visit "This Space" from the [[Universal Backstage|http://docs.tiddlyspace.com/UniversalBackstage]].
You can have as many spaces as you like and each space can have as many members as you or your group need.
!Stuck?
If you're stuck, and would like some help, please visit the [[help|http://help.tiddlyspace.com]] space, which can point you in the right direction.
<<image [[GigList_6.4.15]] width:800 height 300>>
Gigs we have played and are due to play are listed here - you can click on
||<<tag Gigs>>||
to get a drop down pick-list to choose from.
Go to [[google.com/+FromthewoodsInfofolkband|http://google.com/+FromthewoodsInfofolkband]] for this.
There is another FTW Google+ page with a couple of nice vids on it [[here|https://plus.google.com/u/0/b/114379446288362861236/114379446288362861236/about]], too.
<<tiddler SiteInfo>>
To try it there are two steps, the first required, the second and third optional:
* Include the edit space in your space.
* Add the following lines to or create a tiddler called 'HtmlJavascript' (If jquery is already in there, there's no need to have it twice.)
{{{
/bags/edit_public/tiddlers/editedit.js
}}}
* If you want to to use edit as the default editor for missing tiddlers, edit the ServerSettings tiddler and add:
{{{
editor: /edit#{tiddler}
}}}
Then when you visit {{{/edit}}} in your own space, you'll find an editor.
* You can select a tiddler to edit from the sidebar by clicking on the pen icon.
* Clicking a tiddler title will take you to view that tiddler.
* Clicking on a tag in the lower left will add that tag to the tiddler. Click again to remove the tag.
* In the upper right you save, revert or delete.
* Below that are options for choosing the type of the tiddler. You can create other things besides tiddlywiki text: Markdown and raw HTML, CSS or ~JavaScript.
* Edit supports client-side [[extraclusion]].
You can start edit from a link and by providing some information in the hash of the URI you can tell it about the new tiddler you want to create:
{{{
/edit#<title>/<tags>/<type>
}}}
* tags are formatted as they are in TiddlyWiki (double square brackets around tags containing spaces)
* type is a content-type, such as {{{text/x-markdown}}}
A studio version of Houses and Drums appears on the [[EP - Break of Blue]] - hear it here, and there are live performances on video below this:
<<slider HousesLyrics "Houses and Drums - Lyrics" "click to reveal lyrics">>
<html><iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/133157099&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
!Live at Cambridge Junction "Fiver Fest" - 15.11.14
Where we won the audience vote - thanks all who came... Check Jay Plent on guitar - the fifth man...
<html><object width="480" height="360"><param name="movie" value="//www.youtube.com/v/yX99MdsKFZQ?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/yX99MdsKFZQ?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="480" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!Live Radio performance
<<slider Cambridge105live "19. Cambridge 105 Radio - live session 27.08.14" "Click for live radio performance">>
Live in a garden (listen out for grumpy neighbour...)
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/w-PZz0pphAI?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/w-PZz0pphAI?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!Earlier versions
Recorded in one take, and rather roughly at that, in the Bothy on Hallowe'en 2012.
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F65559063&show_artwork=true"></iframe></html>
Noah - guitar and vocals
Jed - Cajon, Fiddle and vocals (more parts to come)
George - Drums
the early version had Ian Rossuck on Cello
<<slider HousesLyrics "Houses and Drums - Lyrics" "click to reveal lyrics">>
!Live at "Earlier With" - SWCHS 21.11.12
<html><iframe width="640" height="480" src="https://youtube.com/embed/09vfDNj3K8Y?rel=0" frameborder="0" allowfullscreen></iframe></html>
|bgcolor(beige):''__Houses and Drums__''<br><br>We spoke to ancient houses<br>This candle wanes before my eyes<br>These streams tumble and torment<br>These tides go trailing by<br><br>We watched the hours burn<br>The holy call of the early train<br>These roots buried deeply softly<br>Speak to me...<br><br>These ancient houses feel the drums<br><br>© [[Noah Bevington]] |
@import url(http://straightwsgi.tiddlyspace.com/bags/straightwsgi_public/tiddlers/HtmlCss);
/bags/edit_public/tiddlers/editedit.js
/status.js
<html><div align="center"><iframe src="https://wildsoundrecs.bandcamp.com/album/light-in-light-out" frameborder="0" width="100%" height="600"></iframe></div></html>
Our cover of Dylan's great classic - a watery version by a bargebound Noah and Jed. Check out our video filmset timing in the closing of the song. There's a live version [[here|20. Blues and Rock Weekender 06.09.2014]]
<html><object width="853" height="480"><param name="movie" value="//www.youtube.com/v/Woqxec4F_e4?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/Woqxec4F_e4?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="853" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
New track after the album... new directions to explore.
THANK YOU TO CAMBRIDGE TV.
'' PLAY FROM 18m:25s''
<html><iframe src="https://player.vimeo.com/video/187666871" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></html>
<<tabs
txtMainTab
"Timeline" "Recently edited pages in a timeline" TabTimeline
"All" "All pages" TabAll
"Tags" "All tags" TabTags
>>
<<image [[Jed_byTimCrapnell]] width:600 height:400>> Photo by Tim Crapnell
<<image [[Jed Fiddle spot]] width:600 height:400>>
<<image [[Jed fiddle and keys]] width:400 height:600>>
[img[https://lh5.googleusercontent.com/-WpyEpWlZg1o/T5R09AVg8BI/AAAAAAAAEaU/lvyxIwYjncY/s640/JedAtPiano.jpg]]
<<image [[Jed and Noah on Stage.jpg]] width:600 height:400>>
[img[https://fbcdn-sphotos-b-a.akamaihd.net/hphotos-ak-ash4/295090_344468958922940_584687540_n.jpg]]
Here are all the links we like...
We mainly put these up here so you can learn them, and help Noah out when he forgets them onstage...
<<tag Lyrics>>
''@@color(brown):| [[Welcome|Welcome to Mortal Tides]] | <<tag [[About]]>> | <<tag [[Songs]]>> | <<tag Lyrics>> | <<tag [[Gigs]]>> | <<tag [[Blog]]>> | <<tag [[Photos]]>> | <<tag [[Videos]]>> | <<tag [[Shop]]>> | <<tag [[Links]]>> | [[Index]] |@@''
<!--{{{-->
<link href="/bags/mortaltides_public/tiddlers.atom" rel="alternate"
type="application/atom+xml" title="mortaltides's public feed" />
<link rel="canonical" href="http://mortaltides.tiddlyspace.com/" />
<!--}}}-->
<!--{{{-->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<!--}}}-->
The video below was shot at our [[Portland Arms EP release gig|24. Nov 8th MATINEE - EP launch gig Portland Arms!]] on Nov 8th 2014, but we need to do a proper recording of this song:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/5iRfC_NyVoo?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/5iRfC_NyVoo?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<slider "MyriadSlider" "Myriad - lyrics" "Click to see Myriad lyrics">>
And the ending chorus - in a very big tunnel....
<html><object width="853" height="480"><param name="movie" value="//www.youtube.com/v/V_-CCQtrhSc?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/V_-CCQtrhSc?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="853" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
|bgcolor(beige):''__Myriad__''<br><br>In many places I want more<br>And so we pull our ships to shore, and watch them burn<br>And through this fading glass I see<br>Before these oceans rise on me, I'll stay a while<br>And we live on with emerald hearts<br>Showing only purest quartz, yet is it so?<br><br>You sail on and I'll give thanks<br>To white shores and myriads of open seas<br>To rip this canvas from my eyes<br>Clear the ashes from the sky, till heaven yearns<br>This lowly tomb we call our home<br>And we will shatter all our bones to watch them cry.<br><br>Hold on... We hold on...<br><br>Tune and Lyrics © [[Noah Bevington]] |
!Part 1
The afternoon it was written...
<html><object width="640" height="480"><param name="movie" value="//www.youtube.com/v/M1DZXFTiXU8?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/M1DZXFTiXU8?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<slider NaiadLyrics "Naiad - lyrics" "click for lyrics">>
!Live Radio performance
<<slider Cambridge105live "19. Cambridge 105 Radio - live session 27.08.14" "Click for live radio performance">>
!Pts 1 and 2 - Live at Folk East August 2014
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/h5X1SYjpssc?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/h5X1SYjpssc?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
Home-recorded version with pics of our [[29. Fiverfest Grand FINAL - Cambridge Junction]] gig:
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/BBqYAf4nIK4?rel=0" frameborder="0" allowfullscreen></iframe></html>
..
|bgcolor(beige):''__Naiad__''<br><br>''Part I''<br><br>Blind at the altar we roam<br>The song of the ashes calls my name<br>Oh the rider has led me down unto water<br><br>//She spoke words like a God might//<br>//God might own//<br><br>Light in light out<br>She's taking it all for herself<br>She's taking it all for herself<br>Oh the rider has led me down unto water<br><br>//She spoke words like a God might//<br>//God might own//<br><br>© [[Noah Bevington]] and [[Jed Bevington]]|
Our most recent outing was to Cambridge's [[STAR RADIO (FM 107.9/1)|12. Live session on Cambs local Star radio]] where we did an acoustic set for Tim Willett on his show (catch the podcast [[here|http://www.star107.co.uk/star-talent.php]]) - here we are doing No Midas:
<html><object width="640" height="480"><param name="movie" value="//www.youtube.com/v/bg9OgJ_1jsQ?version=3&hl=en_GB"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/bg9OgJ_1jsQ?version=3&hl=en_GB" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<slider "MidasSlider" "No Midas - lyrics" "Click for LYRICS to No Midas">><html><iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/159954605&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
Here is some early rehearsal film of No Midas. Filmed on a mobile for that extra "ventriloquism" touch. The song got its first airing at the [[Cambridge Junction|11. Cambridge Junction Fiver - 20th December]] just before Christmas.
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/cWGNnLKxdIs?hl=en_GB&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/cWGNnLKxdIs?hl=en_GB&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
|bgcolor(beige):''__No Midas__''<br><br>In sun... I'll seek a different kind of light<br>And hope... as men do before their time<br>And if heaven wakes in me<br>I'll only strive for ecstasy<br>A passing game<br><br>With time... We bite away the bitter years<br>And search... for any path that brings us here<br>Golden apples fall to floor,<br>From my liar's overture<br>No Midas touch<br><br>//''Bridge - Chorus''//<br><br>And wound... every fragile inch of skin<br>Like wolves... we'll chase the darknes from our kin<br>Ask the fruitful souls to sing<br>As the nobles watch the wing<br>The Jester's smile<br><br>Like Gods... they cast a flame into our minds<br>And pray... they deliver us a sign<br>And in apathy we'll burn<br>Yet open water's pensive words<br>Will heal us all<br><br>We tear the world up... No Midas touch<br><br><br>Tune and Lyrics © [[Noah Bevington]] |
Our cover of the beautiful Radiohead song.
<html><object width="853" height="480"><param name="movie" value="//www.youtube.com/v/rCK7RSmtzdc?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/rCK7RSmtzdc?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="853" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<image [[Noah by Elliot]] width:400 height:600>> portrait by [[Elliot Hingston Photography|http://www.elliot-hingston-photography.co.uk/]]
<<image [[Noah_byTimCrapnell]] width:400 height:600>> Photo by Tim Crapnell
<<image [[Noah crouching tiger]] width:400 height:600>>
<<image [[Noah pensive]] width:600 height:400>>
<<image [[Noah sings, Fergus basses]] width:600 height:400>>
[img[https://lh6.googleusercontent.com/-0PomuSawGe0/TvmsZc7DLyI/AAAAAAAAD7k/Do-eT9gLQNY/s400/IMG_0022.JPG]]
[img[https://lh5.googleusercontent.com/-UpB3qqlGll4/UNbtMid0tEI/AAAAAAAAGGs/llipdXp2VxI/s720/NoahJedSinging.JPG]]
[img[https://lh4.googleusercontent.com/-0IftbbMJbDs/UKALL_5sgAI/AAAAAAAAFqA/bJjCcVP3K78/s1024/IMG_0029.JPG]]
//{{{
config.filters.numbersort = function(results,match) {
var field = match[3];
results = results.sort(function(a, b) {
var val1 = a[field] || a.fields[field];
var val2 = b[field] || b.fields[field];
return parseFloat(val1, 10) < parseFloat(val2, 10) ? -1 : 1;
});
return results;
};
//}}}
<!--{{{-->
<div class='searchbar' macro='search'></div>
<div class='header'>
<h1 class='siteTitle tiddlerEditable' refresh='content' tiddler='SiteTitle'></h1>
<h2 class='siteSubTitle tiddlerEditable' refresh='content' tiddler='SiteSubtitle'></h2>
<h2 div id='navBar' refresh='content' tiddler='MainMenu'></h2></div>
</div>
<div class='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
<div class='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<!--}}}-->
!Long time past...
<html><object width="425" height="344"><param name="movie" value="https://youtube.com/v/tW5f4z6qXik&hl=en_GB&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="https://youtube.com/v/tW5f4z6qXik&hl=en_GB&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></html>
!End of the Road 2009
<<image [[EoR2009]] width:810 height:480>>
<<image [[EoR2009_2]] width:810 height:480>>
!Stop press
Winners of the [[NMG award - Best band under 19yrs|22. Oct 17th - Portland Arms - NMG AWARDS NIGHT]]!
!Download a copy
* ''[[Open in a separate window or download here|https://drive.google.com/file/d/0B5h_CVBdhJPYa2M2QlQ0d1NHaVU/view?usp=sharing]]''
<html><iframe src="https://drive.google.com/file/d/0B5h_CVBdhJPYa2M2QlQ0d1NHaVU/preview" width="640" height="480"></iframe></html>
/***
|Name|RecentChangesPlugin|
|Source|http://www.TiddlyTools.com/#RecentChangesPlugin|
|Version|2.1.0|
|Author|Eric Shulman - ELS Design Studios|
|License|http://www.TiddlyTools.com/#LegalStatements <br>and [[Creative Commons Attribution-ShareAlike 2.5 License|http://creativecommons.org/licenses/by-sa/2.5/]]|
|~CoreVersion|2.1|
|Type|plugin|
|Requires||
|Overrides||
|Description|display droplist of recently changed tiddlers with goto, edit, and preview buttons|
!!!!!Usage
<<<
The {{{<<recentChanges>>}}} macro displays a droplist of all tiddlers that have been changed within the last N days (default=10 days).
<<<
!!!!!Examples
<<<
{{smallform{
{{{<<recentChanges>>}}}
><<recentChanges>>
or
{{{<<recentChanges #ofdays summary>>}}}
>where:
>* #ofdays specifies the time limit for list changed tiddlers. Use 0 (zero) to list all tiddlers in the document
>* "summary" is a keyword that outputs only the summary text (without the droplist or buttons)
>{{{<<recentChanges 14 summary>>}}}
><<recentChanges 14 summary>>
or
{{{<<recentChanges #ofdays previewheight previewclass>>}}}
>where:
>* #ofdays specifies the time limit for list changed tiddlers. Use 0 (zero) to list all tiddlers in the document
>* previewheight is a CSS height measurement and sets the FIXED height of the tiddler preview area (default is 15em)
>* previewclass is any CSS classname, and can be used to apply custom styles to the preview area (default is to use the standard 'viewer' class)
>{{{<<recentChanges 14 10em groupbox>>}}}
><<recentChanges 14 10em groupbox>>
}}}
<<<
!!!!!Revisions
<<<
2008.07.01 [2.1.0] added optional "summary" keyword for simply text output
2008.05.01 [2.0.1] fixup for titles with double-quotes
2007.07.26 [2.0.0] re-written as plugin
2006.10.02 [1.0.0] initial release (as inline script ShowRecentChanges)
<<<
!!!!!Code
***/
//{{{
version.extensions.RecentChangesPlugin= {major: 2, minor: 1, revision: 0, date: new Date(2008,7,1)};
config.shadowTiddlers.RecentChanges="<<recentChanges>>";
config.macros.recentChanges = {
layout: '<form><!--\
--><select size=1 name="list" style="width:69.5%" \
onchange=" \
this.form.goto.disabled=this.form.edit.disabled=this.form.preview.disabled=!this.value.length; \
var target=this.parentNode.parentNode.nextSibling; removeChildren(target); \
if (!this.value.length) \
{ target.style.display=\'none\'; this.form.preview.value=\'preview\'; } \
else if (target.style.display==\'block\') { \
wikify(\'<\'+\'<tiddler [[\'+this.value+\']]>\'+\'>\',target); \
target.style.display=\'block\'; \
this.form.preview.value=\'done\'; \
} \
"><!--\
-->%options%<!--\
--></select><!--\
--><input type="button" name="goto" value="goto" disabled title="view selected tiddler" style="width:10%" \
onclick="var target=this.parentNode.parentNode.nextSibling; removeChildren(target); \
target.style.display=\'none\'; this.form.preview.value=\'preview\'; \
story.displayTiddler(story.findContainingTiddler(this),this.form.list.value); \
"><!--\
--><input type="button" name="edit" value="edit" disabled title="edit selected tiddler" style="width:10%" \
onclick="var target=this.parentNode.parentNode.nextSibling; removeChildren(target); \
target.style.display=\'none\'; this.form.preview.value=\'preview\'; \
story.displayTiddler(story.findContainingTiddler(this),this.form.list.value,DEFAULT_EDIT_TEMPLATE); \
"><!--\
--><input type="button" name="preview" value="preview" disabled title="show/hide tiddler preview" style="width:10%" \
onclick="var target=this.parentNode.parentNode.nextSibling; \
if (this.value==\'preview\') { \
removeChildren(target); \
wikify(\'<\'+\'<tiddler [[\'+this.form.list.value+\']]>\'+\'>\',target); \
target.style.display=this.form.list.value.length?\'block\':\'none\'; this.value=\'done\'; \
} else { \
removeChildren(target); \
target.style.display=\'none\'; this.value=\'preview\'; \
} \
"><!--\
--></form>',
handler: function(place,macroName,params,wikifier,paramString,tiddler) {
var days=10; if (!isNaN(params[0])) days=parseInt(params[0]); // time limit in days (use 0 for all tiddlers)
var summary=params[1]&¶ms[1].toLowerCase()=="summary"; if (summary) params.shift();
var height='15em'; if (params[1]) height=params[1]; // preview area fixed height
var previewclass='viewer'; if (params[2]) previewclass=params[2]; // preview area CSS class
var tiddlers=store.getTiddlers('modified','excludeLists').reverse();
var count=tiddlers.length;
if (days) {
var timelimit=(new Date()).getTime()-86400000*days;
for (var count=0; count<tiddlers.length && tiddlers[count].modified>timelimit; count++);
}
var s=count+' pages have changed since ';
s+=new Date(timelimit).formatString("DDD, MMM DDth YYYY 0hh:0mm");
s+=' ('+days+' days ago)';
if (summary)
{ wikify(s,place); return; }
var opts='<option value="">'+s+'</option>';
for (var i=0; i<count; i++) { var t=tiddlers[i];
opts+='<option value="'+t.title.replace(/"/g,""")+'">';
opts+=t.modified.formatString('YYYY.0MM.0DD 0hh:0mm')+' - '+t.title;
opts+='</option>';
}
createTiddlyElement(place,"div").innerHTML=this.layout.replace(/%options%/,opts);
var preview=createTiddlyElement(place,"div",null,previewclass);
preview.style.display='none';
preview.style.whiteSpace='normal';
preview.style.overflow='auto';
preview.style.height=height;
}
}
//}}}
Seems like an old one now - we don't play it much - should we play it more?
Noah Bevington - Guitar and lead vocals
George Brignal - Percussion
Jed Bevington - Piano
Song by noah
!Live at Elmdon Dial
<html><iframe width="853" height="480" src="https://youtube.com/embed/q3k3bsVUTro?rel=0" frameborder="0" allowfullscreen></iframe></html>
!First scratch recording
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F38496803&show_artwork=true"></iframe></html>
Neil Cowlan - awesome...
[img[https://lh3.googleusercontent.com/-Am2swCGOmAs/UeMDEPjEA_I/AAAAAAAAI54/5IAw0xRH9MY/w890-h593-no/IMG_0067.JPG]]
[img[https://lh6.googleusercontent.com/-_Y7G4r17m8c/UeMDXnHDYbI/AAAAAAAAI2c/jLrF5lsJxRM/w800-h534-no/IMG_0079.JPG]]
[img[https://lh3.googleusercontent.com/-UgKJpGkDz-c/UeMD1sY9fjI/AAAAAAAAI30/lapWpFlKU4U/w800-h540-no/IMG_0097.JPG]]
[img[https://lh6.googleusercontent.com/-X_FExwFfTII/UeMDonyDQaI/AAAAAAAAI3M/L02gH6ujdaU/w800-h534-no/IMG_0089.JPG]]
[img[https://lh6.googleusercontent.com/-W5rZmFgnCzk/UeMDMDUj5fI/AAAAAAAAI6U/o6Ijre32NJc/w890-h593-no/IMG_0070.JPG]]
[img[https://lh4.googleusercontent.com/-5lFIJWMK2hE/UeMDRq4fYLI/AAAAAAAAI6k/2jZ-4c1Dui0/w795-h593-no/IMG_0077.JPG]]
[img[https://lh4.googleusercontent.com/-fcI-vh96Zxg/UeMDUnjNCMI/AAAAAAAAI2U/gXyfkc4TOls/w797-h593-no/IMG_0078.JPG]]
[img[https://lh6.googleusercontent.com/-oyXjqAZD4Uk/UeMDutErYvI/AAAAAAAAI3c/Z31jpL8b8Z8/w800-h534-no/IMG_0093.JPG]]
[img[https://lh6.googleusercontent.com/-4JwaeUYCu_Q/UeMDhPSnMUI/AAAAAAAAI20/AdbVjmUE-nY/w414-h593-no/IMG_0085.JPG]]
[img[https://lh4.googleusercontent.com/-bzBKBstsBDM/UeMEJgH7qdI/AAAAAAAAI40/DH0-84medXY/w800-h521-no/IMG_0118.JPG]]
[img[https://lh6.googleusercontent.com/-W_Usw6e6kiI/UeMEL8UfmsI/AAAAAAAAI48/Iv3O8CHuRKE/w800-h577-no/IMG_0122.JPG]]
[img[https://lh5.googleusercontent.com/-HaVtyD9uR0s/UeMEE4gZc7I/AAAAAAAAI4k/ii_U0oBzRx8/w800-h534-no/IMG_0113.JPG]]
Long days...
[img[https://lh6.googleusercontent.com/-Zic604C0Hok/UeMEUv4RlqI/AAAAAAAAI5U/Yq7txXrugPM/w800-h572-no/IMG_0138.JPG]]
[img[https://lh5.googleusercontent.com/-AcDNQ5xMuN0/UeMD_6DGpVI/AAAAAAAAI4U/gEu67us9CE0/w800-h423-no/IMG_0102.JPG]]
''An E.P. is in the final stages before release now'' after two hard days of recording at the wildly wonderful Ananda Recording studio, near Cambridge back in the summer.
Photos at [[Recording session - July 13-14 2013]]
What a place! And huge thanks to [[Neil Cowlan|http://www.neilcowlan.com/]] of Ananda Recording: he just could not have been more helpful in this treasure trove of recording kit, and his wizardry continues as he mixes and masters the 4 tracks we have recorded. We are really excited about this - the E.P. should be available in August, and is more than a step change for the band - the sound quality will be amazing, and we are quietly confident about the songs, too...
Ananda Recording - one blissfully beautiful studio in deep countryside:
[img[https://lh3.googleusercontent.com/-NUyJiEs8F0U/UeMDBOwGXNI/AAAAAAAAI5s/OuWkIJgEAZc/w951-h344-no/FromTheWoods.jpg]]
<html><object width="560" height="315"><param name="movie" value="//www.youtube.com/v/rEmwtZbSgRU?hl=en_GB&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/rEmwtZbSgRU?hl=en_GB&version=3&rel=0" type="application/x-shockwave-flash" width="560" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
!Read reviews for Light In/Light Out
|bgcolor(darkblue): <br>@@color(lightblue):Click on links to read the review@@<br><br>[[**** Independent on Sunday]]<br>[[Best Folk Albums of 2016 - Telegraph]]<br>[[**** MAVERICK magazine]]<br>[[**** R2 magazine]]<br>[[7/10 Guitarist magazine]]<br>[["Outstanding debut from potentially genre-redefining band" - FATEA]]<br>[["Sure to be one of the most notable debut albums of the year" - Folk Radio UK]]<br><br> |
!Other nice things about the album:
!!Simmy Richman (Independent)
Nov 19 2015 - referring to ''Light In / Light Out''
<<image [[Simmy]] width:350 height:600>>
!!Pete Paphides (Times/Guardian/Observer/Q magazine/Uncut):
|bgcolor(lightgrey): <br> <<image [[PaphidesTWEET]] width:500 height:400>> <br> |
|bgcolor(lightgrey): <br> <<image [[PaphidesTWEET2]] width:500 height:300>> <br> |
!!Dry the River
So proud of this one:
<<image [[DtR_twitter]] width:400 height:350>>
!Reviews for our earlier [[EP - Break of Blue]]
!!!Independent online:
|bgcolor(lightgrey): <br><<image [[Independent review 1]] width:500 height:300>> <br> |
See page [[here|http://www.independent.co.uk/arts-entertainment/music/the-bonus-track-lily--madeleine-bill-callahan-lady-gaga-and-tony-bennett-mortal-tides-luke-sitalsingh-9657160.html]] - listed between Lady Gaga Tony Bennett and Luke Sital Singh... ding dong, we say.
>//"Watch out for the “insanely young” indie-folk band Mortal Tides. The group release their debut EP in October and will, apparently, “be telling their parents they’re studying towards their exams” when they go out on tour that same month. Promising. Watch the video for “Naiad” "//
!!!Folk Radio UK
''http://www.folkradio.co.uk/2014/07/introducing-mortal-tides/''
>//"Whatever their age they’re a welcome addition to the small independent label Wild Sound Records founded by singer songwriter Polly Paulusma (recently reviewed here). Alongside the likes of Maz O’Connor (reviewed here), The Pollyanna Band and Stylusboy this is a label worth keeping an eye on. They’ve certainly an eye for spotting talent as these lads have bucket loads of it, one to definitely watch out for!"//
!Other nice stuff
!NMG Awards Oct 2014 - best band under 19yrs
Judged by the [[panel|http://www.nmgawards.com/?page_id=159]], shortlisted from a longlist of 93, the band was chosen as best under 19yr band in the eastern region (50 mile radius from Cambridge):
|bgcolor(lightgrey): <br> <<image [[NMGheader]] width:150 height:60>> <<image [[NMGTrophyPic]] width:100 height:150>> <<image [[NMGheader]] width:150 height:60>><br><br> ''@@color(darkblue): WINNERS! BEST BAND UNDER 19yrs, NMG AWARDS...@@'' <br><<image [[NMGAwardsPic]] width:500 height:350>><br><br> Mortal Tides (same line-up) previously played as 'From the Woods' |
!!!Gary Brown (Cambridge Junction management)
>//"After over a decade of promoting young bands from the area, From The Woods [''Mortal Tides''] are THE stand-out band for their song-writing, originality and that all-important magical ability to pull and hold a crowd".//
!!!Tim Willett from Cambridge Star Radio writes:
>//"From The Woods [''Mortal Tides''] with their music and lyrics mature beyond their years and assured live performances are an instant hit and an extremely exciting prospect for the future"//
index: backups
editor: /edit#{tiddler}//text%2fx-markdown
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/S5o0gq81xoY?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/S5o0gq81xoY?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<slider "ShadowsSlider" "Shadows - lyrics" "Click for LYRICS to Shadows">>
<html><iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/159954606&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
!Live at the Cambridge Junction (25.01.14):
<html><object width="480" height="360"><param name="movie" value="//www.youtube.com/v/Vh6xvzfwVfk?hl=en_US&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/Vh6xvzfwVfk?hl=en_US&version=3&rel=0" type="application/x-shockwave-flash" width="480" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
Early version, recorded in a single take in the Bothy, with a little guitar solo overdubbed afterwards.... Thanks to John L for lending his mics! And watch out for the studio version on our EP "Break of Blue"...
Noah - Vocals and Guitar
Jed - Piano, vocals
George - Drums
Song by Noah
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F76727197"></iframe></html>
|bgcolor(beige):''__Shadows__''<br><br>There’s a black shape walking down<br>The rusty hum of the streetlight sound<br>A piercing gaze from the eyes above<br>Nothing found, nothing lost<br><br>A break of blue and eyes look up<br>The restless calm of the evening sun<br>False smiles and futile cries<br>Nothing lives, nothing dies<br><br>And you, your heart like gold<br>They’ll pull you in with their empty words<br>False smiles and futile cries<br>Oh nothing lives, nothing dies.<br><br>The dark shape moves up to the door<br>Where you lie stranded on the shore<br>It reaches out with words so clean<br>Only shadows, only dreams.<br><br><br>Lyrics © [[Noah Bevington]], chords © [[Jed Bevington]] |
See our paltry wares on display here: <<tag Shop>>
.
<<newTiddler>><<closeAll>>
/***
|''Name''|SimpleSearchPlugin|
|''Description''|displays search results as a simple list of matching tiddlers|
|''Authors''|FND|
|''Version''|0.4.1|
|''Status''|stable|
|''Source''|http://devpad.tiddlyspot.com/#SimpleSearchPlugin|
|''CodeRepository''|http://svn.tiddlywiki.org/Trunk/contributors/FND/plugins/SimpleSearchPlugin.js|
|''License''|[[Creative Commons Attribution-ShareAlike 3.0 License|http://creativecommons.org/licenses/by-sa/3.0/]]|
|''Keywords''|search|
!Code
***/
//{{{
if(!version.extensions.SimpleSearchPlugin) { //# ensure that the plugin is only installed once
version.extensions.SimpleSearchPlugin = { installed: true };
if(!config.extensions) { config.extensions = {}; }
config.extensions.SimpleSearchPlugin = {
heading: "Search Results",
containerId: "searchResults",
btnCloseLabel: "close",
btnCloseTooltip: "dismiss search results",
btnCloseId: "search_close",
btnOpenLabel: "open all",
btnOpenTooltip: "open all search results",
btnOpenId: "search_open",
displayResults: function(matches, query) {
story.refreshAllTiddlers(true); // update highlighting within story tiddlers
var el = document.getElementById(this.containerId);
query = '"""' + query + '"""'; // prevent WikiLinks
if(el) {
removeChildren(el);
} else { //# fallback: use displayArea as parent
var container = document.getElementById("displayArea");
el = document.createElement("div");
el.id = this.containerId;
el = container.insertBefore(el, container.firstChild);
}
var msg = "!" + this.heading + "\n";
if(matches.length > 0) {
msg += "''" + config.macros.search.successMsg.format([matches.length.toString(), query]) + ":''\n";
this.results = [];
for(var i = 0 ; i < matches.length; i++) {
this.results.push(matches[i].title);
msg += "* [[" + matches[i].title + "]]\n";
}
} else {
msg += "''" + config.macros.search.failureMsg.format([query]) + "''"; // XXX: do not use bold here!?
}
createTiddlyButton(el, this.btnCloseLabel, this.btnCloseTooltip, config.extensions.SimpleSearchPlugin.closeResults, "button", this.btnCloseId);
if(matches.length > 0) { // XXX: redundant!?
createTiddlyButton(el, this.btnOpenLabel, this.btnOpenTooltip, config.extensions.SimpleSearchPlugin.openAll, "button", this.btnOpenId);
}
wikify(msg, el);
},
closeResults: function() {
var el = document.getElementById(config.extensions.SimpleSearchPlugin.containerId);
removeNode(el);
config.extensions.SimpleSearchPlugin.results = null;
highlightHack = null;
},
openAll: function(ev) {
story.displayTiddlers(null, config.extensions.SimpleSearchPlugin.results);
return false;
}
};
// override Story.search()
Story.prototype.search = function(text, useCaseSensitive, useRegExp) {
highlightHack = new RegExp(useRegExp ? text : text.escapeRegExp(), useCaseSensitive ? "mg" : "img");
var matches = store.search(highlightHack, null, "excludeSearch");
var q = useRegExp ? "/" : "'";
config.extensions.SimpleSearchPlugin.displayResults(matches, q + text + q);
};
// override TiddlyWiki.search() to sort by relevance
TiddlyWiki.prototype.search = function(searchRegExp, sortField, excludeTag, match) {
var candidates = this.reverseLookup("tags", excludeTag, !!match);
var primary = [];
var secondary = [];
var tertiary = [];
for(var t = 0; t < candidates.length; t++) {
if(candidates[t].title.search(searchRegExp) != -1) {
primary.push(candidates[t]);
} else if(candidates[t].tags.join(" ").search(searchRegExp) != -1) {
secondary.push(candidates[t]);
} else if(candidates[t].text.search(searchRegExp) != -1) {
tertiary.push(candidates[t]);
}
}
var results = primary.concat(secondary).concat(tertiary);
if(sortField) {
results.sort(function(a, b) {
return a[sortField] < b[sortField] ? -1 : (a[sortField] == b[sortField] ? 0 : +1);
});
}
return results;
};
} //# end of "install only once"
//}}}
Boring, but for the website developers. See tagged material for links to useful workarounds.
<<tag SiteManagement>>
Mortal Tides <<image [[MortalTidesLOGO]] width:200 height:200>>
http://www.fromthewoods.info
Thanks to Newt Labs for making this video of Noah and Jed playing this cover of Nirvana's classic on Castle Hill in Cambridge.
<html><iframe width="640" height="360" src="https://www.youtube.com/embed/Z5YkI9iXywQ?rel=0" frameborder="0" allowfullscreen></iframe></html>
| <<tag Songs>> Click here and select from pick-list... |
Hope you like our songs - more are brewing... All songs remain the copyright of Mortal Tides, and all rights are reserved.
We have an EP, ''"Break of Blue"'', that recorded summer 2013 when Noah and George were 16 and Jed was 14, released under the [[Wild Sound Recordings]] label. An Album is being recorded this summer (2015) with [[Polly Paulusma|Wild Sound Recordings]] as producer - we are bursting to get on with this now - so many new songs to catch.
We put new rough recordings and videos here as they arrive.
Links to songs are listed as links at the top of this page (click "Songs"), or you can click the drop-down 'Songs' menu on the headline links across the top of the website.
!Comments
For songs on SoundCloud you can make COMMENTS by clicking on the sound cloud at whatever point you want the comment to be recorded, then type in the box... for the rest, catch us on [[Twitter]] or [[Facebook]]
!We stream our songs from [[SoundCloud|http://soundcloud.com/mortaltides]]!
https://www.facebook.com/mortaltides
<html><div align="center"><iframe src="https://soundcloud.com/mortaltides/tracks" frameborder="0" width="100%" height="600"></iframe></div></html>
It's first public airing was during a [[12. Live session on Cambs local Star radio]], with the final lyrics barely dry on the page:
<html><object width="640" height="480"><param name="movie" value="//www.youtube.com/v/qqAx6qV13eo?version=3&hl=en_GB&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/qqAx6qV13eo?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
<<slider SpiresLyrics "Spires - lyrics" "click for lyrics">>
<html><iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/159954603&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
...and then we played it live at the [[13. Cambridge Junction Fiver ACOUSTIC SPECTACULAR - January 25th 2014]]:
Live Version at [[Cambridge Junction on 25th January|13. Cambridge Junction Fiver ACOUSTIC SPECTACULAR - January 25th 2014]]:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/vnlr91TicMo?version=3&hl=en_GB&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/vnlr91TicMo?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
This video was recorded on January 11th, an hour after the song's birth - we hadn't got a name for it at that point and the words needed work:
<html><object width="640" height="360"><param name="movie" value="//www.youtube.com/v/v5WHi5jp3RQ?hl=en_GB&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/v5WHi5jp3RQ?hl=en_GB&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
Lyrics and chords © [[Noah Bevington]]
|bgcolor(beige):''__Spires__''<br><br>As we stood / above earth and water<br>We laughed / as all Kings do<br>The sea lay bare beneath us<br>With its blue fields...<br>Beware / the horizon<br>Air hollow to your lungs<br><br>And as / we breathed out<br>The conqueror's sigh to the world<br>The earth / heavy water<br>Gazed... back at us<br>Past this stone / past the dusk<br>Between veils of morning rain<br><br><br>''Chorus''<br>//So we washed our aching bones<br>In the darkness<br>In the darkness<br>This horizon's cold with blood<br>In the darkness<br>In the darkness//<br><br>We left our minds to the dust<br>And drank / pleading from the <br>Imbrued / tainted softly<br>The architects / crowned their lie<br>Oh but we found light (we found hearts)<br>In the honest words we sang<br><br>Set aside your empty lives and pray<br>They lied / and read to us<br>To harness / rise up<br>Between the spires of decay<br>And in all their words<br>Just a lonely bitter taste<br><br><br>Lyrics © [[Noah Bevington]]<br>Music © [[Noah Bevington]], [[Jed Bevington]], [[George Brignal]], [[Fergus Quill]]<br><br> |
A studio version appears on our forthcoming [[EP - Break of Blue]]
Very early verion: Noah on guitar and vocals, George on Percussion, Jed on Violin and backing vocals.
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="http://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F39983700&show_artwork=true"></iframe></html>
<<slider SplitMySoulLyrics "Split my Soul - lyrics" "click to reveal lyrics">>
!Live at Earlier With
<html><iframe width="640" height="480" src="https://youtube.com/embed/PJ60adR7YxM?rel=0" frameborder="0" allowfullscreen></iframe></html>
!Live at the Elmdon Dial pub
<html><iframe width="853" height="480" src="https://youtube.com/embed/OUtLTbPu60w?rel=0" frameborder="0" allowfullscreen></iframe></html>
|bgcolor(beige):''__Split my Soul__''<br><br>I don't know how these colours split my soul<br>But they're the ones you need the one's that you really know<br><br>Steel and iron, long and broken tracks,<br>Just gazing at clocks, wishing they'd turn back.<br><br>High and mighty hide your feelings low,<br>You don't realise, all the bruises you show.<br><br>You've got heart, you've my mind to track,<br>Calling across to your soul over these ruins I've made.<br><br>''//Bridge://''<br><br>Judging minds of old, know why I feel this way<br>Say, I know the road I seek, and now I'm running its way...<br><br><br>© [[Noah Bevington]] |
* [[EP - Break of Blue]]
* [[Album: "Light In / Light Out"]] - due out early 2016 under the [[Wild Sound Recordings]] label.
* T-shirts, posters, mugs, badges? Nah... DIY? See [[Photos]]
.
For a courageous friend.
Song by Noah (guitar and vocals), Jed on backing vocals, Piano and Violin, George on Drums.
<<slider StrongLyrics "Strong - Lyrics" "click to reveal lyrics">>
Most recent showing: at the Elmdon Dial pub, 16.08.12.
<html><iframe width="853" height="480" src="https://youtube.com/embed/blfemT6SXpg?rel=0" frameborder="0" allowfullscreen></iframe></html>
Great Chesterford Community centre - 22.06.12
<html><iframe width="640" height="480" src="https://youtube.com/embed/Cvdg3FFfF5s?rel=0" frameborder="0" allowfullscreen></iframe></html>
Chrishall festival - the sound quality is terrible ...
<html><iframe width="640" height="360" src="https://youtube.com/embed/h_flpYgJxO4?rel=0" frameborder="0" allowfullscreen></iframe></html>
|bgcolor(beige):''__Strong__''<br><br>Took a lot of talking, to get this far<br>Just a compass on the hillside, leading north<br>A stream so wide, an ocean across<br>To lead us away, to lead us from worse<br><br>This song gives to wind, but you will not fall<br>Lanterns in the fog, and you hold them all...<br><br>No regret for words not said, say to me<br>And not a birdsong all night, and all day<br>No refuge I find, that they can't take away<br>No burnt out candle, no flame<br><br>//And no fear of all the colours in rain//<br>//And no scar on skin, to wipe away//<br>//'Cos we've been fighting fire with fire for far too long//<br>//And from our breaking islands fallen leaves will grow//<br>//Til in the darkest place we light for all we know//<br>//Oh be strong, be strong//<br>//Oh be strong, be strong.//<br><br>Oh it took a lot of answers, to learn to talk<br>And no compass led us true, to rest<br>Simply thoughts of thoughts all clear, to us<br>Just a kingdom 'cross the lake, no dust.<br><br>//Chorus//<br><br><br>© [[Noah Bevington]] |
![[Album: "Light In / Light Out"]] - released January 2016!
<<image [[lightinlightout]] width:300 height:300>>
!Blog entries about the making
Delighted to announce that after an incredibly intense 5 days working in [[Three Circles Studio|http://www.threecircles.co.uk/recording-studio-essex/]] with Adrian Hare, we recorded 12 of our songs. A further 3 days mixing, and then a bit of mastering courtesy of Audiomaster in the west country, and we've finished an album for release under Polly Paulusma's [[Wild Sound Recordings]] label. Lots of surprises and delights for you in store. We are really excited. Really. Really. Really. The physical CD's are under production... it's happening!
Quietly confident that our many generous Kickstarter backers won't feel that their money was wasted... watch this space... those that showed faith and pre-ordered CD's, or covers of songs, or other goodies via Kickstarter, we hope you will be satisfied with what you made possible... not long to wait now!
!In the studio green room
Pip - immune to rhythm:
<<image [[PipStudio]] width:400 height:250>>
Star Wars on the PS:
<<image [[Starwars]] width:400 height:250>>
|bgcolor(lightgrey): <br>''__KICKSTART MORTAL TIDES!__''<br><html><iframe width="300" height="225" src="https://www.kickstarter.com/projects/mortaltides/help-mortal-tides-record-their-music/widget/video.html" frameborder="0" scrolling="no"> </iframe></html>_<html><iframe frameborder="0" height="420" scrolling="no" src="https://www.kickstarter.com/projects/mortaltides/help-mortal-tides-record-their-music/widget/card.html?v=2" width="220"></iframe></html><br> |
[[StyleSheetTiddlySpace]]
[[StyleSheetTiddlySpace]]
#displayArea {background-color: #cccc99; }
body {background-image: url(https://s-media-cache-ak0.pinimg.com/736x/79/80/8e/79808e135e3cbff22fa9f96f163e85d4.jpg);
background-repeat: repeat; background-position: left; backgound-color: transparent; font-family: Helvetica;}
.viewer {
font-size: 1.5em;
font-family: Courier;
border-color: white;
padding: 10px 20px 10px 0px;
text-align: left;
vertical-align: top;
}
.tiddler {
border-top: 0.2em solid;
}
.tiddler {
border-bottom: 1.0em dotted;
}
/*{{{*/
.headerForeground {
position: relative;
padding: 2em 0em 1em 0em;
float: right;
top: 0;
margin-right: 5.3em;
background-color: [[ColorPalette::PrimaryMid]];
text-align: right;
}
.header {
width: 100%; /* for ie */
}
.clearFloat {
clear: both;
}
#contentWrapper {
position: relative;
padding-top: 1px;
top: -1px;
}
.header {
position: relative;
background-color: [[ColorPalette::PrimaryMid]];
}
.siteTitle {
clear: both;
display: block;
}
#sidebarSearch {
padding: 0.8em 1em 1em;
width: 10.5em;
margin: 0.6em 0.6em;
float: right;
position: relative;
}
#sidebarSearch .txtOptionInput {
width: 100%;
margin-top: 5px;
}
#sidebarSearch .searchButton {
padding: 0.2em;
color: [[ColorPalette::Background]];
}
/*}}}*/
/*{{{*/
#sidebar .wizard table {
margin: 0px;
}
#menuBar #sidebarOptions {
margin-right: 0.6em;
}
#sidebarTabs {
position: absolute;
right: 0;
top: 0;
width: 22.2em;
}
.tabset {
padding: 1em 6px 1px 0;
position: relative;
top: 2px;
}
#sidebarTabs .tabsetWrapper .tabset {
float: left;
height: auto;
display: inline;
width: 5.5em;
word-wrap: break-word;
top: 0;
padding: 0 0 1px;
}
#sidebarTabs .tabsetWrapper .tabsetWrapper .tabset {
float: none;
height: auto;
top: 1px;
padding: 0 0 1px;
}
.tab {
margin: 0.1em 0.25em 0 0;
padding: 6px 6px 0;
display: inline-block;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topleft: 6px;
-moz-border-radius-topright: 6px;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
#sidebarTabs .tabsetWrapper .tabset .tab {
display: block;
margin: 0 0 1px 0.25em;
padding: 1em 6px 0.5em;
position: relative;
left: 3px;
border-right: 0;
border-bottom: 1px solid [[ColorPalette::TertiaryMid]];
border-color: [[ColorPalette::TertiaryMid]];
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
#sidebarTabs .tabsetWrapper .tabsetWrapper .tabset .tab {
margin: 0.1em 0.25em 0 0;
padding: 6px 6px 0;
display: inline-block;
border-right: 1px solid [[ColorPalette::TertiaryMid]];
border-bottom: 0;
-webkit-border-top-left-radius: 6px;
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topleft: 6px;
-moz-border-radius-topright: 6px;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
}
.tabContents {
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-topright: 6px;
-moz-border-radius-bottomright: 6px;
-moz-border-radius-bottomleft: 6px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
border-bottom-left-radius: 6px;
}
#sidebarTabs .tabsetWrapper .tabContents {
display: inline;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
border-width: 1px 1px 1px 3px;
float: left;
border-color: [[ColorPalette::TertiaryMid]];
*height: expression(this.scrollHeight < 301? "300px" : "auto");
min-height: 25em;
background-color: [[ColorPalette::TertiaryPale]];
}
#sidebarTabs .tabsetWrapper .tabsetWrapper .tabContents {
border-width: 1px;
display: block;
float: none;
min-height: 0;
-webkit-border-top-right-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-topright: 6px;
-moz-border-radius-bottomright: 6px;
-moz-border-radius-bottomleft: 6px;
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
border-bottom-left-radius: 6px;
}
/*}}}*/
/*{{{*/
body {
background: none;
font-family: "Helvetica Neue", Helvetica, Arial;
}
h1,
h2,
h3,
h4,
h5 {
color: black;
border-bottom: none;
}
.tiddler .toolbar a:hover,
.tiddler .toolbar a {
border: none;
background: none;
}
#sidebar {
position: relative !important;
width: 250px !important;
float: right;
margin: 0 0 25px 0;
}
#sidebar h1 {
padding: 0 0 3px 0;
font-size: 18px;
}
#sidebar li {
border-top: 1px dotted #CCC;
}
#sidebar li a {
font-size: 13px;
font-weight: normal;
padding: 2px 0 2px 15px;
display: block;
}
#contentWrapper {
width: 900px;
margin: 30px auto 140px;
padding: 30px 30px 0;
background: white;
background: rgba(255, 255, 255, 0.88);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.header {
float: left;
width: 900px;
border-bottom: 1px dotted #CCC;
margin: 0;
background: none;
}
.header h1 {
margin-top: 0px;
color: [[ColorPalette::PrimaryMid]];
font-size: 60px;
font-weight: 600;
text-decoration: none;
border-bottom: none;
letter-spacing: -2px;
text-rendering: optimizeLegibility;
background: none;
}
.header h2 {
font-size: 18px;
font-weight: 200;
padding: 12px 4px 0 0;
color: black;
border-bottom: none;
}
h1,
h2 {
text-decoration: none;
border-bottom: none;
}
#navBar {
float: right;
padding: 12px 0 0;
}
#navBar ul {
height: 50px;
margin-bottom: 2px;
list-style: none;
display: inline;
list-style-type: square;
}
#navBar ul li {
display: inline !important;
list-style: none;
}
#navBar li a {
font-size: 18px;
font-weight: 400;
display: inline-block !important;
padding: 15px;
border-bottom: none;
}
#navBar li a:hover {
color: #04B;
}
#tiddlerDisplay {
width: 900px;
float: left;
border-right: 1px dotted #CCC;
padding: 0 0 30px 0;
min-height: 420px;
overflow: hidden;
}
#displayArea {
margin: 0;
}
.title {
font-family: Georgia, serif;
font-size: 28px;
margin: 30px 0 10px 0;
font-weight: normal;
line-height: 32px;
border-bottom: 1px dotted black;
text-decoration: none;
color: black;
display: inline-block;
}
.subtitle {
font-size: 0.9em;
}
.subtitle ul,
.subtitle li {
display: inline;
padding-left: 0px;
}
.tiddler .viewer {
clear: both;
}
.wikifying {
background-image: url(/loading.gif);
width:50px;
height: 50px;
display: block;
text-indent: -999px;
background-repeat: no-repeat;
}
.sidebarOptions a {
display: inline-block;
padding: 8px;
}
.sidebarOptions {
padding: 8px;
text-align: right;
}
.searchbar {
text-align: right;
}
.searchbar .searchButton {
display: none;
}
/*}}}*/
[[Jed|Jed Bevington]], [[Noah|Noah Bevington]], [[Fergus|Fergus Quill]] and [[George|George Brignal]]...
<<image [[FTW Band portrait]] width:600 height:400>>
<<image [[On stage Junction Dec 20 2013_2.jpg]] width:600 height:400>>
|bgcolor(lightgrey): <br><br> ''@@color(darkblue): WINNERS! BEST BAND UNDER 19yrs, NMG AWARDS...@@'' <br><<image [[NMGAwardsPic]] width:500 height:350>><br> |
!Live Radio performance
<<slider Cambridge105live "19. Cambridge 105 Radio - live session 27.08.14" "Click for live radio performance">>
<<slider TheFallLyrics "The Fall - Lyrics" "click to reveal lyrics">>
Originally recorded in the Bothy on 3rd February 2013
Noah - Guitar, Vocals
George - Drums
Jed - Violin, Vocals
Ian Rossuck - Cello
<html><iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F77697816"></iframe></html>
<<slider TheFallLyrics "The Fall - Lyrics" "click to reveal lyrics">>
!Live at Cambridge Junction 25.01.14
<html><object width="640" height="480"><param name="movie" value="//www.youtube.com/v/MZJgD8EAYKY?hl=en_GB&version=3&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/MZJgD8EAYKY?hl=en_GB&version=3&rel=0" type="application/x-shockwave-flash" width="640" height="480" allowscriptaccess="always" allowfullscreen="true"></embed></object></html>
|bgcolor(beige):''__The Fall__''<br><br>Two skulls and paper hearts<br>And we fall into this hole<br>And we fall like scattered stones<br>Until we walk upon the earth<br><br>So we walk into the cave<br>Bright lights and shadows dance<br>And we will not see the light<br>Until we walk outside again<br><br>''//Bridge//''<br><br>And it was all a lie<br>That picks me up again<br>Still walking among the Autumn<br>Leaves, that fall into the arms.<br><br>So we walked through the suburbs,<br>The trees caved in, and our hearts burnt out.<br>An honest treaty to pull this veil down...<br>Did we survive the Fall?<br><br><br>© [[Noah Bevington]] |
/***
|''Name''|TiddlerEditablePlugin|
|''Description''|Any elements with a tiddler attribute set and a class tiddlerEditable will allow in place editing|
|''Version''|0.3.5|
***/
//{{{
(function($) {
var extension = config.extensions.tiddlerEditable = {
init: function() {
if(readOnly) {
return;
}
$(".tiddlerEditable, .tiddlerEditable").attr("title", "Double click on this to edit.").dblclick(function(ev) {
var target = ev.target;
var title = $(target).attr("tiddler");
if(!title) {
title = $("[tiddler]", target).attr("tiddler");
tidEl = $("[tiddler]", target)[0];
} else {
tidEl = target;
}
if(!title) {
return;
}
var tiddler = store.getTiddler(title);
var type = tiddler && tiddler.fields['server.content-type'] ? tiddler.fields['server.content-type'] : false;
$(tidEl).empty();
var binary;
if(type && type.indexOf("text/") !== 0) {
binary = true;
}
if(!binary) {
$("<textarea />").focus(function(ev) {
$(ev.target).data("dirty", true);
}).val(store.getTiddlerText(title)).appendTo(target);
} else {
wikify("<<binaryUploadPublic title:\"%0\">>".format(title), tidEl)
}
ev.preventDefault();
return false;
}).mouseover(function(ev) {
$(ev.target).addClass("hover")
}).mouseout(function(ev) {
$(ev.target).removeClass("hover")
});
}
};
$(window).click(function(ev) {
var tag = ev.target.tagName;
if(tag == "TEXTAREA" || tag == "FORM" || tag == "INPUT") {
return;
} else {
var tiddlers = [];
var textareas = $(".tiddlerEditable textarea");
textareas.each(function(i, el) {
var val = $(el).val();
var c = el.parentNode;
var title = $(c).attr("tiddler");
var tiddler = store.getTiddler(title);
if($(el).data("dirty")) {
tiddler.text = val;
if(config.filterHelpers) {
var is = config.filterHelpers.is;
if(is && !is.local(tiddler)) {
delete tiddler.fields['server.etag'];
delete tiddler.fields['server.bag'];
delete tiddler.fields['server.page.revision'];
merge(tiddler.fields, config.defaultCustomFields);
}
}
tiddler = store.saveTiddler(tiddler);
tiddlers.push(tiddler);
} else {
$(c).empty();
wikify(tiddler.text, c, null, tiddler);
}
});
var forms = $(".tiddlerEditable form");
if(forms.length > 0) {
refreshDisplay();
}
if(tiddlers.length > 0) {
autoSaveChanges(null, tiddlers);
}
}
});
_refreshPageTemplate = refreshPageTemplate;
refreshPageTemplate = function() {
_refreshPageTemplate.apply(this, arguments);
extension.init();
}
_refreshDisplay = refreshDisplay;
refreshDisplay = function() {
_refreshDisplay.apply(this, arguments);
extension.init();
}
var r = config.macros.image._renderBinaryImageTiddler;
config.macros.image._renderBinaryImageTiddler = function(place, tiddler) {
$(place).attr("tiddler", tiddler.title);
return r.apply(this, arguments);
}
window.setTimeout(function() {
extension.init();
}, 1000);
})(jQuery);
//}}}
~TiddlySpace is a place where you can host your own wiki (easily editable website) for free.
There's almost no limit to what you can do with tiddlywikis if you want to. See [[TiddlySpace central|http://tiddlyspace.com]] or [[TiddlyWiki|http://www.tiddlywiki.com]] to find out more.
Invented by the great Jeremy Ruston. Pages = Tiddlers. See http://www.tiddlywiki.com
|~ViewToolbar| > references editTiddler +cloneTiddler revisions permalink closeOthers < closeTiddler|
|~EditToolbar|+saveTiddler saveDraft -cancelTiddler deleteTiddler|
|~RevisionToolbar|> fields revert|
The Mortal Tides Tweet as ''{{{@mortaltides}}}''
Go straight to our Twitter page ''[[here|https://twitter.com/mortaltides]]''
|bgcolor(lightblue): ''UPLOADER''<br>Type the name of your image (to be the IMAGE TITLE) here:<br><<binaryUploadPublic edit:title>>Then select the image file you want to upload, click Upload, and you will create a tiddler which is an IMAGE with a TITLE |
|bgcolor(pink): Now, ''to EMBED that image in any OTHER page''... <br>you just use this code: <br><br> ''{{{<<image [[Paste the IMAGE TITLE here]] width:48 height:48>>}}}'' <br><br> You can set the ''Width'' and ''Height'' according to how big you want the photo to display (48x48 is quite small, 480x480 is middle sized, 600x600 is large, for instance) |
Using the Uploader - you can ''use the one in the blue/pink box above'', or you can create another uploading "portal" anywhere on the site, using this bit of code (just stick it in any tiddler, save the changes and away you go):
|bgcolor(orange): {{{<<binaryUploadPublic edit:title>>}}} |
Like this:
!The NEW AMBIT Wheel
!!400x400
<<image [[AMBIT wheel 2014]] width:400 height:400>>
!!200x200
<<image [[AMBIT wheel 2014]] width:200 height:200>>
!!48x48
<<image [[AMBIT wheel 2014]] width:48 height:48>>
!The OLD AMBIT wheel
<<image [[Old AMBIT wheel]] width:400 height:390>>
Videos get tagged under this page heading. List and pick from here:
|bgcolor(lightblue): <<tag Videos>> |
<!--{{{-->
<div class='toolbar'
macro='toolbar [[ToolbarCommands::ViewToolbar]] icons:yes height:16 width:16 more:popup'>
</div>
<div class='title' macro='view title'></div><br>
<div class='viewer' macro='view text _wikified'></div>
<div class='tagClear'></div>
<!--}}}-->
!We are now @@color(gray):Mortal Tides@@
We are about to release an EP and then an album, and we find there is another 'From the Woods' out there already, so good luck to 'em, but it makes sense for us to change now - and anyway the folksy-wolksieness of From the Woods wasn't ever quite it, if we are honest. @@color(gray):''Mortal Tides''@@ is the new name we hope to make a home in.
!We have moved... ''[[www.mortaltides.com|http://www.mortaltides.com]]''
* Our Twitter account is ''[[@mortaltides|https://twitter.com/mortaltides]]''
* Our Facebook page is titled ''[[Mortal Tides|https://www.facebook.com/mortaltides]]''
Please come with us, it is getting exciting with festivals and recording under way.
this is our old name, we are now...
!Mortal Tides
[[Welcome to Mortal Tides]]
.
!!!Debut album [[Light In / Light Out|Album: "Light In / Light Out"]] out now!
|bgcolor(darkgray): <br>@@color(darkgray):. .@@<<image [[LILO]] width:400 height:400>>@@color(darkgray):. .@@<br><br> |
|bgcolor(darkblue): <br>@@color(lightblue):Click links to read reviews@@<br>[[**** Independent on Sunday]]<br>[[Best Folk Albums of 2016 - Telegraph]]<br>[[**** MAVERICK magazine]]<br>[[**** R2 magazine]]<br>[[7/10 Guitarist magazine]]<br>[["Outstanding debut from potentially genre-redefining band" - FATEA]]<br>[["Sure to be one of the most notable debut albums of the year" - Folk Radio UK]]<br><br> |
!listen to Light In / Light Out
<html><iframe src="https://embed.spotify.com/?uri=spotify%3Aalbum%3A3CX9gxSCVGcB3Wr2oohtfp" width="300" height="380" frameborder="0" allowtransparency="true"></iframe></html>
!Yay!
Tipped for 2016 by the great Sue Marchant broadcasting for the BBC across the Eastern Counties:
<html><iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/240271366&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe></html>
Delighted to have been shortlisted for another NMG award at the end of 2015, after our best under 19 win last year, this time in the Folk/Roots category. On the night the wonderful CC Smugglers took the award, but very happy to have been in any short list with them at the head. Huge honour.
<<image [[NMGFolkRoots]] width:200 height:200>>
!Video spotlight:
|bgcolor(lightgray): <br>Live session from the Portland Arms, courtesy of Cambridge TV<br><html><iframe src="https://player.vimeo.com/video/189641750" width="640" height="360" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></html><br>Lovely live footage from the BBC - a live session with Tom Simkins at BBC Introducing in Cambridge. One of our newer songs, [[Empty Hearse]]:<br><html><iframe width="640" height="360" src="//www.youtube.com/embed/ehSZjPNPnc8?rel=0" frameborder="0" allowfullscreen></iframe></html><br> Here's the second song from that session, [[Cruellest Kind]]: <br> <html><iframe width="640" height="360" src="//www.youtube.com/embed/lMyCeFmtUBU" frameborder="0" allowfullscreen></iframe></html><br>Here's [[I Grow Cold]] from our live performance at Secret Garden Party, 2015<br><html><iframe width="560" height="315" src="https://www.youtube.com/embed/xBbMktq_fok" frameborder="0" allowfullscreen></iframe></html><br>And here's our take on the Nirvana classic [[Smells like Teen Spirit|Smells Like Teen Spirit - cover]]:<br><html><iframe width="640" height="360" src="https://www.youtube.com/embed/Z5YkI9iXywQ?rel=0" frameborder="0" allowfullscreen></iframe></html><br>Other new material we particularly like includes [[Cruellest Kind]], [[Naiad]], [[Spires]], [[No Midas]], and [[Shadows]] or select from all our older <<tag Videos>><br><br> |
![[EP - Break of Blue]]:
|bgcolor(lightgrey): <br><<image [[Break of Blue EP cover]] width:200 height:200>><br>Released by [[Wild Sound Recordings]], recorded back in July 2013 when we were well young - a historic teaser for the [[album we're soon to release|Studio recordings - Kickstarted, done and (nearly) dusted!]], which as been produced by the wonderful [[Polly Paulusma|Wild Sound Recordings]] - loads of new material poured out, and more coming since.<br><br> DOWNLOADS: ''[[Amazon|http://www.amazon.co.uk/Break-Blue-EP-Mortal-Tides/dp/B00MG4W9P2/ref=sr_1_1?s=dmusic&ie=UTF8&qid=1408209622&sr=1-1&keywords=Mortal+Tides]]'' and ''[[iTunes|https://itunes.apple.com/gb/album/break-of-blue-ep/id906461512]]''<br><br>See some [[Reviews and Quotes]]<br><br> |
!<<tag About>>
|bgcolor(lightgrey): <br> [[Mortal Tides|About the Band]] <br>are two brothers and two friends writing and [[performing|Gigs]] indie [[folk]] for the last 10 years (since Noah and Jed met George at primary school). See their [[Songs]], and other content on the menu across the top of this page.<br><br><<image [[NMGheader]] width:100 height:45>><br> ''WINNERS! BEST BAND UNDER 19yrs, NMG AWARDS'' <br><<image [[NMGAwardsPic]] width:200 height:145>><br><br> |
!Read [[What the Critics say...|Reviews and Quotes]]
|bgcolor(lightgrey): [[Praises|Reviews and Quotes]] from ''The Independent'', ''Dry the River'', ''Pete Paphides'', ''Folk Radio UK'', ''Tim Willett'' (Cambridge 105 and Star Radio), ''Garry Brown'' (Cambridge Junction)... oh and ''@@color(red):Winners [[NMG AWARD for best group 18 and under|22. Oct 17th - Portland Arms - NMG AWARDS NIGHT]]!@@'' <br> |
!Other news
|bgcolor(lightgrey): Gigs are on hold for exams, but we've got a feast of festivals ahead - announcements any day |
!What's new in the website?
|bgcolor(lightgrey): <br><<recentChanges 60>> <br> Select from the drop down menu then click 'Go to' or 'Preview'... |
!Future
|bgcolor(lightgrey): Check our <<tag [[Gigs]]>> section for forthcoming performances, or indeed ones you have missed. There's a load more stuff that hasn't yet been written for this website, too; by about 2017 this will be an epic site, but until then, this is what we've got... |
!Talk to us!
|bgcolor(lightgrey): Make comments directly on any [[Songs]] that we have streamed from SoundCloud<br> or chat on our [[Facebook page|https://www.facebook.com/mortaltides]] <br>or follow us on [[Twitter|https://twitter.com/mortaltides]], where we are <br>''{{{@mortaltides}}}''<br> |
!Other places
|bgcolor(lightgrey): See our [[Links]] <br> and meanwhile please check in at our Facebook page [[here|https://www.facebook.com/mortaltides]], and maybe even like it? |
<html><a href=http://www.bbc.co.uk/music/introducing/?uploadedbadge title="Head to bbc.co.uk/introducing, upload your music and you could have your tracks broadcast on BBC Radio"><img src="http://www.bbc.co.uk/music/introducing/images/badges/uploadedbadge.png" border="0" alt="Head to bbc.co.uk/introducing, upload your music and you could have your tracks broadcast on BBC Radio" /></a></html><html><a href=http://www.bbc.co.uk/music/introducing/?broadcastbadge title="Head to bbc.co.uk/introducing, upload your music and you could have your tracks broadcast on BBC Radio"><img src="http://www.bbc.co.uk/music/introducing/images/badges/broadcastbadge.png" border="0" alt="Head to bbc.co.uk/introducing, upload your music and you could have your tracks broadcast on BBC Radio" /></a></html>
!About the website
|bgcolor(lightgrey): This website is from supercool new cranny in the webiverse, "TiddlySpace" <br>- check it out for yourself. Free wiki websites. |
We are a four piece band, two brothers [[Noah|Noah Bevington]] and [[Jed|Jed Bevington]], and friends [[George|George Brignal]] and [[Fergus|Fergus Quill]] - playing acoustic and electric [[folk]]; bluesey, rootsy, moody, moshey, jazz-influenced, etc etc. We all like improvising, and stuff happens.
We write all our own material, apart from a few folk standards that we cover.
See [[Reviews and Quotes]] for the critics' views
Currently signed to [[Wild Sound Recordings]] under the wise leadership of English folk legend ''[[Polly Paulusma|http://pollypaulusma.com/wp/]]'' - to whom we owe a river of gratitude - not least for her forbearance and patience with our organisational ...ahem... frailties.
Influences include Dylan, Dry the River, Velvet Underground, Bon Iver, Thom Yorke, Broken Family Band, Alt J, Mingus, ...etc
.
!Living
Around the lightly wooded Saffron Walden area, Essex, UK,
!Recording
In the Bothy in Chesterford and Ananda Recordings. Anyone offering to sponsor more real studio time?
!studying :{
Until recently we were all at [[SWCHS|http://swchs.net]] which has a lovely new auditorium space, and we wait (im)patiently for an invitation to perform there... Now Fergus is at the Jazz conservatoire in Leeds, Jed's started at Hill's Road 6th form college in Cambridge, and Noah and George remain at SWCHS.
![[Noah Bevington]]
Guitars, lead vocals
![[George Brignal]]
Drums
![[Jed Bevington]]
Fiddle, keyboards, vocals, percussion
![[Fergus Quill]]
Bass and double bass.
![[Whole Band pics|The Band]]
We frequently ask ourselves this question.
Answers to our twitter account, please: ''[[@mortaltides|https://twitter.com/mortaltides]]'' or catch us on ''[[Facebook|http://facebook.com/mortaltides]]''
.
Thrilled to be signed to this wonderful folk acoustic roots label, run by the wonderful Polly Paulusma!
See their website [[here|http://www.wildsoundrecordings.com]]
<html><div align="center"><iframe src="http://www.wildsoundrecordings.com" frameborder="0" width="100%" height="600"></iframe></div></html>
A new song, first outing here at the lovely Cambridge Junction 2 stage on March 4th 2015:
<html><iframe width="640" height="480" src="https://www.youtube.com/embed/Po9UMAvtP_o?rel=0" frameborder="0" allowfullscreen></iframe></html>
Song © [[Noah Bevington]]
Our videos are a bit scattered around the ~YouTubiverse at present, but we are trying to gather them into one place... with difficulty it would seem...
!From the Woods (our old) ~YouTube channel:
https://youtube.com/channel/UCOx5LQ18jxrtmaSKGPSY8kQ
!Other sites where our stuff can be found:
https://youtube.com/channel/UCbopmH9H1MI4euzWdv13sDA - new stuff
https://youtube.com/user/dickon1 - older stuff
/**
* @license AngularJS v1.0.8
* (c) 2010-2012 Google, Inc. http://angularjs.org
* License: MIT
*/
(function(window, document, undefined) {
'use strict';
////////////////////////////////////
/**
* @ngdoc function
* @name angular.lowercase
* @function
*
* @description Converts the specified string to lowercase.
* @param {string} string String to be converted to lowercase.
* @returns {string} Lowercased string.
*/
var lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};
/**
* @ngdoc function
* @name angular.uppercase
* @function
*
* @description Converts the specified string to uppercase.
* @param {string} string String to be converted to uppercase.
* @returns {string} Uppercased string.
*/
var uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};
var manualLowercase = function(s) {
return isString(s)
? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
: s;
};
var manualUppercase = function(s) {
return isString(s)
? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
: s;
};
// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
// with correct but slower alternatives.
if ('i' !== 'I'.toLowerCase()) {
lowercase = manualLowercase;
uppercase = manualUppercase;
}
var /** holds major version number for IE or NaN for real browsers */
msie = int((/msie (\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]),
jqLite, // delay binding since jQuery could be loaded after us.
jQuery, // delay binding
slice = [].slice,
push = [].push,
toString = Object.prototype.toString,
/** @name angular */
angular = window.angular || (window.angular = {}),
angularModule,
nodeName_,
uid = ['0', '0', '0'];
/**
* @private
* @param {*} obj
* @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, ...)
*/
function isArrayLike(obj) {
if (!obj || (typeof obj.length !== 'number')) return false;
// We have on object which has length property. Should we treat it as array?
if (typeof obj.hasOwnProperty != 'function' &&
typeof obj.constructor != 'function') {
// This is here for IE8: it is a bogus object treat it as array;
return true;
} else {
return obj instanceof JQLite || // JQLite
(jQuery && obj instanceof jQuery) || // jQuery
toString.call(obj) !== '[object Object]' || // some browser native object
typeof obj.callee === 'function'; // arguments (on IE8 looks like regular obj)
}
}
/**
* @ngdoc function
* @name angular.forEach
* @function
*
* @description
* Invokes the `iterator` function once for each item in `obj` collection, which can be either an
* object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`
* is the value of an object property or an array element and `key` is the object property key or
* array element index. Specifying a `context` for the function is optional.
*
* Note: this function was previously known as `angular.foreach`.
*
<pre>
var values = {name: 'misko', gender: 'male'};
var log = [];
angular.forEach(values, function(value, key){
this.push(key + ': ' + value);
}, log);
expect(log).toEqual(['name: misko', 'gender:male']);
</pre>
*
* @param {Object|Array} obj Object to iterate over.
* @param {Function} iterator Iterator function.
* @param {Object=} context Object to become context (`this`) for the iterator function.
* @returns {Object|Array} Reference to `obj`.
*/
function forEach(obj, iterator, context) {
var key;
if (obj) {
if (isFunction(obj)){
for (key in obj) {
if (key != 'prototype' && key != 'length' && key != 'name' && obj.hasOwnProperty(key)) {
iterator.call(context, obj[key], key);
}
}
} else if (obj.forEach && obj.forEach !== forEach) {
obj.forEach(iterator, context);
} else if (isArrayLike(obj)) {
for (key = 0; key < obj.length; key++)
iterator.call(context, obj[key], key);
} else {
for (key in obj) {
if (obj.hasOwnProperty(key)) {
iterator.call(context, obj[key], key);
}
}
}
}
return obj;
}
function sortedKeys(obj) {
var keys = [];
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
keys.push(key);
}
}
return keys.sort();
}
function forEachSorted(obj, iterator, context) {
var keys = sortedKeys(obj);
for ( var i = 0; i < keys.length; i++) {
iterator.call(context, obj[keys[i]], keys[i]);
}
return keys;
}
/**
* when using forEach the params are value, key, but it is often useful to have key, value.
* @param {function(string, *)} iteratorFn
* @returns {function(*, string)}
*/
function reverseParams(iteratorFn) {
return function(value, key) { iteratorFn(key, value) };
}
/**
* A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric
* characters such as '012ABC'. The reason why we are not using simply a number counter is that
* the number string gets longer over time, and it can also overflow, where as the nextId
* will grow much slower, it is a string, and it will never overflow.
*
* @returns an unique alpha-numeric string
*/
function nextUid() {
var index = uid.length;
var digit;
while(index) {
index--;
digit = uid[index].charCodeAt(0);
if (digit == 57 /*'9'*/) {
uid[index] = 'A';
return uid.join('');
}
if (digit == 90 /*'Z'*/) {
uid[index] = '0';
} else {
uid[index] = String.fromCharCode(digit + 1);
return uid.join('');
}
}
uid.unshift('0');
return uid.join('');
}
/**
* Set or clear the hashkey for an object.
* @param obj object
* @param h the hashkey (!truthy to delete the hashkey)
*/
function setHashKey(obj, h) {
if (h) {
obj.$$hashKey = h;
}
else {
delete obj.$$hashKey;
}
}
/**
* @ngdoc function
* @name angular.extend
* @function
*
* @description
* Extends the destination object `dst` by copying all of the properties from the `src` object(s)
* to `dst`. You can specify multiple `src` objects.
*
* @param {Object} dst Destination object.
* @param {...Object} src Source object(s).
* @returns {Object} Reference to `dst`.
*/
function extend(dst) {
var h = dst.$$hashKey;
forEach(arguments, function(obj){
if (obj !== dst) {
forEach(obj, function(value, key){
dst[key] = value;
});
}
});
setHashKey(dst,h);
return dst;
}
function int(str) {
return parseInt(str, 10);
}
function inherit(parent, extra) {
return extend(new (extend(function() {}, {prototype:parent}))(), extra);
}
/**
* @ngdoc function
* @name angular.noop
* @function
*
* @description
* A function that performs no operations. This function can be useful when writing code in the
* functional style.
<pre>
function foo(callback) {
var result = calculateResult();
(callback || angular.noop)(result);
}
</pre>
*/
function noop() {}
noop.$inject = [];
/**
* @ngdoc function
* @name angular.identity
* @function
*
* @description
* A function that returns its first argument. This function is useful when writing code in the
* functional style.
*
<pre>
function transformer(transformationFn, value) {
return (transformationFn || angular.identity)(value);
};
</pre>
*/
function identity($) {return $;}
identity.$inject = [];
function valueFn(value) {return function() {return value;};}
/**
* @ngdoc function
* @name angular.isUndefined
* @function
*
* @description
* Determines if a reference is undefined.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is undefined.
*/
function isUndefined(value){return typeof value == 'undefined';}
/**
* @ngdoc function
* @name angular.isDefined
* @function
*
* @description
* Determines if a reference is defined.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is defined.
*/
function isDefined(value){return typeof value != 'undefined';}
/**
* @ngdoc function
* @name angular.isObject
* @function
*
* @description
* Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
* considered to be objects.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is an `Object` but not `null`.
*/
function isObject(value){return value != null && typeof value == 'object';}
/**
* @ngdoc function
* @name angular.isString
* @function
*
* @description
* Determines if a reference is a `String`.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `String`.
*/
function isString(value){return typeof value == 'string';}
/**
* @ngdoc function
* @name angular.isNumber
* @function
*
* @description
* Determines if a reference is a `Number`.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `Number`.
*/
function isNumber(value){return typeof value == 'number';}
/**
* @ngdoc function
* @name angular.isDate
* @function
*
* @description
* Determines if a value is a date.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `Date`.
*/
function isDate(value){
return toString.apply(value) == '[object Date]';
}
/**
* @ngdoc function
* @name angular.isArray
* @function
*
* @description
* Determines if a reference is an `Array`.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is an `Array`.
*/
function isArray(value) {
return toString.apply(value) == '[object Array]';
}
/**
* @ngdoc function
* @name angular.isFunction
* @function
*
* @description
* Determines if a reference is a `Function`.
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `Function`.
*/
function isFunction(value){return typeof value == 'function';}
/**
* Determines if a value is a regular expression object.
*
* @private
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a `RegExp`.
*/
function isRegExp(value) {
return toString.apply(value) == '[object RegExp]';
}
/**
* Checks if `obj` is a window object.
*
* @private
* @param {*} obj Object to check
* @returns {boolean} True if `obj` is a window obj.
*/
function isWindow(obj) {
return obj && obj.document && obj.location && obj.alert && obj.setInterval;
}
function isScope(obj) {
return obj && obj.$evalAsync && obj.$watch;
}
function isFile(obj) {
return toString.apply(obj) === '[object File]';
}
function isBoolean(value) {
return typeof value == 'boolean';
}
var trim = (function() {
// native trim is way faster: http://jsperf.com/angular-trim-test
// but IE doesn't have it... :-(
// TODO: we should move this into IE/ES5 polyfill
if (!String.prototype.trim) {
return function(value) {
return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value;
};
}
return function(value) {
return isString(value) ? value.trim() : value;
};
})();
/**
* @ngdoc function
* @name angular.isElement
* @function
*
* @description
* Determines if a reference is a DOM element (or wrapped jQuery element).
*
* @param {*} value Reference to check.
* @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
*/
function isElement(node) {
return node &&
(node.nodeName // we are a direct element
|| (node.bind && node.find)); // we have a bind and find method part of jQuery API
}
/**
* @param str 'key1,key2,...'
* @returns {object} in the form of {key1:true, key2:true, ...}
*/
function makeMap(str){
var obj = {}, items = str.split(","), i;
for ( i = 0; i < items.length; i++ )
obj[ items[i] ] = true;
return obj;
}
if (msie < 9) {
nodeName_ = function(element) {
element = element.nodeName ? element : element[0];
return (element.scopeName && element.scopeName != 'HTML')
? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;
};
} else {
nodeName_ = function(element) {
return element.nodeName ? element.nodeName : element[0].nodeName;
};
}
function map(obj, iterator, context) {
var results = [];
forEach(obj, function(value, index, list) {
results.push(iterator.call(context, value, index, list));
});
return results;
}
/**
* @description
* Determines the number of elements in an array, the number of properties an object has, or
* the length of a string.
*
* Note: This function is used to augment the Object type in Angular expressions. See
* {@link angular.Object} for more information about Angular arrays.
*
* @param {Object|Array|string} obj Object, array, or string to inspect.
* @param {boolean} [ownPropsOnly=false] Count only "own" properties in an object
* @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.
*/
function size(obj, ownPropsOnly) {
var size = 0, key;
if (isArray(obj) || isString(obj)) {
return obj.length;
} else if (isObject(obj)){
for (key in obj)
if (!ownPropsOnly || obj.hasOwnProperty(key))
size++;
}
return size;
}
function includes(array, obj) {
return indexOf(array, obj) != -1;
}
function indexOf(array, obj) {
if (array.indexOf) return array.indexOf(obj);
for ( var i = 0; i < array.length; i++) {
if (obj === array[i]) return i;
}
return -1;
}
function arrayRemove(array, value) {
var index = indexOf(array, value);
if (index >=0)
array.splice(index, 1);
return value;
}
function isLeafNode (node) {
if (node) {
switch (node.nodeName) {
case "OPTION":
case "PRE":
case "TITLE":
return true;
}
}
return false;
}
/**
* @ngdoc function
* @name angular.copy
* @function
*
* @description
* Creates a deep copy of `source`, which should be an object or an array.
*
* * If no destination is supplied, a copy of the object or array is created.
* * If a destination is provided, all of its elements (for array) or properties (for objects)
* are deleted and then all elements/properties from the source are copied to it.
* * If `source` is not an object or array, `source` is returned.
*
* Note: this function is used to augment the Object type in Angular expressions. See
* {@link ng.$filter} for more information about Angular arrays.
*
* @param {*} source The source that will be used to make a copy.
* Can be any type, including primitives, `null`, and `undefined`.
* @param {(Object|Array)=} destination Destination into which the source is copied. If
* provided, must be of the same type as `source`.
* @returns {*} The copy or updated `destination`, if `destination` was specified.
*/
function copy(source, destination){
if (isWindow(source) || isScope(source)) throw Error("Can't copy Window or Scope");
if (!destination) {
destination = source;
if (source) {
if (isArray(source)) {
destination = copy(source, []);
} else if (isDate(source)) {
destination = new Date(source.getTime());
} else if (isRegExp(source)) {
destination = new RegExp(source.source);
} else if (isObject(source)) {
destination = copy(source, {});
}
}
} else {
if (source === destination) throw Error("Can't copy equivalent objects or arrays");
if (isArray(source)) {
destination.length = 0;
for ( var i = 0; i < source.length; i++) {
destination.push(copy(source[i]));
}
} else {
var h = destination.$$hashKey;
forEach(destination, function(value, key){
delete destination[key];
});
for ( var key in source) {
destination[key] = copy(source[key]);
}
setHashKey(destination,h);
}
}
return destination;
}
/**
* Create a shallow copy of an object
*/
function shallowCopy(src, dst) {
dst = dst || {};
for(var key in src) {
if (src.hasOwnProperty(key) && key.substr(0, 2) !== '$$') {
dst[key] = src[key];
}
}
return dst;
}
/**
* @ngdoc function
* @name angular.equals
* @function
*
* @description
* Determines if two objects or two values are equivalent. Supports value types, regular expressions, arrays and
* objects.
*
* Two objects or values are considered equivalent if at least one of the following is true:
*
* * Both objects or values pass `===` comparison.
* * Both objects or values are of the same type and all of their properties pass `===` comparison.
* * Both values are NaN. (In JavasScript, NaN == NaN => false. But we consider two NaN as equal)
* * Both values represent the same regular expression (In JavasScript,
* /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
* representation matches).
*
* During a property comparision, properties of `function` type and properties with names
* that begin with `$` are ignored.
*
* Scope and DOMWindow objects are being compared only by identify (`===`).
*
* @param {*} o1 Object or value to compare.
* @param {*} o2 Object or value to compare.
* @returns {boolean} True if arguments are equal.
*/
function equals(o1, o2) {
if (o1 === o2) return true;
if (o1 === null || o2 === null) return false;
if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
if (t1 == t2) {
if (t1 == 'object') {
if (isArray(o1)) {
if (!isArray(o2)) return false;
if ((length = o1.length) == o2.length) {
for(key=0; key<length; key++) {
if (!equals(o1[key], o2[key])) return false;
}
return true;
}
} else if (isDate(o1)) {
return isDate(o2) && o1.getTime() == o2.getTime();
} else if (isRegExp(o1) && isRegExp(o2)) {
return o1.toString() == o2.toString();
} else {
if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;
keySet = {};
for(key in o1) {
if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
if (!equals(o1[key], o2[key])) return false;
keySet[key] = true;
}
for(key in o2) {
if (!keySet[key] &&
key.charAt(0) !== '$' &&
o2[key] !== undefined &&
!isFunction(o2[key])) return false;
}
return true;
}
}
}
return false;
}
function concat(array1, array2, index) {
return array1.concat(slice.call(array2, index));
}
function sliceArgs(args, startIndex) {
return slice.call(args, startIndex || 0);
}
/**
* @ngdoc function
* @name angular.bind
* @function
*
* @description
* Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
* `fn`). You can supply optional `args` that are prebound to the function. This feature is also
* known as [function currying](http://en.wikipedia.org/wiki/Currying).
*
* @param {Object} self Context which `fn` should be evaluated in.
* @param {function()} fn Function to be bound.
* @param {...*} args Optional arguments to be prebound to the `fn` function call.
* @returns {function()} Function that wraps the `fn` with all the specified bindings.
*/
function bind(self, fn) {
var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
if (isFunction(fn) && !(fn instanceof RegExp)) {
return curryArgs.length
? function() {
return arguments.length
? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))
: fn.apply(self, curryArgs);
}
: function() {
return arguments.length
? fn.apply(self, arguments)
: fn.call(self);
};
} else {
// in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
return fn;
}
}
function toJsonReplacer(key, value) {
var val = value;
if (/^\$+/.test(key)) {
val = undefined;
} else if (isWindow(value)) {
val = '$WINDOW';
} else if (value && document === value) {
val = '$DOCUMENT';
} else if (isScope(value)) {
val = '$SCOPE';
}
return val;
}
/**
* @ngdoc function
* @name angular.toJson
* @function
*
* @description
* Serializes input into a JSON-formatted string. Properties with leading $ characters will be
* stripped since angular uses this notation internally.
*
* @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
* @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.
* @returns {string|undefined} Jsonified string representing `obj`.
*/
function toJson(obj, pretty) {
if (typeof obj === 'undefined') return undefined;
return JSON.stringify(obj, toJsonReplacer, pretty ? ' ' : null);
}
/**
* @ngdoc function
* @name angular.fromJson
* @function
*
* @description
* Deserializes a JSON string.
*
* @param {string} json JSON string to deserialize.
* @returns {Object|Array|Date|string|number} Deserialized thingy.
*/
function fromJson(json) {
return isString(json)
? JSON.parse(json)
: json;
}
function toBoolean(value) {
if (value && value.length !== 0) {
var v = lowercase("" + value);
value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');
} else {
value = false;
}
return value;
}
/**
* @returns {string} Returns the string representation of the element.
*/
function startingTag(element) {
element = jqLite(element).clone();
try {
// turns out IE does not let you set .html() on elements which
// are not allowed to have children. So we just ignore it.
element.html('');
} catch(e) {}
// As Per DOM Standards
var TEXT_NODE = 3;
var elemHtml = jqLite('<div>').append(element).html();
try {
return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :
elemHtml.
match(/^(<[^>]+>)/)[1].
replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
} catch(e) {
return lowercase(elemHtml);
}
}
/////////////////////////////////////////////////
/**
* Tries to decode the URI component without throwing an exception.
*
* @private
* @param str value potential URI component to check.
* @returns {boolean} True if `value` can be decoded
* with the decodeURIComponent function.
*/
function tryDecodeURIComponent(value) {
try {
return decodeURIComponent(value);
} catch(e) {
// Ignore any invalid uri component
}
}
/**
* Parses an escaped url query string into key-value pairs.
* @returns Object.<(string|boolean)>
*/
function parseKeyValue(/**string*/keyValue) {
var obj = {}, key_value, key;
forEach((keyValue || "").split('&'), function(keyValue){
if ( keyValue ) {
key_value = keyValue.split('=');
key = tryDecodeURIComponent(key_value[0]);
if ( isDefined(key) ) {
obj[key] = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;
}
}
});
return obj;
}
function toKeyValue(obj) {
var parts = [];
forEach(obj, function(value, key) {
parts.push(encodeUriQuery(key, true) + (value === true ? '' : '=' + encodeUriQuery(value, true)));
});
return parts.length ? parts.join('&') : '';
}
/**
* We need our custom method because encodeURIComponent is too agressive and doesn't follow
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
* segments:
* segment = *pchar
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
* pct-encoded = "%" HEXDIG HEXDIG
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
* / "*" / "+" / "," / ";" / "="
*/
function encodeUriSegment(val) {
return encodeUriQuery(val, true).
replace(/%26/gi, '&').
replace(/%3D/gi, '=').
replace(/%2B/gi, '+');
}
/**
* This method is intended for encoding *key* or *value* parts of query component. We need a custom
* method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be
* encoded per http://tools.ietf.org/html/rfc3986:
* query = *( pchar / "/" / "?" )
* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* pct-encoded = "%" HEXDIG HEXDIG
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
* / "*" / "+" / "," / ";" / "="
*/
function encodeUriQuery(val, pctEncodeSpaces) {
return encodeURIComponent(val).
replace(/%40/gi, '@').
replace(/%3A/gi, ':').
replace(/%24/g, '$').
replace(/%2C/gi, ',').
replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
}
/**
* @ngdoc directive
* @name ng.directive:ngApp
*
* @element ANY
* @param {angular.Module} ngApp an optional application
* {@link angular.module module} name to load.
*
* @description
*
* Use this directive to auto-bootstrap an application. Only
* one ngApp directive can be used per HTML document. The directive
* designates the root of the application and is typically placed
* at the root of the page.
*
* The first ngApp found in the document will be auto-bootstrapped. To use multiple applications in an
* HTML document you must manually bootstrap them using {@link angular.bootstrap}.
* Applications cannot be nested.
*
* In the example below if the `ngApp` directive would not be placed
* on the `html` element then the document would not be compiled
* and the `{{ 1+2 }}` would not be resolved to `3`.
*
* `ngApp` is the easiest way to bootstrap an application.
*
<doc:example>
<doc:source>
I can add: 1 + 2 = {{ 1+2 }}
</doc:source>
</doc:example>
*
*/
function angularInit(element, bootstrap) {
var elements = [element],
appElement,
module,
names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],
NG_APP_CLASS_REGEXP = /\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;
function append(element) {
element && elements.push(element);
}
forEach(names, function(name) {
names[name] = true;
append(document.getElementById(name));
name = name.replace(':', '\\:');
if (element.querySelectorAll) {
forEach(element.querySelectorAll('.' + name), append);
forEach(element.querySelectorAll('.' + name + '\\:'), append);
forEach(element.querySelectorAll('[' + name + ']'), append);
}
});
forEach(elements, function(element) {
if (!appElement) {
var className = ' ' + element.className + ' ';
var match = NG_APP_CLASS_REGEXP.exec(className);
if (match) {
appElement = element;
module = (match[2] || '').replace(/\s+/g, ',');
} else {
forEach(element.attributes, function(attr) {
if (!appElement && names[attr.name]) {
appElement = element;
module = attr.value;
}
});
}
}
});
if (appElement) {
bootstrap(appElement, module ? [module] : []);
}
}
/**
* @ngdoc function
* @name angular.bootstrap
* @description
* Use this function to manually start up angular application.
*
* See: {@link guide/bootstrap Bootstrap}
*
* Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.
* They must use {@link api/ng.directive:ngApp ngApp}.
*
* @param {Element} element DOM element which is the root of angular application.
* @param {Array<String|Function>=} modules an array of module declarations. See: {@link angular.module modules}
* @returns {AUTO.$injector} Returns the newly created injector for this app.
*/
function bootstrap(element, modules) {
var doBootstrap = function() {
element = jqLite(element);
modules = modules || [];
modules.unshift(['$provide', function($provide) {
$provide.value('$rootElement', element);
}]);
modules.unshift('ng');
var injector = createInjector(modules);
injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
function(scope, element, compile, injector) {
scope.$apply(function() {
element.data('$injector', injector);
compile(element)(scope);
});
}]
);
return injector;
};
var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
return doBootstrap();
}
window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
angular.resumeBootstrap = function(extraModules) {
forEach(extraModules, function(module) {
modules.push(module);
});
doBootstrap();
};
}
var SNAKE_CASE_REGEXP = /[A-Z]/g;
function snake_case(name, separator){
separator = separator || '_';
return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
return (pos ? separator : '') + letter.toLowerCase();
});
}
function bindJQuery() {
// bind to jQuery if present;
jQuery = window.jQuery;
// reset to jQuery or default to us.
if (jQuery) {
jqLite = jQuery;
extend(jQuery.fn, {
scope: JQLitePrototype.scope,
controller: JQLitePrototype.controller,
injector: JQLitePrototype.injector,
inheritedData: JQLitePrototype.inheritedData
});
// Method signature: JQLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)
JQLitePatchJQueryRemove('remove', true, true, false);
JQLitePatchJQueryRemove('empty', false, false, false);
JQLitePatchJQueryRemove('html', false, false, true);
} else {
jqLite = JQLite;
}
angular.element = jqLite;
}
/**
* throw error if the argument is falsy.
*/
function assertArg(arg, name, reason) {
if (!arg) {
throw new Error("Argument '" + (name || '?') + "' is " + (reason || "required"));
}
return arg;
}
function assertArgFn(arg, name, acceptArrayAnnotation) {
if (acceptArrayAnnotation && isArray(arg)) {
arg = arg[arg.length - 1];
}
assertArg(isFunction(arg), name, 'not a function, got ' +
(arg && typeof arg == 'object' ? arg.constructor.name || 'Object' : typeof arg));
return arg;
}
/**
* Return the value accessible from the object by path. Any undefined traversals are ignored
* @param {Object} obj starting object
* @param {string} path path to traverse
* @param {boolean=true} bindFnToScope
* @returns value as accessible by path
*/
//TODO(misko): this function needs to be removed
function getter(obj, path, bindFnToScope) {
if (!path) return obj;
var keys = path.split('.');
var key;
var lastInstance = obj;
var len = keys.length;
for (var i = 0; i < len; i++) {
key = keys[i];
if (obj) {
obj = (lastInstance = obj)[key];
}
}
if (!bindFnToScope && isFunction(obj)) {
return bind(lastInstance, obj);
}
return obj;
}
/**
* @ngdoc interface
* @name angular.Module
* @description
*
* Interface for configuring angular {@link angular.module modules}.
*/
function setupModuleLoader(window) {
function ensure(obj, name, factory) {
return obj[name] || (obj[name] = factory());
}
return ensure(ensure(window, 'angular', Object), 'module', function() {
/** @type {Object.<string, angular.Module>} */
var modules = {};
/**
* @ngdoc function
* @name angular.module
* @description
*
* The `angular.module` is a global place for creating and registering Angular modules. All
* modules (angular core or 3rd party) that should be available to an application must be
* registered using this mechanism.
*
*
* # Module
*
* A module is a collection of services, directives, filters, and configuration information.
* `angular.module` is used to configure the {@link AUTO.$injector $injector}.
*
* <pre>
* // Create a new module
* var myModule = angular.module('myModule', []);
*
* // register a new service
* myModule.value('appName', 'MyCoolApp');
*
* // configure existing services inside initialization blocks.
* myModule.config(function($locationProvider) {
* // Configure existing providers
* $locationProvider.hashPrefix('!');
* });
* </pre>
*
* Then you can create an injector and load your modules like this:
*
* <pre>
* var injector = angular.injector(['ng', 'MyModule'])
* </pre>
*
* However it's more likely that you'll just use
* {@link ng.directive:ngApp ngApp} or
* {@link angular.bootstrap} to simplify this process for you.
*
* @param {!string} name The name of the module to create or retrieve.
* @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
* the module is being retrieved for further configuration.
* @param {Function} configFn Optional configuration function for the module. Same as
* {@link angular.Module#config Module#config()}.
* @returns {module} new module with the {@link angular.Module} api.
*/
return function module(name, requires, configFn) {
if (requires && modules.hasOwnProperty(name)) {
modules[name] = null;
}
return ensure(modules, name, function() {
if (!requires) {
throw Error('No module: ' + name);
}
/** @type {!Array.<Array.<*>>} */
var invokeQueue = [];
/** @type {!Array.<Function>} */
var runBlocks = [];
var config = invokeLater('$injector', 'invoke');
/** @type {angular.Module} */
var moduleInstance = {
// Private state
_invokeQueue: invokeQueue,
_runBlocks: runBlocks,
/**
* @ngdoc property
* @name angular.Module#requires
* @propertyOf angular.Module
* @returns {Array.<string>} List of module names which must be loaded before this module.
* @description
* Holds the list of modules which the injector will load before the current module is loaded.
*/
requires: requires,
/**
* @ngdoc property
* @name angular.Module#name
* @propertyOf angular.Module
* @returns {string} Name of the module.
* @description
*/
name: name,
/**
* @ngdoc method
* @name angular.Module#provider
* @methodOf angular.Module
* @param {string} name service name
* @param {Function} providerType Construction function for creating new instance of the service.
* @description
* See {@link AUTO.$provide#provider $provide.provider()}.
*/
provider: invokeLater('$provide', 'provider'),
/**
* @ngdoc method
* @name angular.Module#factory
* @methodOf angular.Module
* @param {string} name service name
* @param {Function} providerFunction Function for creating new instance of the service.
* @description
* See {@link AUTO.$provide#factory $provide.factory()}.
*/
factory: invokeLater('$provide', 'factory'),
/**
* @ngdoc method
* @name angular.Module#service
* @methodOf angular.Module
* @param {string} name service name
* @param {Function} constructor A constructor function that will be instantiated.
* @description
* See {@link AUTO.$provide#service $provide.service()}.
*/
service: invokeLater('$provide', 'service'),
/**
* @ngdoc method
* @name angular.Module#value
* @methodOf angular.Module
* @param {string} name service name
* @param {*} object Service instance object.
* @description
* See {@link AUTO.$provide#value $provide.value()}.
*/
value: invokeLater('$provide', 'value'),
/**
* @ngdoc method
* @name angular.Module#constant
* @methodOf angular.Module
* @param {string} name constant name
* @param {*} object Constant value.
* @description
* Because the constant are fixed, they get applied before other provide methods.
* See {@link AUTO.$provide#constant $provide.constant()}.
*/
constant: invokeLater('$provide', 'constant', 'unshift'),
/**
* @ngdoc method
* @name angular.Module#filter
* @methodOf angular.Module
* @param {string} name Filter name.
* @param {Function} filterFactory Factory function for creating new instance of filter.
* @description
* See {@link ng.$filterProvider#register $filterProvider.register()}.
*/
filter: invokeLater('$filterProvider', 'register'),
/**
* @ngdoc method
* @name angular.Module#controller
* @methodOf angular.Module
* @param {string} name Controller name.
* @param {Function} constructor Controller constructor function.
* @description
* See {@link ng.$controllerProvider#register $controllerProvider.register()}.
*/
controller: invokeLater('$controllerProvider', 'register'),
/**
* @ngdoc method
* @name angular.Module#directive
* @methodOf angular.Module
* @param {string} name directive name
* @param {Function} directiveFactory Factory function for creating new instance of
* directives.
* @description
* See {@link ng.$compileProvider#directive $compileProvider.directive()}.
*/
directive: invokeLater('$compileProvider', 'directive'),
/**
* @ngdoc method
* @name angular.Module#config
* @methodOf angular.Module
* @param {Function} configFn Execute this function on module load. Useful for service
* configuration.
* @description
* Use this method to register work which needs to be performed on module loading.
*/
config: config,
/**
* @ngdoc method
* @name angular.Module#run
* @methodOf angular.Module
* @param {Function} initializationFn Execute this function after injector creation.
* Useful for application initialization.
* @description
* Use this method to register work which should be performed when the injector is done
* loading all modules.
*/
run: function(block) {
runBlocks.push(block);
return this;
}
};
if (configFn) {
config(configFn);
}
return moduleInstance;
/**
* @param {string} provider
* @param {string} method
* @param {String=} insertMethod
* @returns {angular.Module}
*/
function invokeLater(provider, method, insertMethod) {
return function() {
invokeQueue[insertMethod || 'push']([provider, method, arguments]);
return moduleInstance;
}
}
});
};
});
}
/**
* @ngdoc property
* @name angular.version
* @description
* An object that contains information about the current AngularJS version. This object has the
* following properties:
*
* - `full` – `{string}` – Full version string, such as "0.9.18".
* - `major` – `{number}` – Major version number, such as "0".
* - `minor` – `{number}` – Minor version number, such as "9".
* - `dot` – `{number}` – Dot version number, such as "18".
* - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
*/
var version = {
full: '1.0.8', // all of these placeholder strings will be replaced by grunt's
major: 1, // package task
minor: 0,
dot: 8,
codeName: 'bubble-burst'
};
function publishExternalAPI(angular){
extend(angular, {
'bootstrap': bootstrap,
'copy': copy,
'extend': extend,
'equals': equals,
'element': jqLite,
'forEach': forEach,
'injector': createInjector,
'noop':noop,
'bind':bind,
'toJson': toJson,
'fromJson': fromJson,
'identity':identity,
'isUndefined': isUndefined,
'isDefined': isDefined,
'isString': isString,
'isFunction': isFunction,
'isObject': isObject,
'isNumber': isNumber,
'isElement': isElement,
'isArray': isArray,
'version': version,
'isDate': isDate,
'lowercase': lowercase,
'uppercase': uppercase,
'callbacks': {counter: 0}
});
angularModule = setupModuleLoader(window);
try {
angularModule('ngLocale');
} catch (e) {
angularModule('ngLocale', []).provider('$locale', $LocaleProvider);
}
angularModule('ng', ['ngLocale'], ['$provide',
function ngModule($provide) {
$provide.provider('$compile', $CompileProvider).
directive({
a: htmlAnchorDirective,
input: inputDirective,
textarea: inputDirective,
form: formDirective,
script: scriptDirective,
select: selectDirective,
style: styleDirective,
option: optionDirective,
ngBind: ngBindDirective,
ngBindHtmlUnsafe: ngBindHtmlUnsafeDirective,
ngBindTemplate: ngBindTemplateDirective,
ngClass: ngClassDirective,
ngClassEven: ngClassEvenDirective,
ngClassOdd: ngClassOddDirective,
ngCsp: ngCspDirective,
ngCloak: ngCloakDirective,
ngController: ngControllerDirective,
ngForm: ngFormDirective,
ngHide: ngHideDirective,
ngInclude: ngIncludeDirective,
ngInit: ngInitDirective,
ngNonBindable: ngNonBindableDirective,
ngPluralize: ngPluralizeDirective,
ngRepeat: ngRepeatDirective,
ngShow: ngShowDirective,
ngStyle: ngStyleDirective,
ngSwitch: ngSwitchDirective,
ngSwitchWhen: ngSwitchWhenDirective,
ngSwitchDefault: ngSwitchDefaultDirective,
ngOptions: ngOptionsDirective,
ngView: ngViewDirective,
ngTransclude: ngTranscludeDirective,
ngModel: ngModelDirective,
ngList: ngListDirective,
ngChange: ngChangeDirective,
required: requiredDirective,
ngRequired: requiredDirective,
ngValue: ngValueDirective
}).
directive(ngAttributeAliasDirectives).
directive(ngEventDirectives);
$provide.provider({
$anchorScroll: $AnchorScrollProvider,
$browser: $BrowserProvider,
$cacheFactory: $CacheFactoryProvider,
$controller: $ControllerProvider,
$document: $DocumentProvider,
$exceptionHandler: $ExceptionHandlerProvider,
$filter: $FilterProvider,
$interpolate: $InterpolateProvider,
$http: $HttpProvider,
$httpBackend: $HttpBackendProvider,
$location: $LocationProvider,
$log: $LogProvider,
$parse: $ParseProvider,
$route: $RouteProvider,
$routeParams: $RouteParamsProvider,
$rootScope: $RootScopeProvider,
$q: $QProvider,
$sniffer: $SnifferProvider,
$templateCache: $TemplateCacheProvider,
$timeout: $TimeoutProvider,
$window: $WindowProvider
});
}
]);
}
//////////////////////////////////
//JQLite
//////////////////////////////////
/**
* @ngdoc function
* @name angular.element
* @function
*
* @description
* Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
* `angular.element` can be either an alias for [jQuery](http://api.jquery.com/jQuery/) function, if
* jQuery is available, or a function that wraps the element or string in Angular's jQuery lite
* implementation (commonly referred to as jqLite).
*
* Real jQuery always takes precedence over jqLite, provided it was loaded before `DOMContentLoaded`
* event fired.
*
* jqLite is a tiny, API-compatible subset of jQuery that allows
* Angular to manipulate the DOM. jqLite implements only the most commonly needed functionality
* within a very small footprint, so only a subset of the jQuery API - methods, arguments and
* invocation styles - are supported.
*
* Note: All element references in Angular are always wrapped with jQuery or jqLite; they are never
* raw DOM references.
*
* ## Angular's jqLite
* Angular's lite version of jQuery provides only the following jQuery methods:
*
* - [addClass()](http://api.jquery.com/addClass/)
* - [after()](http://api.jquery.com/after/)
* - [append()](http://api.jquery.com/append/)
* - [attr()](http://api.jquery.com/attr/)
* - [bind()](http://api.jquery.com/bind/) - Does not support namespaces
* - [children()](http://api.jquery.com/children/) - Does not support selectors
* - [clone()](http://api.jquery.com/clone/)
* - [contents()](http://api.jquery.com/contents/)
* - [css()](http://api.jquery.com/css/)
* - [data()](http://api.jquery.com/data/)
* - [eq()](http://api.jquery.com/eq/)
* - [find()](http://api.jquery.com/find/) - Limited to lookups by tag name
* - [hasClass()](http://api.jquery.com/hasClass/)
* - [html()](http://api.jquery.com/html/)
* - [next()](http://api.jquery.com/next/) - Does not support selectors
* - [parent()](http://api.jquery.com/parent/) - Does not support selectors
* - [prepend()](http://api.jquery.com/prepend/)
* - [prop()](http://api.jquery.com/prop/)
* - [ready()](http://api.jquery.com/ready/)
* - [remove()](http://api.jquery.com/remove/)
* - [removeAttr()](http://api.jquery.com/removeAttr/)
* - [removeClass()](http://api.jquery.com/removeClass/)
* - [removeData()](http://api.jquery.com/removeData/)
* - [replaceWith()](http://api.jquery.com/replaceWith/)
* - [text()](http://api.jquery.com/text/)
* - [toggleClass()](http://api.jquery.com/toggleClass/)
* - [triggerHandler()](http://api.jquery.com/triggerHandler/) - Doesn't pass native event objects to handlers.
* - [unbind()](http://api.jquery.com/unbind/) - Does not support namespaces
* - [val()](http://api.jquery.com/val/)
* - [wrap()](http://api.jquery.com/wrap/)
*
* ## jQuery/jqLite Extras
* Angular also provides the following additional methods and events to both jQuery and jqLite:
*
* ### Events
* - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
* on all DOM nodes being removed. This can be used to clean up and 3rd party bindings to the DOM
* element before it is removed.
* ### Methods
* - `controller(name)` - retrieves the controller of the current element or its parent. By default
* retrieves controller associated with the `ngController` directive. If `name` is provided as
* camelCase directive name, then the controller for this directive will be retrieved (e.g.
* `'ngModel'`).
* - `injector()` - retrieves the injector of the current element or its parent.
* - `scope()` - retrieves the {@link api/ng.$rootScope.Scope scope} of the current
* element or its parent.
* - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
* parent element is reached.
*
* @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
* @returns {Object} jQuery object.
*/
var jqCache = JQLite.cache = {},
jqName = JQLite.expando = 'ng-' + new Date().getTime(),
jqId = 1,
addEventListenerFn = (window.document.addEventListener
? function(element, type, fn) {element.addEventListener(type, fn, false);}
: function(element, type, fn) {element.attachEvent('on' + type, fn);}),
removeEventListenerFn = (window.document.removeEventListener
? function(element, type, fn) {element.removeEventListener(type, fn, false); }
: function(element, type, fn) {element.detachEvent('on' + type, fn); });
function jqNextId() { return ++jqId; }
var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
var MOZ_HACK_REGEXP = /^moz([A-Z])/;
/**
* Converts snake_case to camelCase.
* Also there is special case for Moz prefix starting with upper case letter.
* @param name Name to normalize
*/
function camelCase(name) {
return name.
replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
return offset ? letter.toUpperCase() : letter;
}).
replace(MOZ_HACK_REGEXP, 'Moz$1');
}
/////////////////////////////////////////////
// jQuery mutation patch
//
// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a
// $destroy event on all DOM nodes being removed.
//
/////////////////////////////////////////////
function JQLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {
var originalJqFn = jQuery.fn[name];
originalJqFn = originalJqFn.$original || originalJqFn;
removePatch.$original = originalJqFn;
jQuery.fn[name] = removePatch;
function removePatch(param) {
var list = filterElems && param ? [this.filter(param)] : [this],
fireEvent = dispatchThis,
set, setIndex, setLength,
element, childIndex, childLength, children;
if (!getterIfNoArguments || param != null) {
while(list.length) {
set = list.shift();
for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {
element = jqLite(set[setIndex]);
if (fireEvent) {
element.triggerHandler('$destroy');
} else {
fireEvent = !fireEvent;
}
for(childIndex = 0, childLength = (children = element.children()).length;
childIndex < childLength;
childIndex++) {
list.push(jQuery(children[childIndex]));
}
}
}
}
return originalJqFn.apply(this, arguments);
}
}
/////////////////////////////////////////////
function JQLite(element) {
if (element instanceof JQLite) {
return element;
}
if (!(this instanceof JQLite)) {
if (isString(element) && element.charAt(0) != '<') {
throw Error('selectors not implemented');
}
return new JQLite(element);
}
if (isString(element)) {
var div = document.createElement('div');
// Read about the NoScope elements here:
// http://msdn.microsoft.com/en-us/library/ms533897(VS.85).aspx
div.innerHTML = '<div> </div>' + element; // IE insanity to make NoScope elements work!
div.removeChild(div.firstChild); // remove the superfluous div
JQLiteAddNodes(this, div.childNodes);
this.remove(); // detach the elements from the temporary DOM div.
} else {
JQLiteAddNodes(this, element);
}
}
function JQLiteClone(element) {
return element.cloneNode(true);
}
function JQLiteDealoc(element){
JQLiteRemoveData(element);
for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {
JQLiteDealoc(children[i]);
}
}
function JQLiteUnbind(element, type, fn) {
var events = JQLiteExpandoStore(element, 'events'),
handle = JQLiteExpandoStore(element, 'handle');
if (!handle) return; //no listeners registered
if (isUndefined(type)) {
forEach(events, function(eventHandler, type) {
removeEventListenerFn(element, type, eventHandler);
delete events[type];
});
} else {
if (isUndefined(fn)) {
removeEventListenerFn(element, type, events[type]);
delete events[type];
} else {
arrayRemove(events[type] || [], fn);
}
}
}
function JQLiteRemoveData(element) {
var expandoId = element[jqName],
expandoStore = jqCache[expandoId];
if (expandoStore) {
if (expandoStore.handle) {
expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');
JQLiteUnbind(element);
}
delete jqCache[expandoId];
element[jqName] = undefined; // ie does not allow deletion of attributes on elements.
}
}
function JQLiteExpandoStore(element, key, value) {
var expandoId = element[jqName],
expandoStore = jqCache[expandoId || -1];
if (isDefined(value)) {
if (!expandoStore) {
element[jqName] = expandoId = jqNextId();
expandoStore = jqCache[expandoId] = {};
}
expandoStore[key] = value;
} else {
return expandoStore && expandoStore[key];
}
}
function JQLiteData(element, key, value) {
var data = JQLiteExpandoStore(element, 'data'),
isSetter = isDefined(value),
keyDefined = !isSetter && isDefined(key),
isSimpleGetter = keyDefined && !isObject(key);
if (!data && !isSimpleGetter) {
JQLiteExpandoStore(element, 'data', data = {});
}
if (isSetter) {
data[key] = value;
} else {
if (keyDefined) {
if (isSimpleGetter) {
// don't create data in this case.
return data && data[key];
} else {
extend(data, key);
}
} else {
return data;
}
}
}
function JQLiteHasClass(element, selector) {
return ((" " + element.className + " ").replace(/[\n\t]/g, " ").
indexOf( " " + selector + " " ) > -1);
}
function JQLiteRemoveClass(element, cssClasses) {
if (cssClasses) {
forEach(cssClasses.split(' '), function(cssClass) {
element.className = trim(
(" " + element.className + " ")
.replace(/[\n\t]/g, " ")
.replace(" " + trim(cssClass) + " ", " ")
);
});
}
}
function JQLiteAddClass(element, cssClasses) {
if (cssClasses) {
forEach(cssClasses.split(' '), function(cssClass) {
if (!JQLiteHasClass(element, cssClass)) {
element.className = trim(element.className + ' ' + trim(cssClass));
}
});
}
}
function JQLiteAddNodes(root, elements) {
if (elements) {
elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))
? elements
: [ elements ];
for(var i=0; i < elements.length; i++) {
root.push(elements[i]);
}
}
}
function JQLiteController(element, name) {
return JQLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');
}
function JQLiteInheritedData(element, name, value) {
element = jqLite(element);
// if element is the document object work with the html element instead
// this makes $(document).scope() possible
if(element[0].nodeType == 9) {
element = element.find('html');
}
while (element.length) {
if (value = element.data(name)) return value;
element = element.parent();
}
}
//////////////////////////////////////////
// Functions which are declared directly.
//////////////////////////////////////////
var JQLitePrototype = JQLite.prototype = {
ready: function(fn) {
var fired = false;
function trigger() {
if (fired) return;
fired = true;
fn();
}
this.bind('DOMContentLoaded', trigger); // works for modern browsers and IE9
// we can not use jqLite since we are not done loading and jQuery could be loaded later.
JQLite(window).bind('load', trigger); // fallback to window.onload for others
},
toString: function() {
var value = [];
forEach(this, function(e){ value.push('' + e);});
return '[' + value.join(', ') + ']';
},
eq: function(index) {
return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
},
length: 0,
push: push,
sort: [].sort,
splice: [].splice
};
//////////////////////////////////////////
// Functions iterating getter/setters.
// these functions return self on setter and
// value on get.
//////////////////////////////////////////
var BOOLEAN_ATTR = {};
forEach('multiple,selected,checked,disabled,readOnly,required'.split(','), function(value) {
BOOLEAN_ATTR[lowercase(value)] = value;
});
var BOOLEAN_ELEMENTS = {};
forEach('input,select,option,textarea,button,form'.split(','), function(value) {
BOOLEAN_ELEMENTS[uppercase(value)] = true;
});
function getBooleanAttrName(element, name) {
// check dom last since we will most likely fail on name
var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
// booleanAttr is here twice to minimize DOM access
return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;
}
forEach({
data: JQLiteData,
inheritedData: JQLiteInheritedData,
scope: function(element) {
return JQLiteInheritedData(element, '$scope');
},
controller: JQLiteController ,
injector: function(element) {
return JQLiteInheritedData(element, '$injector');
},
removeAttr: function(element,name) {
element.removeAttribute(name);
},
hasClass: JQLiteHasClass,
css: function(element, name, value) {
name = camelCase(name);
if (isDefined(value)) {
element.style[name] = value;
} else {
var val;
if (msie <= 8) {
// this is some IE specific weirdness that jQuery 1.6.4 does not sure why
val = element.currentStyle && element.currentStyle[name];
if (val === '') val = 'auto';
}
val = val || element.style[name];
if (msie <= 8) {
// jquery weirdness :-/
val = (val === '') ? undefined : val;
}
return val;
}
},
attr: function(element, name, value){
var lowercasedName = lowercase(name);
if (BOOLEAN_ATTR[lowercasedName]) {
if (isDefined(value)) {
if (!!value) {
element[name] = true;
element.setAttribute(name, lowercasedName);
} else {
element[name] = false;
element.removeAttribute(lowercasedName);
}
} else {
return (element[name] ||
(element.attributes.getNamedItem(name)|| noop).specified)
? lowercasedName
: undefined;
}
} else if (isDefined(value)) {
element.setAttribute(name, value);
} else if (element.getAttribute) {
// the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
// some elements (e.g. Document) don't have get attribute, so return undefined
var ret = element.getAttribute(name, 2);
// normalize non-existing attributes to undefined (as jQuery)
return ret === null ? undefined : ret;
}
},
prop: function(element, name, value) {
if (isDefined(value)) {
element[name] = value;
} else {
return element[name];
}
},
text: extend((msie < 9)
? function(element, value) {
if (element.nodeType == 1 /** Element */) {
if (isUndefined(value))
return element.innerText;
element.innerText = value;
} else {
if (isUndefined(value))
return element.nodeValue;
element.nodeValue = value;
}
}
: function(element, value) {
if (isUndefined(value)) {
return element.textContent;
}
element.textContent = value;
}, {$dv:''}),
val: function(element, value) {
if (isUndefined(value)) {
if (nodeName_(element) === 'SELECT' && element.multiple) {
var result = [];
forEach(element.options, function (option) {
if (option.selected) {
result.push(option.value || option.text);
}
});
return result.length === 0 ? null : result;
}
return element.value;
}
element.value = value;
},
html: function(element, value) {
if (isUndefined(value)) {
return element.innerHTML;
}
for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {
JQLiteDealoc(childNodes[i]);
}
element.innerHTML = value;
}
}, function(fn, name){
/**
* Properties: writes return selection, reads return first value
*/
JQLite.prototype[name] = function(arg1, arg2) {
var i, key;
// JQLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
// in a way that survives minification.
if (((fn.length == 2 && (fn !== JQLiteHasClass && fn !== JQLiteController)) ? arg1 : arg2) === undefined) {
if (isObject(arg1)) {
// we are a write, but the object properties are the key/values
for(i=0; i < this.length; i++) {
if (fn === JQLiteData) {
// data() takes the whole object in jQuery
fn(this[i], arg1);
} else {
for (key in arg1) {
fn(this[i], key, arg1[key]);
}
}
}
// return self for chaining
return this;
} else {
// we are a read, so read the first child.
if (this.length)
return fn(this[0], arg1, arg2);
}
} else {
// we are a write, so apply to all children
for(i=0; i < this.length; i++) {
fn(this[i], arg1, arg2);
}
// return self for chaining
return this;
}
return fn.$dv;
};
});
function createEventHandler(element, events) {
var eventHandler = function (event, type) {
if (!event.preventDefault) {
event.preventDefault = function() {
event.returnValue = false; //ie
};
}
if (!event.stopPropagation) {
event.stopPropagation = function() {
event.cancelBubble = true; //ie
};
}
if (!event.target) {
event.target = event.srcElement || document;
}
if (isUndefined(event.defaultPrevented)) {
var prevent = event.preventDefault;
event.preventDefault = function() {
event.defaultPrevented = true;
prevent.call(event);
};
event.defaultPrevented = false;
}
event.isDefaultPrevented = function() {
return event.defaultPrevented;
};
forEach(events[type || event.type], function(fn) {
fn.call(element, event);
});
// Remove monkey-patched methods (IE),
// as they would cause memory leaks in IE8.
if (msie <= 8) {
// IE7/8 does not allow to delete property on native object
event.preventDefault = null;
event.stopPropagation = null;
event.isDefaultPrevented = null;
} else {
// It shouldn't affect normal browsers (native methods are defined on prototype).
delete event.preventDefault;
delete event.stopPropagation;
delete event.isDefaultPrevented;
}
};
eventHandler.elem = element;
return eventHandler;
}
//////////////////////////////////////////
// Functions iterating traversal.
// These functions chain results into a single
// selector.
//////////////////////////////////////////
forEach({
removeData: JQLiteRemoveData,
dealoc: JQLiteDealoc,
bind: function bindFn(element, type, fn){
var events = JQLiteExpandoStore(element, 'events'),
handle = JQLiteExpandoStore(element, 'handle');
if (!events) JQLiteExpandoStore(element, 'events', events = {});
if (!handle) JQLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));
forEach(type.split(' '), function(type){
var eventFns = events[type];
if (!eventFns) {
if (type == 'mouseenter' || type == 'mouseleave') {
var contains = document.body.contains || document.body.compareDocumentPosition ?
function( a, b ) {
var adown = a.nodeType === 9 ? a.documentElement : a,
bup = b && b.parentNode;
return a === bup || !!( bup && bup.nodeType === 1 && (
adown.contains ?
adown.contains( bup ) :
a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
));
} :
function( a, b ) {
if ( b ) {
while ( (b = b.parentNode) ) {
if ( b === a ) {
return true;
}
}
}
return false;
};
events[type] = [];
// Refer to jQuery's implementation of mouseenter & mouseleave
// Read about mouseenter and mouseleave:
// http://www.quirksmode.org/js/events_mouse.html#link8
var eventmap = { mouseleave : "mouseout", mouseenter : "mouseover"}
bindFn(element, eventmap[type], function(event) {
var ret, target = this, related = event.relatedTarget;
// For mousenter/leave call the handler if related is outside the target.
// NB: No relatedTarget if the mouse left/entered the browser window
if ( !related || (related !== target && !contains(target, related)) ){
handle(event, type);
}
});
} else {
addEventListenerFn(element, type, handle);
events[type] = [];
}
eventFns = events[type]
}
eventFns.push(fn);
});
},
unbind: JQLiteUnbind,
replaceWith: function(element, replaceNode) {
var index, parent = element.parentNode;
JQLiteDealoc(element);
forEach(new JQLite(replaceNode), function(node){
if (index) {
parent.insertBefore(node, index.nextSibling);
} else {
parent.replaceChild(node, element);
}
index = node;
});
},
children: function(element) {
var children = [];
forEach(element.childNodes, function(element){
if (element.nodeType === 1)
children.push(element);
});
return children;
},
contents: function(element) {
return element.childNodes || [];
},
append: function(element, node) {
forEach(new JQLite(node), function(child){
if (element.nodeType === 1)
element.appendChild(child);
});
},
prepend: function(element, node) {
if (element.nodeType === 1) {
var index = element.firstChild;
forEach(new JQLite(node), function(child){
element.insertBefore(child, index);
});
}
},
wrap: function(element, wrapNode) {
wrapNode = jqLite(wrapNode)[0];
var parent = element.parentNode;
if (parent) {
parent.replaceChild(wrapNode, element);
}
wrapNode.appendChild(element);
},
remove: function(element) {
JQLiteDealoc(element);
var parent = element.parentNode;
if (parent) parent.removeChild(element);
},
after: function(element, newElement) {
var index = element, parent = element.parentNode;
forEach(new JQLite(newElement), function(node){
parent.insertBefore(node, index.nextSibling);
index = node;
});
},
addClass: JQLiteAddClass,
removeClass: JQLiteRemoveClass,
toggleClass: function(element, selector, condition) {
if (isUndefined(condition)) {
condition = !JQLiteHasClass(element, selector);
}
(condition ? JQLiteAddClass : JQLiteRemoveClass)(element, selector);
},
parent: function(element) {
var parent = element.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
next: function(element) {
if (element.nextElementSibling) {
return element.nextElementSibling;
}
// IE8 doesn't have nextElementSibling
var elm = element.nextSibling;
while (elm != null && elm.nodeType !== 1) {
elm = elm.nextSibling;
}
return elm;
},
find: function(element, selector) {
return element.getElementsByTagName(selector);
},
clone: JQLiteClone,
triggerHandler: function(element, eventName) {
var eventFns = (JQLiteExpandoStore(element, 'events') || {})[eventName];
forEach(eventFns, function(fn) {
fn.call(element, null);
});
}
}, function(fn, name){
/**
* chaining functions
*/
JQLite.prototype[name] = function(arg1, arg2) {
var value;
for(var i=0; i < this.length; i++) {
if (value == undefined) {
value = fn(this[i], arg1, arg2);
if (value !== undefined) {
// any function which returns a value needs to be wrapped
value = jqLite(value);
}
} else {
JQLiteAddNodes(value, fn(this[i], arg1, arg2));
}
}
return value == undefined ? this : value;
};
});
/**
* Computes a hash of an 'obj'.
* Hash of a:
* string is string
* number is number as string
* object is either result of calling $$hashKey function on the object or uniquely generated id,
* that is also assigned to the $$hashKey property of the object.
*
* @param obj
* @returns {string} hash string such that the same input will have the same hash string.
* The resulting string key is in 'type:hashKey' format.
*/
function hashKey(obj) {
var objType = typeof obj,
key;
if (objType == 'object' && obj !== null) {
if (typeof (key = obj.$$hashKey) == 'function') {
// must invoke on object to keep the right this
key = obj.$$hashKey();
} else if (key === undefined) {
key = obj.$$hashKey = nextUid();
}
} else {
key = obj;
}
return objType + ':' + key;
}
/**
* HashMap which can use objects as keys
*/
function HashMap(array){
forEach(array, this.put, this);
}
HashMap.prototype = {
/**
* Store key value pair
* @param key key to store can be any type
* @param value value to store can be any type
*/
put: function(key, value) {
this[hashKey(key)] = value;
},
/**
* @param key
* @returns the value for the key
*/
get: function(key) {
return this[hashKey(key)];
},
/**
* Remove the key/value pair
* @param key
*/
remove: function(key) {
var value = this[key = hashKey(key)];
delete this[key];
return value;
}
};
/**
* A map where multiple values can be added to the same key such that they form a queue.
* @returns {HashQueueMap}
*/
function HashQueueMap() {}
HashQueueMap.prototype = {
/**
* Same as array push, but using an array as the value for the hash
*/
push: function(key, value) {
var array = this[key = hashKey(key)];
if (!array) {
this[key] = [value];
} else {
array.push(value);
}
},
/**
* Same as array shift, but using an array as the value for the hash
*/
shift: function(key) {
var array = this[key = hashKey(key)];
if (array) {
if (array.length == 1) {
delete this[key];
return array[0];
} else {
return array.shift();
}
}
},
/**
* return the first item without deleting it
*/
peek: function(key) {
var array = this[hashKey(key)];
if (array) {
return array[0];
}
}
};
/**
* @ngdoc function
* @name angular.injector
* @function
*
* @description
* Creates an injector function that can be used for retrieving services as well as for
* dependency injection (see {@link guide/di dependency injection}).
*
* @param {Array.<string|Function>} modules A list of module functions or their aliases. See
* {@link angular.module}. The `ng` module must be explicitly added.
* @returns {function()} Injector function. See {@link AUTO.$injector $injector}.
*
* @example
* Typical usage
* <pre>
* // create an injector
* var $injector = angular.injector(['ng']);
*
* // use the injector to kick off your application
* // use the type inference to auto inject arguments, or use implicit injection
* $injector.invoke(function($rootScope, $compile, $document){
* $compile($document)($rootScope);
* $rootScope.$digest();
* });
* </pre>
*/
/**
* @ngdoc overview
* @name AUTO
* @description
*
* Implicit module which gets automatically added to each {@link AUTO.$injector $injector}.
*/
var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m;
var FN_ARG_SPLIT = /,/;
var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
function annotate(fn) {
var $inject,
fnText,
argDecl,
last;
if (typeof fn == 'function') {
if (!($inject = fn.$inject)) {
$inject = [];
fnText = fn.toString().replace(STRIP_COMMENTS, '');
argDecl = fnText.match(FN_ARGS);
forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){
arg.replace(FN_ARG, function(all, underscore, name){
$inject.push(name);
});
});
fn.$inject = $inject;
}
} else if (isArray(fn)) {
last = fn.length - 1;
assertArgFn(fn[last], 'fn');
$inject = fn.slice(0, last);
} else {
assertArgFn(fn, 'fn', true);
}
return $inject;
}
///////////////////////////////////////
/**
* @ngdoc object
* @name AUTO.$injector
* @function
*
* @description
*
* `$injector` is used to retrieve object instances as defined by
* {@link AUTO.$provide provider}, instantiate types, invoke methods,
* and load modules.
*
* The following always holds true:
*
* <pre>
* var $injector = angular.injector();
* expect($injector.get('$injector')).toBe($injector);
* expect($injector.invoke(function($injector){
* return $injector;
* }).toBe($injector);
* </pre>
*
* # Injection Function Annotation
*
* JavaScript does not have annotations, and annotations are needed for dependency injection. The
* following are all valid ways of annotating function with injection arguments and are equivalent.
*
* <pre>
* // inferred (only works if code not minified/obfuscated)
* $injector.invoke(function(serviceA){});
*
* // annotated
* function explicit(serviceA) {};
* explicit.$inject = ['serviceA'];
* $injector.invoke(explicit);
*
* // inline
* $injector.invoke(['serviceA', function(serviceA){}]);
* </pre>
*
* ## Inference
*
* In JavaScript calling `toString()` on a function returns the function definition. The definition can then be
* parsed and the function arguments can be extracted. *NOTE:* This does not work with minification, and obfuscation
* tools since these tools change the argument names.
*
* ## `$inject` Annotation
* By adding a `$inject` property onto a function the injection parameters can be specified.
*
* ## Inline
* As an array of injection names, where the last item in the array is the function to call.
*/
/**
* @ngdoc method
* @name AUTO.$injector#get
* @methodOf AUTO.$injector
*
* @description
* Return an instance of the service.
*
* @param {string} name The name of the instance to retrieve.
* @return {*} The instance.
*/
/**
* @ngdoc method
* @name AUTO.$injector#invoke
* @methodOf AUTO.$injector
*
* @description
* Invoke the method and supply the method arguments from the `$injector`.
*
* @param {!function} fn The function to invoke. The function arguments come form the function annotation.
* @param {Object=} self The `this` for the invoked method.
* @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
* the `$injector` is consulted.
* @returns {*} the value returned by the invoked `fn` function.
*/
/**
* @ngdoc method
* @name AUTO.$injector#instantiate
* @methodOf AUTO.$injector
* @description
* Create a new instance of JS type. The method takes a constructor function invokes the new operator and supplies
* all of the arguments to the constructor function as specified by the constructor annotation.
*
* @param {function} Type Annotated constructor function.
* @param {Object=} locals Optional object. If preset then any argument names are read from this object first, before
* the `$injector` is consulted.
* @returns {Object} new instance of `Type`.
*/
/**
* @ngdoc method
* @name AUTO.$injector#annotate
* @methodOf AUTO.$injector
*
* @description
* Returns an array of service names which the function is requesting for injection. This API is used by the injector
* to determine which services need to be injected into the function when the function is invoked. There are three
* ways in which the function can be annotated with the needed dependencies.
*
* # Argument names
*
* The simplest form is to extract the dependencies from the arguments of the function. This is done by converting
* the function into a string using `toString()` method and extracting the argument names.
* <pre>
* // Given
* function MyController($scope, $route) {
* // ...
* }
*
* // Then
* expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
* </pre>
*
* This method does not work with code minfication / obfuscation. For this reason the following annotation strategies
* are supported.
*
* # The `$inject` property
*
* If a function has an `$inject` property and its value is an array of strings, then the strings represent names of
* services to be injected into the function.
* <pre>
* // Given
* var MyController = function(obfuscatedScope, obfuscatedRoute) {
* // ...
* }
* // Define function dependencies
* MyController.$inject = ['$scope', '$route'];
*
* // Then
* expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
* </pre>
*
* # The array notation
*
* It is often desirable to inline Injected functions and that's when setting the `$inject` property is very
* inconvenient. In these situations using the array notation to specify the dependencies in a way that survives
* minification is a better choice:
*
* <pre>
* // We wish to write this (not minification / obfuscation safe)
* injector.invoke(function($compile, $rootScope) {
* // ...
* });
*
* // We are forced to write break inlining
* var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
* // ...
* };
* tmpFn.$inject = ['$compile', '$rootScope'];
* injector.invoke(tmpFn);
*
* // To better support inline function the inline annotation is supported
* injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
* // ...
* }]);
*
* // Therefore
* expect(injector.annotate(
* ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
* ).toEqual(['$compile', '$rootScope']);
* </pre>
*
* @param {function|Array.<string|Function>} fn Function for which dependent service names need to be retrieved as described
* above.
*
* @returns {Array.<string>} The names of the services which the function requires.
*/
/**
* @ngdoc object
* @name AUTO.$provide
*
* @description
*
* Use `$provide` to register new providers with the `$injector`. The providers are the factories for the instance.
* The providers share the same name as the instance they create with `Provider` suffixed to them.
*
* A provider is an object with a `$get()` method. The injector calls the `$get` method to create a new instance of
* a service. The Provider can have additional methods which would allow for configuration of the provider.
*
* <pre>
* function GreetProvider() {
* var salutation = 'Hello';
*
* this.salutation = function(text) {
* salutation = text;
* };
*
* this.$get = function() {
* return function (name) {
* return salutation + ' ' + name + '!';
* };
* };
* }
*
* describe('Greeter', function(){
*
* beforeEach(module(function($provide) {
* $provide.provider('greet', GreetProvider);
* }));
*
* it('should greet', inject(function(greet) {
* expect(greet('angular')).toEqual('Hello angular!');
* }));
*
* it('should allow configuration of salutation', function() {
* module(function(greetProvider) {
* greetProvider.salutation('Ahoj');
* });
* inject(function(greet) {
* expect(greet('angular')).toEqual('Ahoj angular!');
* });
* });
* </pre>
*/
/**
* @ngdoc method
* @name AUTO.$provide#provider
* @methodOf AUTO.$provide
* @description
*
* Register a provider for a service. The providers can be retrieved and can have additional configuration methods.
*
* @param {string} name The name of the instance. NOTE: the provider will be available under `name + 'Provider'` key.
* @param {(Object|function())} provider If the provider is:
*
* - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
* {@link AUTO.$injector#invoke $injector.invoke()} when an instance needs to be created.
* - `Constructor`: a new instance of the provider will be created using
* {@link AUTO.$injector#instantiate $injector.instantiate()}, then treated as `object`.
*
* @returns {Object} registered provider instance
*/
/**
* @ngdoc method
* @name AUTO.$provide#factory
* @methodOf AUTO.$provide
* @description
*
* A short hand for configuring services if only `$get` method is required.
*
* @param {string} name The name of the instance.
* @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand for
* `$provide.provider(name, {$get: $getFn})`.
* @returns {Object} registered provider instance
*/
/**
* @ngdoc method
* @name AUTO.$provide#service
* @methodOf AUTO.$provide
* @description
*
* A short hand for registering service of given class.
*
* @param {string} name The name of the instance.
* @param {Function} constructor A class (constructor function) that will be instantiated.
* @returns {Object} registered provider instance
*/
/**
* @ngdoc method
* @name AUTO.$provide#value
* @methodOf AUTO.$provide
* @description
*
* A short hand for configuring services if the `$get` method is a constant.
*
* @param {string} name The name of the instance.
* @param {*} value The value.
* @returns {Object} registered provider instance
*/
/**
* @ngdoc method
* @name AUTO.$provide#constant
* @methodOf AUTO.$provide
* @description
*
* A constant value, but unlike {@link AUTO.$provide#value value} it can be injected
* into configuration function (other modules) and it is not interceptable by
* {@link AUTO.$provide#decorator decorator}.
*
* @param {string} name The name of the constant.
* @param {*} value The constant value.
* @returns {Object} registered instance
*/
/**
* @ngdoc method
* @name AUTO.$provide#decorator
* @methodOf AUTO.$provide
* @description
*
* Decoration of service, allows the decorator to intercept the service instance creation. The
* returned instance may be the original instance, or a new instance which delegates to the
* original instance.
*
* @param {string} name The name of the service to decorate.
* @param {function()} decorator This function will be invoked when the service needs to be
* instantiated. The function is called using the {@link AUTO.$injector#invoke
* injector.invoke} method and is therefore fully injectable. Local injection arguments:
*
* * `$delegate` - The original service instance, which can be monkey patched, configured,
* decorated or delegated to.
*/
function createInjector(modulesToLoad) {
var INSTANTIATING = {},
providerSuffix = 'Provider',
path = [],
loadedModules = new HashMap(),
providerCache = {
$provide: {
provider: supportObject(provider),
factory: supportObject(factory),
service: supportObject(service),
value: supportObject(value),
constant: supportObject(constant),
decorator: decorator
}
},
providerInjector = createInternalInjector(providerCache, function() {
throw Error("Unknown provider: " + path.join(' <- '));
}),
instanceCache = {},
instanceInjector = (instanceCache.$injector =
createInternalInjector(instanceCache, function(servicename) {
var provider = providerInjector.get(servicename + providerSuffix);
return instanceInjector.invoke(provider.$get, provider);
}));
forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });
return instanceInjector;
////////////////////////////////////
// $provider
////////////////////////////////////
function supportObject(delegate) {
return function(key, value) {
if (isObject(key)) {
forEach(key, reverseParams(delegate));
} else {
return delegate(key, value);
}
}
}
function provider(name, provider_) {
if (isFunction(provider_) || isArray(provider_)) {
provider_ = providerInjector.instantiate(provider_);
}
if (!provider_.$get) {
throw Error('Provider ' + name + ' must define $get factory method.');
}
return providerCache[name + providerSuffix] = provider_;
}
function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }
function service(name, constructor) {
return factory(name, ['$injector', function($injector) {
return $injector.instantiate(constructor);
}]);
}
function value(name, value) { return factory(name, valueFn(value)); }
function constant(name, value) {
providerCache[name] = value;
instanceCache[name] = value;
}
function decorator(serviceName, decorFn) {
var origProvider = providerInjector.get(serviceName + providerSuffix),
orig$get = origProvider.$get;
origProvider.$get = function() {
var origInstance = instanceInjector.invoke(orig$get, origProvider);
return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
};
}
////////////////////////////////////
// Module Loading
////////////////////////////////////
function loadModules(modulesToLoad){
var runBlocks = [];
forEach(modulesToLoad, function(module) {
if (loadedModules.get(module)) return;
loadedModules.put(module, true);
if (isString(module)) {
var moduleFn = angularModule(module);
runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
try {
for(var invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {
var invokeArgs = invokeQueue[i],
provider = invokeArgs[0] == '$injector'
? providerInjector
: providerInjector.get(invokeArgs[0]);
provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
}
} catch (e) {
if (e.message) e.message += ' from ' + module;
throw e;
}
} else if (isFunction(module)) {
try {
runBlocks.push(providerInjector.invoke(module));
} catch (e) {
if (e.message) e.message += ' from ' + module;
throw e;
}
} else if (isArray(module)) {
try {
runBlocks.push(providerInjector.invoke(module));
} catch (e) {
if (e.message) e.message += ' from ' + String(module[module.length - 1]);
throw e;
}
} else {
assertArgFn(module, 'module');
}
});
return runBlocks;
}
////////////////////////////////////
// internal Injector
////////////////////////////////////
function createInternalInjector(cache, factory) {
function getService(serviceName) {
if (typeof serviceName !== 'string') {
throw Error('Service name expected');
}
if (cache.hasOwnProperty(serviceName)) {
if (cache[serviceName] === INSTANTIATING) {
throw Error('Circular dependency: ' + path.join(' <- '));
}
return cache[serviceName];
} else {
try {
path.unshift(serviceName);
cache[serviceName] = INSTANTIATING;
return cache[serviceName] = factory(serviceName);
} finally {
path.shift();
}
}
}
function invoke(fn, self, locals){
var args = [],
$inject = annotate(fn),
length, i,
key;
for(i = 0, length = $inject.length; i < length; i++) {
key = $inject[i];
args.push(
locals && locals.hasOwnProperty(key)
? locals[key]
: getService(key)
);
}
if (!fn.$inject) {
// this means that we must be an array.
fn = fn[length];
}
// Performance optimization: http://jsperf.com/apply-vs-call-vs-invoke
switch (self ? -1 : args.length) {
case 0: return fn();
case 1: return fn(args[0]);
case 2: return fn(args[0], args[1]);
case 3: return fn(args[0], args[1], args[2]);
case 4: return fn(args[0], args[1], args[2], args[3]);
case 5: return fn(args[0], args[1], args[2], args[3], args[4]);
case 6: return fn(args[0], args[1], args[2], args[3], args[4], args[5]);
case 7: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
case 8: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7]);
case 9: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8]);
case 10: return fn(args[0], args[1], args[2], args[3], args[4], args[5], args[6], args[7], args[8], args[9]);
default: return fn.apply(self, args);
}
}
function instantiate(Type, locals) {
var Constructor = function() {},
instance, returnedValue;
// Check if Type is annotated and use just the given function at n-1 as parameter
// e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;
instance = new Constructor();
returnedValue = invoke(Type, instance, locals);
return isObject(returnedValue) ? returnedValue : instance;
}
return {
invoke: invoke,
instantiate: instantiate,
get: getService,
annotate: annotate
};
}
}
/**
* @ngdoc function
* @name ng.$anchorScroll
* @requires $window
* @requires $location
* @requires $rootScope
*
* @description
* When called, it checks current value of `$location.hash()` and scroll to related element,
* according to rules specified in
* {@link http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document Html5 spec}.
*
* It also watches the `$location.hash()` and scroll whenever it changes to match any anchor.
* This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.
*/
function $AnchorScrollProvider() {
var autoScrollingEnabled = true;
this.disableAutoScrolling = function() {
autoScrollingEnabled = false;
};
this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
var document = $window.document;
// helper function to get first anchor from a NodeList
// can't use filter.filter, as it accepts only instances of Array
// and IE can't convert NodeList to an array using [].slice
// TODO(vojta): use filter if we change it to accept lists as well
function getFirstAnchor(list) {
var result = null;
forEach(list, function(element) {
if (!result && lowercase(element.nodeName) === 'a') result = element;
});
return result;
}
function scroll() {
var hash = $location.hash(), elm;
// empty hash, scroll to the top of the page
if (!hash) $window.scrollTo(0, 0);
// element with given id
else if ((elm = document.getElementById(hash))) elm.scrollIntoView();
// first anchor with given name :-D
else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();
// no element and hash == 'top', scroll to the top of the page
else if (hash === 'top') $window.scrollTo(0, 0);
}
// does not scroll when user clicks on anchor link that is currently on
// (no url change, no $location.hash() change), browser native does scroll
if (autoScrollingEnabled) {
$rootScope.$watch(function autoScrollWatch() {return $location.hash();},
function autoScrollWatchAction() {
$rootScope.$evalAsync(scroll);
});
}
return scroll;
}];
}
/**
* ! This is a private undocumented service !
*
* @name ng.$browser
* @requires $log
* @description
* This object has two goals:
*
* - hide all the global state in the browser caused by the window object
* - abstract away all the browser specific features and inconsistencies
*
* For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
* service, which can be used for convenient testing of the application without the interaction with
* the real browser apis.
*/
/**
* @param {object} window The global window object.
* @param {object} document jQuery wrapped document.
* @param {function()} XHR XMLHttpRequest constructor.
* @param {object} $log console.log or an object with the same interface.
* @param {object} $sniffer $sniffer service
*/
function Browser(window, document, $log, $sniffer) {
var self = this,
rawDocument = document[0],
location = window.location,
history = window.history,
setTimeout = window.setTimeout,
clearTimeout = window.clearTimeout,
pendingDeferIds = {};
self.isMock = false;
var outstandingRequestCount = 0;
var outstandingRequestCallbacks = [];
// TODO(vojta): remove this temporary api
self.$$completeOutstandingRequest = completeOutstandingRequest;
self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };
/**
* Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`
* counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
*/
function completeOutstandingRequest(fn) {
try {
fn.apply(null, sliceArgs(arguments, 1));
} finally {
outstandingRequestCount--;
if (outstandingRequestCount === 0) {
while(outstandingRequestCallbacks.length) {
try {
outstandingRequestCallbacks.pop()();
} catch (e) {
$log.error(e);
}
}
}
}
}
/**
* @private
* Note: this method is used only by scenario runner
* TODO(vojta): prefix this method with $$ ?
* @param {function()} callback Function that will be called when no outstanding request
*/
self.notifyWhenNoOutstandingRequests = function(callback) {
// force browser to execute all pollFns - this is needed so that cookies and other pollers fire
// at some deterministic time in respect to the test runner's actions. Leaving things up to the
// regular poller would result in flaky tests.
forEach(pollFns, function(pollFn){ pollFn(); });
if (outstandingRequestCount === 0) {
callback();
} else {
outstandingRequestCallbacks.push(callback);
}
};
//////////////////////////////////////////////////////////////
// Poll Watcher API
//////////////////////////////////////////////////////////////
var pollFns = [],
pollTimeout;
/**
* @name ng.$browser#addPollFn
* @methodOf ng.$browser
*
* @param {function()} fn Poll function to add
*
* @description
* Adds a function to the list of functions that poller periodically executes,
* and starts polling if not started yet.
*
* @returns {function()} the added function
*/
self.addPollFn = function(fn) {
if (isUndefined(pollTimeout)) startPoller(100, setTimeout);
pollFns.push(fn);
return fn;
};
/**
* @param {number} interval How often should browser call poll functions (ms)
* @param {function()} setTimeout Reference to a real or fake `setTimeout` function.
*
* @description
* Configures the poller to run in the specified intervals, using the specified
* setTimeout fn and kicks it off.
*/
function startPoller(interval, setTimeout) {
(function check() {
forEach(pollFns, function(pollFn){ pollFn(); });
pollTimeout = setTimeout(check, interval);
})();
}
//////////////////////////////////////////////////////////////
// URL API
//////////////////////////////////////////////////////////////
var lastBrowserUrl = location.href,
baseElement = document.find('base'),
replacedUrl = null;
/**
* @name ng.$browser#url
* @methodOf ng.$browser
*
* @description
* GETTER:
* Without any argument, this method just returns current value of location.href.
*
* SETTER:
* With at least one argument, this method sets url to new value.
* If html5 history api supported, pushState/replaceState is used, otherwise
* location.href/location.replace is used.
* Returns its own instance to allow chaining
*
* NOTE: this api is intended for use only by the $location service. Please use the
* {@link ng.$location $location service} to change url.
*
* @param {string} url New url (when used as setter)
* @param {boolean=} replace Should new url replace current history record ?
*/
self.url = function(url, replace) {
// setter
if (url) {
if (lastBrowserUrl == url) return;
lastBrowserUrl = url;
if ($sniffer.history) {
if (replace) history.replaceState(null, '', url);
else {
history.pushState(null, '', url);
// Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462
baseElement.attr('href', baseElement.attr('href'));
}
} else {
if (replace) {
location.replace(url);
replacedUrl = url;
} else {
location.href = url;
replacedUrl = null;
}
}
return self;
// getter
} else {
// - the replacedUrl is a workaround for an IE8-9 issue with location.replace method that doesn't update
// location.href synchronously
// - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
return replacedUrl || location.href.replace(/%27/g,"'");
}
};
var urlChangeListeners = [],
urlChangeInit = false;
function fireUrlChange() {
if (lastBrowserUrl == self.url()) return;
lastBrowserUrl = self.url();
forEach(urlChangeListeners, function(listener) {
listener(self.url());
});
}
/**
* @name ng.$browser#onUrlChange
* @methodOf ng.$browser
* @TODO(vojta): refactor to use node's syntax for events
*
* @description
* Register callback function that will be called, when url changes.
*
* It's only called when the url is changed by outside of angular:
* - user types different url into address bar
* - user clicks on history (forward/back) button
* - user clicks on a link
*
* It's not called when url is changed by $browser.url() method
*
* The listener gets called with new url as parameter.
*
* NOTE: this api is intended for use only by the $location service. Please use the
* {@link ng.$location $location service} to monitor url changes in angular apps.
*
* @param {function(string)} listener Listener function to be called when url changes.
* @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
*/
self.onUrlChange = function(callback) {
if (!urlChangeInit) {
// We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)
// don't fire popstate when user change the address bar and don't fire hashchange when url
// changed by push/replaceState
// html5 history api - popstate event
if ($sniffer.history) jqLite(window).bind('popstate', fireUrlChange);
// hashchange event
if ($sniffer.hashchange) jqLite(window).bind('hashchange', fireUrlChange);
// polling
else self.addPollFn(fireUrlChange);
urlChangeInit = true;
}
urlChangeListeners.push(callback);
return callback;
};
//////////////////////////////////////////////////////////////
// Misc API
//////////////////////////////////////////////////////////////
/**
* Returns current <base href>
* (always relative - without domain)
*
* @returns {string=}
*/
self.baseHref = function() {
var href = baseElement.attr('href');
return href ? href.replace(/^https?\:\/\/[^\/]*/, '') : '';
};
//////////////////////////////////////////////////////////////
// Cookies API
//////////////////////////////////////////////////////////////
var lastCookies = {};
var lastCookieString = '';
var cookiePath = self.baseHref();
/**
* @name ng.$browser#cookies
* @methodOf ng.$browser
*
* @param {string=} name Cookie name
* @param {string=} value Cokkie value
*
* @description
* The cookies method provides a 'private' low level access to browser cookies.
* It is not meant to be used directly, use the $cookie service instead.
*
* The return values vary depending on the arguments that the method was called with as follows:
* <ul>
* <li>cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify it</li>
* <li>cookies(name, value) -> set name to value, if value is undefined delete the cookie</li>
* <li>cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that way)</li>
* </ul>
*
* @returns {Object} Hash of all cookies (if called without any parameter)
*/
self.cookies = function(name, value) {
var cookieLength, cookieArray, cookie, i, index;
if (name) {
if (value === undefined) {
rawDocument.cookie = escape(name) + "=;path=" + cookiePath + ";expires=Thu, 01 Jan 1970 00:00:00 GMT";
} else {
if (isString(value)) {
cookieLength = (rawDocument.cookie = escape(name) + '=' + escape(value) + ';path=' + cookiePath).length + 1;
// per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
// - 300 cookies
// - 20 cookies per unique domain
// - 4096 bytes per cookie
if (cookieLength > 4096) {
$log.warn("Cookie '"+ name +"' possibly not set or overflowed because it was too large ("+
cookieLength + " > 4096 bytes)!");
}
}
}
} else {
if (rawDocument.cookie !== lastCookieString) {
lastCookieString = rawDocument.cookie;
cookieArray = lastCookieString.split("; ");
lastCookies = {};
for (i = 0; i < cookieArray.length; i++) {
cookie = cookieArray[i];
index = cookie.indexOf('=');
if (index > 0) { //ignore nameless cookies
var name = unescape(cookie.substring(0, index));
// the first value that is seen for a cookie is the most
// specific one. values for the same cookie name that
// follow are for less specific paths.
if (lastCookies[name] === undefined) {
lastCookies[name] = unescape(cookie.substring(index + 1));
}
}
}
}
return lastCookies;
}
};
/**
* @name ng.$browser#defer
* @methodOf ng.$browser
* @param {function()} fn A function, who's execution should be defered.
* @param {number=} [delay=0] of milliseconds to defer the function execution.
* @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
*
* @description
* Executes a fn asynchroniously via `setTimeout(fn, delay)`.
*
* Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
* `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
* via `$browser.defer.flush()`.
*
*/
self.defer = function(fn, delay) {
var timeoutId;
outstandingRequestCount++;
timeoutId = setTimeout(function() {
delete pendingDeferIds[timeoutId];
completeOutstandingRequest(fn);
}, delay || 0);
pendingDeferIds[timeoutId] = true;
return timeoutId;
};
/**
* @name ng.$browser#defer.cancel
* @methodOf ng.$browser.defer
*
* @description
* Cancels a defered task identified with `deferId`.
*
* @param {*} deferId Token returned by the `$browser.defer` function.
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfuly canceled.
*/
self.defer.cancel = function(deferId) {
if (pendingDeferIds[deferId]) {
delete pendingDeferIds[deferId];
clearTimeout(deferId);
completeOutstandingRequest(noop);
return true;
}
return false;
};
}
function $BrowserProvider(){
this.$get = ['$window', '$log', '$sniffer', '$document',
function( $window, $log, $sniffer, $document){
return new Browser($window, $document, $log, $sniffer);
}];
}
/**
* @ngdoc object
* @name ng.$cacheFactory
*
* @description
* Factory that constructs cache objects and gives access to them.
*
* <pre>
*
* var cache = $cacheFactory('cacheId');
* expect($cacheFactory.get('cacheId')).toBe(cache);
* expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
*
* cache.put("key", "value");
* cache.put("another key", "another value");
*
* expect(cache.info()).toEqual({id: 'cacheId', size: 2}); // Since we've specified no options on creation
*
* </pre>
*
*
* @param {string} cacheId Name or id of the newly created cache.
* @param {object=} options Options object that specifies the cache behavior. Properties:
*
* - `{number=}` `capacity` — turns the cache into LRU cache.
*
* @returns {object} Newly created cache object with the following set of methods:
*
* - `{object}` `info()` — Returns id, size, and options of cache.
* - `{void}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache.
* - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.
* - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.
* - `{void}` `removeAll()` — Removes all cached values.
* - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
*
*/
function $CacheFactoryProvider() {
this.$get = function() {
var caches = {};
function cacheFactory(cacheId, options) {
if (cacheId in caches) {
throw Error('cacheId ' + cacheId + ' taken');
}
var size = 0,
stats = extend({}, options, {id: cacheId}),
data = {},
capacity = (options && options.capacity) || Number.MAX_VALUE,
lruHash = {},
freshEnd = null,
staleEnd = null;
return caches[cacheId] = {
put: function(key, value) {
var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
refresh(lruEntry);
if (isUndefined(value)) return;
if (!(key in data)) size++;
data[key] = value;
if (size > capacity) {
this.remove(staleEnd.key);
}
},
get: function(key) {
var lruEntry = lruHash[key];
if (!lruEntry) return;
refresh(lruEntry);
return data[key];
},
remove: function(key) {
var lruEntry = lruHash[key];
if (!lruEntry) return;
if (lruEntry == freshEnd) freshEnd = lruEntry.p;
if (lruEntry == staleEnd) staleEnd = lruEntry.n;
link(lruEntry.n,lruEntry.p);
delete lruHash[key];
delete data[key];
size--;
},
removeAll: function() {
data = {};
size = 0;
lruHash = {};
freshEnd = staleEnd = null;
},
destroy: function() {
data = null;
stats = null;
lruHash = null;
delete caches[cacheId];
},
info: function() {
return extend({}, stats, {size: size});
}
};
/**
* makes the `entry` the freshEnd of the LRU linked list
*/
function refresh(entry) {
if (entry != freshEnd) {
if (!staleEnd) {
staleEnd = entry;
} else if (staleEnd == entry) {
staleEnd = entry.n;
}
link(entry.n, entry.p);
link(entry, freshEnd);
freshEnd = entry;
freshEnd.n = null;
}
}
/**
* bidirectionally links two entries of the LRU linked list
*/
function link(nextEntry, prevEntry) {
if (nextEntry != prevEntry) {
if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify
if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify
}
}
}
/**
* @ngdoc method
* @name ng.$cacheFactory#info
* @methodOf ng.$cacheFactory
*
* @description
* Get information about all the of the caches that have been created
*
* @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
*/
cacheFactory.info = function() {
var info = {};
forEach(caches, function(cache, cacheId) {
info[cacheId] = cache.info();
});
return info;
};
/**
* @ngdoc method
* @name ng.$cacheFactory#get
* @methodOf ng.$cacheFactory
*
* @description
* Get access to a cache object by the `cacheId` used when it was created.
*
* @param {string} cacheId Name or id of a cache to access.
* @returns {object} Cache object identified by the cacheId or undefined if no such cache.
*/
cacheFactory.get = function(cacheId) {
return caches[cacheId];
};
return cacheFactory;
};
}
/**
* @ngdoc object
* @name ng.$templateCache
*
* @description
* The first time a template is used, it is loaded in the template cache for quick retrieval. You can
* load templates directly into the cache in a `script` tag, or by consuming the `$templateCache`
* service directly.
*
* Adding via the `script` tag:
* <pre>
* <html ng-app>
* <head>
* <script type="text/ng-template" id="templateId.html">
* This is the content of the template
* </script>
* </head>
* ...
* </html>
* </pre>
*
* **Note:** the `script` tag containing the template does not need to be included in the `head` of the document, but
* it must be below the `ng-app` definition.
*
* Adding via the $templateCache service:
*
* <pre>
* var myApp = angular.module('myApp', []);
* myApp.run(function($templateCache) {
* $templateCache.put('templateId.html', 'This is the content of the template');
* });
* </pre>
*
* To retrieve the template later, simply use it in your HTML:
* <pre>
* <div ng-include=" 'templateId.html' "></div>
* </pre>
*
* or get it via Javascript:
* <pre>
* $templateCache.get('templateId.html')
* </pre>
*
* See {@link ng.$cacheFactory $cacheFactory}.
*
*/
function $TemplateCacheProvider() {
this.$get = ['$cacheFactory', function($cacheFactory) {
return $cacheFactory('templates');
}];
}
/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
*
* DOM-related variables:
*
* - "node" - DOM Node
* - "element" - DOM Element or Node
* - "$node" or "$element" - jqLite-wrapped node or element
*
*
* Compiler related stuff:
*
* - "linkFn" - linking fn of a single directive
* - "nodeLinkFn" - function that aggregates all linking fns for a particular node
* - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node
* - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList)
*/
var NON_ASSIGNABLE_MODEL_EXPRESSION = 'Non-assignable model expression: ';
/**
* @ngdoc function
* @name ng.$compile
* @function
*
* @description
* Compiles a piece of HTML string or DOM into a template and produces a template function, which
* can then be used to link {@link ng.$rootScope.Scope scope} and the template together.
*
* The compilation is a process of walking the DOM tree and trying to match DOM elements to
* {@link ng.$compileProvider#directive directives}. For each match it
* executes corresponding template function and collects the
* instance functions into a single template function which is then returned.
*
* The template function can then be used once to produce the view or as it is the case with
* {@link ng.directive:ngRepeat repeater} many-times, in which
* case each call results in a view that is a DOM clone of the original template.
*
<doc:example module="compile">
<doc:source>
<script>
// declare a new module, and inject the $compileProvider
angular.module('compile', [], function($compileProvider) {
// configure new 'compile' directive by passing a directive
// factory function. The factory function injects the '$compile'
$compileProvider.directive('compile', function($compile) {
// directive factory creates a link function
return function(scope, element, attrs) {
scope.$watch(
function(scope) {
// watch the 'compile' expression for changes
return scope.$eval(attrs.compile);
},
function(value) {
// when the 'compile' expression changes
// assign it into the current DOM
element.html(value);
// compile the new DOM and link it to the current
// scope.
// NOTE: we only compile .childNodes so that
// we don't get into infinite loop compiling ourselves
$compile(element.contents())(scope);
}
);
};
})
});
function Ctrl($scope) {
$scope.name = 'Angular';
$scope.html = 'Hello {{name}}';
}
</script>
<div ng-controller="Ctrl">
<input ng-model="name"> <br>
<textarea ng-model="html"></textarea> <br>
<div compile="html"></div>
</div>
</doc:source>
<doc:scenario>
it('should auto compile', function() {
expect(element('div[compile]').text()).toBe('Hello Angular');
input('html').enter('{{name}}!');
expect(element('div[compile]').text()).toBe('Angular!');
});
</doc:scenario>
</doc:example>
*
*
* @param {string|DOMElement} element Element or HTML string to compile into a template function.
* @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives.
* @param {number} maxPriority only apply directives lower then given priority (Only effects the
* root element(s), not their children)
* @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template
* (a DOM element/tree) to a scope. Where:
*
* * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
* * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
* `template` and call the `cloneAttachFn` function allowing the caller to attach the
* cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
* called as: <br> `cloneAttachFn(clonedElement, scope)` where:
*
* * `clonedElement` - is a clone of the original `element` passed into the compiler.
* * `scope` - is the current scope with which the linking function is working with.
*
* Calling the linking function returns the element of the template. It is either the original element
* passed in, or the clone of the element if the `cloneAttachFn` is provided.
*
* After linking the view is not updated until after a call to $digest which typically is done by
* Angular automatically.
*
* If you need access to the bound view, there are two ways to do it:
*
* - If you are not asking the linking function to clone the template, create the DOM element(s)
* before you send them to the compiler and keep this reference around.
* <pre>
* var element = $compile('<p>{{total}}</p>')(scope);
* </pre>
*
* - if on the other hand, you need the element to be cloned, the view reference from the original
* example would not point to the clone, but rather to the original template that was cloned. In
* this case, you can access the clone via the cloneAttachFn:
* <pre>
* var templateHTML = angular.element('<p>{{total}}</p>'),
* scope = ....;
*
* var clonedElement = $compile(templateHTML)(scope, function(clonedElement, scope) {
* //attach the clone to DOM document at the right place
* });
*
* //now we have reference to the cloned DOM via `clone`
* </pre>
*
*
* For information on how the compiler works, see the
* {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
*/
/**
* @ngdoc service
* @name ng.$compileProvider
* @function
*
* @description
*/
$CompileProvider.$inject = ['$provide'];
function $CompileProvider($provide) {
var hasDirectives = {},
Suffix = 'Directive',
COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,
CLASS_DIRECTIVE_REGEXP = /(([\d\w\-_]+)(?:\:([^;]+))?;?)/,
MULTI_ROOT_TEMPLATE_ERROR = 'Template must have exactly one root element. was: ',
urlSanitizationWhitelist = /^\s*(https?|ftp|mailto|file):/;
/**
* @ngdoc function
* @name ng.$compileProvider#directive
* @methodOf ng.$compileProvider
* @function
*
* @description
* Register a new directive with the compiler.
*
* @param {string} name Name of the directive in camel-case. (ie <code>ngBind</code> which will match as
* <code>ng-bind</code>).
* @param {function|Array} directiveFactory An injectable directive factory function. See {@link guide/directive} for more
* info.
* @returns {ng.$compileProvider} Self for chaining.
*/
this.directive = function registerDirective(name, directiveFactory) {
if (isString(name)) {
assertArg(directiveFactory, 'directive');
if (!hasDirectives.hasOwnProperty(name)) {
hasDirectives[name] = [];
$provide.factory(name + Suffix, ['$injector', '$exceptionHandler',
function($injector, $exceptionHandler) {
var directives = [];
forEach(hasDirectives[name], function(directiveFactory) {
try {
var directive = $injector.invoke(directiveFactory);
if (isFunction(directive)) {
directive = { compile: valueFn(directive) };
} else if (!directive.compile && directive.link) {
directive.compile = valueFn(directive.link);
}
directive.priority = directive.priority || 0;
directive.name = directive.name || name;
directive.require = directive.require || (directive.controller && directive.name);
directive.restrict = directive.restrict || 'A';
directives.push(directive);
} catch (e) {
$exceptionHandler(e);
}
});
return directives;
}]);
}
hasDirectives[name].push(directiveFactory);
} else {
forEach(name, reverseParams(registerDirective));
}
return this;
};
/**
* @ngdoc function
* @name ng.$compileProvider#urlSanitizationWhitelist
* @methodOf ng.$compileProvider
* @function
*
* @description
* Retrieves or overrides the default regular expression that is used for whitelisting of safe
* urls during a[href] sanitization.
*
* The sanitization is a security measure aimed at prevent XSS attacks via html links.
*
* Any url about to be assigned to a[href] via data-binding is first normalized and turned into an
* absolute url. Afterwards the url is matched against the `urlSanitizationWhitelist` regular
* expression. If a match is found the original url is written into the dom. Otherwise the
* absolute url is prefixed with `'unsafe:'` string and only then it is written into the DOM.
*
* @param {RegExp=} regexp New regexp to whitelist urls with.
* @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
* chaining otherwise.
*/
this.urlSanitizationWhitelist = function(regexp) {
if (isDefined(regexp)) {
urlSanitizationWhitelist = regexp;
return this;
}
return urlSanitizationWhitelist;
};
this.$get = [
'$injector', '$interpolate', '$exceptionHandler', '$http', '$templateCache', '$parse',
'$controller', '$rootScope', '$document',
function($injector, $interpolate, $exceptionHandler, $http, $templateCache, $parse,
$controller, $rootScope, $document) {
var Attributes = function(element, attr) {
this.$$element = element;
this.$attr = attr || {};
};
Attributes.prototype = {
$normalize: directiveNormalize,
/**
* Set a normalized attribute on the element in a way such that all directives
* can share the attribute. This function properly handles boolean attributes.
* @param {string} key Normalized key. (ie ngAttribute)
* @param {string|boolean} value The value to set. If `null` attribute will be deleted.
* @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.
* Defaults to true.
* @param {string=} attrName Optional none normalized name. Defaults to key.
*/
$set: function(key, value, writeAttr, attrName) {
var booleanKey = getBooleanAttrName(this.$$element[0], key),
$$observers = this.$$observers,
normalizedVal;
if (booleanKey) {
this.$$element.prop(key, value);
attrName = booleanKey;
}
this[key] = value;
// translate normalized key to actual key
if (attrName) {
this.$attr[key] = attrName;
} else {
attrName = this.$attr[key];
if (!attrName) {
this.$attr[key] = attrName = snake_case(key, '-');
}
}
// sanitize a[href] values
if (nodeName_(this.$$element[0]) === 'A' && key === 'href') {
urlSanitizationNode.setAttribute('href', value);
// href property always returns normalized absolute url, so we can match against that
normalizedVal = urlSanitizationNode.href;
if (normalizedVal !== '' && !normalizedVal.match(urlSanitizationWhitelist)) {
this[key] = value = 'unsafe:' + normalizedVal;
}
}
if (writeAttr !== false) {
if (value === null || value === undefined) {
this.$$element.removeAttr(attrName);
} else {
this.$$element.attr(attrName, value);
}
}
// fire observers
$$observers && forEach($$observers[key], function(fn) {
try {
fn(value);
} catch (e) {
$exceptionHandler(e);
}
});
},
/**
* Observe an interpolated attribute.
* The observer will never be called, if given attribute is not interpolated.
*
* @param {string} key Normalized key. (ie ngAttribute) .
* @param {function(*)} fn Function that will be called whenever the attribute value changes.
* @returns {function(*)} the `fn` Function passed in.
*/
$observe: function(key, fn) {
var attrs = this,
$$observers = (attrs.$$observers || (attrs.$$observers = {})),
listeners = ($$observers[key] || ($$observers[key] = []));
listeners.push(fn);
$rootScope.$evalAsync(function() {
if (!listeners.$$inter) {
// no one registered attribute interpolation function, so lets call it manually
fn(attrs[key]);
}
});
return fn;
}
};
var urlSanitizationNode = $document[0].createElement('a'),
startSymbol = $interpolate.startSymbol(),
endSymbol = $interpolate.endSymbol(),
denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')
? identity
: function denormalizeTemplate(template) {
return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
};
return compile;
//================================
function compile($compileNodes, transcludeFn, maxPriority) {
if (!($compileNodes instanceof jqLite)) {
// jquery always rewraps, whereas we need to preserve the original selector so that we can modify it.
$compileNodes = jqLite($compileNodes);
}
// We can not compile top level text elements since text nodes can be merged and we will
// not be able to attach scope data to them, so we will wrap them in <span>
forEach($compileNodes, function(node, index){
if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\S+/) /* non-empty */ ) {
$compileNodes[index] = jqLite(node).wrap('<span></span>').parent()[0];
}
});
var compositeLinkFn = compileNodes($compileNodes, transcludeFn, $compileNodes, maxPriority);
return function publicLinkFn(scope, cloneConnectFn){
assertArg(scope, 'scope');
// important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
// and sometimes changes the structure of the DOM.
var $linkNode = cloneConnectFn
? JQLitePrototype.clone.call($compileNodes) // IMPORTANT!!!
: $compileNodes;
// Attach scope only to non-text nodes.
for(var i = 0, ii = $linkNode.length; i<ii; i++) {
var node = $linkNode[i];
if (node.nodeType == 1 /* element */ || node.nodeType == 9 /* document */) {
$linkNode.eq(i).data('$scope', scope);
}
}
safeAddClass($linkNode, 'ng-scope');
if (cloneConnectFn) cloneConnectFn($linkNode, scope);
if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode);
return $linkNode;
};
}
function wrongMode(localName, mode) {
throw Error("Unsupported '" + mode + "' for '" + localName + "'.");
}
function safeAddClass($element, className) {
try {
$element.addClass(className);
} catch(e) {
// ignore, since it means that we are trying to set class on
// SVG element, where class name is read-only.
}
}
/**
* Compile function matches each node in nodeList against the directives. Once all directives
* for a particular node are collected their compile functions are executed. The compile
* functions return values - the linking functions - are combined into a composite linking
* function, which is the a linking function for the node.
*
* @param {NodeList} nodeList an array of nodes or NodeList to compile
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
* scope argument is auto-generated to the new child of the transcluded parent scope.
* @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then the
* rootElement must be set the jqLite collection of the compile root. This is
* needed so that the jqLite collection items can be replaced with widgets.
* @param {number=} max directive priority
* @returns {?function} A composite linking function of all of the matched directives or null.
*/
function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority) {
var linkFns = [],
nodeLinkFn, childLinkFn, directives, attrs, linkFnFound;
for(var i = 0; i < nodeList.length; i++) {
attrs = new Attributes();
// we must always refer to nodeList[i] since the nodes can be replaced underneath us.
directives = collectDirectives(nodeList[i], [], attrs, maxPriority);
nodeLinkFn = (directives.length)
? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement)
: null;
childLinkFn = (nodeLinkFn && nodeLinkFn.terminal || !nodeList[i].childNodes || !nodeList[i].childNodes.length)
? null
: compileNodes(nodeList[i].childNodes,
nodeLinkFn ? nodeLinkFn.transclude : transcludeFn);
linkFns.push(nodeLinkFn);
linkFns.push(childLinkFn);
linkFnFound = (linkFnFound || nodeLinkFn || childLinkFn);
}
// return a linking function if we have found anything, null otherwise
return linkFnFound ? compositeLinkFn : null;
function compositeLinkFn(scope, nodeList, $rootElement, boundTranscludeFn) {
var nodeLinkFn, childLinkFn, node, childScope, childTranscludeFn, i, ii, n;
// copy nodeList so that linking doesn't break due to live list updates.
var stableNodeList = [];
for (i = 0, ii = nodeList.length; i < ii; i++) {
stableNodeList.push(nodeList[i]);
}
for(i = 0, n = 0, ii = linkFns.length; i < ii; n++) {
node = stableNodeList[n];
nodeLinkFn = linkFns[i++];
childLinkFn = linkFns[i++];
if (nodeLinkFn) {
if (nodeLinkFn.scope) {
childScope = scope.$new(isObject(nodeLinkFn.scope));
jqLite(node).data('$scope', childScope);
} else {
childScope = scope;
}
childTranscludeFn = nodeLinkFn.transclude;
if (childTranscludeFn || (!boundTranscludeFn && transcludeFn)) {
nodeLinkFn(childLinkFn, childScope, node, $rootElement,
(function(transcludeFn) {
return function(cloneFn) {
var transcludeScope = scope.$new();
transcludeScope.$$transcluded = true;
return transcludeFn(transcludeScope, cloneFn).
bind('$destroy', bind(transcludeScope, transcludeScope.$destroy));
};
})(childTranscludeFn || transcludeFn)
);
} else {
nodeLinkFn(childLinkFn, childScope, node, undefined, boundTranscludeFn);
}
} else if (childLinkFn) {
childLinkFn(scope, node.childNodes, undefined, boundTranscludeFn);
}
}
}
}
/**
* Looks for directives on the given node and adds them to the directive collection which is
* sorted.
*
* @param node Node to search.
* @param directives An array to which the directives are added to. This array is sorted before
* the function returns.
* @param attrs The shared attrs object which is used to populate the normalized attributes.
* @param {number=} maxPriority Max directive priority.
*/
function collectDirectives(node, directives, attrs, maxPriority) {
var nodeType = node.nodeType,
attrsMap = attrs.$attr,
match,
className;
switch(nodeType) {
case 1: /* Element */
// use the node name: <directive>
addDirective(directives,
directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority);
// iterate over the attributes
for (var attr, name, nName, value, nAttrs = node.attributes,
j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {
attr = nAttrs[j];
if (!msie || msie >= 8 || attr.specified) {
name = attr.name;
nName = directiveNormalize(name.toLowerCase());
attrsMap[nName] = name;
attrs[nName] = value = trim((msie && name == 'href')
? decodeURIComponent(node.getAttribute(name, 2))
: attr.value);
if (getBooleanAttrName(node, nName)) {
attrs[nName] = true; // presence means true
}
addAttrInterpolateDirective(node, directives, value, nName);
addDirective(directives, nName, 'A', maxPriority);
}
}
// use class as directive
className = node.className;
if (isString(className) && className !== '') {
while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
nName = directiveNormalize(match[2]);
if (addDirective(directives, nName, 'C', maxPriority)) {
attrs[nName] = trim(match[3]);
}
className = className.substr(match.index + match[0].length);
}
}
break;
case 3: /* Text Node */
addTextInterpolateDirective(directives, node.nodeValue);
break;
case 8: /* Comment */
try {
match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
if (match) {
nName = directiveNormalize(match[1]);
if (addDirective(directives, nName, 'M', maxPriority)) {
attrs[nName] = trim(match[2]);
}
}
} catch (e) {
// turns out that under some circumstances IE9 throws errors when one attempts to read comment's node value.
// Just ignore it and continue. (Can't seem to reproduce in test case.)
}
break;
}
directives.sort(byPriority);
return directives;
}
/**
* Once the directives have been collected, their compile functions are executed. This method
* is responsible for inlining directive templates as well as terminating the application
* of the directives if the terminal directive has been reached.
*
* @param {Array} directives Array of collected directives to execute their compile function.
* this needs to be pre-sorted by priority order.
* @param {Node} compileNode The raw DOM node to apply the compile functions to
* @param {Object} templateAttrs The shared attribute function
* @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the
* scope argument is auto-generated to the new child of the transcluded parent scope.
* @param {JQLite} jqCollection If we are working on the root of the compile tree then this
* argument has the root jqLite array so that we can replace nodes on it.
* @returns linkFn
*/
function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, jqCollection) {
var terminalPriority = -Number.MAX_VALUE,
preLinkFns = [],
postLinkFns = [],
newScopeDirective = null,
newIsolateScopeDirective = null,
templateDirective = null,
$compileNode = templateAttrs.$$element = jqLite(compileNode),
directive,
directiveName,
$template,
transcludeDirective,
childTranscludeFn = transcludeFn,
controllerDirectives,
linkFn,
directiveValue;
// executes all directives on the current element
for(var i = 0, ii = directives.length; i < ii; i++) {
directive = directives[i];
$template = undefined;
if (terminalPriority > directive.priority) {
break; // prevent further processing of directives
}
if (directiveValue = directive.scope) {
assertNoDuplicate('isolated scope', newIsolateScopeDirective, directive, $compileNode);
if (isObject(directiveValue)) {
safeAddClass($compileNode, 'ng-isolate-scope');
newIsolateScopeDirective = directive;
}
safeAddClass($compileNode, 'ng-scope');
newScopeDirective = newScopeDirective || directive;
}
directiveName = directive.name;
if (directiveValue = directive.controller) {
controllerDirectives = controllerDirectives || {};
assertNoDuplicate("'" + directiveName + "' controller",
controllerDirectives[directiveName], directive, $compileNode);
controllerDirectives[directiveName] = directive;
}
if (directiveValue = directive.transclude) {
assertNoDuplicate('transclusion', transcludeDirective, directive, $compileNode);
transcludeDirective = directive;
terminalPriority = directive.priority;
if (directiveValue == 'element') {
$template = jqLite(compileNode);
$compileNode = templateAttrs.$$element =
jqLite(document.createComment(' ' + directiveName + ': ' + templateAttrs[directiveName] + ' '));
compileNode = $compileNode[0];
replaceWith(jqCollection, jqLite($template[0]), compileNode);
childTranscludeFn = compile($template, transcludeFn, terminalPriority);
} else {
$template = jqLite(JQLiteClone(compileNode)).contents();
$compileNode.html(''); // clear contents
childTranscludeFn = compile($template, transcludeFn);
}
}
if ((directiveValue = directive.template)) {
assertNoDuplicate('template', templateDirective, directive, $compileNode);
templateDirective = directive;
directiveValue = denormalizeTemplate(directiveValue);
if (directive.replace) {
$template = jqLite('<div>' +
trim(directiveValue) +
'</div>').contents();
compileNode = $template[0];
if ($template.length != 1 || compileNode.nodeType !== 1) {
throw new Error(MULTI_ROOT_TEMPLATE_ERROR + directiveValue);
}
replaceWith(jqCollection, $compileNode, compileNode);
var newTemplateAttrs = {$attr: {}};
// combine directives from the original node and from the template:
// - take the array of directives for this element
// - split it into two parts, those that were already applied and those that weren't
// - collect directives from the template, add them to the second group and sort them
// - append the second group with new directives to the first group
directives = directives.concat(
collectDirectives(
compileNode,
directives.splice(i + 1, directives.length - (i + 1)),
newTemplateAttrs
)
);
mergeTemplateAttributes(templateAttrs, newTemplateAttrs);
ii = directives.length;
} else {
$compileNode.html(directiveValue);
}
}
if (directive.templateUrl) {
assertNoDuplicate('template', templateDirective, directive, $compileNode);
templateDirective = directive;
nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i),
nodeLinkFn, $compileNode, templateAttrs, jqCollection, directive.replace,
childTranscludeFn);
ii = directives.length;
} else if (directive.compile) {
try {
linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);
if (isFunction(linkFn)) {
addLinkFns(null, linkFn);
} else if (linkFn) {
addLinkFns(linkFn.pre, linkFn.post);
}
} catch (e) {
$exceptionHandler(e, startingTag($compileNode));
}
}
if (directive.terminal) {
nodeLinkFn.terminal = true;
terminalPriority = Math.max(terminalPriority, directive.priority);
}
}
nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope;
nodeLinkFn.transclude = transcludeDirective && childTranscludeFn;
// might be normal or delayed nodeLinkFn depending on if templateUrl is present
return nodeLinkFn;
////////////////////
function addLinkFns(pre, post) {
if (pre) {
pre.require = directive.require;
preLinkFns.push(pre);
}
if (post) {
post.require = directive.require;
postLinkFns.push(post);
}
}
function getControllers(require, $element) {
var value, retrievalMethod = 'data', optional = false;
if (isString(require)) {
while((value = require.charAt(0)) == '^' || value == '?') {
require = require.substr(1);
if (value == '^') {
retrievalMethod = 'inheritedData';
}
optional = optional || value == '?';
}
value = $element[retrievalMethod]('$' + require + 'Controller');
if (!value && !optional) {
throw Error("No controller: " + require);
}
return value;
} else if (isArray(require)) {
value = [];
forEach(require, function(require) {
value.push(getControllers(require, $element));
});
}
return value;
}
function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
var attrs, $element, i, ii, linkFn, controller;
if (compileNode === linkNode) {
attrs = templateAttrs;
} else {
attrs = shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));
}
$element = attrs.$$element;
if (newIsolateScopeDirective) {
var LOCAL_REGEXP = /^\s*([@=&])\s*(\w*)\s*$/;
var parentScope = scope.$parent || scope;
forEach(newIsolateScopeDirective.scope, function(definiton, scopeName) {
var match = definiton.match(LOCAL_REGEXP) || [],
attrName = match[2]|| scopeName,
mode = match[1], // @, =, or &
lastValue,
parentGet, parentSet;
scope.$$isolateBindings[scopeName] = mode + attrName;
switch (mode) {
case '@': {
attrs.$observe(attrName, function(value) {
scope[scopeName] = value;
});
attrs.$$observers[attrName].$$scope = parentScope;
break;
}
case '=': {
parentGet = $parse(attrs[attrName]);
parentSet = parentGet.assign || function() {
// reset the change, or we will throw this exception on every $digest
lastValue = scope[scopeName] = parentGet(parentScope);
throw Error(NON_ASSIGNABLE_MODEL_EXPRESSION + attrs[attrName] +
' (directive: ' + newIsolateScopeDirective.name + ')');
};
lastValue = scope[scopeName] = parentGet(parentScope);
scope.$watch(function parentValueWatch() {
var parentValue = parentGet(parentScope);
if (parentValue !== scope[scopeName]) {
// we are out of sync and need to copy
if (parentValue !== lastValue) {
// parent changed and it has precedence
lastValue = scope[scopeName] = parentValue;
} else {
// if the parent can be assigned then do so
parentSet(parentScope, parentValue = lastValue = scope[scopeName]);
}
}
return parentValue;
});
break;
}
case '&': {
parentGet = $parse(attrs[attrName]);
scope[scopeName] = function(locals) {
return parentGet(parentScope, locals);
};
break;
}
default: {
throw Error('Invalid isolate scope definition for directive ' +
newIsolateScopeDirective.name + ': ' + definiton);
}
}
});
}
if (controllerDirectives) {
forEach(controllerDirectives, function(directive) {
var locals = {
$scope: scope,
$element: $element,
$attrs: attrs,
$transclude: boundTranscludeFn
};
controller = directive.controller;
if (controller == '@') {
controller = attrs[directive.name];
}
$element.data(
'$' + directive.name + 'Controller',
$controller(controller, locals));
});
}
// PRELINKING
for(i = 0, ii = preLinkFns.length; i < ii; i++) {
try {
linkFn = preLinkFns[i];
linkFn(scope, $element, attrs,
linkFn.require && getControllers(linkFn.require, $element));
} catch (e) {
$exceptionHandler(e, startingTag($element));
}
}
// RECURSION
childLinkFn && childLinkFn(scope, linkNode.childNodes, undefined, boundTranscludeFn);
// POSTLINKING
for(i = 0, ii = postLinkFns.length; i < ii; i++) {
try {
linkFn = postLinkFns[i];
linkFn(scope, $element, attrs,
linkFn.require && getControllers(linkFn.require, $element));
} catch (e) {
$exceptionHandler(e, startingTag($element));
}
}
}
}
/**
* looks up the directive and decorates it with exception handling and proper parameters. We
* call this the boundDirective.
*
* @param {string} name name of the directive to look up.
* @param {string} location The directive must be found in specific format.
* String containing any of theses characters:
*
* * `E`: element name
* * `A': attribute
* * `C`: class
* * `M`: comment
* @returns true if directive was added.
*/
function addDirective(tDirectives, name, location, maxPriority) {
var match = false;
if (hasDirectives.hasOwnProperty(name)) {
for(var directive, directives = $injector.get(name + Suffix),
i = 0, ii = directives.length; i<ii; i++) {
try {
directive = directives[i];
if ( (maxPriority === undefined || maxPriority > directive.priority) &&
directive.restrict.indexOf(location) != -1) {
tDirectives.push(directive);
match = true;
}
} catch(e) { $exceptionHandler(e); }
}
}
return match;
}
/**
* When the element is replaced with HTML template then the new attributes
* on the template need to be merged with the existing attributes in the DOM.
* The desired effect is to have both of the attributes present.
*
* @param {object} dst destination attributes (original DOM)
* @param {object} src source attributes (from the directive template)
*/
function mergeTemplateAttributes(dst, src) {
var srcAttr = src.$attr,
dstAttr = dst.$attr,
$element = dst.$$element;
// reapply the old attributes to the new element
forEach(dst, function(value, key) {
if (key.charAt(0) != '$') {
if (src[key]) {
value += (key === 'style' ? ';' : ' ') + src[key];
}
dst.$set(key, value, true, srcAttr[key]);
}
});
// copy the new attributes on the old attrs object
forEach(src, function(value, key) {
if (key == 'class') {
safeAddClass($element, value);
dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
} else if (key == 'style') {
$element.attr('style', $element.attr('style') + ';' + value);
} else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
dst[key] = value;
dstAttr[key] = srcAttr[key];
}
});
}
function compileTemplateUrl(directives, beforeTemplateNodeLinkFn, $compileNode, tAttrs,
$rootElement, replace, childTranscludeFn) {
var linkQueue = [],
afterTemplateNodeLinkFn,
afterTemplateChildLinkFn,
beforeTemplateCompileNode = $compileNode[0],
origAsyncDirective = directives.shift(),
// The fact that we have to copy and patch the directive seems wrong!
derivedSyncDirective = extend({}, origAsyncDirective, {
controller: null, templateUrl: null, transclude: null, scope: null
});
$compileNode.html('');
$http.get(origAsyncDirective.templateUrl, {cache: $templateCache}).
success(function(content) {
var compileNode, tempTemplateAttrs, $template;
content = denormalizeTemplate(content);
if (replace) {
$template = jqLite('<div>' + trim(content) + '</div>').contents();
compileNode = $template[0];
if ($template.length != 1 || compileNode.nodeType !== 1) {
throw new Error(MULTI_ROOT_TEMPLATE_ERROR + content);
}
tempTemplateAttrs = {$attr: {}};
replaceWith($rootElement, $compileNode, compileNode);
collectDirectives(compileNode, directives, tempTemplateAttrs);
mergeTemplateAttributes(tAttrs, tempTemplateAttrs);
} else {
compileNode = beforeTemplateCompileNode;
$compileNode.html(content);
}
directives.unshift(derivedSyncDirective);
afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs, childTranscludeFn);
afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);
while(linkQueue.length) {
var controller = linkQueue.pop(),
linkRootElement = linkQueue.pop(),
beforeTemplateLinkNode = linkQueue.pop(),
scope = linkQueue.pop(),
linkNode = compileNode;
if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {
// it was cloned therefore we have to clone as well.
linkNode = JQLiteClone(compileNode);
replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);
}
afterTemplateNodeLinkFn(function() {
beforeTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement, controller);
}, scope, linkNode, $rootElement, controller);
}
linkQueue = null;
}).
error(function(response, code, headers, config) {
throw Error('Failed to load template: ' + config.url);
});
return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, controller) {
if (linkQueue) {
linkQueue.push(scope);
linkQueue.push(node);
linkQueue.push(rootElement);
linkQueue.push(controller);
} else {
afterTemplateNodeLinkFn(function() {
beforeTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, controller);
}, scope, node, rootElement, controller);
}
};
}
/**
* Sorting function for bound directives.
*/
function byPriority(a, b) {
return b.priority - a.priority;
}
function assertNoDuplicate(what, previousDirective, directive, element) {
if (previousDirective) {
throw Error('Multiple directives [' + previousDirective.name + ', ' +
directive.name + '] asking for ' + what + ' on: ' + startingTag(element));
}
}
function addTextInterpolateDirective(directives, text) {
var interpolateFn = $interpolate(text, true);
if (interpolateFn) {
directives.push({
priority: 0,
compile: valueFn(function textInterpolateLinkFn(scope, node) {
var parent = node.parent(),
bindings = parent.data('$binding') || [];
bindings.push(interpolateFn);
safeAddClass(parent.data('$binding', bindings), 'ng-binding');
scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
node[0].nodeValue = value;
});
})
});
}
}
function addAttrInterpolateDirective(node, directives, value, name) {
var interpolateFn = $interpolate(value, true);
// no interpolation found -> ignore
if (!interpolateFn) return;
directives.push({
priority: 100,
compile: valueFn(function attrInterpolateLinkFn(scope, element, attr) {
var $$observers = (attr.$$observers || (attr.$$observers = {}));
if (name === 'class') {
// we need to interpolate classes again, in the case the element was replaced
// and therefore the two class attrs got merged - we want to interpolate the result
interpolateFn = $interpolate(attr[name], true);
}
attr[name] = undefined;
($$observers[name] || ($$observers[name] = [])).$$inter = true;
(attr.$$observers && attr.$$observers[name].$$scope || scope).
$watch(interpolateFn, function interpolateFnWatchAction(value) {
attr.$set(name, value);
});
})
});
}
/**
* This is a special jqLite.replaceWith, which can replace items which
* have no parents, provided that the containing jqLite collection is provided.
*
* @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes
* in the root of the tree.
* @param {JqLite} $element The jqLite element which we are going to replace. We keep the shell,
* but replace its DOM node reference.
* @param {Node} newNode The new DOM node.
*/
function replaceWith($rootElement, $element, newNode) {
var oldNode = $element[0],
parent = oldNode.parentNode,
i, ii;
if ($rootElement) {
for(i = 0, ii = $rootElement.length; i < ii; i++) {
if ($rootElement[i] == oldNode) {
$rootElement[i] = newNode;
break;
}
}
}
if (parent) {
parent.replaceChild(newNode, oldNode);
}
newNode[jqLite.expando] = oldNode[jqLite.expando];
$element[0] = newNode;
}
}];
}
var PREFIX_REGEXP = /^(x[\:\-_]|data[\:\-_])/i;
/**
* Converts all accepted directives format into proper directive name.
* All of these will become 'myDirective':
* my:DiRective
* my-directive
* x-my-directive
* data-my:directive
*
* Also there is special case for Moz prefix starting with upper case letter.
* @param name Name to normalize
*/
function directiveNormalize(name) {
return camelCase(name.replace(PREFIX_REGEXP, ''));
}
/**
* @ngdoc object
* @name ng.$compile.directive.Attributes
* @description
*
* A shared object between directive compile / linking functions which contains normalized DOM element
* attributes. The the values reflect current binding state `{{ }}`. The normalization is needed
* since all of these are treated as equivalent in Angular:
*
* <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
*/
/**
* @ngdoc property
* @name ng.$compile.directive.Attributes#$attr
* @propertyOf ng.$compile.directive.Attributes
* @returns {object} A map of DOM element attribute names to the normalized name. This is
* needed to do reverse lookup from normalized name back to actual name.
*/
/**
* @ngdoc function
* @name ng.$compile.directive.Attributes#$set
* @methodOf ng.$compile.directive.Attributes
* @function
*
* @description
* Set DOM element attribute value.
*
*
* @param {string} name Normalized element attribute name of the property to modify. The name is
* revers translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
* property to the original name.
* @param {string} value Value to set the attribute to.
*/
/**
* Closure compiler type information
*/
function nodesetLinkingFn(
/* angular.Scope */ scope,
/* NodeList */ nodeList,
/* Element */ rootElement,
/* function(Function) */ boundTranscludeFn
){}
function directiveLinkingFn(
/* nodesetLinkingFn */ nodesetLinkingFn,
/* angular.Scope */ scope,
/* Node */ node,
/* Element */ rootElement,
/* function(Function) */ boundTranscludeFn
){}
/**
* @ngdoc object
* @name ng.$controllerProvider
* @description
* The {@link ng.$controller $controller service} is used by Angular to create new
* controllers.
*
* This provider allows controller registration via the
* {@link ng.$controllerProvider#register register} method.
*/
function $ControllerProvider() {
var controllers = {};
/**
* @ngdoc function
* @name ng.$controllerProvider#register
* @methodOf ng.$controllerProvider
* @param {string} name Controller name
* @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
* annotations in the array notation).
*/
this.register = function(name, constructor) {
if (isObject(name)) {
extend(controllers, name)
} else {
controllers[name] = constructor;
}
};
this.$get = ['$injector', '$window', function($injector, $window) {
/**
* @ngdoc function
* @name ng.$controller
* @requires $injector
*
* @param {Function|string} constructor If called with a function then it's considered to be the
* controller constructor function. Otherwise it's considered to be a string which is used
* to retrieve the controller constructor using the following steps:
*
* * check if a controller with given name is registered via `$controllerProvider`
* * check if evaluating the string on the current scope returns a constructor
* * check `window[constructor]` on the global `window` object
*
* @param {Object} locals Injection locals for Controller.
* @return {Object} Instance of given controller.
*
* @description
* `$controller` service is responsible for instantiating controllers.
*
* It's just a simple call to {@link AUTO.$injector $injector}, but extracted into
* a service, so that one can override this service with {@link https://gist.github.com/1649788
* BC version}.
*/
return function(constructor, locals) {
if(isString(constructor)) {
var name = constructor;
constructor = controllers.hasOwnProperty(name)
? controllers[name]
: getter(locals.$scope, name, true) || getter($window, name, true);
assertArgFn(constructor, name, true);
}
return $injector.instantiate(constructor, locals);
};
}];
}
/**
* @ngdoc object
* @name ng.$document
* @requires $window
*
* @description
* A {@link angular.element jQuery (lite)}-wrapped reference to the browser's `window.document`
* element.
*/
function $DocumentProvider(){
this.$get = ['$window', function(window){
return jqLite(window.document);
}];
}
/**
* @ngdoc function
* @name ng.$exceptionHandler
* @requires $log
*
* @description
* Any uncaught exception in angular expressions is delegated to this service.
* The default implementation simply delegates to `$log.error` which logs it into
* the browser console.
*
* In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
* {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.
*
* @param {Error} exception Exception associated with the error.
* @param {string=} cause optional information about the context in which
* the error was thrown.
*
*/
function $ExceptionHandlerProvider() {
this.$get = ['$log', function($log) {
return function(exception, cause) {
$log.error.apply($log, arguments);
};
}];
}
/**
* @ngdoc object
* @name ng.$interpolateProvider
* @function
*
* @description
*
* Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
*/
function $InterpolateProvider() {
var startSymbol = '{{';
var endSymbol = '}}';
/**
* @ngdoc method
* @name ng.$interpolateProvider#startSymbol
* @methodOf ng.$interpolateProvider
* @description
* Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
*
* @param {string=} value new value to set the starting symbol to.
* @returns {string|self} Returns the symbol when used as getter and self if used as setter.
*/
this.startSymbol = function(value){
if (value) {
startSymbol = value;
return this;
} else {
return startSymbol;
}
};
/**
* @ngdoc method
* @name ng.$interpolateProvider#endSymbol
* @methodOf ng.$interpolateProvider
* @description
* Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
*
* @param {string=} value new value to set the ending symbol to.
* @returns {string|self} Returns the symbol when used as getter and self if used as setter.
*/
this.endSymbol = function(value){
if (value) {
endSymbol = value;
return this;
} else {
return endSymbol;
}
};
this.$get = ['$parse', function($parse) {
var startSymbolLength = startSymbol.length,
endSymbolLength = endSymbol.length;
/**
* @ngdoc function
* @name ng.$interpolate
* @function
*
* @requires $parse
*
* @description
*
* Compiles a string with markup into an interpolation function. This service is used by the
* HTML {@link ng.$compile $compile} service for data binding. See
* {@link ng.$interpolateProvider $interpolateProvider} for configuring the
* interpolation markup.
*
*
<pre>
var $interpolate = ...; // injected
var exp = $interpolate('Hello {{name}}!');
expect(exp({name:'Angular'}).toEqual('Hello Angular!');
</pre>
*
*
* @param {string} text The text with markup to interpolate.
* @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
* embedded expression in order to return an interpolation function. Strings with no
* embedded expression will return null for the interpolation function.
* @returns {function(context)} an interpolation function which is used to compute the interpolated
* string. The function has these parameters:
*
* * `context`: an object against which any expressions embedded in the strings are evaluated
* against.
*
*/
function $interpolate(text, mustHaveExpression) {
var startIndex,
endIndex,
index = 0,
parts = [],
length = text.length,
hasInterpolation = false,
fn,
exp,
concat = [];
while(index < length) {
if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&
((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {
(index != startIndex) && parts.push(text.substring(index, startIndex));
parts.push(fn = $parse(exp = text.substring(startIndex + startSymbolLength, endIndex)));
fn.exp = exp;
index = endIndex + endSymbolLength;
hasInterpolation = true;
} else {
// we did not find anything, so we have to add the remainder to the parts array
(index != length) && parts.push(text.substring(index));
index = length;
}
}
if (!(length = parts.length)) {
// we added, nothing, must have been an empty string.
parts.push('');
length = 1;
}
if (!mustHaveExpression || hasInterpolation) {
concat.length = length;
fn = function(context) {
for(var i = 0, ii = length, part; i<ii; i++) {
if (typeof (part = parts[i]) == 'function') {
part = part(context);
if (part == null || part == undefined) {
part = '';
} else if (typeof part != 'string') {
part = toJson(part);
}
}
concat[i] = part;
}
return concat.join('');
};
fn.exp = text;
fn.parts = parts;
return fn;
}
}
/**
* @ngdoc method
* @name ng.$interpolate#startSymbol
* @methodOf ng.$interpolate
* @description
* Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
*
* Use {@link ng.$interpolateProvider#startSymbol $interpolateProvider#startSymbol} to change
* the symbol.
*
* @returns {string} start symbol.
*/
$interpolate.startSymbol = function() {
return startSymbol;
}
/**
* @ngdoc method
* @name ng.$interpolate#endSymbol
* @methodOf ng.$interpolate
* @description
* Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
*
* Use {@link ng.$interpolateProvider#endSymbol $interpolateProvider#endSymbol} to change
* the symbol.
*
* @returns {string} start symbol.
*/
$interpolate.endSymbol = function() {
return endSymbol;
}
return $interpolate;
}];
}
var URL_MATCH = /^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
PATH_MATCH = /^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,
HASH_MATCH = PATH_MATCH,
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
/**
* Encode path using encodeUriSegment, ignoring forward slashes
*
* @param {string} path Path to encode
* @returns {string}
*/
function encodePath(path) {
var segments = path.split('/'),
i = segments.length;
while (i--) {
segments[i] = encodeUriSegment(segments[i]);
}
return segments.join('/');
}
function stripHash(url) {
return url.split('#')[0];
}
function matchUrl(url, obj) {
var match = URL_MATCH.exec(url);
match = {
protocol: match[1],
host: match[3],
port: int(match[5]) || DEFAULT_PORTS[match[1]] || null,
path: match[6] || '/',
search: match[8],
hash: match[10]
};
if (obj) {
obj.$$protocol = match.protocol;
obj.$$host = match.host;
obj.$$port = match.port;
}
return match;
}
function composeProtocolHostPort(protocol, host, port) {
return protocol + '://' + host + (port == DEFAULT_PORTS[protocol] ? '' : ':' + port);
}
function pathPrefixFromBase(basePath) {
return basePath.substr(0, basePath.lastIndexOf('/'));
}
function convertToHtml5Url(url, basePath, hashPrefix) {
var match = matchUrl(url);
// already html5 url
if (decodeURIComponent(match.path) != basePath || isUndefined(match.hash) ||
match.hash.indexOf(hashPrefix) !== 0) {
return url;
// convert hashbang url -> html5 url
} else {
return composeProtocolHostPort(match.protocol, match.host, match.port) +
pathPrefixFromBase(basePath) + match.hash.substr(hashPrefix.length);
}
}
function convertToHashbangUrl(url, basePath, hashPrefix) {
var match = matchUrl(url);
// already hashbang url
if (decodeURIComponent(match.path) == basePath && !isUndefined(match.hash) &&
match.hash.indexOf(hashPrefix) === 0) {
return url;
// convert html5 url -> hashbang url
} else {
var search = match.search && '?' + match.search || '',
hash = match.hash && '#' + match.hash || '',
pathPrefix = pathPrefixFromBase(basePath),
path = match.path.substr(pathPrefix.length);
if (match.path.indexOf(pathPrefix) !== 0) {
throw Error('Invalid url "' + url + '", missing path prefix "' + pathPrefix + '" !');
}
return composeProtocolHostPort(match.protocol, match.host, match.port) + basePath +
'#' + hashPrefix + path + search + hash;
}
}
/**
* LocationUrl represents an url
* This object is exposed as $location service when HTML5 mode is enabled and supported
*
* @constructor
* @param {string} url HTML5 url
* @param {string} pathPrefix
*/
function LocationUrl(url, pathPrefix, appBaseUrl) {
pathPrefix = pathPrefix || '';
/**
* Parse given html5 (regular) url string into properties
* @param {string} newAbsoluteUrl HTML5 url
* @private
*/
this.$$parse = function(newAbsoluteUrl) {
var match = matchUrl(newAbsoluteUrl, this);
if (match.path.indexOf(pathPrefix) !== 0) {
throw Error('Invalid url "' + newAbsoluteUrl + '", missing path prefix "' + pathPrefix + '" !');
}
this.$$path = decodeURIComponent(match.path.substr(pathPrefix.length));
this.$$search = parseKeyValue(match.search);
this.$$hash = match.hash && decodeURIComponent(match.hash) || '';
this.$$compose();
};
/**
* Compose url and update `absUrl` property
* @private
*/
this.$$compose = function() {
var search = toKeyValue(this.$$search),
hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
this.$$absUrl = composeProtocolHostPort(this.$$protocol, this.$$host, this.$$port) +
pathPrefix + this.$$url;
};
this.$$rewriteAppUrl = function(absoluteLinkUrl) {
if(absoluteLinkUrl.indexOf(appBaseUrl) == 0) {
return absoluteLinkUrl;
}
}
this.$$parse(url);
}
/**
* LocationHashbangUrl represents url
* This object is exposed as $location service when html5 history api is disabled or not supported
*
* @constructor
* @param {string} url Legacy url
* @param {string} hashPrefix Prefix for hash part (containing path and search)
*/
function LocationHashbangUrl(url, hashPrefix, appBaseUrl) {
var basePath;
/**
* Parse given hashbang url into properties
* @param {string} url Hashbang url
* @private
*/
this.$$parse = function(url) {
var match = matchUrl(url, this);
if (match.hash && match.hash.indexOf(hashPrefix) !== 0) {
throw Error('Invalid url "' + url + '", missing hash prefix "' + hashPrefix + '" !');
}
basePath = match.path + (match.search ? '?' + match.search : '');
match = HASH_MATCH.exec((match.hash || '').substr(hashPrefix.length));
if (match[1]) {
this.$$path = (match[1].charAt(0) == '/' ? '' : '/') + decodeURIComponent(match[1]);
} else {
this.$$path = '';
}
this.$$search = parseKeyValue(match[3]);
this.$$hash = match[5] && decodeURIComponent(match[5]) || '';
this.$$compose();
};
/**
* Compose hashbang url and update `absUrl` property
* @private
*/
this.$$compose = function() {
var search = toKeyValue(this.$$search),
hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
this.$$absUrl = composeProtocolHostPort(this.$$protocol, this.$$host, this.$$port) +
basePath + (this.$$url ? '#' + hashPrefix + this.$$url : '');
};
this.$$rewriteAppUrl = function(absoluteLinkUrl) {
if(absoluteLinkUrl.indexOf(appBaseUrl) == 0) {
return absoluteLinkUrl;
}
}
this.$$parse(url);
}
LocationUrl.prototype = {
/**
* Has any change been replacing ?
* @private
*/
$$replace: false,
/**
* @ngdoc method
* @name ng.$location#absUrl
* @methodOf ng.$location
*
* @description
* This method is getter only.
*
* Return full url representation with all segments encoded according to rules specified in
* {@link http://www.ietf.org/rfc/rfc3986.txt RFC 3986}.
*
* @return {string} full url
*/
absUrl: locationGetter('$$absUrl'),
/**
* @ngdoc method
* @name ng.$location#url
* @methodOf ng.$location
*
* @description
* This method is getter / setter.
*
* Return url (e.g. `/path?a=b#hash`) when called without any parameter.
*
* Change path, search and hash, when called with parameter and return `$location`.
*
* @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
* @return {string} url
*/
url: function(url, replace) {
if (isUndefined(url))
return this.$$url;
var match = PATH_MATCH.exec(url);
if (match[1]) this.path(decodeURIComponent(match[1]));
if (match[2] || match[1]) this.search(match[3] || '');
this.hash(match[5] || '', replace);
return this;
},
/**
* @ngdoc method
* @name ng.$location#protocol
* @methodOf ng.$location
*
* @description
* This method is getter only.
*
* Return protocol of current url.
*
* @return {string} protocol of current url
*/
protocol: locationGetter('$$protocol'),
/**
* @ngdoc method
* @name ng.$location#host
* @methodOf ng.$location
*
* @description
* This method is getter only.
*
* Return host of current url.
*
* @return {string} host of current url.
*/
host: locationGetter('$$host'),
/**
* @ngdoc method
* @name ng.$location#port
* @methodOf ng.$location
*
* @description
* This method is getter only.
*
* Return port of current url.
*
* @return {Number} port
*/
port: locationGetter('$$port'),
/**
* @ngdoc method
* @name ng.$location#path
* @methodOf ng.$location
*
* @description
* This method is getter / setter.
*
* Return path of current url when called without any parameter.
*
* Change path when called with parameter and return `$location`.
*
* Note: Path should always begin with forward slash (/), this method will add the forward slash
* if it is missing.
*
* @param {string=} path New path
* @return {string} path
*/
path: locationGetterSetter('$$path', function(path) {
return path.charAt(0) == '/' ? path : '/' + path;
}),
/**
* @ngdoc method
* @name ng.$location#search
* @methodOf ng.$location
*
* @description
* This method is getter / setter.
*
* Return search part (as object) of current url when called without any parameter.
*
* Change search part when called with parameter and return `$location`.
*
* @param {string|object<string,string>=} search New search params - string or hash object
* @param {string=} paramValue If `search` is a string, then `paramValue` will override only a
* single search parameter. If the value is `null`, the parameter will be deleted.
*
* @return {string} search
*/
search: function(search, paramValue) {
if (isUndefined(search))
return this.$$search;
if (isDefined(paramValue)) {
if (paramValue === null) {
delete this.$$search[search];
} else {
this.$$search[search] = paramValue;
}
} else {
this.$$search = isString(search) ? parseKeyValue(search) : search;
}
this.$$compose();
return this;
},
/**
* @ngdoc method
* @name ng.$location#hash
* @methodOf ng.$location
*
* @description
* This method is getter / setter.
*
* Return hash fragment when called without any parameter.
*
* Change hash fragment when called with parameter and return `$location`.
*
* @param {string=} hash New hash fragment
* @return {string} hash
*/
hash: locationGetterSetter('$$hash', identity),
/**
* @ngdoc method
* @name ng.$location#replace
* @methodOf ng.$location
*
* @description
* If called, all changes to $location during current `$digest` will be replacing current history
* record, instead of adding new one.
*/
replace: function() {
this.$$replace = true;
return this;
}
};
LocationHashbangUrl.prototype = inherit(LocationUrl.prototype);
function LocationHashbangInHtml5Url(url, hashPrefix, appBaseUrl, baseExtra) {
LocationHashbangUrl.apply(this, arguments);
this.$$rewriteAppUrl = function(absoluteLinkUrl) {
if (absoluteLinkUrl.indexOf(appBaseUrl) == 0) {
return appBaseUrl + baseExtra + '#' + hashPrefix + absoluteLinkUrl.substr(appBaseUrl.length);
}
}
}
LocationHashbangInHtml5Url.prototype = inherit(LocationHashbangUrl.prototype);
function locationGetter(property) {
return function() {
return this[property];
};
}
function locationGetterSetter(property, preprocess) {
return function(value) {
if (isUndefined(value))
return this[property];
this[property] = preprocess(value);
this.$$compose();
return this;
};
}
/**
* @ngdoc object
* @name ng.$location
*
* @requires $browser
* @requires $sniffer
* @requires $rootElement
*
* @description
* The $location service parses the URL in the browser address bar (based on the
* {@link https://developer.mozilla.org/en/window.location window.location}) and makes the URL
* available to your application. Changes to the URL in the address bar are reflected into
* $location service and changes to $location are reflected into the browser address bar.
*
* **The $location service:**
*
* - Exposes the current URL in the browser address bar, so you can
* - Watch and observe the URL.
* - Change the URL.
* - Synchronizes the URL with the browser when the user
* - Changes the address bar.
* - Clicks the back or forward button (or clicks a History link).
* - Clicks on a link.
* - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
*
* For more information see {@link guide/dev_guide.services.$location Developer Guide: Angular
* Services: Using $location}
*/
/**
* @ngdoc object
* @name ng.$locationProvider
* @description
* Use the `$locationProvider` to configure how the application deep linking paths are stored.
*/
function $LocationProvider(){
var hashPrefix = '',
html5Mode = false;
/**
* @ngdoc property
* @name ng.$locationProvider#hashPrefix
* @methodOf ng.$locationProvider
* @description
* @param {string=} prefix Prefix for hash part (containing path and search)
* @returns {*} current value if used as getter or itself (chaining) if used as setter
*/
this.hashPrefix = function(prefix) {
if (isDefined(prefix)) {
hashPrefix = prefix;
return this;
} else {
return hashPrefix;
}
};
/**
* @ngdoc property
* @name ng.$locationProvider#html5Mode
* @methodOf ng.$locationProvider
* @description
* @param {string=} mode Use HTML5 strategy if available.
* @returns {*} current value if used as getter or itself (chaining) if used as setter
*/
this.html5Mode = function(mode) {
if (isDefined(mode)) {
html5Mode = mode;
return this;
} else {
return html5Mode;
}
};
this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',
function( $rootScope, $browser, $sniffer, $rootElement) {
var $location,
basePath,
pathPrefix,
initUrl = $browser.url(),
initUrlParts = matchUrl(initUrl),
appBaseUrl;
if (html5Mode) {
basePath = $browser.baseHref() || '/';
pathPrefix = pathPrefixFromBase(basePath);
appBaseUrl =
composeProtocolHostPort(initUrlParts.protocol, initUrlParts.host, initUrlParts.port) +
pathPrefix + '/';
if ($sniffer.history) {
$location = new LocationUrl(
convertToHtml5Url(initUrl, basePath, hashPrefix),
pathPrefix, appBaseUrl);
} else {
$location = new LocationHashbangInHtml5Url(
convertToHashbangUrl(initUrl, basePath, hashPrefix),
hashPrefix, appBaseUrl, basePath.substr(pathPrefix.length + 1));
}
} else {
appBaseUrl =
composeProtocolHostPort(initUrlParts.protocol, initUrlParts.host, initUrlParts.port) +
(initUrlParts.path || '') +
(initUrlParts.search ? ('?' + initUrlParts.search) : '') +
'#' + hashPrefix + '/';
$location = new LocationHashbangUrl(initUrl, hashPrefix, appBaseUrl);
}
$rootElement.bind('click', function(event) {
// TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
// currently we open nice url link and redirect then
if (event.ctrlKey || event.metaKey || event.which == 2) return;
var elm = jqLite(event.target);
// traverse the DOM up to find first A tag
while (lowercase(elm[0].nodeName) !== 'a') {
// ignore rewriting if no A tag (reached root element, or no parent - removed from document)
if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;
}
var absHref = elm.prop('href'),
rewrittenUrl = $location.$$rewriteAppUrl(absHref);
if (absHref && !elm.attr('target') && rewrittenUrl) {
// update location manually
$location.$$parse(rewrittenUrl);
$rootScope.$apply();
event.preventDefault();
// hack to work around FF6 bug 684208 when scenario runner clicks on links
window.angular['ff-684208-preventDefault'] = true;
}
});
// rewrite hashbang url <> html5 url
if ($location.absUrl() != initUrl) {
$browser.url($location.absUrl(), true);
}
// update $location when $browser url changes
$browser.onUrlChange(function(newUrl) {
if ($location.absUrl() != newUrl) {
if ($rootScope.$broadcast('$locationChangeStart', newUrl, $location.absUrl()).defaultPrevented) {
$browser.url($location.absUrl());
return;
}
$rootScope.$evalAsync(function() {
var oldUrl = $location.absUrl();
$location.$$parse(newUrl);
afterLocationChange(oldUrl);
});
if (!$rootScope.$$phase) $rootScope.$digest();
}
});
// update browser
var changeCounter = 0;
$rootScope.$watch(function $locationWatch() {
var oldUrl = $browser.url();
var currentReplace = $location.$$replace;
if (!changeCounter || oldUrl != $location.absUrl()) {
changeCounter++;
$rootScope.$evalAsync(function() {
if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).
defaultPrevented) {
$location.$$parse(oldUrl);
} else {
$browser.url($location.absUrl(), currentReplace);
afterLocationChange(oldUrl);
}
});
}
$location.$$replace = false;
return changeCounter;
});
return $location;
function afterLocationChange(oldUrl) {
$rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);
}
}];
}
/**
* @ngdoc object
* @name ng.$log
* @requires $window
*
* @description
* Simple service for logging. Default implementation writes the message
* into the browser's console (if present).
*
* The main purpose of this service is to simplify debugging and troubleshooting.
*
* @example
<example>
<file name="script.js">
function LogCtrl($scope, $log) {
$scope.$log = $log;
$scope.message = 'Hello World!';
}
</file>
<file name="index.html">
<div ng-controller="LogCtrl">
<p>Reload this page with open console, enter text and hit the log button...</p>
Message:
<input type="text" ng-model="message"/>
<button ng-click="$log.log(message)">log</button>
<button ng-click="$log.warn(message)">warn</button>
<button ng-click="$log.info(message)">info</button>
<button ng-click="$log.error(message)">error</button>
</div>
</file>
</example>
*/
function $LogProvider(){
this.$get = ['$window', function($window){
return {
/**
* @ngdoc method
* @name ng.$log#log
* @methodOf ng.$log
*
* @description
* Write a log message
*/
log: consoleLog('log'),
/**
* @ngdoc method
* @name ng.$log#warn
* @methodOf ng.$log
*
* @description
* Write a warning message
*/
warn: consoleLog('warn'),
/**
* @ngdoc method
* @name ng.$log#info
* @methodOf ng.$log
*
* @description
* Write an information message
*/
info: consoleLog('info'),
/**
* @ngdoc method
* @name ng.$log#error
* @methodOf ng.$log
*
* @description
* Write an error message
*/
error: consoleLog('error')
};
function formatError(arg) {
if (arg instanceof Error) {
if (arg.stack) {
arg = (arg.message && arg.stack.indexOf(arg.message) === -1)
? 'Error: ' + arg.message + '\n' + arg.stack
: arg.stack;
} else if (arg.sourceURL) {
arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line;
}
}
return arg;
}
function consoleLog(type) {
var console = $window.console || {},
logFn = console[type] || console.log || noop;
if (logFn.apply) {
return function() {
var args = [];
forEach(arguments, function(arg) {
args.push(formatError(arg));
});
return logFn.apply(console, args);
};
}
// we are IE which either doesn't have window.console => this is noop and we do nothing,
// or we are IE where console.log doesn't have apply so we log at least first 2 args
return function(arg1, arg2) {
logFn(arg1, arg2);
}
}
}];
}
var OPERATORS = {
'null':function(){return null;},
'true':function(){return true;},
'false':function(){return false;},
undefined:noop,
'+':function(self, locals, a,b){
a=a(self, locals); b=b(self, locals);
if (isDefined(a)) {
if (isDefined(b)) {
return a + b;
}
return a;
}
return isDefined(b)?b:undefined;},
'-':function(self, locals, a,b){a=a(self, locals); b=b(self, locals); return (isDefined(a)?a:0)-(isDefined(b)?b:0);},
'*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},
'/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},
'%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},
'^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},
'=':noop,
'==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},
'!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},
'<':function(self, locals, a,b){return a(self, locals)<b(self, locals);},
'>':function(self, locals, a,b){return a(self, locals)>b(self, locals);},
'<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},
'>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},
'&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},
'||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},
'&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},
// '|':function(self, locals, a,b){return a|b;},
'|':function(self, locals, a,b){return b(self, locals)(self, locals, a(self, locals));},
'!':function(self, locals, a){return !a(self, locals);}
};
var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'};
function lex(text, csp){
var tokens = [],
token,
index = 0,
json = [],
ch,
lastCh = ':'; // can start regexp
while (index < text.length) {
ch = text.charAt(index);
if (is('"\'')) {
readString(ch);
} else if (isNumber(ch) || is('.') && isNumber(peek())) {
readNumber();
} else if (isIdent(ch)) {
readIdent();
// identifiers can only be if the preceding char was a { or ,
if (was('{,') && json[0]=='{' &&
(token=tokens[tokens.length-1])) {
token.json = token.text.indexOf('.') == -1;
}
} else if (is('(){}[].,;:')) {
tokens.push({
index:index,
text:ch,
json:(was(':[,') && is('{[')) || is('}]:,')
});
if (is('{[')) json.unshift(ch);
if (is('}]')) json.shift();
index++;
} else if (isWhitespace(ch)) {
index++;
continue;
} else {
var ch2 = ch + peek(),
fn = OPERATORS[ch],
fn2 = OPERATORS[ch2];
if (fn2) {
tokens.push({index:index, text:ch2, fn:fn2});
index += 2;
} else if (fn) {
tokens.push({index:index, text:ch, fn:fn, json: was('[,:') && is('+-')});
index += 1;
} else {
throwError("Unexpected next character ", index, index+1);
}
}
lastCh = ch;
}
return tokens;
function is(chars) {
return chars.indexOf(ch) != -1;
}
function was(chars) {
return chars.indexOf(lastCh) != -1;
}
function peek() {
return index + 1 < text.length ? text.charAt(index + 1) : false;
}
function isNumber(ch) {
return '0' <= ch && ch <= '9';
}
function isWhitespace(ch) {
return ch == ' ' || ch == '\r' || ch == '\t' ||
ch == '\n' || ch == '\v' || ch == '\u00A0'; // IE treats non-breaking space as \u00A0
}
function isIdent(ch) {
return 'a' <= ch && ch <= 'z' ||
'A' <= ch && ch <= 'Z' ||
'_' == ch || ch == '$';
}
function isExpOperator(ch) {
return ch == '-' || ch == '+' || isNumber(ch);
}
function throwError(error, start, end) {
end = end || index;
throw Error("Lexer Error: " + error + " at column" +
(isDefined(start)
? "s " + start + "-" + index + " [" + text.substring(start, end) + "]"
: " " + end) +
" in expression [" + text + "].");
}
function readNumber() {
var number = "";
var start = index;
while (index < text.length) {
var ch = lowercase(text.charAt(index));
if (ch == '.' || isNumber(ch)) {
number += ch;
} else {
var peekCh = peek();
if (ch == 'e' && isExpOperator(peekCh)) {
number += ch;
} else if (isExpOperator(ch) &&
peekCh && isNumber(peekCh) &&
number.charAt(number.length - 1) == 'e') {
number += ch;
} else if (isExpOperator(ch) &&
(!peekCh || !isNumber(peekCh)) &&
number.charAt(number.length - 1) == 'e') {
throwError('Invalid exponent');
} else {
break;
}
}
index++;
}
number = 1 * number;
tokens.push({index:start, text:number, json:true,
fn:function() {return number;}});
}
function readIdent() {
var ident = "",
start = index,
lastDot, peekIndex, methodName, ch;
while (index < text.length) {
ch = text.charAt(index);
if (ch == '.' || isIdent(ch) || isNumber(ch)) {
if (ch == '.') lastDot = index;
ident += ch;
} else {
break;
}
index++;
}
//check if this is not a method invocation and if it is back out to last dot
if (lastDot) {
peekIndex = index;
while(peekIndex < text.length) {
ch = text.charAt(peekIndex);
if (ch == '(') {
methodName = ident.substr(lastDot - start + 1);
ident = ident.substr(0, lastDot - start);
index = peekIndex;
break;
}
if(isWhitespace(ch)) {
peekIndex++;
} else {
break;
}
}
}
var token = {
index:start,
text:ident
};
if (OPERATORS.hasOwnProperty(ident)) {
token.fn = token.json = OPERATORS[ident];
} else {
var getter = getterFn(ident, csp);
token.fn = extend(function(self, locals) {
return (getter(self, locals));
}, {
assign: function(self, value) {
return setter(self, ident, value);
}
});
}
tokens.push(token);
if (methodName) {
tokens.push({
index:lastDot,
text: '.',
json: false
});
tokens.push({
index: lastDot + 1,
text: methodName,
json: false
});
}
}
function readString(quote) {
var start = index;
index++;
var string = "";
var rawString = quote;
var escape = false;
while (index < text.length) {
var ch = text.charAt(index);
rawString += ch;
if (escape) {
if (ch == 'u') {
var hex = text.substring(index + 1, index + 5);
if (!hex.match(/[\da-f]{4}/i))
throwError( "Invalid unicode escape [\\u" + hex + "]");
index += 4;
string += String.fromCharCode(parseInt(hex, 16));
} else {
var rep = ESCAPE[ch];
if (rep) {
string += rep;
} else {
string += ch;
}
}
escape = false;
} else if (ch == '\\') {
escape = true;
} else if (ch == quote) {
index++;
tokens.push({
index:start,
text:rawString,
string:string,
json:true,
fn:function() { return string; }
});
return;
} else {
string += ch;
}
index++;
}
throwError("Unterminated quote", start);
}
}
/////////////////////////////////////////
function parser(text, json, $filter, csp){
var ZERO = valueFn(0),
value,
tokens = lex(text, csp),
assignment = _assignment,
functionCall = _functionCall,
fieldAccess = _fieldAccess,
objectIndex = _objectIndex,
filterChain = _filterChain;
if(json){
// The extra level of aliasing is here, just in case the lexer misses something, so that
// we prevent any accidental execution in JSON.
assignment = logicalOR;
functionCall =
fieldAccess =
objectIndex =
filterChain =
function() { throwError("is not valid json", {text:text, index:0}); };
value = primary();
} else {
value = statements();
}
if (tokens.length !== 0) {
throwError("is an unexpected token", tokens[0]);
}
return value;
///////////////////////////////////
function throwError(msg, token) {
throw Error("Syntax Error: Token '" + token.text +
"' " + msg + " at column " +
(token.index + 1) + " of the expression [" +
text + "] starting at [" + text.substring(token.index) + "].");
}
function peekToken() {
if (tokens.length === 0)
throw Error("Unexpected end of expression: " + text);
return tokens[0];
}
function peek(e1, e2, e3, e4) {
if (tokens.length > 0) {
var token = tokens[0];
var t = token.text;
if (t==e1 || t==e2 || t==e3 || t==e4 ||
(!e1 && !e2 && !e3 && !e4)) {
return token;
}
}
return false;
}
function expect(e1, e2, e3, e4){
var token = peek(e1, e2, e3, e4);
if (token) {
if (json && !token.json) {
throwError("is not valid json", token);
}
tokens.shift();
return token;
}
return false;
}
function consume(e1){
if (!expect(e1)) {
throwError("is unexpected, expecting [" + e1 + "]", peek());
}
}
function unaryFn(fn, right) {
return function(self, locals) {
return fn(self, locals, right);
};
}
function binaryFn(left, fn, right) {
return function(self, locals) {
return fn(self, locals, left, right);
};
}
function statements() {
var statements = [];
while(true) {
if (tokens.length > 0 && !peek('}', ')', ';', ']'))
statements.push(filterChain());
if (!expect(';')) {
// optimize for the common case where there is only one statement.
// TODO(size): maybe we should not support multiple statements?
return statements.length == 1
? statements[0]
: function(self, locals){
var value;
for ( var i = 0; i < statements.length; i++) {
var statement = statements[i];
if (statement)
value = statement(self, locals);
}
return value;
};
}
}
}
function _filterChain() {
var left = expression();
var token;
while(true) {
if ((token = expect('|'))) {
left = binaryFn(left, token.fn, filter());
} else {
return left;
}
}
}
function filter() {
var token = expect();
var fn = $filter(token.text);
var argsFn = [];
while(true) {
if ((token = expect(':'))) {
argsFn.push(expression());
} else {
var fnInvoke = function(self, locals, input){
var args = [input];
for ( var i = 0; i < argsFn.length; i++) {
args.push(argsFn[i](self, locals));
}
return fn.apply(self, args);
};
return function() {
return fnInvoke;
};
}
}
}
function expression() {
return assignment();
}
function _assignment() {
var left = logicalOR();
var right;
var token;
if ((token = expect('='))) {
if (!left.assign) {
throwError("implies assignment but [" +
text.substring(0, token.index) + "] can not be assigned to", token);
}
right = logicalOR();
return function(scope, locals){
return left.assign(scope, right(scope, locals), locals);
};
} else {
return left;
}
}
function logicalOR() {
var left = logicalAND();
var token;
while(true) {
if ((token = expect('||'))) {
left = binaryFn(left, token.fn, logicalAND());
} else {
return left;
}
}
}
function logicalAND() {
var left = equality();
var token;
if ((token = expect('&&'))) {
left = binaryFn(left, token.fn, logicalAND());
}
return left;
}
function equality() {
var left = relational();
var token;
if ((token = expect('==','!='))) {
left = binaryFn(left, token.fn, equality());
}
return left;
}
function relational() {
var left = additive();
var token;
if ((token = expect('<', '>', '<=', '>='))) {
left = binaryFn(left, token.fn, relational());
}
return left;
}
function additive() {
var left = multiplicative();
var token;
while ((token = expect('+','-'))) {
left = binaryFn(left, token.fn, multiplicative());
}
return left;
}
function multiplicative() {
var left = unary();
var token;
while ((token = expect('*','/','%'))) {
left = binaryFn(left, token.fn, unary());
}
return left;
}
function unary() {
var token;
if (expect('+')) {
return primary();
} else if ((token = expect('-'))) {
return binaryFn(ZERO, token.fn, unary());
} else if ((token = expect('!'))) {
return unaryFn(token.fn, unary());
} else {
return primary();
}
}
function primary() {
var primary;
if (expect('(')) {
primary = filterChain();
consume(')');
} else if (expect('[')) {
primary = arrayDeclaration();
} else if (expect('{')) {
primary = object();
} else {
var token = expect();
primary = token.fn;
if (!primary) {
throwError("not a primary expression", token);
}
}
var next, context;
while ((next = expect('(', '[', '.'))) {
if (next.text === '(') {
primary = functionCall(primary, context);
context = null;
} else if (next.text === '[') {
context = primary;
primary = objectIndex(primary);
} else if (next.text === '.') {
context = primary;
primary = fieldAccess(primary);
} else {
throwError("IMPOSSIBLE");
}
}
return primary;
}
function _fieldAccess(object) {
var field = expect().text;
var getter = getterFn(field, csp);
return extend(
function(scope, locals, self) {
return getter(self || object(scope, locals), locals);
},
{
assign:function(scope, value, locals) {
return setter(object(scope, locals), field, value);
}
}
);
}
function _objectIndex(obj) {
var indexFn = expression();
consume(']');
return extend(
function(self, locals){
var o = obj(self, locals),
i = indexFn(self, locals),
v, p;
if (!o) return undefined;
v = o[i];
if (v && v.then) {
p = v;
if (!('$$v' in v)) {
p.$$v = undefined;
p.then(function(val) { p.$$v = val; });
}
v = v.$$v;
}
return v;
}, {
assign:function(self, value, locals){
return obj(self, locals)[indexFn(self, locals)] = value;
}
});
}
function _functionCall(fn, contextGetter) {
var argsFn = [];
if (peekToken().text != ')') {
do {
argsFn.push(expression());
} while (expect(','));
}
consume(')');
return function(scope, locals){
var args = [],
context = contextGetter ? contextGetter(scope, locals) : scope;
for ( var i = 0; i < argsFn.length; i++) {
args.push(argsFn[i](scope, locals));
}
var fnPtr = fn(scope, locals, context) || noop;
// IE stupidity!
return fnPtr.apply
? fnPtr.apply(context, args)
: fnPtr(args[0], args[1], args[2], args[3], args[4]);
};
}
// This is used with json array declaration
function arrayDeclaration () {
var elementFns = [];
if (peekToken().text != ']') {
do {
elementFns.push(expression());
} while (expect(','));
}
consume(']');
return function(self, locals){
var array = [];
for ( var i = 0; i < elementFns.length; i++) {
array.push(elementFns[i](self, locals));
}
return array;
};
}
function object () {
var keyValues = [];
if (peekToken().text != '}') {
do {
var token = expect(),
key = token.string || token.text;
consume(":");
var value = expression();
keyValues.push({key:key, value:value});
} while (expect(','));
}
consume('}');
return function(self, locals){
var object = {};
for ( var i = 0; i < keyValues.length; i++) {
var keyValue = keyValues[i];
object[keyValue.key] = keyValue.value(self, locals);
}
return object;
};
}
}
//////////////////////////////////////////////////
// Parser helper functions
//////////////////////////////////////////////////
function setter(obj, path, setValue) {
var element = path.split('.');
for (var i = 0; element.length > 1; i++) {
var key = element.shift();
var propertyObj = obj[key];
if (!propertyObj) {
propertyObj = {};
obj[key] = propertyObj;
}
obj = propertyObj;
}
obj[element.shift()] = setValue;
return setValue;
}
var getterFnCache = {};
/**
* Implementation of the "Black Hole" variant from:
* - http://jsperf.com/angularjs-parse-getter/4
* - http://jsperf.com/path-evaluation-simplified/7
*/
function cspSafeGetterFn(key0, key1, key2, key3, key4) {
return function(scope, locals) {
var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope,
promise;
if (pathVal === null || pathVal === undefined) return pathVal;
pathVal = pathVal[key0];
if (pathVal && pathVal.then) {
if (!("$$v" in pathVal)) {
promise = pathVal;
promise.$$v = undefined;
promise.then(function(val) { promise.$$v = val; });
}
pathVal = pathVal.$$v;
}
if (!key1 || pathVal === null || pathVal === undefined) return pathVal;
pathVal = pathVal[key1];
if (pathVal && pathVal.then) {
if (!("$$v" in pathVal)) {
promise = pathVal;
promise.$$v = undefined;
promise.then(function(val) { promise.$$v = val; });
}
pathVal = pathVal.$$v;
}
if (!key2 || pathVal === null || pathVal === undefined) return pathVal;
pathVal = pathVal[key2];
if (pathVal && pathVal.then) {
if (!("$$v" in pathVal)) {
promise = pathVal;
promise.$$v = undefined;
promise.then(function(val) { promise.$$v = val; });
}
pathVal = pathVal.$$v;
}
if (!key3 || pathVal === null || pathVal === undefined) return pathVal;
pathVal = pathVal[key3];
if (pathVal && pathVal.then) {
if (!("$$v" in pathVal)) {
promise = pathVal;
promise.$$v = undefined;
promise.then(function(val) { promise.$$v = val; });
}
pathVal = pathVal.$$v;
}
if (!key4 || pathVal === null || pathVal === undefined) return pathVal;
pathVal = pathVal[key4];
if (pathVal && pathVal.then) {
if (!("$$v" in pathVal)) {
promise = pathVal;
promise.$$v = undefined;
promise.then(function(val) { promise.$$v = val; });
}
pathVal = pathVal.$$v;
}
return pathVal;
};
}
function getterFn(path, csp) {
if (getterFnCache.hasOwnProperty(path)) {
return getterFnCache[path];
}
var pathKeys = path.split('.'),
pathKeysLength = pathKeys.length,
fn;
if (csp) {
fn = (pathKeysLength < 6)
? cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4])
: function(scope, locals) {
var i = 0, val;
do {
val = cspSafeGetterFn(
pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++]
)(scope, locals);
locals = undefined; // clear after first iteration
scope = val;
} while (i < pathKeysLength);
return val;
}
} else {
var code = 'var l, fn, p;\n';
forEach(pathKeys, function(key, index) {
code += 'if(s === null || s === undefined) return s;\n' +
'l=s;\n' +
's='+ (index
// we simply dereference 's' on any .dot notation
? 's'
// but if we are first then we check locals first, and if so read it first
: '((k&&k.hasOwnProperty("' + key + '"))?k:s)') + '["' + key + '"]' + ';\n' +
'if (s && s.then) {\n' +
' if (!("$$v" in s)) {\n' +
' p=s;\n' +
' p.$$v = undefined;\n' +
' p.then(function(v) {p.$$v=v;});\n' +
'}\n' +
' s=s.$$v\n' +
'}\n';
});
code += 'return s;';
fn = Function('s', 'k', code); // s=scope, k=locals
fn.toString = function() { return code; };
}
return getterFnCache[path] = fn;
}
///////////////////////////////////
/**
* @ngdoc function
* @name ng.$parse
* @function
*
* @description
*
* Converts Angular {@link guide/expression expression} into a function.
*
* <pre>
* var getter = $parse('user.name');
* var setter = getter.assign;
* var context = {user:{name:'angular'}};
* var locals = {user:{name:'local'}};
*
* expect(getter(context)).toEqual('angular');
* setter(context, 'newValue');
* expect(context.user.name).toEqual('newValue');
* expect(getter(context, locals)).toEqual('local');
* </pre>
*
*
* @param {string} expression String expression to compile.
* @returns {function(context, locals)} a function which represents the compiled expression:
*
* * `context` – `{object}` – an object against which any expressions embedded in the strings
* are evaluated against (tipically a scope object).
* * `locals` – `{object=}` – local variables context object, useful for overriding values in
* `context`.
*
* The return function also has an `assign` property, if the expression is assignable, which
* allows one to set values to expressions.
*
*/
function $ParseProvider() {
var cache = {};
this.$get = ['$filter', '$sniffer', function($filter, $sniffer) {
return function(exp) {
switch(typeof exp) {
case 'string':
return cache.hasOwnProperty(exp)
? cache[exp]
: cache[exp] = parser(exp, false, $filter, $sniffer.csp);
case 'function':
return exp;
default:
return noop;
}
};
}];
}
/**
* @ngdoc service
* @name ng.$q
* @requires $rootScope
*
* @description
* A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).
*
* [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
* interface for interacting with an object that represents the result of an action that is
* performed asynchronously, and may or may not be finished at any given point in time.
*
* From the perspective of dealing with error handling, deferred and promise APIs are to
* asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.
*
* <pre>
* // for the purpose of this example let's assume that variables `$q` and `scope` are
* // available in the current lexical scope (they could have been injected or passed in).
*
* function asyncGreet(name) {
* var deferred = $q.defer();
*
* setTimeout(function() {
* // since this fn executes async in a future turn of the event loop, we need to wrap
* // our code into an $apply call so that the model changes are properly observed.
* scope.$apply(function() {
* if (okToGreet(name)) {
* deferred.resolve('Hello, ' + name + '!');
* } else {
* deferred.reject('Greeting ' + name + ' is not allowed.');
* }
* });
* }, 1000);
*
* return deferred.promise;
* }
*
* var promise = asyncGreet('Robin Hood');
* promise.then(function(greeting) {
* alert('Success: ' + greeting);
* }, function(reason) {
* alert('Failed: ' + reason);
* });
* </pre>
*
* At first it might not be obvious why this extra complexity is worth the trouble. The payoff
* comes in the way of
* [guarantees that promise and deferred APIs make](https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md).
*
* Additionally the promise api allows for composition that is very hard to do with the
* traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.
* For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the
* section on serial or parallel joining of promises.
*
*
* # The Deferred API
*
* A new instance of deferred is constructed by calling `$q.defer()`.
*
* The purpose of the deferred object is to expose the associated Promise instance as well as APIs
* that can be used for signaling the successful or unsuccessful completion of the task.
*
* **Methods**
*
* - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection
* constructed via `$q.reject`, the promise will be rejected instead.
* - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to
* resolving it with a rejection constructed via `$q.reject`.
*
* **Properties**
*
* - promise – `{Promise}` – promise object associated with this deferred.
*
*
* # The Promise API
*
* A new promise instance is created when a deferred instance is created and can be retrieved by
* calling `deferred.promise`.
*
* The purpose of the promise object is to allow for interested parties to get access to the result
* of the deferred task when it completes.
*
* **Methods**
*
* - `then(successCallback, errorCallback)` – regardless of when the promise was or will be resolved
* or rejected, `then` calls one of the success or error callbacks asynchronously as soon as the result
* is available. The callbacks are called with a single argument: the result or rejection reason.
*
* This method *returns a new promise* which is resolved or rejected via the return value of the
* `successCallback` or `errorCallback`.
*
*
* # Chaining promises
*
* Because calling the `then` method of a promise returns a new derived promise, it is easily possible
* to create a chain of promises:
*
* <pre>
* promiseB = promiseA.then(function(result) {
* return result + 1;
* });
*
* // promiseB will be resolved immediately after promiseA is resolved and its value
* // will be the result of promiseA incremented by 1
* </pre>
*
* It is possible to create chains of any length and since a promise can be resolved with another
* promise (which will defer its resolution further), it is possible to pause/defer resolution of
* the promises at any point in the chain. This makes it possible to implement powerful APIs like
* $http's response interceptors.
*
*
* # Differences between Kris Kowal's Q and $q
*
* There are three main differences:
*
* - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation
* mechanism in angular, which means faster propagation of resolution or rejection into your
* models and avoiding unnecessary browser repaints, which would result in flickering UI.
* - $q promises are recognized by the templating engine in angular, which means that in templates
* you can treat promises attached to a scope as if they were the resulting values.
* - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains
* all the important functionality needed for common async tasks.
*
* # Testing
*
* <pre>
* it('should simulate promise', inject(function($q, $rootScope) {
* var deferred = $q.defer();
* var promise = deferred.promise;
* var resolvedValue;
*
* promise.then(function(value) { resolvedValue = value; });
* expect(resolvedValue).toBeUndefined();
*
* // Simulate resolving of promise
* deferred.resolve(123);
* // Note that the 'then' function does not get called synchronously.
* // This is because we want the promise API to always be async, whether or not
* // it got called synchronously or asynchronously.
* expect(resolvedValue).toBeUndefined();
*
* // Propagate promise resolution to 'then' functions using $apply().
* $rootScope.$apply();
* expect(resolvedValue).toEqual(123);
* });
* </pre>
*/
function $QProvider() {
this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
return qFactory(function(callback) {
$rootScope.$evalAsync(callback);
}, $exceptionHandler);
}];
}
/**
* Constructs a promise manager.
*
* @param {function(function)} nextTick Function for executing functions in the next turn.
* @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
* debugging purposes.
* @returns {object} Promise manager.
*/
function qFactory(nextTick, exceptionHandler) {
/**
* @ngdoc
* @name ng.$q#defer
* @methodOf ng.$q
* @description
* Creates a `Deferred` object which represents a task which will finish in the future.
*
* @returns {Deferred} Returns a new instance of deferred.
*/
var defer = function() {
var pending = [],
value, deferred;
deferred = {
resolve: function(val) {
if (pending) {
var callbacks = pending;
pending = undefined;
value = ref(val);
if (callbacks.length) {
nextTick(function() {
var callback;
for (var i = 0, ii = callbacks.length; i < ii; i++) {
callback = callbacks[i];
value.then(callback[0], callback[1]);
}
});
}
}
},
reject: function(reason) {
deferred.resolve(reject(reason));
},
promise: {
then: function(callback, errback) {
var result = defer();
var wrappedCallback = function(value) {
try {
result.resolve((callback || defaultCallback)(value));
} catch(e) {
result.reject(e);
exceptionHandler(e);
}
};
var wrappedErrback = function(reason) {
try {
result.resolve((errback || defaultErrback)(reason));
} catch(e) {
result.reject(e);
exceptionHandler(e);
}
};
if (pending) {
pending.push([wrappedCallback, wrappedErrback]);
} else {
value.then(wrappedCallback, wrappedErrback);
}
return result.promise;
}
}
};
return deferred;
};
var ref = function(value) {
if (value && value.then) return value;
return {
then: function(callback) {
var result = defer();
nextTick(function() {
result.resolve(callback(value));
});
return result.promise;
}
};
};
/**
* @ngdoc
* @name ng.$q#reject
* @methodOf ng.$q
* @description
* Creates a promise that is resolved as rejected with the specified `reason`. This api should be
* used to forward rejection in a chain of promises. If you are dealing with the last promise in
* a promise chain, you don't need to worry about it.
*
* When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of
* `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via
* a promise error callback and you want to forward the error to the promise derived from the
* current promise, you have to "rethrow" the error by returning a rejection constructed via
* `reject`.
*
* <pre>
* promiseB = promiseA.then(function(result) {
* // success: do something and resolve promiseB
* // with the old or a new result
* return result;
* }, function(reason) {
* // error: handle the error if possible and
* // resolve promiseB with newPromiseOrValue,
* // otherwise forward the rejection to promiseB
* if (canHandle(reason)) {
* // handle the error and recover
* return newPromiseOrValue;
* }
* return $q.reject(reason);
* });
* </pre>
*
* @param {*} reason Constant, message, exception or an object representing the rejection reason.
* @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.
*/
var reject = function(reason) {
return {
then: function(callback, errback) {
var result = defer();
nextTick(function() {
result.resolve((errback || defaultErrback)(reason));
});
return result.promise;
}
};
};
/**
* @ngdoc
* @name ng.$q#when
* @methodOf ng.$q
* @description
* Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
* This is useful when you are dealing with an object that might or might not be a promise, or if
* the promise comes from a source that can't be trusted.
*
* @param {*} value Value or a promise
* @returns {Promise} Returns a promise of the passed value or promise
*/
var when = function(value, callback, errback) {
var result = defer(),
done;
var wrappedCallback = function(value) {
try {
return (callback || defaultCallback)(value);
} catch (e) {
exceptionHandler(e);
return reject(e);
}
};
var wrappedErrback = function(reason) {
try {
return (errback || defaultErrback)(reason);
} catch (e) {
exceptionHandler(e);
return reject(e);
}
};
nextTick(function() {
ref(value).then(function(value) {
if (done) return;
done = true;
result.resolve(ref(value).then(wrappedCallback, wrappedErrback));
}, function(reason) {
if (done) return;
done = true;
result.resolve(wrappedErrback(reason));
});
});
return result.promise;
};
function defaultCallback(value) {
return value;
}
function defaultErrback(reason) {
return reject(reason);
}
/**
* @ngdoc
* @name ng.$q#all
* @methodOf ng.$q
* @description
* Combines multiple promises into a single promise that is resolved when all of the input
* promises are resolved.
*
* @param {Array.<Promise>} promises An array of promises.
* @returns {Promise} Returns a single promise that will be resolved with an array of values,
* each value corresponding to the promise at the same index in the `promises` array. If any of
* the promises is resolved with a rejection, this resulting promise will be resolved with the
* same rejection.
*/
function all(promises) {
var deferred = defer(),
counter = promises.length,
results = [];
if (counter) {
forEach(promises, function(promise, index) {
ref(promise).then(function(value) {
if (index in results) return;
results[index] = value;
if (!(--counter)) deferred.resolve(results);
}, function(reason) {
if (index in results) return;
deferred.reject(reason);
});
});
} else {
deferred.resolve(results);
}
return deferred.promise;
}
return {
defer: defer,
reject: reject,
when: when,
all: all
};
}
/**
* @ngdoc object
* @name ng.$routeProvider
* @function
*
* @description
*
* Used for configuring routes. See {@link ng.$route $route} for an example.
*/
function $RouteProvider(){
var routes = {};
/**
* @ngdoc method
* @name ng.$routeProvider#when
* @methodOf ng.$routeProvider
*
* @param {string} path Route path (matched against `$location.path`). If `$location.path`
* contains redundant trailing slash or is missing one, the route will still match and the
* `$location.path` will be updated to add or drop the trailing slash to exactly match the
* route definition.
*
* `path` can contain named groups starting with a colon (`:name`). All characters up to the
* next slash are matched and stored in `$routeParams` under the given `name` after the route
* is resolved.
*
* @param {Object} route Mapping information to be assigned to `$route.current` on route
* match.
*
* Object properties:
*
* - `controller` – `{(string|function()=}` – Controller fn that should be associated with newly
* created scope or the name of a {@link angular.Module#controller registered controller}
* if passed as a string.
* - `template` – `{string=}` – html template as a string that should be used by
* {@link ng.directive:ngView ngView} or
* {@link ng.directive:ngInclude ngInclude} directives.
* this property takes precedence over `templateUrl`.
* - `templateUrl` – `{string=}` – path to an html template that should be used by
* {@link ng.directive:ngView ngView}.
* - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
* be injected into the controller. If any of these dependencies are promises, they will be
* resolved and converted to a value before the controller is instantiated and the
* `$routeChangeSuccess` event is fired. The map object is:
*
* - `key` – `{string}`: a name of a dependency to be injected into the controller.
* - `factory` - `{string|function}`: If `string` then it is an alias for a service.
* Otherwise if function, then it is {@link api/AUTO.$injector#invoke injected}
* and the return value is treated as the dependency. If the result is a promise, it is resolved
* before its value is injected into the controller. Be aware that `ngRoute.$routeParams` will
* still refer to the previous route within these resolve functions. Use `$route.current.params`
* to access the new route parameters, instead.
*
* - `redirectTo` – {(string|function())=} – value to update
* {@link ng.$location $location} path with and trigger route redirection.
*
* If `redirectTo` is a function, it will be called with the following parameters:
*
* - `{Object.<string>}` - route parameters extracted from the current
* `$location.path()` by applying the current route templateUrl.
* - `{string}` - current `$location.path()`
* - `{Object}` - current `$location.search()`
*
* The custom `redirectTo` function is expected to return a string which will be used
* to update `$location.path()` and `$location.search()`.
*
* - `[reloadOnSearch=true]` - {boolean=} - reload route when only $location.search()
* changes.
*
* If the option is set to `false` and url in the browser changes, then
* `$routeUpdate` event is broadcasted on the root scope.
*
* @returns {Object} self
*
* @description
* Adds a new route definition to the `$route` service.
*/
this.when = function(path, route) {
routes[path] = extend({reloadOnSearch: true}, route);
// create redirection for trailing slashes
if (path) {
var redirectPath = (path[path.length-1] == '/')
? path.substr(0, path.length-1)
: path +'/';
routes[redirectPath] = {redirectTo: path};
}
return this;
};
/**
* @ngdoc method
* @name ng.$routeProvider#otherwise
* @methodOf ng.$routeProvider
*
* @description
* Sets route definition that will be used on route change when no other route definition
* is matched.
*
* @param {Object} params Mapping information to be assigned to `$route.current`.
* @returns {Object} self
*/
this.otherwise = function(params) {
this.when(null, params);
return this;
};
this.$get = ['$rootScope', '$location', '$routeParams', '$q', '$injector', '$http', '$templateCache',
function( $rootScope, $location, $routeParams, $q, $injector, $http, $templateCache) {
/**
* @ngdoc object
* @name ng.$route
* @requires $location
* @requires $routeParams
*
* @property {Object} current Reference to the current route definition.
* The route definition contains:
*
* - `controller`: The controller constructor as define in route definition.
* - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
* controller instantiation. The `locals` contain
* the resolved values of the `resolve` map. Additionally the `locals` also contain:
*
* - `$scope` - The current route scope.
* - `$template` - The current route template HTML.
*
* @property {Array.<Object>} routes Array of all configured routes.
*
* @description
* Is used for deep-linking URLs to controllers and views (HTML partials).
* It watches `$location.url()` and tries to map the path to an existing route definition.
*
* You can define routes through {@link ng.$routeProvider $routeProvider}'s API.
*
* The `$route` service is typically used in conjunction with {@link ng.directive:ngView ngView}
* directive and the {@link ng.$routeParams $routeParams} service.
*
* @example
This example shows how changing the URL hash causes the `$route` to match a route against the
URL, and the `ngView` pulls in the partial.
Note that this example is using {@link ng.directive:script inlined templates}
to get it working on jsfiddle as well.
<example module="ngView">
<file name="index.html">
<div ng-controller="MainCntl">
Choose:
<a href="Book/Moby">Moby</a> |
<a href="Book/Moby/ch/1">Moby: Ch1</a> |
<a href="Book/Gatsby">Gatsby</a> |
<a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
<a href="Book/Scarlet">Scarlet Letter</a><br/>
<div ng-view></div>
<hr />
<pre>$location.path() = {{$location.path()}}</pre>
<pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
<pre>$route.current.params = {{$route.current.params}}</pre>
<pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
<pre>$routeParams = {{$routeParams}}</pre>
</div>
</file>
<file name="book.html">
controller: {{name}}<br />
Book Id: {{params.bookId}}<br />
</file>
<file name="chapter.html">
controller: {{name}}<br />
Book Id: {{params.bookId}}<br />
Chapter Id: {{params.chapterId}}
</file>
<file name="script.js">
angular.module('ngView', [], function($routeProvider, $locationProvider) {
$routeProvider.when('/Book/:bookId', {
templateUrl: 'book.html',
controller: BookCntl,
resolve: {
// I will cause a 1 second delay
delay: function($q, $timeout) {
var delay = $q.defer();
$timeout(delay.resolve, 1000);
return delay.promise;
}
}
});
$routeProvider.when('/Book/:bookId/ch/:chapterId', {
templateUrl: 'chapter.html',
controller: ChapterCntl
});
// configure html5 to get links working on jsfiddle
$locationProvider.html5Mode(true);
});
function MainCntl($scope, $route, $routeParams, $location) {
$scope.$route = $route;
$scope.$location = $location;
$scope.$routeParams = $routeParams;
}
function BookCntl($scope, $routeParams) {
$scope.name = "BookCntl";
$scope.params = $routeParams;
}
function ChapterCntl($scope, $routeParams) {
$scope.name = "ChapterCntl";
$scope.params = $routeParams;
}
</file>
<file name="scenario.js">
it('should load and compile correct template', function() {
element('a:contains("Moby: Ch1")').click();
var content = element('.doc-example-live [ng-view]').text();
expect(content).toMatch(/controller\: ChapterCntl/);
expect(content).toMatch(/Book Id\: Moby/);
expect(content).toMatch(/Chapter Id\: 1/);
element('a:contains("Scarlet")').click();
sleep(2); // promises are not part of scenario waiting
content = element('.doc-example-live [ng-view]').text();
expect(content).toMatch(/controller\: BookCntl/);
expect(content).toMatch(/Book Id\: Scarlet/);
});
</file>
</example>
*/
/**
* @ngdoc event
* @name ng.$route#$routeChangeStart
* @eventOf ng.$route
* @eventType broadcast on root scope
* @description
* Broadcasted before a route change. At this point the route services starts
* resolving all of the dependencies needed for the route change to occurs.
* Typically this involves fetching the view template as well as any dependencies
* defined in `resolve` route property. Once all of the dependencies are resolved
* `$routeChangeSuccess` is fired.
*
* @param {Route} next Future route information.
* @param {Route} current Current route information.
*/
/**
* @ngdoc event
* @name ng.$route#$routeChangeSuccess
* @eventOf ng.$route
* @eventType broadcast on root scope
* @description
* Broadcasted after a route dependencies are resolved.
* {@link ng.directive:ngView ngView} listens for the directive
* to instantiate the controller and render the view.
*
* @param {Object} angularEvent Synthetic event object.
* @param {Route} current Current route information.
* @param {Route|Undefined} previous Previous route information, or undefined if current is first route entered.
*/
/**
* @ngdoc event
* @name ng.$route#$routeChangeError
* @eventOf ng.$route
* @eventType broadcast on root scope
* @description
* Broadcasted if any of the resolve promises are rejected.
*
* @param {Route} current Current route information.
* @param {Route} previous Previous route information.
* @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
*/
/**
* @ngdoc event
* @name ng.$route#$routeUpdate
* @eventOf ng.$route
* @eventType broadcast on root scope
* @description
*
* The `reloadOnSearch` property has been set to false, and we are reusing the same
* instance of the Controller.
*/
var forceReload = false,
$route = {
routes: routes,
/**
* @ngdoc method
* @name ng.$route#reload
* @methodOf ng.$route
*
* @description
* Causes `$route` service to reload the current route even if
* {@link ng.$location $location} hasn't changed.
*
* As a result of that, {@link ng.directive:ngView ngView}
* creates new scope, reinstantiates the controller.
*/
reload: function() {
forceReload = true;
$rootScope.$evalAsync(updateRoute);
}
};
$rootScope.$on('$locationChangeSuccess', updateRoute);
return $route;
/////////////////////////////////////////////////////
/**
* @param on {string} current url
* @param when {string} route when template to match the url against
* @return {?Object}
*/
function switchRouteMatcher(on, when) {
// TODO(i): this code is convoluted and inefficient, we should construct the route matching
// regex only once and then reuse it
// Escape regexp special characters.
when = '^' + when.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&") + '$';
var regex = '',
params = [],
dst = {};
var re = /:(\w+)/g,
paramMatch,
lastMatchedIndex = 0;
while ((paramMatch = re.exec(when)) !== null) {
// Find each :param in `when` and replace it with a capturing group.
// Append all other sections of when unchanged.
regex += when.slice(lastMatchedIndex, paramMatch.index);
regex += '([^\\/]*)';
params.push(paramMatch[1]);
lastMatchedIndex = re.lastIndex;
}
// Append trailing path part.
regex += when.substr(lastMatchedIndex);
var match = on.match(new RegExp(regex));
if (match) {
forEach(params, function(name, index) {
dst[name] = match[index + 1];
});
}
return match ? dst : null;
}
function updateRoute() {
var next = parseRoute(),
last = $route.current;
if (next && last && next.$$route === last.$$route
&& equals(next.pathParams, last.pathParams) && !next.reloadOnSearch && !forceReload) {
last.params = next.params;
copy(last.params, $routeParams);
$rootScope.$broadcast('$routeUpdate', last);
} else if (next || last) {
forceReload = false;
$rootScope.$broadcast('$routeChangeStart', next, last);
$route.current = next;
if (next) {
if (next.redirectTo) {
if (isString(next.redirectTo)) {
$location.path(interpolate(next.redirectTo, next.params)).search(next.params)
.replace();
} else {
$location.url(next.redirectTo(next.pathParams, $location.path(), $location.search()))
.replace();
}
}
}
$q.when(next).
then(function() {
if (next) {
var keys = [],
values = [],
template;
forEach(next.resolve || {}, function(value, key) {
keys.push(key);
values.push(isString(value) ? $injector.get(value) : $injector.invoke(value));
});
if (isDefined(template = next.template)) {
} else if (isDefined(template = next.templateUrl)) {
template = $http.get(template, {cache: $templateCache}).
then(function(response) { return response.data; });
}
if (isDefined(template)) {
keys.push('$template');
values.push(template);
}
return $q.all(values).then(function(values) {
var locals = {};
forEach(values, function(value, index) {
locals[keys[index]] = value;
});
return locals;
});
}
}).
// after route change
then(function(locals) {
if (next == $route.current) {
if (next) {
next.locals = locals;
copy(next.params, $routeParams);
}
$rootScope.$broadcast('$routeChangeSuccess', next, last);
}
}, function(error) {
if (next == $route.current) {
$rootScope.$broadcast('$routeChangeError', next, last, error);
}
});
}
}
/**
* @returns the current active route, by matching it against the URL
*/
function parseRoute() {
// Match a route
var params, match;
forEach(routes, function(route, path) {
if (!match && (params = switchRouteMatcher($location.path(), path))) {
match = inherit(route, {
params: extend({}, $location.search(), params),
pathParams: params});
match.$$route = route;
}
});
// No route matched; fallback to "otherwise" route
return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
}
/**
* @returns interpolation of the redirect path with the parametrs
*/
function interpolate(string, params) {
var result = [];
forEach((string||'').split(':'), function(segment, i) {
if (i == 0) {
result.push(segment);
} else {
var segmentMatch = segment.match(/(\w+)(.*)/);
var key = segmentMatch[1];
result.push(params[key]);
result.push(segmentMatch[2] || '');
delete params[key];
}
});
return result.join('');
}
}];
}
/**
* @ngdoc object
* @name ng.$routeParams
* @requires $route
*
* @description
* Current set of route parameters. The route parameters are a combination of the
* {@link ng.$location $location} `search()`, and `path()`. The `path` parameters
* are extracted when the {@link ng.$route $route} path is matched.
*
* In case of parameter name collision, `path` params take precedence over `search` params.
*
* The service guarantees that the identity of the `$routeParams` object will remain unchanged
* (but its properties will likely change) even when a route change occurs.
*
* Note that the `$routeParams` are only updated *after* a route change completes successfully.
* This means that you cannot rely on `$routeParams` being correct in route resolve functions.
* Instead you can use `$route.current.params` to access the new route's parameters.
*
* @example
* <pre>
* // Given:
* // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
* // Route: /Chapter/:chapterId/Section/:sectionId
* //
* // Then
* $routeParams ==> {chapterId:1, sectionId:2, search:'moby'}
* </pre>
*/
function $RouteParamsProvider() {
this.$get = valueFn({});
}
/**
* DESIGN NOTES
*
* The design decisions behind the scope are heavily favored for speed and memory consumption.
*
* The typical use of scope is to watch the expressions, which most of the time return the same
* value as last time so we optimize the operation.
*
* Closures construction is expensive in terms of speed as well as memory:
* - No closures, instead use prototypical inheritance for API
* - Internal state needs to be stored on scope directly, which means that private state is
* exposed as $$____ properties
*
* Loop operations are optimized by using while(count--) { ... }
* - this means that in order to keep the same order of execution as addition we have to add
* items to the array at the beginning (shift) instead of at the end (push)
*
* Child scopes are created and removed often
* - Using an array would be slow since inserts in middle are expensive so we use linked list
*
* There are few watches then a lot of observers. This is why you don't want the observer to be
* implemented in the same way as watch. Watch requires return of initialization function which
* are expensive to construct.
*/
/**
* @ngdoc object
* @name ng.$rootScopeProvider
* @description
*
* Provider for the $rootScope service.
*/
/**
* @ngdoc function
* @name ng.$rootScopeProvider#digestTtl
* @methodOf ng.$rootScopeProvider
* @description
*
* Sets the number of digest iterations the scope should attempt to execute before giving up and
* assuming that the model is unstable.
*
* The current default is 10 iterations.
*
* @param {number} limit The number of digest iterations.
*/
/**
* @ngdoc object
* @name ng.$rootScope
* @description
*
* Every application has a single root {@link ng.$rootScope.Scope scope}.
* All other scopes are child scopes of the root scope. Scopes provide mechanism for watching the model and provide
* event processing life-cycle. See {@link guide/scope developer guide on scopes}.
*/
function $RootScopeProvider(){
var TTL = 10;
this.digestTtl = function(value) {
if (arguments.length) {
TTL = value;
}
return TTL;
};
this.$get = ['$injector', '$exceptionHandler', '$parse',
function( $injector, $exceptionHandler, $parse) {
/**
* @ngdoc function
* @name ng.$rootScope.Scope
*
* @description
* A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
* {@link AUTO.$injector $injector}. Child scopes are created using the
* {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
* compiled HTML template is executed.)
*
* Here is a simple scope snippet to show how you can interact with the scope.
* <pre>
angular.injector(['ng']).invoke(function($rootScope) {
var scope = $rootScope.$new();
scope.salutation = 'Hello';
scope.name = 'World';
expect(scope.greeting).toEqual(undefined);
scope.$watch('name', function() {
scope.greeting = scope.salutation + ' ' + scope.name + '!';
}); // initialize the watch
expect(scope.greeting).toEqual(undefined);
scope.name = 'Misko';
// still old value, since watches have not been called yet
expect(scope.greeting).toEqual(undefined);
scope.$digest(); // fire all the watches
expect(scope.greeting).toEqual('Hello Misko!');
});
* </pre>
*
* # Inheritance
* A scope can inherit from a parent scope, as in this example:
* <pre>
var parent = $rootScope;
var child = parent.$new();
parent.salutation = "Hello";
child.name = "World";
expect(child.salutation).toEqual('Hello');
child.salutation = "Welcome";
expect(child.salutation).toEqual('Welcome');
expect(parent.salutation).toEqual('Hello');
* </pre>
*
*
* @param {Object.<string, function()>=} providers Map of service factory which need to be provided
* for the current scope. Defaults to {@link ng}.
* @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
* append/override services provided by `providers`. This is handy when unit-testing and having
* the need to override a default service.
* @returns {Object} Newly created scope.
*
*/
function Scope() {
this.$id = nextUid();
this.$$phase = this.$parent = this.$$watchers =
this.$$nextSibling = this.$$prevSibling =
this.$$childHead = this.$$childTail = null;
this['this'] = this.$root = this;
this.$$destroyed = false;
this.$$asyncQueue = [];
this.$$listeners = {};
this.$$isolateBindings = {};
}
/**
* @ngdoc property
* @name ng.$rootScope.Scope#$id
* @propertyOf ng.$rootScope.Scope
* @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for
* debugging.
*/
Scope.prototype = {
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$new
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Creates a new child {@link ng.$rootScope.Scope scope}.
*
* The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} and
* {@link ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the scope
* hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
*
* {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is desired for
* the scope and its child scopes to be permanently detached from the parent and thus stop
* participating in model change detection and listener notification by invoking.
*
* @param {boolean} isolate if true then the scope does not prototypically inherit from the
* parent scope. The scope is isolated, as it can not see parent scope properties.
* When creating widgets it is useful for the widget to not accidentally read parent
* state.
*
* @returns {Object} The newly created child scope.
*
*/
$new: function(isolate) {
var Child,
child;
if (isFunction(isolate)) {
// TODO: remove at some point
throw Error('API-CHANGE: Use $controller to instantiate controllers.');
}
if (isolate) {
child = new Scope();
child.$root = this.$root;
} else {
Child = function() {}; // should be anonymous; This is so that when the minifier munges
// the name it does not become random set of chars. These will then show up as class
// name in the debugger.
Child.prototype = this;
child = new Child();
child.$id = nextUid();
}
child['this'] = child;
child.$$listeners = {};
child.$parent = this;
child.$$asyncQueue = [];
child.$$watchers = child.$$nextSibling = child.$$childHead = child.$$childTail = null;
child.$$prevSibling = this.$$childTail;
if (this.$$childHead) {
this.$$childTail.$$nextSibling = child;
this.$$childTail = child;
} else {
this.$$childHead = this.$$childTail = child;
}
return child;
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$watch
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Registers a `listener` callback to be executed whenever the `watchExpression` changes.
*
* - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest $digest()} and
* should return the value which will be watched. (Since {@link ng.$rootScope.Scope#$digest $digest()}
* reruns when it detects changes the `watchExpression` can execute multiple times per
* {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
* - The `listener` is called only when the value from the current `watchExpression` and the
* previous call to `watchExpression` are not equal (with the exception of the initial run,
* see below). The inequality is determined according to
* {@link angular.equals} function. To save the value of the object for later comparison, the
* {@link angular.copy} function is used. It also means that watching complex options will
* have adverse memory and performance implications.
* - The watch `listener` may change the model, which may trigger other `listener`s to fire. This
* is achieved by rerunning the watchers until no changes are detected. The rerun iteration
* limit is 10 to prevent an infinite loop deadlock.
*
*
* If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
* you can register a `watchExpression` function with no `listener`. (Since `watchExpression`
* can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a change is
* detected, be prepared for multiple calls to your listener.)
*
* After a watcher is registered with the scope, the `listener` fn is called asynchronously
* (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
* watcher. In rare cases, this is undesirable because the listener is called when the result
* of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
* can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
* listener was called due to initialization.
*
*
* # Example
* <pre>
// let's assume that scope was dependency injected as the $rootScope
var scope = $rootScope;
scope.name = 'misko';
scope.counter = 0;
expect(scope.counter).toEqual(0);
scope.$watch('name', function(newValue, oldValue) { scope.counter = scope.counter + 1; });
expect(scope.counter).toEqual(0);
scope.$digest();
// no variable change
expect(scope.counter).toEqual(0);
scope.name = 'adam';
scope.$digest();
expect(scope.counter).toEqual(1);
* </pre>
*
*
*
* @param {(function()|string)} watchExpression Expression that is evaluated on each
* {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers a
* call to the `listener`.
*
* - `string`: Evaluated as {@link guide/expression expression}
* - `function(scope)`: called with current `scope` as a parameter.
* @param {(function()|string)=} listener Callback called whenever the return value of
* the `watchExpression` changes.
*
* - `string`: Evaluated as {@link guide/expression expression}
* - `function(newValue, oldValue, scope)`: called with current and previous values as parameters.
*
* @param {boolean=} objectEquality Compare object for equality rather than for reference.
* @returns {function()} Returns a deregistration function for this listener.
*/
$watch: function(watchExp, listener, objectEquality) {
var scope = this,
get = compileToFn(watchExp, 'watch'),
array = scope.$$watchers,
watcher = {
fn: listener,
last: initWatchVal,
get: get,
exp: watchExp,
eq: !!objectEquality
};
// in the case user pass string, we need to compile it, do we really need this ?
if (!isFunction(listener)) {
var listenFn = compileToFn(listener || noop, 'listener');
watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);};
}
if (!array) {
array = scope.$$watchers = [];
}
// we use unshift since we use a while loop in $digest for speed.
// the while loop reads in reverse order.
array.unshift(watcher);
return function() {
arrayRemove(array, watcher);
};
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$digest
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and its children.
* Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change the model, the
* `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers} until no more listeners are
* firing. This means that it is possible to get into an infinite loop. This function will throw
* `'Maximum iteration limit exceeded.'` if the number of iterations exceeds 10.
*
* Usually you don't call `$digest()` directly in
* {@link ng.directive:ngController controllers} or in
* {@link ng.$compileProvider#directive directives}.
* Instead a call to {@link ng.$rootScope.Scope#$apply $apply()} (typically from within a
* {@link ng.$compileProvider#directive directives}) will force a `$digest()`.
*
* If you want to be notified whenever `$digest()` is called,
* you can register a `watchExpression` function with {@link ng.$rootScope.Scope#$watch $watch()}
* with no `listener`.
*
* You may have a need to call `$digest()` from within unit-tests, to simulate the scope
* life-cycle.
*
* # Example
* <pre>
var scope = ...;
scope.name = 'misko';
scope.counter = 0;
expect(scope.counter).toEqual(0);
scope.$watch('name', function(newValue, oldValue) {
scope.counter = scope.counter + 1;
});
expect(scope.counter).toEqual(0);
scope.$digest();
// no variable change
expect(scope.counter).toEqual(0);
scope.name = 'adam';
scope.$digest();
expect(scope.counter).toEqual(1);
* </pre>
*
*/
$digest: function() {
var watch, value, last,
watchers,
asyncQueue,
length,
dirty, ttl = TTL,
next, current, target = this,
watchLog = [],
logIdx, logMsg;
beginPhase('$digest');
do {
dirty = false;
current = target;
do {
asyncQueue = current.$$asyncQueue;
while(asyncQueue.length) {
try {
current.$eval(asyncQueue.shift());
} catch (e) {
$exceptionHandler(e);
}
}
if ((watchers = current.$$watchers)) {
// process our watches
length = watchers.length;
while (length--) {
try {
watch = watchers[length];
// Most common watches are on primitives, in which case we can short
// circuit it with === operator, only when === fails do we use .equals
if (watch && (value = watch.get(current)) !== (last = watch.last) &&
!(watch.eq
? equals(value, last)
: (typeof value == 'number' && typeof last == 'number'
&& isNaN(value) && isNaN(last)))) {
dirty = true;
watch.last = watch.eq ? copy(value) : value;
watch.fn(value, ((last === initWatchVal) ? value : last), current);
if (ttl < 5) {
logIdx = 4 - ttl;
if (!watchLog[logIdx]) watchLog[logIdx] = [];
logMsg = (isFunction(watch.exp))
? 'fn: ' + (watch.exp.name || watch.exp.toString())
: watch.exp;
logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);
watchLog[logIdx].push(logMsg);
}
}
} catch (e) {
$exceptionHandler(e);
}
}
}
// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!
// this piece should be kept in sync with the traversal in $broadcast
if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
while(current !== target && !(next = current.$$nextSibling)) {
current = current.$parent;
}
}
} while ((current = next));
if(dirty && !(ttl--)) {
clearPhase();
throw Error(TTL + ' $digest() iterations reached. Aborting!\n' +
'Watchers fired in the last 5 iterations: ' + toJson(watchLog));
}
} while (dirty || asyncQueue.length);
clearPhase();
},
/**
* @ngdoc event
* @name ng.$rootScope.Scope#$destroy
* @eventOf ng.$rootScope.Scope
* @eventType broadcast on scope being destroyed
*
* @description
* Broadcasted when a scope and its children are being destroyed.
*
* Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
* clean up DOM bindings before an element is removed from the DOM.
*/
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$destroy
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Removes the current scope (and all of its children) from the parent scope. Removal implies
* that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
* propagate to the current scope and its children. Removal also implies that the current
* scope is eligible for garbage collection.
*
* The `$destroy()` is usually used by directives such as
* {@link ng.directive:ngRepeat ngRepeat} for managing the
* unrolling of the loop.
*
* Just before a scope is destroyed a `$destroy` event is broadcasted on this scope.
* Application code can register a `$destroy` event handler that will give it chance to
* perform any necessary cleanup.
*
* Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
* clean up DOM bindings before an element is removed from the DOM.
*/
$destroy: function() {
// we can't destroy the root scope or a scope that has been already destroyed
if ($rootScope == this || this.$$destroyed) return;
var parent = this.$parent;
this.$broadcast('$destroy');
this.$$destroyed = true;
if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
// This is bogus code that works around Chrome's GC leak
// see: https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =
this.$$childTail = null;
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$eval
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Executes the `expression` on the current scope returning the result. Any exceptions in the
* expression are propagated (uncaught). This is useful when evaluating Angular expressions.
*
* # Example
* <pre>
var scope = ng.$rootScope.Scope();
scope.a = 1;
scope.b = 2;
expect(scope.$eval('a+b')).toEqual(3);
expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
* </pre>
*
* @param {(string|function())=} expression An angular expression to be executed.
*
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
* - `function(scope)`: execute the function with the current `scope` parameter.
*
* @returns {*} The result of evaluating the expression.
*/
$eval: function(expr, locals) {
return $parse(expr)(this, locals);
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$evalAsync
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Executes the expression on the current scope at a later point in time.
*
* The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only that:
*
* - it will execute in the current script execution context (before any DOM rendering).
* - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
* `expression` execution.
*
* Any exceptions from the execution of the expression are forwarded to the
* {@link ng.$exceptionHandler $exceptionHandler} service.
*
* @param {(string|function())=} expression An angular expression to be executed.
*
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
* - `function(scope)`: execute the function with the current `scope` parameter.
*
*/
$evalAsync: function(expr) {
this.$$asyncQueue.push(expr);
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$apply
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* `$apply()` is used to execute an expression in angular from outside of the angular framework.
* (For example from browser DOM events, setTimeout, XHR or third party libraries).
* Because we are calling into the angular framework we need to perform proper scope life-cycle
* of {@link ng.$exceptionHandler exception handling},
* {@link ng.$rootScope.Scope#$digest executing watches}.
*
* ## Life cycle
*
* # Pseudo-Code of `$apply()`
* <pre>
function $apply(expr) {
try {
return $eval(expr);
} catch (e) {
$exceptionHandler(e);
} finally {
$root.$digest();
}
}
* </pre>
*
*
* Scope's `$apply()` method transitions through the following stages:
*
* 1. The {@link guide/expression expression} is executed using the
* {@link ng.$rootScope.Scope#$eval $eval()} method.
* 2. Any exceptions from the execution of the expression are forwarded to the
* {@link ng.$exceptionHandler $exceptionHandler} service.
* 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the expression
* was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
*
*
* @param {(string|function())=} exp An angular expression to be executed.
*
* - `string`: execute using the rules as defined in {@link guide/expression expression}.
* - `function(scope)`: execute the function with current `scope` parameter.
*
* @returns {*} The result of evaluating the expression.
*/
$apply: function(expr) {
try {
beginPhase('$apply');
return this.$eval(expr);
} catch (e) {
$exceptionHandler(e);
} finally {
clearPhase();
try {
$rootScope.$digest();
} catch (e) {
$exceptionHandler(e);
throw e;
}
}
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$on
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for discussion of
* event life cycle.
*
* The event listener function format is: `function(event, args...)`. The `event` object
* passed into the listener has the following attributes:
*
* - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or `$broadcast`-ed.
* - `currentScope` - `{Scope}`: the current scope which is handling the event.
* - `name` - `{string}`: Name of the event.
* - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel further event
* propagation (available only for events that were `$emit`-ed).
* - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag to true.
* - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
*
* @param {string} name Event name to listen on.
* @param {function(event, args...)} listener Function to call when the event is emitted.
* @returns {function()} Returns a deregistration function for this listener.
*/
$on: function(name, listener) {
var namedListeners = this.$$listeners[name];
if (!namedListeners) {
this.$$listeners[name] = namedListeners = [];
}
namedListeners.push(listener);
return function() {
namedListeners[indexOf(namedListeners, listener)] = null;
};
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$emit
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Dispatches an event `name` upwards through the scope hierarchy notifying the
* registered {@link ng.$rootScope.Scope#$on} listeners.
*
* The event life cycle starts at the scope on which `$emit` was called. All
* {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified.
* Afterwards, the event traverses upwards toward the root scope and calls all registered
* listeners along the way. The event will stop propagating if one of the listeners cancels it.
*
* Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
* onto the {@link ng.$exceptionHandler $exceptionHandler} service.
*
* @param {string} name Event name to emit.
* @param {...*} args Optional set of arguments which will be passed onto the event listeners.
* @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
*/
$emit: function(name, args) {
var empty = [],
namedListeners,
scope = this,
stopPropagation = false,
event = {
name: name,
targetScope: scope,
stopPropagation: function() {stopPropagation = true;},
preventDefault: function() {
event.defaultPrevented = true;
},
defaultPrevented: false
},
listenerArgs = concat([event], arguments, 1),
i, length;
do {
namedListeners = scope.$$listeners[name] || empty;
event.currentScope = scope;
for (i=0, length=namedListeners.length; i<length; i++) {
// if listeners were deregistered, defragment the array
if (!namedListeners[i]) {
namedListeners.splice(i, 1);
i--;
length--;
continue;
}
try {
namedListeners[i].apply(null, listenerArgs);
if (stopPropagation) return event;
} catch (e) {
$exceptionHandler(e);
}
}
//traverse upwards
scope = scope.$parent;
} while (scope);
return event;
},
/**
* @ngdoc function
* @name ng.$rootScope.Scope#$broadcast
* @methodOf ng.$rootScope.Scope
* @function
*
* @description
* Dispatches an event `name` downwards to all child scopes (and their children) notifying the
* registered {@link ng.$rootScope.Scope#$on} listeners.
*
* The event life cycle starts at the scope on which `$broadcast` was called. All
* {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get notified.
* Afterwards, the event propagates to all direct and indirect scopes of the current scope and
* calls all registered listeners along the way. The event cannot be canceled.
*
* Any exception emmited from the {@link ng.$rootScope.Scope#$on listeners} will be passed
* onto the {@link ng.$exceptionHandler $exceptionHandler} service.
*
* @param {string} name Event name to broadcast.
* @param {...*} args Optional set of arguments which will be passed onto the event listeners.
* @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
*/
$broadcast: function(name, args) {
var target = this,
current = target,
next = target,
event = {
name: name,
targetScope: target,
preventDefault: function() {
event.defaultPrevented = true;
},
defaultPrevented: false
},
listenerArgs = concat([event], arguments, 1),
listeners, i, length;
//down while you can, then up and next sibling or up and next sibling until back at root
do {
current = next;
event.currentScope = current;
listeners = current.$$listeners[name] || [];
for (i=0, length = listeners.length; i<length; i++) {
// if listeners were deregistered, defragment the array
if (!listeners[i]) {
listeners.splice(i, 1);
i--;
length--;
continue;
}
try {
listeners[i].apply(null, listenerArgs);
} catch(e) {
$exceptionHandler(e);
}
}
// Insanity Warning: scope depth-first traversal
// yes, this code is a bit crazy, but it works and we have tests to prove it!
// this piece should be kept in sync with the traversal in $digest
if (!(next = (current.$$childHead || (current !== target && current.$$nextSibling)))) {
while(current !== target && !(next = current.$$nextSibling)) {
current = current.$parent;
}
}
} while ((current = next));
return event;
}
};
var $rootScope = new Scope();
return $rootScope;
function beginPhase(phase) {
if ($rootScope.$$phase) {
throw Error($rootScope.$$phase + ' already in progress');
}
$rootScope.$$phase = phase;
}
function clearPhase() {
$rootScope.$$phase = null;
}
function compileToFn(exp, name) {
var fn = $parse(exp);
assertArgFn(fn, name);
return fn;
}
/**
* function used as an initial value for watchers.
* because it's unique we can easily tell it apart from other values
*/
function initWatchVal() {}
}];
}
/**
* !!! This is an undocumented "private" service !!!
*
* @name ng.$sniffer
* @requires $window
*
* @property {boolean} history Does the browser support html5 history api ?
* @property {boolean} hashchange Does the browser support hashchange event ?
*
* @description
* This is very simple implementation of testing browser's features.
*/
function $SnifferProvider() {
this.$get = ['$window', function($window) {
var eventSupport = {},
android = int((/android (\d+)/.exec(lowercase($window.navigator.userAgent)) || [])[1]);
return {
// Android has history.pushState, but it does not update location correctly
// so let's not use the history API at all.
// http://code.google.com/p/android/issues/detail?id=17471
// https://github.com/angular/angular.js/issues/904
history: !!($window.history && $window.history.pushState && !(android < 4)),
hashchange: 'onhashchange' in $window &&
// IE8 compatible mode lies
(!$window.document.documentMode || $window.document.documentMode > 7),
hasEvent: function(event) {
// IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
// it. In particular the event is not fired when backspace or delete key are pressed or
// when cut operation is performed.
if (event == 'input' && msie == 9) return false;
if (isUndefined(eventSupport[event])) {
var divElm = $window.document.createElement('div');
eventSupport[event] = 'on' + event in divElm;
}
return eventSupport[event];
},
// TODO(i): currently there is no way to feature detect CSP without triggering alerts
csp: false
};
}];
}
/**
* @ngdoc object
* @name ng.$window
*
* @description
* A reference to the browser's `window` object. While `window`
* is globally available in JavaScript, it causes testability problems, because
* it is a global variable. In angular we always refer to it through the
* `$window` service, so it may be overriden, removed or mocked for testing.
*
* Expressions, like the one defined for the `ngClick` directive in the example
* below, are evaluated with respect to the current scope. Therefore, there is
* no risk of inadvertently coding in a dependency on a global value in such an
* expression.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope, $window) {
$scope.$window = $window;
$scope.greeting = 'Hello, World!';
}
</script>
<div ng-controller="Ctrl">
<input type="text" ng-model="greeting" />
<button ng-click="$window.alert(greeting)">ALERT</button>
</div>
</doc:source>
<doc:scenario>
it('should display the greeting in the input box', function() {
input('greeting').enter('Hello, E2E Tests');
// If we click the button it will block the test runner
// element(':button').click();
});
</doc:scenario>
</doc:example>
*/
function $WindowProvider(){
this.$get = valueFn(window);
}
/**
* Parse headers into key value object
*
* @param {string} headers Raw headers as a string
* @returns {Object} Parsed headers as key value object
*/
function parseHeaders(headers) {
var parsed = {}, key, val, i;
if (!headers) return parsed;
forEach(headers.split('\n'), function(line) {
i = line.indexOf(':');
key = lowercase(trim(line.substr(0, i)));
val = trim(line.substr(i + 1));
if (key) {
if (parsed[key]) {
parsed[key] += ', ' + val;
} else {
parsed[key] = val;
}
}
});
return parsed;
}
/**
* Returns a function that provides access to parsed headers.
*
* Headers are lazy parsed when first requested.
* @see parseHeaders
*
* @param {(string|Object)} headers Headers to provide access to.
* @returns {function(string=)} Returns a getter function which if called with:
*
* - if called with single an argument returns a single header value or null
* - if called with no arguments returns an object containing all headers.
*/
function headersGetter(headers) {
var headersObj = isObject(headers) ? headers : undefined;
return function(name) {
if (!headersObj) headersObj = parseHeaders(headers);
if (name) {
return headersObj[lowercase(name)] || null;
}
return headersObj;
};
}
/**
* Chain all given functions
*
* This function is used for both request and response transforming
*
* @param {*} data Data to transform.
* @param {function(string=)} headers Http headers getter fn.
* @param {(function|Array.<function>)} fns Function or an array of functions.
* @returns {*} Transformed data.
*/
function transformData(data, headers, fns) {
if (isFunction(fns))
return fns(data, headers);
forEach(fns, function(fn) {
data = fn(data, headers);
});
return data;
}
function isSuccess(status) {
return 200 <= status && status < 300;
}
function $HttpProvider() {
var JSON_START = /^\s*(\[|\{[^\{])/,
JSON_END = /[\}\]]\s*$/,
PROTECTION_PREFIX = /^\)\]\}',?\n/;
var $config = this.defaults = {
// transform incoming response data
transformResponse: [function(data) {
if (isString(data)) {
// strip json vulnerability protection prefix
data = data.replace(PROTECTION_PREFIX, '');
if (JSON_START.test(data) && JSON_END.test(data))
data = fromJson(data, true);
}
return data;
}],
// transform outgoing request data
transformRequest: [function(d) {
return isObject(d) && !isFile(d) ? toJson(d) : d;
}],
// default headers
headers: {
common: {
'Accept': 'application/json, text/plain, */*',
'X-Requested-With': 'XMLHttpRequest'
},
post: {'Content-Type': 'application/json;charset=utf-8'},
put: {'Content-Type': 'application/json;charset=utf-8'}
}
};
var providerResponseInterceptors = this.responseInterceptors = [];
this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',
function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {
var defaultCache = $cacheFactory('$http'),
responseInterceptors = [];
forEach(providerResponseInterceptors, function(interceptor) {
responseInterceptors.push(
isString(interceptor)
? $injector.get(interceptor)
: $injector.invoke(interceptor)
);
});
/**
* @ngdoc function
* @name ng.$http
* @requires $httpBackend
* @requires $browser
* @requires $cacheFactory
* @requires $rootScope
* @requires $q
* @requires $injector
*
* @description
* The `$http` service is a core Angular service that facilitates communication with the remote
* HTTP servers via the browser's {@link https://developer.mozilla.org/en/xmlhttprequest
* XMLHttpRequest} object or via {@link http://en.wikipedia.org/wiki/JSONP JSONP}.
*
* For unit testing applications that use `$http` service, see
* {@link ngMock.$httpBackend $httpBackend mock}.
*
* For a higher level of abstraction, please check out the {@link ngResource.$resource
* $resource} service.
*
* The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by
* the $q service. While for simple usage patterns this doesn't matter much, for advanced usage
* it is important to familiarize yourself with these APIs and the guarantees they provide.
*
*
* # General usage
* The `$http` service is a function which takes a single argument — a configuration object —
* that is used to generate an HTTP request and returns a {@link ng.$q promise}
* with two $http specific methods: `success` and `error`.
*
* <pre>
* $http({method: 'GET', url: '/someUrl'}).
* success(function(data, status, headers, config) {
* // this callback will be called asynchronously
* // when the response is available
* }).
* error(function(data, status, headers, config) {
* // called asynchronously if an error occurs
* // or server returns response with an error status.
* });
* </pre>
*
* Since the returned value of calling the $http function is a `promise`, you can also use
* the `then` method to register callbacks, and these callbacks will receive a single argument –
* an object representing the response. See the API signature and type info below for more
* details.
*
* A response status code between 200 and 299 is considered a success status and
* will result in the success callback being called. Note that if the response is a redirect,
* XMLHttpRequest will transparently follow it, meaning that the error callback will not be
* called for such responses.
*
* # Shortcut methods
*
* Since all invocations of the $http service require passing in an HTTP method and URL, and
* POST/PUT requests require request data to be provided as well, shortcut methods
* were created:
*
* <pre>
* $http.get('/someUrl').success(successCallback);
* $http.post('/someUrl', data).success(successCallback);
* </pre>
*
* Complete list of shortcut methods:
*
* - {@link ng.$http#get $http.get}
* - {@link ng.$http#head $http.head}
* - {@link ng.$http#post $http.post}
* - {@link ng.$http#put $http.put}
* - {@link ng.$http#delete $http.delete}
* - {@link ng.$http#jsonp $http.jsonp}
*
*
* # Setting HTTP Headers
*
* The $http service will automatically add certain HTTP headers to all requests. These defaults
* can be fully configured by accessing the `$httpProvider.defaults.headers` configuration
* object, which currently contains this default configuration:
*
* - `$httpProvider.defaults.headers.common` (headers that are common for all requests):
* - `Accept: application/json, text/plain, * / *`
* - `X-Requested-With: XMLHttpRequest`
* - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)
* - `Content-Type: application/json`
* - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)
* - `Content-Type: application/json`
*
* To add or overwrite these defaults, simply add or remove a property from these configuration
* objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
* with the lowercased HTTP method name as the key, e.g.
* `$httpProvider.defaults.headers.get['My-Header']='value'`.
*
* Additionally, the defaults can be set at runtime via the `$http.defaults` object in the same
* fashion.
*
*
* # Transforming Requests and Responses
*
* Both requests and responses can be transformed using transform functions. By default, Angular
* applies these transformations:
*
* Request transformations:
*
* - If the `data` property of the request configuration object contains an object, serialize it into
* JSON format.
*
* Response transformations:
*
* - If XSRF prefix is detected, strip it (see Security Considerations section below).
* - If JSON response is detected, deserialize it using a JSON parser.
*
* To globally augment or override the default transforms, modify the `$httpProvider.defaults.transformRequest` and
* `$httpProvider.defaults.transformResponse` properties. These properties are by default an
* array of transform functions, which allows you to `push` or `unshift` a new transformation function into the
* transformation chain. You can also decide to completely override any default transformations by assigning your
* transformation functions to these properties directly without the array wrapper.
*
* Similarly, to locally override the request/response transforms, augment the `transformRequest` and/or
* `transformResponse` properties of the configuration object passed into `$http`.
*
*
* # Caching
*
* To enable caching, set the configuration property `cache` to `true`. When the cache is
* enabled, `$http` stores the response from the server in local cache. Next time the
* response is served from the cache without sending a request to the server.
*
* Note that even if the response is served from cache, delivery of the data is asynchronous in
* the same way that real requests are.
*
* If there are multiple GET requests for the same URL that should be cached using the same
* cache, but the cache is not populated yet, only one request to the server will be made and
* the remaining requests will be fulfilled using the response from the first request.
*
*
* # Response interceptors
*
* Before you start creating interceptors, be sure to understand the
* {@link ng.$q $q and deferred/promise APIs}.
*
* For purposes of global error handling, authentication or any kind of synchronous or
* asynchronous preprocessing of received responses, it is desirable to be able to intercept
* responses for http requests before they are handed over to the application code that
* initiated these requests. The response interceptors leverage the {@link ng.$q
* promise apis} to fulfil this need for both synchronous and asynchronous preprocessing.
*
* The interceptors are service factories that are registered with the $httpProvider by
* adding them to the `$httpProvider.responseInterceptors` array. The factory is called and
* injected with dependencies (if specified) and returns the interceptor — a function that
* takes a {@link ng.$q promise} and returns the original or a new promise.
*
* <pre>
* // register the interceptor as a service
* $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
* return function(promise) {
* return promise.then(function(response) {
* // do something on success
* return response;
* }, function(response) {
* // do something on error
* if (canRecover(response)) {
* return responseOrNewPromise
* }
* return $q.reject(response);
* });
* }
* });
*
* $httpProvider.responseInterceptors.push('myHttpInterceptor');
*
*
* // register the interceptor via an anonymous factory
* $httpProvider.responseInterceptors.push(function($q, dependency1, dependency2) {
* return function(promise) {
* // same as above
* }
* });
* </pre>
*
*
* # Security Considerations
*
* When designing web applications, consider security threats from:
*
* - {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx
* JSON vulnerability}
* - {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF}
*
* Both server and the client must cooperate in order to eliminate these threats. Angular comes
* pre-configured with strategies that address these issues, but for this to work backend server
* cooperation is required.
*
* ## JSON Vulnerability Protection
*
* A {@link http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx
* JSON vulnerability} allows third party website to turn your JSON resource URL into
* {@link http://en.wikipedia.org/wiki/JSONP JSONP} request under some conditions. To
* counter this your server can prefix all JSON requests with following string `")]}',\n"`.
* Angular will automatically strip the prefix before processing it as JSON.
*
* For example if your server needs to return:
* <pre>
* ['one','two']
* </pre>
*
* which is vulnerable to attack, your server can return:
* <pre>
* )]}',
* ['one','two']
* </pre>
*
* Angular will strip the prefix, before processing the JSON.
*
*
* ## Cross Site Request Forgery (XSRF) Protection
*
* {@link http://en.wikipedia.org/wiki/Cross-site_request_forgery XSRF} is a technique by which
* an unauthorized site can gain your user's private data. Angular provides a mechanism
* to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie
* called `XSRF-TOKEN` and sets it as the HTTP header `X-XSRF-TOKEN`. Since only JavaScript that
* runs on your domain could read the cookie, your server can be assured that the XHR came from
* JavaScript running on your domain.
*
* To take advantage of this, your server needs to set a token in a JavaScript readable session
* cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the
* server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure
* that only JavaScript running on your domain could have sent the request. The token must be
* unique for each user and must be verifiable by the server (to prevent the JavaScript from making
* up its own tokens). We recommend that the token is a digest of your site's authentication
* cookie with a {@link https://en.wikipedia.org/wiki/Salt_(cryptography) salt} for added security.
*
*
* @param {object} config Object describing the request to be made and how it should be
* processed. The object has following properties:
*
* - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)
* - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.
* - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be turned to
* `?key1=value1&key2=value2` after the url. If the value is not a string, it will be JSONified.
* - **data** – `{string|Object}` – Data to be sent as the request message data.
* - **headers** – `{Object}` – Map of strings representing HTTP headers to send to the server.
* - **transformRequest** – `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
* transform function or an array of such functions. The transform function takes the http
* request body and headers and returns its transformed (typically serialized) version.
* - **transformResponse** – `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
* transform function or an array of such functions. The transform function takes the http
* response body and headers and returns its transformed (typically deserialized) version.
* - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
* GET request, otherwise if a cache instance built with
* {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
* caching.
* - **timeout** – `{number}` – timeout in milliseconds.
* - **withCredentials** - `{boolean}` - whether to to set the `withCredentials` flag on the
* XHR object. See {@link https://developer.mozilla.org/en/http_access_control#section_5
* requests with credentials} for more information.
*
* @returns {HttpPromise} Returns a {@link ng.$q promise} object with the
* standard `then` method and two http specific methods: `success` and `error`. The `then`
* method takes two arguments a success and an error callback which will be called with a
* response object. The `success` and `error` methods take a single argument - a function that
* will be called when the request succeeds or fails respectively. The arguments passed into
* these functions are destructured representation of the response object passed into the
* `then` method. The response object has these properties:
*
* - **data** – `{string|Object}` – The response body transformed with the transform functions.
* - **status** – `{number}` – HTTP status code of the response.
* - **headers** – `{function([headerName])}` – Header getter function.
* - **config** – `{Object}` – The configuration object that was used to generate the request.
*
* @property {Array.<Object>} pendingRequests Array of config objects for currently pending
* requests. This is primarily meant to be used for debugging purposes.
*
*
* @example
<example>
<file name="index.html">
<div ng-controller="FetchCtrl">
<select ng-model="method">
<option>GET</option>
<option>JSONP</option>
</select>
<input type="text" ng-model="url" size="80"/>
<button ng-click="fetch()">fetch</button><br>
<button ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button>
<button ng-click="updateModel('JSONP', 'http://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">Sample JSONP</button>
<button ng-click="updateModel('JSONP', 'http://angularjs.org/doesntexist&callback=JSON_CALLBACK')">Invalid JSONP</button>
<pre>http status code: {{status}}</pre>
<pre>http response data: {{data}}</pre>
</div>
</file>
<file name="script.js">
function FetchCtrl($scope, $http, $templateCache) {
$scope.method = 'GET';
$scope.url = 'http-hello.html';
$scope.fetch = function() {
$scope.code = null;
$scope.response = null;
$http({method: $scope.method, url: $scope.url, cache: $templateCache}).
success(function(data, status) {
$scope.status = status;
$scope.data = data;
}).
error(function(data, status) {
$scope.data = data || "Request failed";
$scope.status = status;
});
};
$scope.updateModel = function(method, url) {
$scope.method = method;
$scope.url = url;
};
}
</file>
<file name="http-hello.html">
Hello, $http!
</file>
<file name="scenario.js">
it('should make an xhr GET request', function() {
element(':button:contains("Sample GET")').click();
element(':button:contains("fetch")').click();
expect(binding('status')).toBe('200');
expect(binding('data')).toMatch(/Hello, \$http!/);
});
it('should make a JSONP request to angularjs.org', function() {
element(':button:contains("Sample JSONP")').click();
element(':button:contains("fetch")').click();
expect(binding('status')).toBe('200');
expect(binding('data')).toMatch(/Super Hero!/);
});
it('should make JSONP request to invalid URL and invoke the error handler',
function() {
element(':button:contains("Invalid JSONP")').click();
element(':button:contains("fetch")').click();
expect(binding('status')).toBe('0');
expect(binding('data')).toBe('Request failed');
});
</file>
</example>
*/
function $http(config) {
config.method = uppercase(config.method);
var reqTransformFn = config.transformRequest || $config.transformRequest,
respTransformFn = config.transformResponse || $config.transformResponse,
reqHeaders = extend({}, config.headers),
defHeaders = extend(
{'X-XSRF-TOKEN': $browser.cookies()['XSRF-TOKEN']},
$config.headers.common,
$config.headers[lowercase(config.method)]
),
reqData,
defHeaderName, lowercaseDefHeaderName, headerName,
promise;
// using for-in instead of forEach to avoid unecessary iteration after header has been found
defaultHeadersIteration:
for(defHeaderName in defHeaders) {
lowercaseDefHeaderName = lowercase(defHeaderName);
for(headerName in config.headers) {
if (lowercase(headerName) === lowercaseDefHeaderName) {
continue defaultHeadersIteration;
}
}
reqHeaders[defHeaderName] = defHeaders[defHeaderName];
}
// strip content-type if data is undefined
if (isUndefined(config.data)) {
for(var header in reqHeaders) {
if (lowercase(header) === 'content-type') {
delete reqHeaders[header];
break;
}
}
}
reqData = transformData(config.data, headersGetter(reqHeaders), reqTransformFn);
// send request
promise = sendReq(config, reqData, reqHeaders);
// transform future response
promise = promise.then(transformResponse, transformResponse);
// apply interceptors
forEach(responseInterceptors, function(interceptor) {
promise = interceptor(promise);
});
promise.success = function(fn) {
promise.then(function(response) {
fn(response.data, response.status, response.headers, config);
});
return promise;
};
promise.error = function(fn) {
promise.then(null, function(response) {
fn(response.data, response.status, response.headers, config);
});
return promise;
};
return promise;
function transformResponse(response) {
// make a copy since the response must be cacheable
var resp = extend({}, response, {
data: transformData(response.data, response.headers, respTransformFn)
});
return (isSuccess(response.status))
? resp
: $q.reject(resp);
}
}
$http.pendingRequests = [];
/**
* @ngdoc method
* @name ng.$http#get
* @methodOf ng.$http
*
* @description
* Shortcut method to perform `GET` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
/**
* @ngdoc method
* @name ng.$http#delete
* @methodOf ng.$http
*
* @description
* Shortcut method to perform `DELETE` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
/**
* @ngdoc method
* @name ng.$http#head
* @methodOf ng.$http
*
* @description
* Shortcut method to perform `HEAD` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
/**
* @ngdoc method
* @name ng.$http#jsonp
* @methodOf ng.$http
*
* @description
* Shortcut method to perform `JSONP` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request.
* Should contain `JSON_CALLBACK` string.
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
createShortMethods('get', 'delete', 'head', 'jsonp');
/**
* @ngdoc method
* @name ng.$http#post
* @methodOf ng.$http
*
* @description
* Shortcut method to perform `POST` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request
* @param {*} data Request content
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
/**
* @ngdoc method
* @name ng.$http#put
* @methodOf ng.$http
*
* @description
* Shortcut method to perform `PUT` request.
*
* @param {string} url Relative or absolute URL specifying the destination of the request
* @param {*} data Request content
* @param {Object=} config Optional configuration object
* @returns {HttpPromise} Future object
*/
createShortMethodsWithData('post', 'put');
/**
* @ngdoc property
* @name ng.$http#defaults
* @propertyOf ng.$http
*
* @description
* Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
* default headers as well as request and response transformations.
*
* See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
*/
$http.defaults = $config;
return $http;
function createShortMethods(names) {
forEach(arguments, function(name) {
$http[name] = function(url, config) {
return $http(extend(config || {}, {
method: name,
url: url
}));
};
});
}
function createShortMethodsWithData(name) {
forEach(arguments, function(name) {
$http[name] = function(url, data, config) {
return $http(extend(config || {}, {
method: name,
url: url,
data: data
}));
};
});
}
/**
* Makes the request.
*
* !!! ACCESSES CLOSURE VARS:
* $httpBackend, $config, $log, $rootScope, defaultCache, $http.pendingRequests
*/
function sendReq(config, reqData, reqHeaders) {
var deferred = $q.defer(),
promise = deferred.promise,
cache,
cachedResp,
url = buildUrl(config.url, config.params);
$http.pendingRequests.push(config);
promise.then(removePendingReq, removePendingReq);
if (config.cache && config.method == 'GET') {
cache = isObject(config.cache) ? config.cache : defaultCache;
}
if (cache) {
cachedResp = cache.get(url);
if (cachedResp) {
if (cachedResp.then) {
// cached request has already been sent, but there is no response yet
cachedResp.then(removePendingReq, removePendingReq);
return cachedResp;
} else {
// serving from cache
if (isArray(cachedResp)) {
resolvePromise(cachedResp[1], cachedResp[0], copy(cachedResp[2]));
} else {
resolvePromise(cachedResp, 200, {});
}
}
} else {
// put the promise for the non-transformed response into cache as a placeholder
cache.put(url, promise);
}
}
// if we won't have the response in cache, send the request to the backend
if (!cachedResp) {
$httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,
config.withCredentials);
}
return promise;
/**
* Callback registered to $httpBackend():
* - caches the response if desired
* - resolves the raw $http promise
* - calls $apply
*/
function done(status, response, headersString) {
if (cache) {
if (isSuccess(status)) {
cache.put(url, [status, response, parseHeaders(headersString)]);
} else {
// remove promise from the cache
cache.remove(url);
}
}
resolvePromise(response, status, headersString);
$rootScope.$apply();
}
/**
* Resolves the raw $http promise.
*/
function resolvePromise(response, status, headers) {
// normalize internal statuses to 0
status = Math.max(status, 0);
(isSuccess(status) ? deferred.resolve : deferred.reject)({
data: response,
status: status,
headers: headersGetter(headers),
config: config
});
}
function removePendingReq() {
var idx = indexOf($http.pendingRequests, config);
if (idx !== -1) $http.pendingRequests.splice(idx, 1);
}
}
function buildUrl(url, params) {
if (!params) return url;
var parts = [];
forEachSorted(params, function(value, key) {
if (value == null || value == undefined) return;
if (isObject(value)) {
value = toJson(value);
}
parts.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));
});
return url + ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');
}
}];
}
var XHR = window.XMLHttpRequest || function() {
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); } catch (e1) {}
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); } catch (e2) {}
try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e3) {}
throw new Error("This browser does not support XMLHttpRequest.");
};
/**
* @ngdoc object
* @name ng.$httpBackend
* @requires $browser
* @requires $window
* @requires $document
*
* @description
* HTTP backend used by the {@link ng.$http service} that delegates to
* XMLHttpRequest object or JSONP and deals with browser incompatibilities.
*
* You should never need to use this service directly, instead use the higher-level abstractions:
* {@link ng.$http $http} or {@link ngResource.$resource $resource}.
*
* During testing this implementation is swapped with {@link ngMock.$httpBackend mock
* $httpBackend} which can be trained with responses.
*/
function $HttpBackendProvider() {
this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {
return createHttpBackend($browser, XHR, $browser.defer, $window.angular.callbacks,
$document[0], $window.location.protocol.replace(':', ''));
}];
}
function createHttpBackend($browser, XHR, $browserDefer, callbacks, rawDocument, locationProtocol) {
// TODO(vojta): fix the signature
return function(method, url, post, callback, headers, timeout, withCredentials) {
$browser.$$incOutstandingRequestCount();
url = url || $browser.url();
if (lowercase(method) == 'jsonp') {
var callbackId = '_' + (callbacks.counter++).toString(36);
callbacks[callbackId] = function(data) {
callbacks[callbackId].data = data;
};
jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
function() {
if (callbacks[callbackId].data) {
completeRequest(callback, 200, callbacks[callbackId].data);
} else {
completeRequest(callback, -2);
}
delete callbacks[callbackId];
});
} else {
var xhr = new XHR();
xhr.open(method, url, true);
forEach(headers, function(value, key) {
if (value) xhr.setRequestHeader(key, value);
});
var status;
// In IE6 and 7, this might be called synchronously when xhr.send below is called and the
// response is in the cache. the promise api will ensure that to the app code the api is
// always async
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
var responseHeaders = xhr.getAllResponseHeaders();
// TODO(vojta): remove once Firefox 21 gets released.
// begin: workaround to overcome Firefox CORS http response headers bug
// https://bugzilla.mozilla.org/show_bug.cgi?id=608735
// Firefox already patched in nightly. Should land in Firefox 21.
// CORS "simple response headers" http://www.w3.org/TR/cors/
var value,
simpleHeaders = ["Cache-Control", "Content-Language", "Content-Type",
"Expires", "Last-Modified", "Pragma"];
if (!responseHeaders) {
responseHeaders = "";
forEach(simpleHeaders, function (header) {
var value = xhr.getResponseHeader(header);
if (value) {
responseHeaders += header + ": " + value + "\n";
}
});
}
// end of the workaround.
completeRequest(callback, status || xhr.status, xhr.responseText,
responseHeaders);
}
};
if (withCredentials) {
xhr.withCredentials = true;
}
xhr.send(post || '');
if (timeout > 0) {
$browserDefer(function() {
status = -1;
xhr.abort();
}, timeout);
}
}
function completeRequest(callback, status, response, headersString) {
// URL_MATCH is defined in src/service/location.js
var protocol = (url.match(URL_MATCH) || ['', locationProtocol])[1];
// fix status code for file protocol (it's always 0)
status = (protocol == 'file') ? (response ? 200 : 404) : status;
// normalize IE bug (http://bugs.jquery.com/ticket/1450)
status = status == 1223 ? 204 : status;
callback(status, response, headersString);
$browser.$$completeOutstandingRequest(noop);
}
};
function jsonpReq(url, done) {
// we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
var script = rawDocument.createElement('script'),
doneWrapper = function() {
rawDocument.body.removeChild(script);
if (done) done();
};
script.type = 'text/javascript';
script.src = url;
if (msie) {
script.onreadystatechange = function() {
if (/loaded|complete/.test(script.readyState)) doneWrapper();
};
} else {
script.onload = script.onerror = doneWrapper;
}
rawDocument.body.appendChild(script);
}
}
/**
* @ngdoc object
* @name ng.$locale
*
* @description
* $locale service provides localization rules for various Angular components. As of right now the
* only public api is:
*
* * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
*/
function $LocaleProvider(){
this.$get = function() {
return {
id: 'en-us',
NUMBER_FORMATS: {
DECIMAL_SEP: '.',
GROUP_SEP: ',',
PATTERNS: [
{ // Decimal Pattern
minInt: 1,
minFrac: 0,
maxFrac: 3,
posPre: '',
posSuf: '',
negPre: '-',
negSuf: '',
gSize: 3,
lgSize: 3
},{ //Currency Pattern
minInt: 1,
minFrac: 2,
maxFrac: 2,
posPre: '\u00A4',
posSuf: '',
negPre: '(\u00A4',
negSuf: ')',
gSize: 3,
lgSize: 3
}
],
CURRENCY_SYM: '$'
},
DATETIME_FORMATS: {
MONTH: 'January,February,March,April,May,June,July,August,September,October,November,December'
.split(','),
SHORTMONTH: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),
DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),
SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),
AMPMS: ['AM','PM'],
medium: 'MMM d, y h:mm:ss a',
short: 'M/d/yy h:mm a',
fullDate: 'EEEE, MMMM d, y',
longDate: 'MMMM d, y',
mediumDate: 'MMM d, y',
shortDate: 'M/d/yy',
mediumTime: 'h:mm:ss a',
shortTime: 'h:mm a'
},
pluralCat: function(num) {
if (num === 1) {
return 'one';
}
return 'other';
}
};
};
}
function $TimeoutProvider() {
this.$get = ['$rootScope', '$browser', '$q', '$exceptionHandler',
function($rootScope, $browser, $q, $exceptionHandler) {
var deferreds = {};
/**
* @ngdoc function
* @name ng.$timeout
* @requires $browser
*
* @description
* Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch
* block and delegates any exceptions to
* {@link ng.$exceptionHandler $exceptionHandler} service.
*
* The return value of registering a timeout function is a promise, which will be resolved when
* the timeout is reached and the timeout function is executed.
*
* To cancel a timeout request, call `$timeout.cancel(promise)`.
*
* In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to
* synchronously flush the queue of deferred functions.
*
* @param {function()} fn A function, whose execution should be delayed.
* @param {number=} [delay=0] Delay in milliseconds.
* @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
* will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
* @returns {Promise} Promise that will be resolved when the timeout is reached. The value this
* promise will be resolved with is the return value of the `fn` function.
*/
function timeout(fn, delay, invokeApply) {
var deferred = $q.defer(),
promise = deferred.promise,
skipApply = (isDefined(invokeApply) && !invokeApply),
timeoutId, cleanup;
timeoutId = $browser.defer(function() {
try {
deferred.resolve(fn());
} catch(e) {
deferred.reject(e);
$exceptionHandler(e);
}
finally {
delete deferreds[promise.$$timeoutId];
}
if (!skipApply) $rootScope.$apply();
}, delay);
promise.$$timeoutId = timeoutId;
deferreds[timeoutId] = deferred;
return promise;
}
/**
* @ngdoc function
* @name ng.$timeout#cancel
* @methodOf ng.$timeout
*
* @description
* Cancels a task associated with the `promise`. As a result of this, the promise will be
* resolved with a rejection.
*
* @param {Promise=} promise Promise returned by the `$timeout` function.
* @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
* canceled.
*/
timeout.cancel = function(promise) {
if (promise && promise.$$timeoutId in deferreds) {
deferreds[promise.$$timeoutId].reject('canceled');
delete deferreds[promise.$$timeoutId];
return $browser.defer.cancel(promise.$$timeoutId);
}
return false;
};
return timeout;
}];
}
/**
* @ngdoc object
* @name ng.$filterProvider
* @description
*
* Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To
* achieve this a filter definition consists of a factory function which is annotated with dependencies and is
* responsible for creating a filter function.
*
* <pre>
* // Filter registration
* function MyModule($provide, $filterProvider) {
* // create a service to demonstrate injection (not always needed)
* $provide.value('greet', function(name){
* return 'Hello ' + name + '!';
* });
*
* // register a filter factory which uses the
* // greet service to demonstrate DI.
* $filterProvider.register('greet', function(greet){
* // return the filter function which uses the greet service
* // to generate salutation
* return function(text) {
* // filters need to be forgiving so check input validity
* return text && greet(text) || text;
* };
* });
* }
* </pre>
*
* The filter function is registered with the `$injector` under the filter name suffixe with `Filter`.
* <pre>
* it('should be the same instance', inject(
* function($filterProvider) {
* $filterProvider.register('reverse', function(){
* return ...;
* });
* },
* function($filter, reverseFilter) {
* expect($filter('reverse')).toBe(reverseFilter);
* });
* </pre>
*
*
* For more information about how angular filters work, and how to create your own filters, see
* {@link guide/dev_guide.templates.filters Understanding Angular Filters} in the angular Developer
* Guide.
*/
/**
* @ngdoc method
* @name ng.$filterProvider#register
* @methodOf ng.$filterProvider
* @description
* Register filter factory function.
*
* @param {String} name Name of the filter.
* @param {function} fn The filter factory function which is injectable.
*/
/**
* @ngdoc function
* @name ng.$filter
* @function
* @description
* Filters are used for formatting data displayed to the user.
*
* The general syntax in templates is as follows:
*
* {{ expression [| filter_name[:parameter_value] ... ] }}
*
* @param {String} name Name of the filter function to retrieve
* @return {Function} the filter function
*/
$FilterProvider.$inject = ['$provide'];
function $FilterProvider($provide) {
var suffix = 'Filter';
function register(name, factory) {
return $provide.factory(name + suffix, factory);
}
this.register = register;
this.$get = ['$injector', function($injector) {
return function(name) {
return $injector.get(name + suffix);
}
}];
////////////////////////////////////////
register('currency', currencyFilter);
register('date', dateFilter);
register('filter', filterFilter);
register('json', jsonFilter);
register('limitTo', limitToFilter);
register('lowercase', lowercaseFilter);
register('number', numberFilter);
register('orderBy', orderByFilter);
register('uppercase', uppercaseFilter);
}
/**
* @ngdoc filter
* @name ng.filter:filter
* @function
*
* @description
* Selects a subset of items from `array` and returns it as a new array.
*
* Note: This function is used to augment the `Array` type in Angular expressions. See
* {@link ng.$filter} for more information about Angular arrays.
*
* @param {Array} array The source array.
* @param {string|Object|function()} expression The predicate to be used for selecting items from
* `array`.
*
* Can be one of:
*
* - `string`: Predicate that results in a substring match using the value of `expression`
* string. All strings or objects with string properties in `array` that contain this string
* will be returned. The predicate can be negated by prefixing the string with `!`.
*
* - `Object`: A pattern object can be used to filter specific properties on objects contained
* by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
* which have property `name` containing "M" and property `phone` containing "1". A special
* property name `$` can be used (as in `{$:"text"}`) to accept a match against any
* property of the object. That's equivalent to the simple substring match with a `string`
* as described above.
*
* - `function`: A predicate function can be used to write arbitrary filters. The function is
* called for each element of `array`. The final result is an array of those elements that
* the predicate returned true for.
*
* @example
<doc:example>
<doc:source>
<div ng-init="friends = [{name:'John', phone:'555-1276'},
{name:'Mary', phone:'800-BIG-MARY'},
{name:'Mike', phone:'555-4321'},
{name:'Adam', phone:'555-5678'},
{name:'Julie', phone:'555-8765'}]"></div>
Search: <input ng-model="searchText">
<table id="searchTextResults">
<tr><th>Name</th><th>Phone</th></tr>
<tr ng-repeat="friend in friends | filter:searchText">
<td>{{friend.name}}</td>
<td>{{friend.phone}}</td>
</tr>
</table>
<hr>
Any: <input ng-model="search.$"> <br>
Name only <input ng-model="search.name"><br>
Phone only <input ng-model="search.phone"><br>
<table id="searchObjResults">
<tr><th>Name</th><th>Phone</th></tr>
<tr ng-repeat="friend in friends | filter:search">
<td>{{friend.name}}</td>
<td>{{friend.phone}}</td>
</tr>
</table>
</doc:source>
<doc:scenario>
it('should search across all fields when filtering with a string', function() {
input('searchText').enter('m');
expect(repeater('#searchTextResults tr', 'friend in friends').column('friend.name')).
toEqual(['Mary', 'Mike', 'Adam']);
input('searchText').enter('76');
expect(repeater('#searchTextResults tr', 'friend in friends').column('friend.name')).
toEqual(['John', 'Julie']);
});
it('should search in specific fields when filtering with a predicate object', function() {
input('search.$').enter('i');
expect(repeater('#searchObjResults tr', 'friend in friends').column('friend.name')).
toEqual(['Mary', 'Mike', 'Julie']);
});
</doc:scenario>
</doc:example>
*/
function filterFilter() {
return function(array, expression) {
if (!isArray(array)) return array;
var predicates = [];
predicates.check = function(value) {
for (var j = 0; j < predicates.length; j++) {
if(!predicates[j](value)) {
return false;
}
}
return true;
};
var search = function(obj, text){
if (text.charAt(0) === '!') {
return !search(obj, text.substr(1));
}
switch (typeof obj) {
case "boolean":
case "number":
case "string":
return ('' + obj).toLowerCase().indexOf(text) > -1;
case "object":
for ( var objKey in obj) {
if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {
return true;
}
}
return false;
case "array":
for ( var i = 0; i < obj.length; i++) {
if (search(obj[i], text)) {
return true;
}
}
return false;
default:
return false;
}
};
switch (typeof expression) {
case "boolean":
case "number":
case "string":
expression = {$:expression};
case "object":
for (var key in expression) {
if (key == '$') {
(function() {
var text = (''+expression[key]).toLowerCase();
if (!text) return;
predicates.push(function(value) {
return search(value, text);
});
})();
} else {
(function() {
var path = key;
var text = (''+expression[key]).toLowerCase();
if (!text) return;
predicates.push(function(value) {
return search(getter(value, path), text);
});
})();
}
}
break;
case 'function':
predicates.push(expression);
break;
default:
return array;
}
var filtered = [];
for ( var j = 0; j < array.length; j++) {
var value = array[j];
if (predicates.check(value)) {
filtered.push(value);
}
}
return filtered;
}
}
/**
* @ngdoc filter
* @name ng.filter:currency
* @function
*
* @description
* Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default
* symbol for current locale is used.
*
* @param {number} amount Input to filter.
* @param {string=} symbol Currency symbol or identifier to be displayed.
* @returns {string} Formatted number.
*
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.amount = 1234.56;
}
</script>
<div ng-controller="Ctrl">
<input type="number" ng-model="amount"> <br>
default currency symbol ($): {{amount | currency}}<br>
custom currency identifier (USD$): {{amount | currency:"USD$"}}
</div>
</doc:source>
<doc:scenario>
it('should init with 1234.56', function() {
expect(binding('amount | currency')).toBe('$1,234.56');
expect(binding('amount | currency:"USD$"')).toBe('USD$1,234.56');
});
it('should update', function() {
input('amount').enter('-1234');
expect(binding('amount | currency')).toBe('($1,234.00)');
expect(binding('amount | currency:"USD$"')).toBe('(USD$1,234.00)');
});
</doc:scenario>
</doc:example>
*/
currencyFilter.$inject = ['$locale'];
function currencyFilter($locale) {
var formats = $locale.NUMBER_FORMATS;
return function(amount, currencySymbol){
if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;
return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).
replace(/\u00A4/g, currencySymbol);
};
}
/**
* @ngdoc filter
* @name ng.filter:number
* @function
*
* @description
* Formats a number as text.
*
* If the input is not a number an empty string is returned.
*
* @param {number|string} number Number to format.
* @param {(number|string)=} fractionSize Number of decimal places to round the number to.
* If this is not provided then the fraction size is computed from the current locale's number
* formatting pattern. In the case of the default locale, it will be 3.
* @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.val = 1234.56789;
}
</script>
<div ng-controller="Ctrl">
Enter number: <input ng-model='val'><br>
Default formatting: {{val | number}}<br>
No fractions: {{val | number:0}}<br>
Negative number: {{-val | number:4}}
</div>
</doc:source>
<doc:scenario>
it('should format numbers', function() {
expect(binding('val | number')).toBe('1,234.568');
expect(binding('val | number:0')).toBe('1,235');
expect(binding('-val | number:4')).toBe('-1,234.5679');
});
it('should update', function() {
input('val').enter('3374.333');
expect(binding('val | number')).toBe('3,374.333');
expect(binding('val | number:0')).toBe('3,374');
expect(binding('-val | number:4')).toBe('-3,374.3330');
});
</doc:scenario>
</doc:example>
*/
numberFilter.$inject = ['$locale'];
function numberFilter($locale) {
var formats = $locale.NUMBER_FORMATS;
return function(number, fractionSize) {
return formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,
fractionSize);
};
}
var DECIMAL_SEP = '.';
function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
if (isNaN(number) || !isFinite(number)) return '';
var isNegative = number < 0;
number = Math.abs(number);
var numStr = number + '',
formatedText = '',
parts = [];
var hasExponent = false;
if (numStr.indexOf('e') !== -1) {
var match = numStr.match(/([\d\.]+)e(-?)(\d+)/);
if (match && match[2] == '-' && match[3] > fractionSize + 1) {
numStr = '0';
} else {
formatedText = numStr;
hasExponent = true;
}
}
if (!hasExponent) {
var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;
// determine fractionSize if it is not specified
if (isUndefined(fractionSize)) {
fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);
}
var pow = Math.pow(10, fractionSize);
number = Math.round(number * pow) / pow;
var fraction = ('' + number).split(DECIMAL_SEP);
var whole = fraction[0];
fraction = fraction[1] || '';
var pos = 0,
lgroup = pattern.lgSize,
group = pattern.gSize;
if (whole.length >= (lgroup + group)) {
pos = whole.length - lgroup;
for (var i = 0; i < pos; i++) {
if ((pos - i)%group === 0 && i !== 0) {
formatedText += groupSep;
}
formatedText += whole.charAt(i);
}
}
for (i = pos; i < whole.length; i++) {
if ((whole.length - i)%lgroup === 0 && i !== 0) {
formatedText += groupSep;
}
formatedText += whole.charAt(i);
}
// format fraction part.
while(fraction.length < fractionSize) {
fraction += '0';
}
if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize);
} else {
if (fractionSize > 0 && number > -1 && number < 1) {
formatedText = number.toFixed(fractionSize);
}
}
parts.push(isNegative ? pattern.negPre : pattern.posPre);
parts.push(formatedText);
parts.push(isNegative ? pattern.negSuf : pattern.posSuf);
return parts.join('');
}
function padNumber(num, digits, trim) {
var neg = '';
if (num < 0) {
neg = '-';
num = -num;
}
num = '' + num;
while(num.length < digits) num = '0' + num;
if (trim)
num = num.substr(num.length - digits);
return neg + num;
}
function dateGetter(name, size, offset, trim) {
offset = offset || 0;
return function(date) {
var value = date['get' + name]();
if (offset > 0 || value > -offset)
value += offset;
if (value === 0 && offset == -12 ) value = 12;
return padNumber(value, size, trim);
};
}
function dateStrGetter(name, shortForm) {
return function(date, formats) {
var value = date['get' + name]();
var get = uppercase(shortForm ? ('SHORT' + name) : name);
return formats[get][value];
};
}
function timeZoneGetter(date) {
var zone = -1 * date.getTimezoneOffset();
var paddedZone = (zone >= 0) ? "+" : "";
paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +
padNumber(Math.abs(zone % 60), 2);
return paddedZone;
}
function ampmGetter(date, formats) {
return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
}
var DATE_FORMATS = {
yyyy: dateGetter('FullYear', 4),
yy: dateGetter('FullYear', 2, 0, true),
y: dateGetter('FullYear', 1),
MMMM: dateStrGetter('Month'),
MMM: dateStrGetter('Month', true),
MM: dateGetter('Month', 2, 1),
M: dateGetter('Month', 1, 1),
dd: dateGetter('Date', 2),
d: dateGetter('Date', 1),
HH: dateGetter('Hours', 2),
H: dateGetter('Hours', 1),
hh: dateGetter('Hours', 2, -12),
h: dateGetter('Hours', 1, -12),
mm: dateGetter('Minutes', 2),
m: dateGetter('Minutes', 1),
ss: dateGetter('Seconds', 2),
s: dateGetter('Seconds', 1),
EEEE: dateStrGetter('Day'),
EEE: dateStrGetter('Day', true),
a: ampmGetter,
Z: timeZoneGetter
};
var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,
NUMBER_STRING = /^\d+$/;
/**
* @ngdoc filter
* @name ng.filter:date
* @function
*
* @description
* Formats `date` to a string based on the requested `format`.
*
* `format` string can be composed of the following elements:
*
* * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
* * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
* * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
* * `'MMMM'`: Month in year (January-December)
* * `'MMM'`: Month in year (Jan-Dec)
* * `'MM'`: Month in year, padded (01-12)
* * `'M'`: Month in year (1-12)
* * `'dd'`: Day in month, padded (01-31)
* * `'d'`: Day in month (1-31)
* * `'EEEE'`: Day in Week,(Sunday-Saturday)
* * `'EEE'`: Day in Week, (Sun-Sat)
* * `'HH'`: Hour in day, padded (00-23)
* * `'H'`: Hour in day (0-23)
* * `'hh'`: Hour in am/pm, padded (01-12)
* * `'h'`: Hour in am/pm, (1-12)
* * `'mm'`: Minute in hour, padded (00-59)
* * `'m'`: Minute in hour (0-59)
* * `'ss'`: Second in minute, padded (00-59)
* * `'s'`: Second in minute (0-59)
* * `'a'`: am/pm marker
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
*
* `format` string can also be one of the following predefined
* {@link guide/i18n localizable formats}:
*
* * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
* (e.g. Sep 3, 2010 12:05:08 pm)
* * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 pm)
* * `'fullDate'`: equivalent to `'EEEE, MMMM d,y'` for en_US locale
* (e.g. Friday, September 3, 2010)
* * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)
* * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)
* * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)
* * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm)
* * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm)
*
* `format` string can contain literal values. These need to be quoted with single quotes (e.g.
* `"h 'in the morning'"`). In order to output single quote, use two single quotes in a sequence
* (e.g. `"h 'o''clock'"`).
*
* @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or
* number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.SSSZ and its
* shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is
* specified in the string input, the time is considered to be in the local timezone.
* @param {string=} format Formatting rules (see Description). If not specified,
* `mediumDate` is used.
* @returns {string} Formatted string or the input if input is not recognized as date/millis.
*
* @example
<doc:example>
<doc:source>
<span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:
{{1288323623006 | date:'medium'}}<br>
<span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:
{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}<br>
<span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}<br>
</doc:source>
<doc:scenario>
it('should format date', function() {
expect(binding("1288323623006 | date:'medium'")).
toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/);
expect(binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).
toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/);
expect(binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).
toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
});
</doc:scenario>
</doc:example>
*/
dateFilter.$inject = ['$locale'];
function dateFilter($locale) {
var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
function jsonStringToDate(string){
var match;
if (match = string.match(R_ISO8601_STR)) {
var date = new Date(0),
tzHour = 0,
tzMin = 0;
if (match[9]) {
tzHour = int(match[9] + match[10]);
tzMin = int(match[9] + match[11]);
}
date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
date.setUTCHours(int(match[4]||0) - tzHour, int(match[5]||0) - tzMin, int(match[6]||0), int(match[7]||0));
return date;
}
return string;
}
return function(date, format) {
var text = '',
parts = [],
fn, match;
format = format || 'mediumDate';
format = $locale.DATETIME_FORMATS[format] || format;
if (isString(date)) {
if (NUMBER_STRING.test(date)) {
date = int(date);
} else {
date = jsonStringToDate(date);
}
}
if (isNumber(date)) {
date = new Date(date);
}
if (!isDate(date)) {
return date;
}
while(format) {
match = DATE_FORMATS_SPLIT.exec(format);
if (match) {
parts = concat(parts, match, 1);
format = parts.pop();
} else {
parts.push(format);
format = null;
}
}
forEach(parts, function(value){
fn = DATE_FORMATS[value];
text += fn ? fn(date, $locale.DATETIME_FORMATS)
: value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
});
return text;
};
}
/**
* @ngdoc filter
* @name ng.filter:json
* @function
*
* @description
* Allows you to convert a JavaScript object into JSON string.
*
* This filter is mostly useful for debugging. When using the double curly {{value}} notation
* the binding is automatically converted to JSON.
*
* @param {*} object Any JavaScript object (including arrays and primitive types) to filter.
* @returns {string} JSON string.
*
*
* @example:
<doc:example>
<doc:source>
<pre>{{ {'name':'value'} | json }}</pre>
</doc:source>
<doc:scenario>
it('should jsonify filtered objects', function() {
expect(binding("{'name':'value'}")).toMatch(/\{\n "name": ?"value"\n}/);
});
</doc:scenario>
</doc:example>
*
*/
function jsonFilter() {
return function(object) {
return toJson(object, true);
};
}
/**
* @ngdoc filter
* @name ng.filter:lowercase
* @function
* @description
* Converts string to lowercase.
* @see angular.lowercase
*/
var lowercaseFilter = valueFn(lowercase);
/**
* @ngdoc filter
* @name ng.filter:uppercase
* @function
* @description
* Converts string to uppercase.
* @see angular.uppercase
*/
var uppercaseFilter = valueFn(uppercase);
/**
* @ngdoc function
* @name ng.filter:limitTo
* @function
*
* @description
* Creates a new array containing only a specified number of elements in an array. The elements
* are taken from either the beginning or the end of the source array, as specified by the
* value and sign (positive or negative) of `limit`.
*
* Note: This function is used to augment the `Array` type in Angular expressions. See
* {@link ng.$filter} for more information about Angular arrays.
*
* @param {Array} array Source array to be limited.
* @param {string|Number} limit The length of the returned array. If the `limit` number is
* positive, `limit` number of items from the beginning of the source array are copied.
* If the number is negative, `limit` number of items from the end of the source array are
* copied. The `limit` will be trimmed if it exceeds `array.length`
* @returns {Array} A new sub-array of length `limit` or less if input array had less than `limit`
* elements.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.numbers = [1,2,3,4,5,6,7,8,9];
$scope.limit = 3;
}
</script>
<div ng-controller="Ctrl">
Limit {{numbers}} to: <input type="integer" ng-model="limit">
<p>Output: {{ numbers | limitTo:limit }}</p>
</div>
</doc:source>
<doc:scenario>
it('should limit the numer array to first three items', function() {
expect(element('.doc-example-live input[ng-model=limit]').val()).toBe('3');
expect(binding('numbers | limitTo:limit')).toEqual('[1,2,3]');
});
it('should update the output when -3 is entered', function() {
input('limit').enter(-3);
expect(binding('numbers | limitTo:limit')).toEqual('[7,8,9]');
});
it('should not exceed the maximum size of input array', function() {
input('limit').enter(100);
expect(binding('numbers | limitTo:limit')).toEqual('[1,2,3,4,5,6,7,8,9]');
});
</doc:scenario>
</doc:example>
*/
function limitToFilter(){
return function(array, limit) {
if (!(array instanceof Array)) return array;
limit = int(limit);
var out = [],
i, n;
// check that array is iterable
if (!array || !(array instanceof Array))
return out;
// if abs(limit) exceeds maximum length, trim it
if (limit > array.length)
limit = array.length;
else if (limit < -array.length)
limit = -array.length;
if (limit > 0) {
i = 0;
n = limit;
} else {
i = array.length + limit;
n = array.length;
}
for (; i<n; i++) {
out.push(array[i]);
}
return out;
}
}
/**
* @ngdoc function
* @name ng.filter:orderBy
* @function
*
* @description
* Orders a specified `array` by the `expression` predicate.
*
* Note: this function is used to augment the `Array` type in Angular expressions. See
* {@link ng.$filter} for more informaton about Angular arrays.
*
* @param {Array} array The array to sort.
* @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be
* used by the comparator to determine the order of elements.
*
* Can be one of:
*
* - `function`: Getter function. The result of this function will be sorted using the
* `<`, `=`, `>` operator.
* - `string`: An Angular expression which evaluates to an object to order by, such as 'name'
* to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control
* ascending or descending sort order (for example, +name or -name).
* - `Array`: An array of function or string predicates. The first predicate in the array
* is used for sorting, but when two items are equivalent, the next predicate is used.
*
* @param {boolean=} reverse Reverse the order the array.
* @returns {Array} Sorted copy of the source array.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.friends =
[{name:'John', phone:'555-1212', age:10},
{name:'Mary', phone:'555-9876', age:19},
{name:'Mike', phone:'555-4321', age:21},
{name:'Adam', phone:'555-5678', age:35},
{name:'Julie', phone:'555-8765', age:29}]
$scope.predicate = '-age';
}
</script>
<div ng-controller="Ctrl">
<pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>
<hr/>
[ <a href="" ng-click="predicate=''">unsorted</a> ]
<table class="friend">
<tr>
<th><a href="" ng-click="predicate = 'name'; reverse=false">Name</a>
(<a href ng-click="predicate = '-name'; reverse=false">^</a>)</th>
<th><a href="" ng-click="predicate = 'phone'; reverse=!reverse">Phone Number</a></th>
<th><a href="" ng-click="predicate = 'age'; reverse=!reverse">Age</a></th>
</tr>
<tr ng-repeat="friend in friends | orderBy:predicate:reverse">
<td>{{friend.name}}</td>
<td>{{friend.phone}}</td>
<td>{{friend.age}}</td>
</tr>
</table>
</div>
</doc:source>
<doc:scenario>
it('should be reverse ordered by aged', function() {
expect(binding('predicate')).toBe('-age');
expect(repeater('table.friend', 'friend in friends').column('friend.age')).
toEqual(['35', '29', '21', '19', '10']);
expect(repeater('table.friend', 'friend in friends').column('friend.name')).
toEqual(['Adam', 'Julie', 'Mike', 'Mary', 'John']);
});
it('should reorder the table when user selects different predicate', function() {
element('.doc-example-live a:contains("Name")').click();
expect(repeater('table.friend', 'friend in friends').column('friend.name')).
toEqual(['Adam', 'John', 'Julie', 'Mary', 'Mike']);
expect(repeater('table.friend', 'friend in friends').column('friend.age')).
toEqual(['35', '10', '29', '19', '21']);
element('.doc-example-live a:contains("Phone")').click();
expect(repeater('table.friend', 'friend in friends').column('friend.phone')).
toEqual(['555-9876', '555-8765', '555-5678', '555-4321', '555-1212']);
expect(repeater('table.friend', 'friend in friends').column('friend.name')).
toEqual(['Mary', 'Julie', 'Adam', 'Mike', 'John']);
});
</doc:scenario>
</doc:example>
*/
orderByFilter.$inject = ['$parse'];
function orderByFilter($parse){
return function(array, sortPredicate, reverseOrder) {
if (!isArray(array)) return array;
if (!sortPredicate) return array;
sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];
sortPredicate = map(sortPredicate, function(predicate){
var descending = false, get = predicate || identity;
if (isString(predicate)) {
if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {
descending = predicate.charAt(0) == '-';
predicate = predicate.substring(1);
}
get = $parse(predicate);
}
return reverseComparator(function(a,b){
return compare(get(a),get(b));
}, descending);
});
var arrayCopy = [];
for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }
return arrayCopy.sort(reverseComparator(comparator, reverseOrder));
function comparator(o1, o2){
for ( var i = 0; i < sortPredicate.length; i++) {
var comp = sortPredicate[i](o1, o2);
if (comp !== 0) return comp;
}
return 0;
}
function reverseComparator(comp, descending) {
return toBoolean(descending)
? function(a,b){return comp(b,a);}
: comp;
}
function compare(v1, v2){
var t1 = typeof v1;
var t2 = typeof v2;
if (t1 == t2) {
if (t1 == "string") {
v1 = v1.toLowerCase();
v2 = v2.toLowerCase();
}
if (v1 === v2) return 0;
return v1 < v2 ? -1 : 1;
} else {
return t1 < t2 ? -1 : 1;
}
}
}
}
function ngDirective(directive) {
if (isFunction(directive)) {
directive = {
link: directive
}
}
directive.restrict = directive.restrict || 'AC';
return valueFn(directive);
}
/**
* @ngdoc directive
* @name ng.directive:a
* @restrict E
*
* @description
* Modifies the default behavior of html A tag, so that the default action is prevented when href
* attribute is empty.
*
* The reasoning for this change is to allow easy creation of action links with `ngClick` directive
* without changing the location or causing page reloads, e.g.:
* `<a href="" ng-click="model.$save()">Save</a>`
*/
var htmlAnchorDirective = valueFn({
restrict: 'E',
compile: function(element, attr) {
if (msie <= 8) {
// turn <a href ng-click="..">link</a> into a stylable link in IE
// but only if it doesn't have name attribute, in which case it's an anchor
if (!attr.href && !attr.name) {
attr.$set('href', '');
}
// add a comment node to anchors to workaround IE bug that causes element content to be reset
// to new attribute content if attribute is updated with value containing @ and element also
// contains value with @
// see issue #1949
element.append(document.createComment('IE fix'));
}
return function(scope, element) {
element.bind('click', function(event){
// if we have no href url, then don't navigate anywhere.
if (!element.attr('href')) {
event.preventDefault();
}
});
}
}
});
/**
* @ngdoc directive
* @name ng.directive:ngHref
* @restrict A
*
* @description
* Using Angular markup like {{hash}} in an href attribute makes
* the page open to a wrong URL, if the user clicks that link before
* angular has a chance to replace the {{hash}} with actual URL, the
* link will be broken and will most likely return a 404 error.
* The `ngHref` directive solves this problem.
*
* The buggy way to write it:
* <pre>
* <a href="http://www.gravatar.com/avatar/{{hash}}"/>
* </pre>
*
* The correct way to write it:
* <pre>
* <a ng-href="http://www.gravatar.com/avatar/{{hash}}"/>
* </pre>
*
* @element A
* @param {template} ngHref any string which can contain `{{}}` markup.
*
* @example
* This example uses `link` variable inside `href` attribute:
<doc:example>
<doc:source>
<input ng-model="value" /><br />
<a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
<a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
<a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br />
<a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br />
<a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br />
<a id="link-6" ng-href="{{value}}">link</a> (link, change location)
</doc:source>
<doc:scenario>
it('should execute ng-click but not reload when href without value', function() {
element('#link-1').click();
expect(input('value').val()).toEqual('1');
expect(element('#link-1').attr('href')).toBe("");
});
it('should execute ng-click but not reload when href empty string', function() {
element('#link-2').click();
expect(input('value').val()).toEqual('2');
expect(element('#link-2').attr('href')).toBe("");
});
it('should execute ng-click and change url when ng-href specified', function() {
expect(element('#link-3').attr('href')).toBe("/123");
element('#link-3').click();
expect(browser().window().path()).toEqual('/123');
});
it('should execute ng-click but not reload when href empty string and name specified', function() {
element('#link-4').click();
expect(input('value').val()).toEqual('4');
expect(element('#link-4').attr('href')).toBe('');
});
it('should execute ng-click but not reload when no href but name specified', function() {
element('#link-5').click();
expect(input('value').val()).toEqual('5');
expect(element('#link-5').attr('href')).toBe(undefined);
});
it('should only change url when only ng-href', function() {
input('value').enter('6');
expect(element('#link-6').attr('href')).toBe('6');
element('#link-6').click();
expect(browser().location().url()).toEqual('/6');
});
</doc:scenario>
</doc:example>
*/
/**
* @ngdoc directive
* @name ng.directive:ngSrc
* @restrict A
*
* @description
* Using Angular markup like `{{hash}}` in a `src` attribute doesn't
* work right: The browser will fetch from the URL with the literal
* text `{{hash}}` until Angular replaces the expression inside
* `{{hash}}`. The `ngSrc` directive solves this problem.
*
* The buggy way to write it:
* <pre>
* <img src="http://www.gravatar.com/avatar/{{hash}}"/>
* </pre>
*
* The correct way to write it:
* <pre>
* <img ng-src="http://www.gravatar.com/avatar/{{hash}}"/>
* </pre>
*
* @element IMG
* @param {template} ngSrc any string which can contain `{{}}` markup.
*/
/**
* @ngdoc directive
* @name ng.directive:ngDisabled
* @restrict A
*
* @description
*
* The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:
* <pre>
* <div ng-init="scope = { isDisabled: false }">
* <button disabled="{{scope.isDisabled}}">Disabled</button>
* </div>
* </pre>
*
* The HTML specs do not require browsers to preserve the special attributes such as disabled.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce the `ngDisabled` directive.
*
* @example
<doc:example>
<doc:source>
Click me to toggle: <input type="checkbox" ng-model="checked"><br/>
<button ng-model="button" ng-disabled="checked">Button</button>
</doc:source>
<doc:scenario>
it('should toggle button', function() {
expect(element('.doc-example-live :button').prop('disabled')).toBeFalsy();
input('checked').check();
expect(element('.doc-example-live :button').prop('disabled')).toBeTruthy();
});
</doc:scenario>
</doc:example>
*
* @element INPUT
* @param {expression} ngDisabled Angular expression that will be evaluated.
*/
/**
* @ngdoc directive
* @name ng.directive:ngChecked
* @restrict A
*
* @description
* The HTML specs do not require browsers to preserve the special attributes such as checked.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce the `ngChecked` directive.
* @example
<doc:example>
<doc:source>
Check me to check both: <input type="checkbox" ng-model="master"><br/>
<input id="checkSlave" type="checkbox" ng-checked="master">
</doc:source>
<doc:scenario>
it('should check both checkBoxes', function() {
expect(element('.doc-example-live #checkSlave').prop('checked')).toBeFalsy();
input('master').check();
expect(element('.doc-example-live #checkSlave').prop('checked')).toBeTruthy();
});
</doc:scenario>
</doc:example>
*
* @element INPUT
* @param {expression} ngChecked Angular expression that will be evaluated.
*/
/**
* @ngdoc directive
* @name ng.directive:ngMultiple
* @restrict A
*
* @description
* The HTML specs do not require browsers to preserve the special attributes such as multiple.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce the `ngMultiple` directive.
*
* @example
<doc:example>
<doc:source>
Check me check multiple: <input type="checkbox" ng-model="checked"><br/>
<select id="select" ng-multiple="checked">
<option>Misko</option>
<option>Igor</option>
<option>Vojta</option>
<option>Di</option>
</select>
</doc:source>
<doc:scenario>
it('should toggle multiple', function() {
expect(element('.doc-example-live #select').prop('multiple')).toBeFalsy();
input('checked').check();
expect(element('.doc-example-live #select').prop('multiple')).toBeTruthy();
});
</doc:scenario>
</doc:example>
*
* @element SELECT
* @param {expression} ngMultiple Angular expression that will be evaluated.
*/
/**
* @ngdoc directive
* @name ng.directive:ngReadonly
* @restrict A
*
* @description
* The HTML specs do not require browsers to preserve the special attributes such as readonly.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce the `ngReadonly` directive.
* @example
<doc:example>
<doc:source>
Check me to make text readonly: <input type="checkbox" ng-model="checked"><br/>
<input type="text" ng-readonly="checked" value="I'm Angular"/>
</doc:source>
<doc:scenario>
it('should toggle readonly attr', function() {
expect(element('.doc-example-live :text').prop('readonly')).toBeFalsy();
input('checked').check();
expect(element('.doc-example-live :text').prop('readonly')).toBeTruthy();
});
</doc:scenario>
</doc:example>
*
* @element INPUT
* @param {string} expression Angular expression that will be evaluated.
*/
/**
* @ngdoc directive
* @name ng.directive:ngSelected
* @restrict A
*
* @description
* The HTML specs do not require browsers to preserve the special attributes such as selected.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduced the `ngSelected` directive.
* @example
<doc:example>
<doc:source>
Check me to select: <input type="checkbox" ng-model="selected"><br/>
<select>
<option>Hello!</option>
<option id="greet" ng-selected="selected">Greetings!</option>
</select>
</doc:source>
<doc:scenario>
it('should select Greetings!', function() {
expect(element('.doc-example-live #greet').prop('selected')).toBeFalsy();
input('selected').check();
expect(element('.doc-example-live #greet').prop('selected')).toBeTruthy();
});
</doc:scenario>
</doc:example>
*
* @element OPTION
* @param {string} expression Angular expression that will be evaluated.
*/
var ngAttributeAliasDirectives = {};
// boolean attrs are evaluated
forEach(BOOLEAN_ATTR, function(propName, attrName) {
var normalized = directiveNormalize('ng-' + attrName);
ngAttributeAliasDirectives[normalized] = function() {
return {
priority: 100,
compile: function() {
return function(scope, element, attr) {
scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {
attr.$set(attrName, !!value);
});
};
}
};
};
});
// ng-src, ng-href are interpolated
forEach(['src', 'href'], function(attrName) {
var normalized = directiveNormalize('ng-' + attrName);
ngAttributeAliasDirectives[normalized] = function() {
return {
priority: 99, // it needs to run after the attributes are interpolated
link: function(scope, element, attr) {
attr.$observe(normalized, function(value) {
if (!value)
return;
attr.$set(attrName, value);
// on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist
// then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
// to set the property as well to achieve the desired effect.
// we use attr[attrName] value since $set can sanitize the url.
if (msie) element.prop(attrName, attr[attrName]);
});
}
};
};
});
var nullFormCtrl = {
$addControl: noop,
$removeControl: noop,
$setValidity: noop,
$setDirty: noop
};
/**
* @ngdoc object
* @name ng.directive:form.FormController
*
* @property {boolean} $pristine True if user has not interacted with the form yet.
* @property {boolean} $dirty True if user has already interacted with the form.
* @property {boolean} $valid True if all of the containing forms and controls are valid.
* @property {boolean} $invalid True if at least one containing control or form is invalid.
*
* @property {Object} $error Is an object hash, containing references to all invalid controls or
* forms, where:
*
* - keys are validation tokens (error names) — such as `required`, `url` or `email`),
* - values are arrays of controls or forms that are invalid with given error.
*
* @description
* `FormController` keeps track of all its controls and nested forms as well as state of them,
* such as being valid/invalid or dirty/pristine.
*
* Each {@link ng.directive:form form} directive creates an instance
* of `FormController`.
*
*/
//asks for $scope to fool the BC controller module
FormController.$inject = ['$element', '$attrs', '$scope'];
function FormController(element, attrs) {
var form = this,
parentForm = element.parent().controller('form') || nullFormCtrl,
invalidCount = 0, // used to easily determine if we are valid
errors = form.$error = {};
// init state
form.$name = attrs.name || attrs.ngForm;
form.$dirty = false;
form.$pristine = true;
form.$valid = true;
form.$invalid = false;
parentForm.$addControl(form);
// Setup initial state of the control
element.addClass(PRISTINE_CLASS);
toggleValidCss(true);
// convenience method for easy toggling of classes
function toggleValidCss(isValid, validationErrorKey) {
validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
element.
removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).
addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
}
/**
* @ngdoc function
* @name ng.directive:form.FormController#$addControl
* @methodOf ng.directive:form.FormController
*
* @description
* Register a control with the form.
*
* Input elements using ngModelController do this automatically when they are linked.
*/
form.$addControl = function(control) {
if (control.$name && !form.hasOwnProperty(control.$name)) {
form[control.$name] = control;
}
};
/**
* @ngdoc function
* @name ng.directive:form.FormController#$removeControl
* @methodOf ng.directive:form.FormController
*
* @description
* Deregister a control from the form.
*
* Input elements using ngModelController do this automatically when they are destroyed.
*/
form.$removeControl = function(control) {
if (control.$name && form[control.$name] === control) {
delete form[control.$name];
}
forEach(errors, function(queue, validationToken) {
form.$setValidity(validationToken, true, control);
});
};
/**
* @ngdoc function
* @name ng.directive:form.FormController#$setValidity
* @methodOf ng.directive:form.FormController
*
* @description
* Sets the validity of a form control.
*
* This method will also propagate to parent forms.
*/
form.$setValidity = function(validationToken, isValid, control) {
var queue = errors[validationToken];
if (isValid) {
if (queue) {
arrayRemove(queue, control);
if (!queue.length) {
invalidCount--;
if (!invalidCount) {
toggleValidCss(isValid);
form.$valid = true;
form.$invalid = false;
}
errors[validationToken] = false;
toggleValidCss(true, validationToken);
parentForm.$setValidity(validationToken, true, form);
}
}
} else {
if (!invalidCount) {
toggleValidCss(isValid);
}
if (queue) {
if (includes(queue, control)) return;
} else {
errors[validationToken] = queue = [];
invalidCount++;
toggleValidCss(false, validationToken);
parentForm.$setValidity(validationToken, false, form);
}
queue.push(control);
form.$valid = false;
form.$invalid = true;
}
};
/**
* @ngdoc function
* @name ng.directive:form.FormController#$setDirty
* @methodOf ng.directive:form.FormController
*
* @description
* Sets the form to a dirty state.
*
* This method can be called to add the 'ng-dirty' class and set the form to a dirty
* state (ng-dirty class). This method will also propagate to parent forms.
*/
form.$setDirty = function() {
element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);
form.$dirty = true;
form.$pristine = false;
parentForm.$setDirty();
};
}
/**
* @ngdoc directive
* @name ng.directive:ngForm
* @restrict EAC
*
* @description
* Nestable alias of {@link ng.directive:form `form`} directive. HTML
* does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
* sub-group of controls needs to be determined.
*
* @param {string=} name|ngForm Name of the form. If specified, the form controller will be published into
* related scope, under this name.
*
*/
/**
* @ngdoc directive
* @name ng.directive:form
* @restrict E
*
* @description
* Directive that instantiates
* {@link ng.directive:form.FormController FormController}.
*
* If `name` attribute is specified, the form controller is published onto the current scope under
* this name.
*
* # Alias: {@link ng.directive:ngForm `ngForm`}
*
* In angular forms can be nested. This means that the outer form is valid when all of the child
* forms are valid as well. However browsers do not allow nesting of `<form>` elements, for this
* reason angular provides {@link ng.directive:ngForm `ngForm`} alias
* which behaves identical to `<form>` but allows form nesting.
*
*
* # CSS classes
* - `ng-valid` Is set if the form is valid.
* - `ng-invalid` Is set if the form is invalid.
* - `ng-pristine` Is set if the form is pristine.
* - `ng-dirty` Is set if the form is dirty.
*
*
* # Submitting a form and preventing default action
*
* Since the role of forms in client-side Angular applications is different than in classical
* roundtrip apps, it is desirable for the browser not to translate the form submission into a full
* page reload that sends the data to the server. Instead some javascript logic should be triggered
* to handle the form submission in application specific way.
*
* For this reason, Angular prevents the default action (form submission to the server) unless the
* `<form>` element has an `action` attribute specified.
*
* You can use one of the following two ways to specify what javascript method should be called when
* a form is submitted:
*
* - {@link ng.directive:ngSubmit ngSubmit} directive on the form element
* - {@link ng.directive:ngClick ngClick} directive on the first
* button or input field of type submit (input[type=submit])
*
* To prevent double execution of the handler, use only one of ngSubmit or ngClick directives. This
* is because of the following form submission rules coming from the html spec:
*
* - If a form has only one input field then hitting enter in this field triggers form submit
* (`ngSubmit`)
* - if a form has has 2+ input fields and no buttons or input[type=submit] then hitting enter
* doesn't trigger submit
* - if a form has one or more input fields and one or more buttons or input[type=submit] then
* hitting enter in any of the input fields will trigger the click handler on the *first* button or
* input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)
*
* @param {string=} name Name of the form. If specified, the form controller will be published into
* related scope, under this name.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.userType = 'guest';
}
</script>
<form name="myForm" ng-controller="Ctrl">
userType: <input name="input" ng-model="userType" required>
<span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
<tt>userType = {{userType}}</tt><br>
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>
</form>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('userType')).toEqual('guest');
expect(binding('myForm.input.$valid')).toEqual('true');
});
it('should be invalid if empty', function() {
input('userType').enter('');
expect(binding('userType')).toEqual('');
expect(binding('myForm.input.$valid')).toEqual('false');
});
</doc:scenario>
</doc:example>
*/
var formDirectiveFactory = function(isNgForm) {
return ['$timeout', function($timeout) {
var formDirective = {
name: 'form',
restrict: 'E',
controller: FormController,
compile: function() {
return {
pre: function(scope, formElement, attr, controller) {
if (!attr.action) {
// we can't use jq events because if a form is destroyed during submission the default
// action is not prevented. see #1238
//
// IE 9 is not affected because it doesn't fire a submit event and try to do a full
// page reload if the form was destroyed by submission of the form via a click handler
// on a button in the form. Looks like an IE9 specific bug.
var preventDefaultListener = function(event) {
event.preventDefault
? event.preventDefault()
: event.returnValue = false; // IE
};
addEventListenerFn(formElement[0], 'submit', preventDefaultListener);
// unregister the preventDefault listener so that we don't not leak memory but in a
// way that will achieve the prevention of the default action.
formElement.bind('$destroy', function() {
$timeout(function() {
removeEventListenerFn(formElement[0], 'submit', preventDefaultListener);
}, 0, false);
});
}
var parentFormCtrl = formElement.parent().controller('form'),
alias = attr.name || attr.ngForm;
if (alias) {
scope[alias] = controller;
}
if (parentFormCtrl) {
formElement.bind('$destroy', function() {
parentFormCtrl.$removeControl(controller);
if (alias) {
scope[alias] = undefined;
}
extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
});
}
}
};
}
};
return isNgForm ? extend(copy(formDirective), {restrict: 'EAC'}) : formDirective;
}];
};
var formDirective = formDirectiveFactory();
var ngFormDirective = formDirectiveFactory(true);
var URL_REGEXP = /^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/;
var EMAIL_REGEXP = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}$/;
var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/;
var inputType = {
/**
* @ngdoc inputType
* @name ng.directive:input.text
*
* @description
* Standard HTML text input with angular data binding.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Adds `required` validation error key if the value is not entered.
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
* `required` when you want to data-bind to the `required` attribute.
* @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
* minlength.
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
* maxlength.
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
* patterns defined as scope expressions.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.text = 'guest';
$scope.word = /^\w*$/;
}
</script>
<form name="myForm" ng-controller="Ctrl">
Single word: <input type="text" name="input" ng-model="text"
ng-pattern="word" required>
<span class="error" ng-show="myForm.input.$error.required">
Required!</span>
<span class="error" ng-show="myForm.input.$error.pattern">
Single word only!</span>
<tt>text = {{text}}</tt><br/>
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('text')).toEqual('guest');
expect(binding('myForm.input.$valid')).toEqual('true');
});
it('should be invalid if empty', function() {
input('text').enter('');
expect(binding('text')).toEqual('');
expect(binding('myForm.input.$valid')).toEqual('false');
});
it('should be invalid if multi word', function() {
input('text').enter('hello world');
expect(binding('myForm.input.$valid')).toEqual('false');
});
</doc:scenario>
</doc:example>
*/
'text': textInputType,
/**
* @ngdoc inputType
* @name ng.directive:input.number
*
* @description
* Text input with number validation and transformation. Sets the `number` validation
* error if not a valid number.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
* @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
* @param {string=} required Sets `required` validation error key if the value is not entered.
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
* `required` when you want to data-bind to the `required` attribute.
* @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
* minlength.
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
* maxlength.
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
* patterns defined as scope expressions.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.value = 12;
}
</script>
<form name="myForm" ng-controller="Ctrl">
Number: <input type="number" name="input" ng-model="value"
min="0" max="99" required>
<span class="error" ng-show="myForm.input.$error.required">
Required!</span>
<span class="error" ng-show="myForm.input.$error.number">
Not valid number!</span>
<tt>value = {{value}}</tt><br/>
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('value')).toEqual('12');
expect(binding('myForm.input.$valid')).toEqual('true');
});
it('should be invalid if empty', function() {
input('value').enter('');
expect(binding('value')).toEqual('');
expect(binding('myForm.input.$valid')).toEqual('false');
});
it('should be invalid if over max', function() {
input('value').enter('123');
expect(binding('value')).toEqual('');
expect(binding('myForm.input.$valid')).toEqual('false');
});
</doc:scenario>
</doc:example>
*/
'number': numberInputType,
/**
* @ngdoc inputType
* @name ng.directive:input.url
*
* @description
* Text input with URL validation. Sets the `url` validation error key if the content is not a
* valid URL.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `required` validation error key if the value is not entered.
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
* `required` when you want to data-bind to the `required` attribute.
* @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
* minlength.
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
* maxlength.
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
* patterns defined as scope expressions.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.text = 'http://google.com';
}
</script>
<form name="myForm" ng-controller="Ctrl">
URL: <input type="url" name="input" ng-model="text" required>
<span class="error" ng-show="myForm.input.$error.required">
Required!</span>
<span class="error" ng-show="myForm.input.$error.url">
Not valid url!</span>
<tt>text = {{text}}</tt><br/>
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
<tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('text')).toEqual('http://google.com');
expect(binding('myForm.input.$valid')).toEqual('true');
});
it('should be invalid if empty', function() {
input('text').enter('');
expect(binding('text')).toEqual('');
expect(binding('myForm.input.$valid')).toEqual('false');
});
it('should be invalid if not url', function() {
input('text').enter('xxx');
expect(binding('myForm.input.$valid')).toEqual('false');
});
</doc:scenario>
</doc:example>
*/
'url': urlInputType,
/**
* @ngdoc inputType
* @name ng.directive:input.email
*
* @description
* Text input with email validation. Sets the `email` validation error key if not a valid email
* address.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `required` validation error key if the value is not entered.
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
* `required` when you want to data-bind to the `required` attribute.
* @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
* minlength.
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
* maxlength.
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
* patterns defined as scope expressions.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.text = 'me@example.com';
}
</script>
<form name="myForm" ng-controller="Ctrl">
Email: <input type="email" name="input" ng-model="text" required>
<span class="error" ng-show="myForm.input.$error.required">
Required!</span>
<span class="error" ng-show="myForm.input.$error.email">
Not valid email!</span>
<tt>text = {{text}}</tt><br/>
<tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
<tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
<tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('text')).toEqual('me@example.com');
expect(binding('myForm.input.$valid')).toEqual('true');
});
it('should be invalid if empty', function() {
input('text').enter('');
expect(binding('text')).toEqual('');
expect(binding('myForm.input.$valid')).toEqual('false');
});
it('should be invalid if not email', function() {
input('text').enter('xxx');
expect(binding('myForm.input.$valid')).toEqual('false');
});
</doc:scenario>
</doc:example>
*/
'email': emailInputType,
/**
* @ngdoc inputType
* @name ng.directive:input.radio
*
* @description
* HTML radio button.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string} value The value to which the expression should be set when selected.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.color = 'blue';
}
</script>
<form name="myForm" ng-controller="Ctrl">
<input type="radio" ng-model="color" value="red"> Red <br/>
<input type="radio" ng-model="color" value="green"> Green <br/>
<input type="radio" ng-model="color" value="blue"> Blue <br/>
<tt>color = {{color}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should change state', function() {
expect(binding('color')).toEqual('blue');
input('color').select('red');
expect(binding('color')).toEqual('red');
});
</doc:scenario>
</doc:example>
*/
'radio': radioInputType,
/**
* @ngdoc inputType
* @name ng.directive:input.checkbox
*
* @description
* HTML checkbox.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} ngTrueValue The value to which the expression should be set when selected.
* @param {string=} ngFalseValue The value to which the expression should be set when not selected.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.value1 = true;
$scope.value2 = 'YES'
}
</script>
<form name="myForm" ng-controller="Ctrl">
Value1: <input type="checkbox" ng-model="value1"> <br/>
Value2: <input type="checkbox" ng-model="value2"
ng-true-value="YES" ng-false-value="NO"> <br/>
<tt>value1 = {{value1}}</tt><br/>
<tt>value2 = {{value2}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should change state', function() {
expect(binding('value1')).toEqual('true');
expect(binding('value2')).toEqual('YES');
input('value1').check();
input('value2').check();
expect(binding('value1')).toEqual('false');
expect(binding('value2')).toEqual('NO');
});
</doc:scenario>
</doc:example>
*/
'checkbox': checkboxInputType,
'hidden': noop,
'button': noop,
'submit': noop,
'reset': noop
};
function isEmpty(value) {
return isUndefined(value) || value === '' || value === null || value !== value;
}
function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
var listener = function() {
var value = trim(element.val());
if (ctrl.$viewValue !== value) {
scope.$apply(function() {
ctrl.$setViewValue(value);
});
}
};
// if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the
// input event on backspace, delete or cut
if ($sniffer.hasEvent('input')) {
element.bind('input', listener);
} else {
var timeout;
var deferListener = function() {
if (!timeout) {
timeout = $browser.defer(function() {
listener();
timeout = null;
});
}
};
element.bind('keydown', function(event) {
var key = event.keyCode;
// ignore
// command modifiers arrows
if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;
deferListener();
});
// if user paste into input using mouse, we need "change" event to catch it
element.bind('change', listener);
// if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it
if ($sniffer.hasEvent('paste')) {
element.bind('paste cut', deferListener);
}
}
ctrl.$render = function() {
element.val(isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);
};
// pattern validator
var pattern = attr.ngPattern,
patternValidator;
var validate = function(regexp, value) {
if (isEmpty(value) || regexp.test(value)) {
ctrl.$setValidity('pattern', true);
return value;
} else {
ctrl.$setValidity('pattern', false);
return undefined;
}
};
if (pattern) {
if (pattern.match(/^\/(.*)\/$/)) {
pattern = new RegExp(pattern.substr(1, pattern.length - 2));
patternValidator = function(value) {
return validate(pattern, value)
};
} else {
patternValidator = function(value) {
var patternObj = scope.$eval(pattern);
if (!patternObj || !patternObj.test) {
throw new Error('Expected ' + pattern + ' to be a RegExp but was ' + patternObj);
}
return validate(patternObj, value);
};
}
ctrl.$formatters.push(patternValidator);
ctrl.$parsers.push(patternValidator);
}
// min length validator
if (attr.ngMinlength) {
var minlength = int(attr.ngMinlength);
var minLengthValidator = function(value) {
if (!isEmpty(value) && value.length < minlength) {
ctrl.$setValidity('minlength', false);
return undefined;
} else {
ctrl.$setValidity('minlength', true);
return value;
}
};
ctrl.$parsers.push(minLengthValidator);
ctrl.$formatters.push(minLengthValidator);
}
// max length validator
if (attr.ngMaxlength) {
var maxlength = int(attr.ngMaxlength);
var maxLengthValidator = function(value) {
if (!isEmpty(value) && value.length > maxlength) {
ctrl.$setValidity('maxlength', false);
return undefined;
} else {
ctrl.$setValidity('maxlength', true);
return value;
}
};
ctrl.$parsers.push(maxLengthValidator);
ctrl.$formatters.push(maxLengthValidator);
}
}
function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
ctrl.$parsers.push(function(value) {
var empty = isEmpty(value);
if (empty || NUMBER_REGEXP.test(value)) {
ctrl.$setValidity('number', true);
return value === '' ? null : (empty ? value : parseFloat(value));
} else {
ctrl.$setValidity('number', false);
return undefined;
}
});
ctrl.$formatters.push(function(value) {
return isEmpty(value) ? '' : '' + value;
});
if (attr.min) {
var min = parseFloat(attr.min);
var minValidator = function(value) {
if (!isEmpty(value) && value < min) {
ctrl.$setValidity('min', false);
return undefined;
} else {
ctrl.$setValidity('min', true);
return value;
}
};
ctrl.$parsers.push(minValidator);
ctrl.$formatters.push(minValidator);
}
if (attr.max) {
var max = parseFloat(attr.max);
var maxValidator = function(value) {
if (!isEmpty(value) && value > max) {
ctrl.$setValidity('max', false);
return undefined;
} else {
ctrl.$setValidity('max', true);
return value;
}
};
ctrl.$parsers.push(maxValidator);
ctrl.$formatters.push(maxValidator);
}
ctrl.$formatters.push(function(value) {
if (isEmpty(value) || isNumber(value)) {
ctrl.$setValidity('number', true);
return value;
} else {
ctrl.$setValidity('number', false);
return undefined;
}
});
}
function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
var urlValidator = function(value) {
if (isEmpty(value) || URL_REGEXP.test(value)) {
ctrl.$setValidity('url', true);
return value;
} else {
ctrl.$setValidity('url', false);
return undefined;
}
};
ctrl.$formatters.push(urlValidator);
ctrl.$parsers.push(urlValidator);
}
function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
textInputType(scope, element, attr, ctrl, $sniffer, $browser);
var emailValidator = function(value) {
if (isEmpty(value) || EMAIL_REGEXP.test(value)) {
ctrl.$setValidity('email', true);
return value;
} else {
ctrl.$setValidity('email', false);
return undefined;
}
};
ctrl.$formatters.push(emailValidator);
ctrl.$parsers.push(emailValidator);
}
function radioInputType(scope, element, attr, ctrl) {
// make the name unique, if not defined
if (isUndefined(attr.name)) {
element.attr('name', nextUid());
}
element.bind('click', function() {
if (element[0].checked) {
scope.$apply(function() {
ctrl.$setViewValue(attr.value);
});
}
});
ctrl.$render = function() {
var value = attr.value;
element[0].checked = (value == ctrl.$viewValue);
};
attr.$observe('value', ctrl.$render);
}
function checkboxInputType(scope, element, attr, ctrl) {
var trueValue = attr.ngTrueValue,
falseValue = attr.ngFalseValue;
if (!isString(trueValue)) trueValue = true;
if (!isString(falseValue)) falseValue = false;
element.bind('click', function() {
scope.$apply(function() {
ctrl.$setViewValue(element[0].checked);
});
});
ctrl.$render = function() {
element[0].checked = ctrl.$viewValue;
};
ctrl.$formatters.push(function(value) {
return value === trueValue;
});
ctrl.$parsers.push(function(value) {
return value ? trueValue : falseValue;
});
}
/**
* @ngdoc directive
* @name ng.directive:textarea
* @restrict E
*
* @description
* HTML textarea element control with angular data-binding. The data-binding and validation
* properties of this element are exactly the same as those of the
* {@link ng.directive:input input element}.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `required` validation error key if the value is not entered.
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
* `required` when you want to data-bind to the `required` attribute.
* @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
* minlength.
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
* maxlength.
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
* patterns defined as scope expressions.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*/
/**
* @ngdoc directive
* @name ng.directive:input
* @restrict E
*
* @description
* HTML input element control with angular data-binding. Input control follows HTML5 input types
* and polyfills the HTML5 validation behavior for older browsers.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required Sets `required` validation error key if the value is not entered.
* @param {boolean=} ngRequired Sets `required` attribute if set to true
* @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
* minlength.
* @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
* maxlength.
* @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the
* RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for
* patterns defined as scope expressions.
* @param {string=} ngChange Angular expression to be executed when input changes due to user
* interaction with the input element.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.user = {name: 'guest', last: 'visitor'};
}
</script>
<div ng-controller="Ctrl">
<form name="myForm">
User name: <input type="text" name="userName" ng-model="user.name" required>
<span class="error" ng-show="myForm.userName.$error.required">
Required!</span><br>
Last name: <input type="text" name="lastName" ng-model="user.last"
ng-minlength="3" ng-maxlength="10">
<span class="error" ng-show="myForm.lastName.$error.minlength">
Too short!</span>
<span class="error" ng-show="myForm.lastName.$error.maxlength">
Too long!</span><br>
</form>
<hr>
<tt>user = {{user}}</tt><br/>
<tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br>
<tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br>
<tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br>
<tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>
<tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>
<tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>
</div>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('user')).toEqual('{"name":"guest","last":"visitor"}');
expect(binding('myForm.userName.$valid')).toEqual('true');
expect(binding('myForm.$valid')).toEqual('true');
});
it('should be invalid if empty when required', function() {
input('user.name').enter('');
expect(binding('user')).toEqual('{"last":"visitor"}');
expect(binding('myForm.userName.$valid')).toEqual('false');
expect(binding('myForm.$valid')).toEqual('false');
});
it('should be valid if empty when min length is set', function() {
input('user.last').enter('');
expect(binding('user')).toEqual('{"name":"guest","last":""}');
expect(binding('myForm.lastName.$valid')).toEqual('true');
expect(binding('myForm.$valid')).toEqual('true');
});
it('should be invalid if less than required min length', function() {
input('user.last').enter('xx');
expect(binding('user')).toEqual('{"name":"guest"}');
expect(binding('myForm.lastName.$valid')).toEqual('false');
expect(binding('myForm.lastName.$error')).toMatch(/minlength/);
expect(binding('myForm.$valid')).toEqual('false');
});
it('should be invalid if longer than max length', function() {
input('user.last').enter('some ridiculously long name');
expect(binding('user'))
.toEqual('{"name":"guest"}');
expect(binding('myForm.lastName.$valid')).toEqual('false');
expect(binding('myForm.lastName.$error')).toMatch(/maxlength/);
expect(binding('myForm.$valid')).toEqual('false');
});
</doc:scenario>
</doc:example>
*/
var inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {
return {
restrict: 'E',
require: '?ngModel',
link: function(scope, element, attr, ctrl) {
if (ctrl) {
(inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,
$browser);
}
}
};
}];
var VALID_CLASS = 'ng-valid',
INVALID_CLASS = 'ng-invalid',
PRISTINE_CLASS = 'ng-pristine',
DIRTY_CLASS = 'ng-dirty';
/**
* @ngdoc object
* @name ng.directive:ngModel.NgModelController
*
* @property {string} $viewValue Actual string value in the view.
* @property {*} $modelValue The value in the model, that the control is bound to.
* @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
the control reads value from the DOM. Each function is called, in turn, passing the value
through to the next. Used to sanitize / convert the value as well as validation.
For validation, the parsers should update the validity state using
{@link ng.directive:ngModel.NgModelController#$setValidity $setValidity()},
and return `undefined` for invalid values.
*
* @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
* the model value changes. Each function is called, in turn, passing the value through to the
* next. Used to format / convert values for display in the control and validation.
* <pre>
* function formatter(value) {
* if (value) {
* return value.toUpperCase();
* }
* }
* ngModel.$formatters.push(formatter);
* </pre>
* @property {Object} $error An bject hash with all errors as keys.
*
* @property {boolean} $pristine True if user has not interacted with the control yet.
* @property {boolean} $dirty True if user has already interacted with the control.
* @property {boolean} $valid True if there is no error.
* @property {boolean} $invalid True if at least one error on the control.
*
* @description
*
* `NgModelController` provides API for the `ng-model` directive. The controller contains
* services for data-binding, validation, CSS update, value formatting and parsing. It
* specifically does not contain any logic which deals with DOM rendering or listening to
* DOM events. The `NgModelController` is meant to be extended by other directives where, the
* directive provides DOM manipulation and the `NgModelController` provides the data-binding.
* Note that you cannot use `NgModelController` in a directive with an isolated scope,
* as, in that case, the `ng-model` value gets put into the isolated scope and does not get
* propogated to the parent scope.
*
*
* This example shows how to use `NgModelController` with a custom control to achieve
* data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
* collaborate together to achieve the desired result.
*
* <example module="customControl">
<file name="style.css">
[contenteditable] {
border: 1px solid black;
background-color: white;
min-height: 20px;
}
.ng-invalid {
border: 1px solid red;
}
</file>
<file name="script.js">
angular.module('customControl', []).
directive('contenteditable', function() {
return {
restrict: 'A', // only activate on element attribute
require: '?ngModel', // get a hold of NgModelController
link: function(scope, element, attrs, ngModel) {
if(!ngModel) return; // do nothing if no ng-model
// Specify how UI should be updated
ngModel.$render = function() {
element.html(ngModel.$viewValue || '');
};
// Listen for change events to enable binding
element.bind('blur keyup change', function() {
scope.$apply(read);
});
read(); // initialize
// Write data to the model
function read() {
var html = element.html();
// When we clear the content editable the browser leaves a <br> behind
// If strip-br attribute is provided then we strip this out
if( attrs.stripBr && html == '<br>' ) {
html = '';
}
ngModel.$setViewValue(html);
}
}
};
});
</file>
<file name="index.html">
<form name="myForm">
<div contenteditable
name="myWidget" ng-model="userContent"
strip-br="true"
required>Change me!</div>
<span ng-show="myForm.myWidget.$error.required">Required!</span>
<hr>
<textarea ng-model="userContent"></textarea>
</form>
</file>
<file name="scenario.js">
it('should data-bind and become invalid', function() {
var contentEditable = element('[contenteditable]');
expect(contentEditable.text()).toEqual('Change me!');
input('userContent').enter('');
expect(contentEditable.text()).toEqual('');
expect(contentEditable.prop('className')).toMatch(/ng-invalid-required/);
});
</file>
* </example>
*
*/
var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse',
function($scope, $exceptionHandler, $attr, $element, $parse) {
this.$viewValue = Number.NaN;
this.$modelValue = Number.NaN;
this.$parsers = [];
this.$formatters = [];
this.$viewChangeListeners = [];
this.$pristine = true;
this.$dirty = false;
this.$valid = true;
this.$invalid = false;
this.$name = $attr.name;
var ngModelGet = $parse($attr.ngModel),
ngModelSet = ngModelGet.assign;
if (!ngModelSet) {
throw Error(NON_ASSIGNABLE_MODEL_EXPRESSION + $attr.ngModel +
' (' + startingTag($element) + ')');
}
/**
* @ngdoc function
* @name ng.directive:ngModel.NgModelController#$render
* @methodOf ng.directive:ngModel.NgModelController
*
* @description
* Called when the view needs to be updated. It is expected that the user of the ng-model
* directive will implement this method.
*/
this.$render = noop;
var parentForm = $element.inheritedData('$formController') || nullFormCtrl,
invalidCount = 0, // used to easily determine if we are valid
$error = this.$error = {}; // keep invalid keys here
// Setup initial state of the control
$element.addClass(PRISTINE_CLASS);
toggleValidCss(true);
// convenience method for easy toggling of classes
function toggleValidCss(isValid, validationErrorKey) {
validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
$element.
removeClass((isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey).
addClass((isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);
}
/**
* @ngdoc function
* @name ng.directive:ngModel.NgModelController#$setValidity
* @methodOf ng.directive:ngModel.NgModelController
*
* @description
* Change the validity state, and notifies the form when the control changes validity. (i.e. it
* does not notify form if given validator is already marked as invalid).
*
* This method should be called by validators - i.e. the parser or formatter functions.
*
* @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign
* to `$error[validationErrorKey]=isValid` so that it is available for data-binding.
* The `validationErrorKey` should be in camelCase and will get converted into dash-case
* for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`
* class and can be bound to as `{{someForm.someControl.$error.myError}}` .
* @param {boolean} isValid Whether the current state is valid (true) or invalid (false).
*/
this.$setValidity = function(validationErrorKey, isValid) {
if ($error[validationErrorKey] === !isValid) return;
if (isValid) {
if ($error[validationErrorKey]) invalidCount--;
if (!invalidCount) {
toggleValidCss(true);
this.$valid = true;
this.$invalid = false;
}
} else {
toggleValidCss(false);
this.$invalid = true;
this.$valid = false;
invalidCount++;
}
$error[validationErrorKey] = !isValid;
toggleValidCss(isValid, validationErrorKey);
parentForm.$setValidity(validationErrorKey, isValid, this);
};
/**
* @ngdoc function
* @name ng.directive:ngModel.NgModelController#$setViewValue
* @methodOf ng.directive:ngModel.NgModelController
*
* @description
* Read a value from view.
*
* This method should be called from within a DOM event handler.
* For example {@link ng.directive:input input} or
* {@link ng.directive:select select} directives call it.
*
* It internally calls all `$parsers` (including validators) and updates the `$modelValue` and the actual model path.
* Lastly it calls all registered change listeners.
*
* @param {string} value Value from the view.
*/
this.$setViewValue = function(value) {
this.$viewValue = value;
// change to dirty
if (this.$pristine) {
this.$dirty = true;
this.$pristine = false;
$element.removeClass(PRISTINE_CLASS).addClass(DIRTY_CLASS);
parentForm.$setDirty();
}
forEach(this.$parsers, function(fn) {
value = fn(value);
});
if (this.$modelValue !== value) {
this.$modelValue = value;
ngModelSet($scope, value);
forEach(this.$viewChangeListeners, function(listener) {
try {
listener();
} catch(e) {
$exceptionHandler(e);
}
})
}
};
// model -> value
var ctrl = this;
$scope.$watch(function ngModelWatch() {
var value = ngModelGet($scope);
// if scope model value and ngModel value are out of sync
if (ctrl.$modelValue !== value) {
var formatters = ctrl.$formatters,
idx = formatters.length;
ctrl.$modelValue = value;
while(idx--) {
value = formatters[idx](value);
}
if (ctrl.$viewValue !== value) {
ctrl.$viewValue = value;
ctrl.$render();
}
}
});
}];
/**
* @ngdoc directive
* @name ng.directive:ngModel
*
* @element input
*
* @description
* Is a directive that tells Angular to do two-way data binding. It works together with `input`,
* `select`, `textarea`. You can easily write your own directives to use `ngModel` as well.
*
* `ngModel` is responsible for:
*
* - binding the view into the model, which other directives such as `input`, `textarea` or `select`
* require,
* - providing validation behavior (i.e. required, number, email, url),
* - keeping state of the control (valid/invalid, dirty/pristine, validation errors),
* - setting related css class onto the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`),
* - register the control with parent {@link ng.directive:form form}.
*
* Note: `ngModel` will try to bind to the property given by evaluating the expression on the
* current scope. If the property doesn't already exist on this scope, it will be created
* implicitly and added to the scope.
*
* For basic examples, how to use `ngModel`, see:
*
* - {@link ng.directive:input input}
* - {@link ng.directive:input.text text}
* - {@link ng.directive:input.checkbox checkbox}
* - {@link ng.directive:input.radio radio}
* - {@link ng.directive:input.number number}
* - {@link ng.directive:input.email email}
* - {@link ng.directive:input.url url}
* - {@link ng.directive:select select}
* - {@link ng.directive:textarea textarea}
*
*/
var ngModelDirective = function() {
return {
require: ['ngModel', '^?form'],
controller: NgModelController,
link: function(scope, element, attr, ctrls) {
// notify others, especially parent forms
var modelCtrl = ctrls[0],
formCtrl = ctrls[1] || nullFormCtrl;
formCtrl.$addControl(modelCtrl);
element.bind('$destroy', function() {
formCtrl.$removeControl(modelCtrl);
});
}
};
};
/**
* @ngdoc directive
* @name ng.directive:ngChange
* @restrict E
*
* @description
* Evaluate given expression when user changes the input.
* The expression is not evaluated when the value change is coming from the model.
*
* Note, this directive requires `ngModel` to be present.
*
* @element input
*
* @example
* <doc:example>
* <doc:source>
* <script>
* function Controller($scope) {
* $scope.counter = 0;
* $scope.change = function() {
* $scope.counter++;
* };
* }
* </script>
* <div ng-controller="Controller">
* <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
* <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
* <label for="ng-change-example2">Confirmed</label><br />
* debug = {{confirmed}}<br />
* counter = {{counter}}
* </div>
* </doc:source>
* <doc:scenario>
* it('should evaluate the expression if changing from view', function() {
* expect(binding('counter')).toEqual('0');
* element('#ng-change-example1').click();
* expect(binding('counter')).toEqual('1');
* expect(binding('confirmed')).toEqual('true');
* });
*
* it('should not evaluate the expression if changing from model', function() {
* element('#ng-change-example2').click();
* expect(binding('counter')).toEqual('0');
* expect(binding('confirmed')).toEqual('true');
* });
* </doc:scenario>
* </doc:example>
*/
var ngChangeDirective = valueFn({
require: 'ngModel',
link: function(scope, element, attr, ctrl) {
ctrl.$viewChangeListeners.push(function() {
scope.$eval(attr.ngChange);
});
}
});
var requiredDirective = function() {
return {
require: '?ngModel',
link: function(scope, elm, attr, ctrl) {
if (!ctrl) return;
attr.required = true; // force truthy in case we are on non input element
var validator = function(value) {
if (attr.required && (isEmpty(value) || value === false)) {
ctrl.$setValidity('required', false);
return;
} else {
ctrl.$setValidity('required', true);
return value;
}
};
ctrl.$formatters.push(validator);
ctrl.$parsers.unshift(validator);
attr.$observe('required', function() {
validator(ctrl.$viewValue);
});
}
};
};
/**
* @ngdoc directive
* @name ng.directive:ngList
*
* @description
* Text input that converts between comma-separated string into an array of strings.
*
* @element input
* @param {string=} ngList optional delimiter that should be used to split the value. If
* specified in form `/something/` then the value will be converted into a regular expression.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.names = ['igor', 'misko', 'vojta'];
}
</script>
<form name="myForm" ng-controller="Ctrl">
List: <input name="namesInput" ng-model="names" ng-list required>
<span class="error" ng-show="myForm.namesInput.$error.required">
Required!</span>
<br>
<tt>names = {{names}}</tt><br/>
<tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>
<tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>
<tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
<tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
</form>
</doc:source>
<doc:scenario>
it('should initialize to model', function() {
expect(binding('names')).toEqual('["igor","misko","vojta"]');
expect(binding('myForm.namesInput.$valid')).toEqual('true');
expect(element('span.error').css('display')).toBe('none');
});
it('should be invalid if empty', function() {
input('names').enter('');
expect(binding('names')).toEqual('[]');
expect(binding('myForm.namesInput.$valid')).toEqual('false');
expect(element('span.error').css('display')).not().toBe('none');
});
</doc:scenario>
</doc:example>
*/
var ngListDirective = function() {
return {
require: 'ngModel',
link: function(scope, element, attr, ctrl) {
var match = /\/(.*)\//.exec(attr.ngList),
separator = match && new RegExp(match[1]) || attr.ngList || ',';
var parse = function(viewValue) {
var list = [];
if (viewValue) {
forEach(viewValue.split(separator), function(value) {
if (value) list.push(trim(value));
});
}
return list;
};
ctrl.$parsers.push(parse);
ctrl.$formatters.push(function(value) {
if (isArray(value)) {
return value.join(', ');
}
return undefined;
});
}
};
};
var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
var ngValueDirective = function() {
return {
priority: 100,
compile: function(tpl, tplAttr) {
if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {
return function(scope, elm, attr) {
attr.$set('value', scope.$eval(attr.ngValue));
};
} else {
return function(scope, elm, attr) {
scope.$watch(attr.ngValue, function valueWatchAction(value) {
attr.$set('value', value);
});
};
}
}
};
};
/**
* @ngdoc directive
* @name ng.directive:ngBind
*
* @description
* The `ngBind` attribute tells Angular to replace the text content of the specified HTML element
* with the value of a given expression, and to update the text content when the value of that
* expression changes.
*
* Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
* `{{ expression }}` which is similar but less verbose.
*
* It is preferrable to use `ngBind` instead of `{{ expression }}` when a template is momentarily
* displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
* element attribute, it makes the bindings invisible to the user while the page is loading.
*
* An alternative solution to this problem would be using the
* {@link ng.directive:ngCloak ngCloak} directive.
*
*
* @element ANY
* @param {expression} ngBind {@link guide/expression Expression} to evaluate.
*
* @example
* Enter a name in the Live Preview text box; the greeting below the text box changes instantly.
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.name = 'Whirled';
}
</script>
<div ng-controller="Ctrl">
Enter name: <input type="text" ng-model="name"><br>
Hello <span ng-bind="name"></span>!
</div>
</doc:source>
<doc:scenario>
it('should check ng-bind', function() {
expect(using('.doc-example-live').binding('name')).toBe('Whirled');
using('.doc-example-live').input('name').enter('world');
expect(using('.doc-example-live').binding('name')).toBe('world');
});
</doc:scenario>
</doc:example>
*/
var ngBindDirective = ngDirective(function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBind);
scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
element.text(value == undefined ? '' : value);
});
});
/**
* @ngdoc directive
* @name ng.directive:ngBindTemplate
*
* @description
* The `ngBindTemplate` directive specifies that the element
* text content should be replaced with the interpolation of the template
* in the `ngBindTemplate` attribute.
* Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
* expressions. This directive is needed since some HTML elements
* (such as TITLE and OPTION) cannot contain SPAN elements.
*
* @element ANY
* @param {string} ngBindTemplate template of form
* <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.
*
* @example
* Try it here: enter text in text box and watch the greeting change.
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.salutation = 'Hello';
$scope.name = 'World';
}
</script>
<div ng-controller="Ctrl">
Salutation: <input type="text" ng-model="salutation"><br>
Name: <input type="text" ng-model="name"><br>
<pre ng-bind-template="{{salutation}} {{name}}!"></pre>
</div>
</doc:source>
<doc:scenario>
it('should check ng-bind', function() {
expect(using('.doc-example-live').binding('salutation')).
toBe('Hello');
expect(using('.doc-example-live').binding('name')).
toBe('World');
using('.doc-example-live').input('salutation').enter('Greetings');
using('.doc-example-live').input('name').enter('user');
expect(using('.doc-example-live').binding('salutation')).
toBe('Greetings');
expect(using('.doc-example-live').binding('name')).
toBe('user');
});
</doc:scenario>
</doc:example>
*/
var ngBindTemplateDirective = ['$interpolate', function($interpolate) {
return function(scope, element, attr) {
// TODO: move this to scenario runner
var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));
element.addClass('ng-binding').data('$binding', interpolateFn);
attr.$observe('ngBindTemplate', function(value) {
element.text(value);
});
}
}];
/**
* @ngdoc directive
* @name ng.directive:ngBindHtmlUnsafe
*
* @description
* Creates a binding that will innerHTML the result of evaluating the `expression` into the current
* element. *The innerHTML-ed content will not be sanitized!* You should use this directive only if
* {@link ngSanitize.directive:ngBindHtml ngBindHtml} directive is too
* restrictive and when you absolutely trust the source of the content you are binding to.
*
* See {@link ngSanitize.$sanitize $sanitize} docs for examples.
*
* @element ANY
* @param {expression} ngBindHtmlUnsafe {@link guide/expression Expression} to evaluate.
*/
var ngBindHtmlUnsafeDirective = [function() {
return function(scope, element, attr) {
element.addClass('ng-binding').data('$binding', attr.ngBindHtmlUnsafe);
scope.$watch(attr.ngBindHtmlUnsafe, function ngBindHtmlUnsafeWatchAction(value) {
element.html(value || '');
});
};
}];
function classDirective(name, selector) {
name = 'ngClass' + name;
return ngDirective(function(scope, element, attr) {
var oldVal = undefined;
scope.$watch(attr[name], ngClassWatchAction, true);
attr.$observe('class', function(value) {
var ngClass = scope.$eval(attr[name]);
ngClassWatchAction(ngClass, ngClass);
});
if (name !== 'ngClass') {
scope.$watch('$index', function($index, old$index) {
var mod = $index & 1;
if (mod !== old$index & 1) {
if (mod === selector) {
addClass(scope.$eval(attr[name]));
} else {
removeClass(scope.$eval(attr[name]));
}
}
});
}
function ngClassWatchAction(newVal) {
if (selector === true || scope.$index % 2 === selector) {
if (oldVal && !equals(newVal,oldVal)) {
removeClass(oldVal);
}
addClass(newVal);
}
oldVal = copy(newVal);
}
function removeClass(classVal) {
if (isObject(classVal) && !isArray(classVal)) {
classVal = map(classVal, function(v, k) { if (v) return k });
}
element.removeClass(isArray(classVal) ? classVal.join(' ') : classVal);
}
function addClass(classVal) {
if (isObject(classVal) && !isArray(classVal)) {
classVal = map(classVal, function(v, k) { if (v) return k });
}
if (classVal) {
element.addClass(isArray(classVal) ? classVal.join(' ') : classVal);
}
}
});
}
/**
* @ngdoc directive
* @name ng.directive:ngClass
*
* @description
* The `ngClass` allows you to set CSS classes on HTML an element, dynamically, by databinding
* an expression that represents all classes to be added.
*
* The directive won't add duplicate classes if a particular class was already set.
*
* When the expression changes, the previously added classes are removed and only then the
* new classes are added.
*
* @element ANY
* @param {expression} ngClass {@link guide/expression Expression} to eval. The result
* of the evaluation can be a string representing space delimited class
* names, an array, or a map of class names to boolean values. In the case of a map, the
* names of the properties whose values are truthy will be added as css classes to the
* element.
*
* @example
<example>
<file name="index.html">
<input type="button" value="set" ng-click="myVar='my-class'">
<input type="button" value="clear" ng-click="myVar=''">
<br>
<span ng-class="myVar">Sample Text</span>
</file>
<file name="style.css">
.my-class {
color: red;
}
</file>
<file name="scenario.js">
it('should check ng-class', function() {
expect(element('.doc-example-live span').prop('className')).not().
toMatch(/my-class/);
using('.doc-example-live').element(':button:first').click();
expect(element('.doc-example-live span').prop('className')).
toMatch(/my-class/);
using('.doc-example-live').element(':button:last').click();
expect(element('.doc-example-live span').prop('className')).not().
toMatch(/my-class/);
});
</file>
</example>
*/
var ngClassDirective = classDirective('', true);
/**
* @ngdoc directive
* @name ng.directive:ngClassOdd
*
* @description
* The `ngClassOdd` and `ngClassEven` directives work exactly as
* {@link ng.directive:ngClass ngClass}, except it works in
* conjunction with `ngRepeat` and takes affect only on odd (even) rows.
*
* This directive can be applied only within a scope of an
* {@link ng.directive:ngRepeat ngRepeat}.
*
* @element ANY
* @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result
* of the evaluation can be a string representing space delimited class names or an array.
*
* @example
<example>
<file name="index.html">
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
<li ng-repeat="name in names">
<span ng-class-odd="'odd'" ng-class-even="'even'">
{{name}}
</span>
</li>
</ol>
</file>
<file name="style.css">
.odd {
color: red;
}
.even {
color: blue;
}
</file>
<file name="scenario.js">
it('should check ng-class-odd and ng-class-even', function() {
expect(element('.doc-example-live li:first span').prop('className')).
toMatch(/odd/);
expect(element('.doc-example-live li:last span').prop('className')).
toMatch(/even/);
});
</file>
</example>
*/
var ngClassOddDirective = classDirective('Odd', 0);
/**
* @ngdoc directive
* @name ng.directive:ngClassEven
*
* @description
* The `ngClassOdd` and `ngClassEven` directives work exactly as
* {@link ng.directive:ngClass ngClass}, except it works in
* conjunction with `ngRepeat` and takes affect only on odd (even) rows.
*
* This directive can be applied only within a scope of an
* {@link ng.directive:ngRepeat ngRepeat}.
*
* @element ANY
* @param {expression} ngClassEven {@link guide/expression Expression} to eval. The
* result of the evaluation can be a string representing space delimited class names or an array.
*
* @example
<example>
<file name="index.html">
<ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
<li ng-repeat="name in names">
<span ng-class-odd="'odd'" ng-class-even="'even'">
{{name}}
</span>
</li>
</ol>
</file>
<file name="style.css">
.odd {
color: red;
}
.even {
color: blue;
}
</file>
<file name="scenario.js">
it('should check ng-class-odd and ng-class-even', function() {
expect(element('.doc-example-live li:first span').prop('className')).
toMatch(/odd/);
expect(element('.doc-example-live li:last span').prop('className')).
toMatch(/even/);
});
</file>
</example>
*/
var ngClassEvenDirective = classDirective('Even', 1);
/**
* @ngdoc directive
* @name ng.directive:ngCloak
*
* @description
* The `ngCloak` directive is used to prevent the Angular html template from being briefly
* displayed by the browser in its raw (uncompiled) form while your application is loading. Use this
* directive to avoid the undesirable flicker effect caused by the html template display.
*
* The directive can be applied to the `<body>` element, but typically a fine-grained application is
* prefered in order to benefit from progressive rendering of the browser view.
*
* `ngCloak` works in cooperation with a css rule that is embedded within `angular.js` and
* `angular.min.js` files. Following is the css rule:
*
* <pre>
* [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
* display: none !important;
* }
* </pre>
*
* When this css rule is loaded by the browser, all html elements (including their children) that
* are tagged with the `ng-cloak` directive are hidden. When Angular comes across this directive
* during the compilation of the template it deletes the `ngCloak` element attribute, which
* makes the compiled element visible.
*
* For the best result, `angular.js` script must be loaded in the head section of the html file;
* alternatively, the css rule (above) must be included in the external stylesheet of the
* application.
*
* Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they
* cannot match the `[ng\:cloak]` selector. To work around this limitation, you must add the css
* class `ngCloak` in addition to `ngCloak` directive as shown in the example below.
*
* @element ANY
*
* @example
<doc:example>
<doc:source>
<div id="template1" ng-cloak>{{ 'hello' }}</div>
<div id="template2" ng-cloak class="ng-cloak">{{ 'hello IE7' }}</div>
</doc:source>
<doc:scenario>
it('should remove the template directive and css class', function() {
expect(element('.doc-example-live #template1').attr('ng-cloak')).
not().toBeDefined();
expect(element('.doc-example-live #template2').attr('ng-cloak')).
not().toBeDefined();
});
</doc:scenario>
</doc:example>
*
*/
var ngCloakDirective = ngDirective({
compile: function(element, attr) {
attr.$set('ngCloak', undefined);
element.removeClass('ng-cloak');
}
});
/**
* @ngdoc directive
* @name ng.directive:ngController
*
* @description
* The `ngController` directive assigns behavior to a scope. This is a key aspect of how angular
* supports the principles behind the Model-View-Controller design pattern.
*
* MVC components in angular:
*
* * Model — The Model is data in scope properties; scopes are attached to the DOM.
* * View — The template (HTML with data bindings) is rendered into the View.
* * Controller — The `ngController` directive specifies a Controller class; the class has
* methods that typically express the business logic behind the application.
*
* Note that an alternative way to define controllers is via the {@link ng.$route $route} service.
*
* @element ANY
* @scope
* @param {expression} ngController Name of a globally accessible constructor function or an
* {@link guide/expression expression} that on the current scope evaluates to a
* constructor function.
*
* @example
* Here is a simple form for editing user contact information. Adding, removing, clearing, and
* greeting are methods declared on the $scope by the controller (see source tab). These methods can
* easily be called from the angular markup. Notice that any changes to the data are automatically
* reflected in the View without the need for a manual update.
<doc:example>
<doc:source>
<script>
function SettingsController($scope) {
$scope.name = "John Smith";
$scope.contacts = [
{type:'phone', value:'408 555 1212'},
{type:'email', value:'john.smith@example.org'} ];
$scope.greet = function() {
alert(this.name);
};
$scope.addContact = function() {
this.contacts.push({type:'email', value:'yourname@example.org'});
};
$scope.removeContact = function(contactToRemove) {
var index = this.contacts.indexOf(contactToRemove);
this.contacts.splice(index, 1);
};
$scope.clearContact = function(contact) {
contact.type = 'phone';
contact.value = '';
};
}
</script>
<div ng-controller="SettingsController">
Name: <input type="text" ng-model="name"/>
[ <a href="" ng-click="greet()">greet</a> ]<br/>
Contact:
<ul>
<li ng-repeat="contact in contacts">
<select ng-model="contact.type">
<option>phone</option>
<option>email</option>
</select>
<input type="text" ng-model="contact.value"/>
[ <a href="" ng-click="clearContact(contact)">clear</a>
| <a href="" ng-click="removeContact(contact)">X</a> ]
</li>
<li>[ <a href="" ng-click="addContact()">add</a> ]</li>
</ul>
</div>
</doc:source>
<doc:scenario>
it('should check controller', function() {
expect(element('.doc-example-live div>:input').val()).toBe('John Smith');
expect(element('.doc-example-live li:nth-child(1) input').val())
.toBe('408 555 1212');
expect(element('.doc-example-live li:nth-child(2) input').val())
.toBe('john.smith@example.org');
element('.doc-example-live li:first a:contains("clear")').click();
expect(element('.doc-example-live li:first input').val()).toBe('');
element('.doc-example-live li:last a:contains("add")').click();
expect(element('.doc-example-live li:nth-child(3) input').val())
.toBe('yourname@example.org');
});
</doc:scenario>
</doc:example>
*/
var ngControllerDirective = [function() {
return {
scope: true,
controller: '@'
};
}];
/**
* @ngdoc directive
* @name ng.directive:ngCsp
* @priority 1000
*
* @element html
* @description
* Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.
*
* This is necessary when developing things like Google Chrome Extensions.
*
* CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).
* For us to be compatible, we just need to implement the "getterFn" in $parse without violating
* any of these restrictions.
*
* AngularJS uses `Function(string)` generated functions as a speed optimization. By applying `ngCsp`
* it is be possible to opt into the CSP compatible mode. When this mode is on AngularJS will
* evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will
* be raised.
*
* In order to use this feature put `ngCsp` directive on the root element of the application.
*
* @example
* This example shows how to apply the `ngCsp` directive to the `html` tag.
<pre>
<!doctype html>
<html ng-app ng-csp>
...
...
</html>
</pre>
*/
var ngCspDirective = ['$sniffer', function($sniffer) {
return {
priority: 1000,
compile: function() {
$sniffer.csp = true;
}
};
}];
/**
* @ngdoc directive
* @name ng.directive:ngClick
*
* @description
* The ngClick allows you to specify custom behavior when
* element is clicked.
*
* @element ANY
* @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
* click. (Event object is available as `$event`)
*
* @example
<doc:example>
<doc:source>
<button ng-click="count = count + 1" ng-init="count=0">
Increment
</button>
count: {{count}}
</doc:source>
<doc:scenario>
it('should check ng-click', function() {
expect(binding('count')).toBe('0');
element('.doc-example-live :button').click();
expect(binding('count')).toBe('1');
});
</doc:scenario>
</doc:example>
*/
/*
* A directive that allows creation of custom onclick handlers that are defined as angular
* expressions and are compiled and executed within the current scope.
*
* Events that are handled via these handler are always configured not to propagate further.
*/
var ngEventDirectives = {};
forEach(
'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave submit'.split(' '),
function(name) {
var directiveName = directiveNormalize('ng-' + name);
ngEventDirectives[directiveName] = ['$parse', function($parse) {
return function(scope, element, attr) {
var fn = $parse(attr[directiveName]);
element.bind(lowercase(name), function(event) {
scope.$apply(function() {
fn(scope, {$event:event});
});
});
};
}];
}
);
/**
* @ngdoc directive
* @name ng.directive:ngDblclick
*
* @description
* The `ngDblclick` directive allows you to specify custom behavior on dblclick event.
*
* @element ANY
* @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon
* dblclick. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngMousedown
*
* @description
* The ngMousedown directive allows you to specify custom behavior on mousedown event.
*
* @element ANY
* @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
* mousedown. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngMouseup
*
* @description
* Specify custom behavior on mouseup event.
*
* @element ANY
* @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
* mouseup. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngMouseover
*
* @description
* Specify custom behavior on mouseover event.
*
* @element ANY
* @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
* mouseover. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngMouseenter
*
* @description
* Specify custom behavior on mouseenter event.
*
* @element ANY
* @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
* mouseenter. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngMouseleave
*
* @description
* Specify custom behavior on mouseleave event.
*
* @element ANY
* @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
* mouseleave. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngMousemove
*
* @description
* Specify custom behavior on mousemove event.
*
* @element ANY
* @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
* mousemove. (Event object is available as `$event`)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngKeydown
*
* @description
* Specify custom behavior on keydown event.
*
* @element ANY
* @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon
* keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngKeyup
*
* @description
* Specify custom behavior on keyup event.
*
* @element ANY
* @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon
* keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngKeypress
*
* @description
* Specify custom behavior on keypress event.
*
* @element ANY
* @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
* keypress. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
*
* @example
* See {@link ng.directive:ngClick ngClick}
*/
/**
* @ngdoc directive
* @name ng.directive:ngSubmit
*
* @description
* Enables binding angular expressions to onsubmit events.
*
* Additionally it prevents the default action (which for form means sending the request to the
* server and reloading the current page) **but only if the form does not contain an `action`
* attribute**.
*
* @element form
* @param {expression} ngSubmit {@link guide/expression Expression} to eval. (Event object is available as `$event`)
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.list = [];
$scope.text = 'hello';
$scope.submit = function() {
if (this.text) {
this.list.push(this.text);
this.text = '';
}
};
}
</script>
<form ng-submit="submit()" ng-controller="Ctrl">
Enter text and hit enter:
<input type="text" ng-model="text" name="text" />
<input type="submit" id="submit" value="Submit" />
<pre>list={{list}}</pre>
</form>
</doc:source>
<doc:scenario>
it('should check ng-submit', function() {
expect(binding('list')).toBe('[]');
element('.doc-example-live #submit').click();
expect(binding('list')).toBe('["hello"]');
expect(input('text').val()).toBe('');
});
it('should ignore empty strings', function() {
expect(binding('list')).toBe('[]');
element('.doc-example-live #submit').click();
element('.doc-example-live #submit').click();
expect(binding('list')).toBe('["hello"]');
});
</doc:scenario>
</doc:example>
*/
/**
* @ngdoc directive
* @name ng.directive:ngInclude
* @restrict ECA
*
* @description
* Fetches, compiles and includes an external HTML fragment.
*
* Keep in mind that Same Origin Policy applies to included resources
* (e.g. ngInclude won't work for cross-domain requests on all browsers and for
* file:// access on some browsers).
*
* @scope
*
* @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
* make sure you wrap it in quotes, e.g. `src="'myPartialTemplate.html'"`.
* @param {string=} onload Expression to evaluate when a new partial is loaded.
*
* @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
* $anchorScroll} to scroll the viewport after the content is loaded.
*
* - If the attribute is not set, disable scrolling.
* - If the attribute is set without value, enable scrolling.
* - Otherwise enable scrolling only if the expression evaluates to truthy value.
*
* @example
<example>
<file name="index.html">
<div ng-controller="Ctrl">
<select ng-model="template" ng-options="t.name for t in templates">
<option value="">(blank)</option>
</select>
url of the template: <tt>{{template.url}}</tt>
<hr/>
<div ng-include src="template.url"></div>
</div>
</file>
<file name="script.js">
function Ctrl($scope) {
$scope.templates =
[ { name: 'template1.html', url: 'template1.html'}
, { name: 'template2.html', url: 'template2.html'} ];
$scope.template = $scope.templates[0];
}
</file>
<file name="template1.html">
Content of template1.html
</file>
<file name="template2.html">
Content of template2.html
</file>
<file name="scenario.js">
it('should load template1.html', function() {
expect(element('.doc-example-live [ng-include]').text()).
toMatch(/Content of template1.html/);
});
it('should load template2.html', function() {
select('template').option('1');
expect(element('.doc-example-live [ng-include]').text()).
toMatch(/Content of template2.html/);
});
it('should change to blank', function() {
select('template').option('');
expect(element('.doc-example-live [ng-include]').text()).toEqual('');
});
</file>
</example>
*/
/**
* @ngdoc event
* @name ng.directive:ngInclude#$includeContentLoaded
* @eventOf ng.directive:ngInclude
* @eventType emit on the current ngInclude scope
* @description
* Emitted every time the ngInclude content is reloaded.
*/
var ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$compile',
function($http, $templateCache, $anchorScroll, $compile) {
return {
restrict: 'ECA',
terminal: true,
compile: function(element, attr) {
var srcExp = attr.ngInclude || attr.src,
onloadExp = attr.onload || '',
autoScrollExp = attr.autoscroll;
return function(scope, element) {
var changeCounter = 0,
childScope;
var clearContent = function() {
if (childScope) {
childScope.$destroy();
childScope = null;
}
element.html('');
};
scope.$watch(srcExp, function ngIncludeWatchAction(src) {
var thisChangeId = ++changeCounter;
if (src) {
$http.get(src, {cache: $templateCache}).success(function(response) {
if (thisChangeId !== changeCounter) return;
if (childScope) childScope.$destroy();
childScope = scope.$new();
element.html(response);
$compile(element.contents())(childScope);
if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
$anchorScroll();
}
childScope.$emit('$includeContentLoaded');
scope.$eval(onloadExp);
}).error(function() {
if (thisChangeId === changeCounter) clearContent();
});
} else clearContent();
});
};
}
};
}];
/**
* @ngdoc directive
* @name ng.directive:ngInit
*
* @description
* The `ngInit` directive specifies initialization tasks to be executed
* before the template enters execution mode during bootstrap.
*
* @element ANY
* @param {expression} ngInit {@link guide/expression Expression} to eval.
*
* @example
<doc:example>
<doc:source>
<div ng-init="greeting='Hello'; person='World'">
{{greeting}} {{person}}!
</div>
</doc:source>
<doc:scenario>
it('should check greeting', function() {
expect(binding('greeting')).toBe('Hello');
expect(binding('person')).toBe('World');
});
</doc:scenario>
</doc:example>
*/
var ngInitDirective = ngDirective({
compile: function() {
return {
pre: function(scope, element, attrs) {
scope.$eval(attrs.ngInit);
}
}
}
});
/**
* @ngdoc directive
* @name ng.directive:ngNonBindable
* @priority 1000
*
* @description
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
* by angular. Use `ngNonBindable` to make angular ignore a chunk of HTML.
*
* @element ANY
*
* @example
* In this example there are two location where a simple binding (`{{}}`) is present, but the one
* wrapped in `ngNonBindable` is left alone.
*
* @example
<doc:example>
<doc:source>
<div>Normal: {{1 + 2}}</div>
<div ng-non-bindable>Ignored: {{1 + 2}}</div>
</doc:source>
<doc:scenario>
it('should check ng-non-bindable', function() {
expect(using('.doc-example-live').binding('1 + 2')).toBe('3');
expect(using('.doc-example-live').element('div:last').text()).
toMatch(/1 \+ 2/);
});
</doc:scenario>
</doc:example>
*/
var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
/**
* @ngdoc directive
* @name ng.directive:ngPluralize
* @restrict EA
*
* @description
* # Overview
* `ngPluralize` is a directive that displays messages according to en-US localization rules.
* These rules are bundled with angular.js, but can be overridden
* (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive
* by specifying the mappings between
* {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
* plural categories} and the strings to be displayed.
*
* # Plural categories and explicit number rules
* There are two
* {@link http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html
* plural categories} in Angular's default en-US locale: "one" and "other".
*
* While a pural category may match many numbers (for example, in en-US locale, "other" can match
* any number that is not 1), an explicit number rule can only match one number. For example, the
* explicit number rule for "3" matches the number 3. There are examples of plural categories
* and explicit number rules throughout the rest of this documentation.
*
* # Configuring ngPluralize
* You configure ngPluralize by providing 2 attributes: `count` and `when`.
* You can also provide an optional attribute, `offset`.
*
* The value of the `count` attribute can be either a string or an {@link guide/expression
* Angular expression}; these are evaluated on the current scope for its bound value.
*
* The `when` attribute specifies the mappings between plural categories and the actual
* string to be displayed. The value of the attribute should be a JSON object.
*
* The following example shows how to configure ngPluralize:
*
* <pre>
* <ng-pluralize count="personCount"
when="{'0': 'Nobody is viewing.',
* 'one': '1 person is viewing.',
* 'other': '{} people are viewing.'}">
* </ng-pluralize>
*</pre>
*
* In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not
* specify this rule, 0 would be matched to the "other" category and "0 people are viewing"
* would be shown instead of "Nobody is viewing". You can specify an explicit number rule for
* other numbers, for example 12, so that instead of showing "12 people are viewing", you can
* show "a dozen people are viewing".
*
* You can use a set of closed braces(`{}`) as a placeholder for the number that you want substituted
* into pluralized strings. In the previous example, Angular will replace `{}` with
* <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder
* for <span ng-non-bindable>{{numberExpression}}</span>.
*
* # Configuring ngPluralize with offset
* The `offset` attribute allows further customization of pluralized text, which can result in
* a better user experience. For example, instead of the message "4 people are viewing this document",
* you might display "John, Kate and 2 others are viewing this document".
* The offset attribute allows you to offset a number by any desired value.
* Let's take a look at an example:
*
* <pre>
* <ng-pluralize count="personCount" offset=2
* when="{'0': 'Nobody is viewing.',
* '1': '{{person1}} is viewing.',
* '2': '{{person1}} and {{person2}} are viewing.',
* 'one': '{{person1}}, {{person2}} and one other person are viewing.',
* 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
* </ng-pluralize>
* </pre>
*
* Notice that we are still using two plural categories(one, other), but we added
* three explicit number rules 0, 1 and 2.
* When one person, perhaps John, views the document, "John is viewing" will be shown.
* When three people view the document, no explicit number rule is found, so
* an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.
* In this case, plural category 'one' is matched and "John, Marry and one other person are viewing"
* is shown.
*
* Note that when you specify offsets, you must provide explicit number rules for
* numbers from 0 up to and including the offset. If you use an offset of 3, for example,
* you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for
* plural categories "one" and "other".
*
* @param {string|expression} count The variable to be bounded to.
* @param {string} when The mapping between plural category to its correspoding strings.
* @param {number=} offset Offset to deduct from the total number.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.person1 = 'Igor';
$scope.person2 = 'Misko';
$scope.personCount = 1;
}
</script>
<div ng-controller="Ctrl">
Person 1:<input type="text" ng-model="person1" value="Igor" /><br/>
Person 2:<input type="text" ng-model="person2" value="Misko" /><br/>
Number of People:<input type="text" ng-model="personCount" value="1" /><br/>
<!--- Example with simple pluralization rules for en locale --->
Without Offset:
<ng-pluralize count="personCount"
when="{'0': 'Nobody is viewing.',
'one': '1 person is viewing.',
'other': '{} people are viewing.'}">
</ng-pluralize><br>
<!--- Example with offset --->
With Offset(2):
<ng-pluralize count="personCount" offset=2
when="{'0': 'Nobody is viewing.',
'1': '{{person1}} is viewing.',
'2': '{{person1}} and {{person2}} are viewing.',
'one': '{{person1}}, {{person2}} and one other person are viewing.',
'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
</ng-pluralize>
</div>
</doc:source>
<doc:scenario>
it('should show correct pluralized string', function() {
expect(element('.doc-example-live ng-pluralize:first').text()).
toBe('1 person is viewing.');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Igor is viewing.');
using('.doc-example-live').input('personCount').enter('0');
expect(element('.doc-example-live ng-pluralize:first').text()).
toBe('Nobody is viewing.');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Nobody is viewing.');
using('.doc-example-live').input('personCount').enter('2');
expect(element('.doc-example-live ng-pluralize:first').text()).
toBe('2 people are viewing.');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Igor and Misko are viewing.');
using('.doc-example-live').input('personCount').enter('3');
expect(element('.doc-example-live ng-pluralize:first').text()).
toBe('3 people are viewing.');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Igor, Misko and one other person are viewing.');
using('.doc-example-live').input('personCount').enter('4');
expect(element('.doc-example-live ng-pluralize:first').text()).
toBe('4 people are viewing.');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Igor, Misko and 2 other people are viewing.');
});
it('should show data-binded names', function() {
using('.doc-example-live').input('personCount').enter('4');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Igor, Misko and 2 other people are viewing.');
using('.doc-example-live').input('person1').enter('Di');
using('.doc-example-live').input('person2').enter('Vojta');
expect(element('.doc-example-live ng-pluralize:last').text()).
toBe('Di, Vojta and 2 other people are viewing.');
});
</doc:scenario>
</doc:example>
*/
var ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {
var BRACE = /{}/g;
return {
restrict: 'EA',
link: function(scope, element, attr) {
var numberExp = attr.count,
whenExp = element.attr(attr.$attr.when), // this is because we have {{}} in attrs
offset = attr.offset || 0,
whens = scope.$eval(whenExp),
whensExpFns = {},
startSymbol = $interpolate.startSymbol(),
endSymbol = $interpolate.endSymbol();
forEach(whens, function(expression, key) {
whensExpFns[key] =
$interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +
offset + endSymbol));
});
scope.$watch(function ngPluralizeWatch() {
var value = parseFloat(scope.$eval(numberExp));
if (!isNaN(value)) {
//if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,
//check it against pluralization rules in $locale service
if (!(value in whens)) value = $locale.pluralCat(value - offset);
return whensExpFns[value](scope, element, true);
} else {
return '';
}
}, function ngPluralizeWatchAction(newVal) {
element.text(newVal);
});
}
};
}];
/**
* @ngdoc directive
* @name ng.directive:ngRepeat
*
* @description
* The `ngRepeat` directive instantiates a template once per item from a collection. Each template
* instance gets its own scope, where the given loop variable is set to the current collection item,
* and `$index` is set to the item index or key.
*
* Special properties are exposed on the local scope of each template instance, including:
*
* * `$index` – `{number}` – iterator offset of the repeated element (0..length-1)
* * `$first` – `{boolean}` – true if the repeated element is first in the iterator.
* * `$middle` – `{boolean}` – true if the repeated element is between the first and last in the iterator.
* * `$last` – `{boolean}` – true if the repeated element is last in the iterator.
*
*
* @element ANY
* @scope
* @priority 1000
* @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. Two
* formats are currently supported:
*
* * `variable in expression` – where variable is the user defined loop variable and `expression`
* is a scope expression giving the collection to enumerate.
*
* For example: `track in cd.tracks`.
*
* * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,
* and `expression` is the scope expression giving the collection to enumerate.
*
* For example: `(name, age) in {'adam':10, 'amalie':12}`.
*
* @example
* This example initializes the scope to a list of names and
* then uses `ngRepeat` to display every person:
<doc:example>
<doc:source>
<div ng-init="friends = [{name:'John', age:25}, {name:'Mary', age:28}]">
I have {{friends.length}} friends. They are:
<ul>
<li ng-repeat="friend in friends">
[{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
</li>
</ul>
</div>
</doc:source>
<doc:scenario>
it('should check ng-repeat', function() {
var r = using('.doc-example-live').repeater('ul li');
expect(r.count()).toBe(2);
expect(r.row(0)).toEqual(["1","John","25"]);
expect(r.row(1)).toEqual(["2","Mary","28"]);
});
</doc:scenario>
</doc:example>
*/
var ngRepeatDirective = ngDirective({
transclude: 'element',
priority: 1000,
terminal: true,
compile: function(element, attr, linker) {
return function(scope, iterStartElement, attr){
var expression = attr.ngRepeat;
var match = expression.match(/^\s*(.+)\s+in\s+(.*)\s*$/),
lhs, rhs, valueIdent, keyIdent;
if (! match) {
throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '" +
expression + "'.");
}
lhs = match[1];
rhs = match[2];
match = lhs.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);
if (!match) {
throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '" +
lhs + "'.");
}
valueIdent = match[3] || match[1];
keyIdent = match[2];
// Store a list of elements from previous run. This is a hash where key is the item from the
// iterator, and the value is an array of objects with following properties.
// - scope: bound scope
// - element: previous element.
// - index: position
// We need an array of these objects since the same object can be returned from the iterator.
// We expect this to be a rare case.
var lastOrder = new HashQueueMap();
scope.$watch(function ngRepeatWatch(scope){
var index, length,
collection = scope.$eval(rhs),
cursor = iterStartElement, // current position of the node
// Same as lastOrder but it has the current state. It will become the
// lastOrder on the next iteration.
nextOrder = new HashQueueMap(),
arrayBound,
childScope,
key, value, // key/value of iteration
array,
last; // last object information {scope, element, index}
if (!isArray(collection)) {
// if object, extract keys, sort them and use to determine order of iteration over obj props
array = [];
for(key in collection) {
if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {
array.push(key);
}
}
array.sort();
} else {
array = collection || [];
}
arrayBound = array.length-1;
// we are not using forEach for perf reasons (trying to avoid #call)
for (index = 0, length = array.length; index < length; index++) {
key = (collection === array) ? index : array[index];
value = collection[key];
last = lastOrder.shift(value);
if (last) {
// if we have already seen this object, then we need to reuse the
// associated scope/element
childScope = last.scope;
nextOrder.push(value, last);
if (index === last.index) {
// do nothing
cursor = last.element;
} else {
// existing item which got moved
last.index = index;
// This may be a noop, if the element is next, but I don't know of a good way to
// figure this out, since it would require extra DOM access, so let's just hope that
// the browsers realizes that it is noop, and treats it as such.
cursor.after(last.element);
cursor = last.element;
}
} else {
// new item which we don't know about
childScope = scope.$new();
}
childScope[valueIdent] = value;
if (keyIdent) childScope[keyIdent] = key;
childScope.$index = index;
childScope.$first = (index === 0);
childScope.$last = (index === arrayBound);
childScope.$middle = !(childScope.$first || childScope.$last);
if (!last) {
linker(childScope, function(clone){
cursor.after(clone);
last = {
scope: childScope,
element: (cursor = clone),
index: index
};
nextOrder.push(value, last);
});
}
}
//shrink children
for (key in lastOrder) {
if (lastOrder.hasOwnProperty(key)) {
array = lastOrder[key];
while(array.length) {
value = array.pop();
value.element.remove();
value.scope.$destroy();
}
}
}
lastOrder = nextOrder;
});
};
}
});
/**
* @ngdoc directive
* @name ng.directive:ngShow
*
* @description
* The `ngShow` and `ngHide` directives show or hide a portion of the DOM tree (HTML)
* conditionally.
*
* @element ANY
* @param {expression} ngShow If the {@link guide/expression expression} is truthy
* then the element is shown or hidden respectively.
*
* @example
<doc:example>
<doc:source>
Click me: <input type="checkbox" ng-model="checked"><br/>
Show: <span ng-show="checked">I show up when your checkbox is checked.</span> <br/>
Hide: <span ng-hide="checked">I hide when your checkbox is checked.</span>
</doc:source>
<doc:scenario>
it('should check ng-show / ng-hide', function() {
expect(element('.doc-example-live span:first:hidden').count()).toEqual(1);
expect(element('.doc-example-live span:last:visible').count()).toEqual(1);
input('checked').check();
expect(element('.doc-example-live span:first:visible').count()).toEqual(1);
expect(element('.doc-example-live span:last:hidden').count()).toEqual(1);
});
</doc:scenario>
</doc:example>
*/
//TODO(misko): refactor to remove element from the DOM
var ngShowDirective = ngDirective(function(scope, element, attr){
scope.$watch(attr.ngShow, function ngShowWatchAction(value){
element.css('display', toBoolean(value) ? '' : 'none');
});
});
/**
* @ngdoc directive
* @name ng.directive:ngHide
*
* @description
* The `ngHide` and `ngShow` directives hide or show a portion of the DOM tree (HTML)
* conditionally.
*
* @element ANY
* @param {expression} ngHide If the {@link guide/expression expression} is truthy then
* the element is shown or hidden respectively.
*
* @example
<doc:example>
<doc:source>
Click me: <input type="checkbox" ng-model="checked"><br/>
Show: <span ng-show="checked">I show up when you checkbox is checked?</span> <br/>
Hide: <span ng-hide="checked">I hide when you checkbox is checked?</span>
</doc:source>
<doc:scenario>
it('should check ng-show / ng-hide', function() {
expect(element('.doc-example-live span:first:hidden').count()).toEqual(1);
expect(element('.doc-example-live span:last:visible').count()).toEqual(1);
input('checked').check();
expect(element('.doc-example-live span:first:visible').count()).toEqual(1);
expect(element('.doc-example-live span:last:hidden').count()).toEqual(1);
});
</doc:scenario>
</doc:example>
*/
//TODO(misko): refactor to remove element from the DOM
var ngHideDirective = ngDirective(function(scope, element, attr){
scope.$watch(attr.ngHide, function ngHideWatchAction(value){
element.css('display', toBoolean(value) ? 'none' : '');
});
});
/**
* @ngdoc directive
* @name ng.directive:ngStyle
*
* @description
* The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
*
* @element ANY
* @param {expression} ngStyle {@link guide/expression Expression} which evals to an
* object whose keys are CSS style names and values are corresponding values for those CSS
* keys.
*
* @example
<example>
<file name="index.html">
<input type="button" value="set" ng-click="myStyle={color:'red'}">
<input type="button" value="clear" ng-click="myStyle={}">
<br/>
<span ng-style="myStyle">Sample Text</span>
<pre>myStyle={{myStyle}}</pre>
</file>
<file name="style.css">
span {
color: black;
}
</file>
<file name="scenario.js">
it('should check ng-style', function() {
expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)');
element('.doc-example-live :button[value=set]').click();
expect(element('.doc-example-live span').css('color')).toBe('rgb(255, 0, 0)');
element('.doc-example-live :button[value=clear]').click();
expect(element('.doc-example-live span').css('color')).toBe('rgb(0, 0, 0)');
});
</file>
</example>
*/
var ngStyleDirective = ngDirective(function(scope, element, attr) {
scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {
if (oldStyles && (newStyles !== oldStyles)) {
forEach(oldStyles, function(val, style) { element.css(style, '');});
}
if (newStyles) element.css(newStyles);
}, true);
});
/**
* @ngdoc directive
* @name ng.directive:ngSwitch
* @restrict EA
*
* @description
* Conditionally change the DOM structure.
*
* @usage
* <ANY ng-switch="expression">
* <ANY ng-switch-when="matchValue1">...</ANY>
* <ANY ng-switch-when="matchValue2">...</ANY>
* ...
* <ANY ng-switch-default>...</ANY>
* </ANY>
*
* @scope
* @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>.
* @paramDescription
* On child elments add:
*
* * `ngSwitchWhen`: the case statement to match against. If match then this
* case will be displayed.
* * `ngSwitchDefault`: the default case when no other casses match.
*
* @example
<doc:example>
<doc:source>
<script>
function Ctrl($scope) {
$scope.items = ['settings', 'home', 'other'];
$scope.selection = $scope.items[0];
}
</script>
<div ng-controller="Ctrl">
<select ng-model="selection" ng-options="item for item in items">
</select>
<tt>selection={{selection}}</tt>
<hr/>
<div ng-switch on="selection" >
<div ng-switch-when="settings">Settings Div</div>
<span ng-switch-when="home">Home Span</span>
<span ng-switch-default>default</span>
</div>
</div>
</doc:source>
<doc:scenario>
it('should start in settings', function() {
expect(element('.doc-example-live [ng-switch]').text()).toMatch(/Settings Div/);
});
it('should change to home', function() {
select('selection').option('home');
expect(element('.doc-example-live [ng-switch]').text()).toMatch(/Home Span/);
});
it('should select deafault', function() {
select('selection').option('other');
expect(element('.doc-example-live [ng-switch]').text()).toMatch(/default/);
});
</doc:scenario>
</doc:example>
*/
var NG_SWITCH = 'ng-switch';
var ngSwitchDirective = valueFn({
restrict: 'EA',
require: 'ngSwitch',
// asks for $scope to fool the BC controller module
controller: ['$scope', function ngSwitchController() {
this.cases = {};
}],
link: function(scope, element, attr, ctrl) {
var watchExpr = attr.ngSwitch || attr.on,
selectedTransclude,
selectedElement,
selectedScope;
scope.$watch(watchExpr, function ngSwitchWatchAction(value) {
if (selectedElement) {
selectedScope.$destroy();
selectedElement.remove();
selectedElement = selectedScope = null;
}
if ((selectedTransclude = ctrl.cases['!' + value] || ctrl.cases['?'])) {
scope.$eval(attr.change);
selectedScope = scope.$new();
selectedTransclude(selectedScope, function(caseElement) {
selectedElement = caseElement;
element.append(caseElement);
});
}
});
}
});
var ngSwitchWhenDirective = ngDirective({
transclude: 'element',
priority: 500,
require: '^ngSwitch',
compile: function(element, attrs, transclude) {
return function(scope, element, attr, ctrl) {
ctrl.cases['!' + attrs.ngSwitchWhen] = transclude;
};
}
});
var ngSwitchDefaultDirective = ngDirective({
transclude: 'element',
priority: 500,
require: '^ngSwitch',
compile: function(element, attrs, transclude) {
return function(scope, element, attr, ctrl) {
ctrl.cases['?'] = transclude;
};
}
});
/**
* @ngdoc directive
* @name ng.directive:ngTransclude
*
* @description
* Insert the transcluded DOM here.
*
* @element ANY
*
* @example
<doc:example module="transclude">
<doc:source>
<script>
function Ctrl($scope) {
$scope.title = 'Lorem Ipsum';
$scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
}
angular.module('transclude', [])
.directive('pane', function(){
return {
restrict: 'E',
transclude: true,
scope: { title:'@' },
template: '<div style="border: 1px solid black;">' +
'<div style="background-color: gray">{{title}}</div>' +
'<div ng-transclude></div>' +
'</div>'
};
});
</script>
<div ng-controller="Ctrl">
<input ng-model="title"><br>
<textarea ng-model="text"></textarea> <br/>
<pane title="{{title}}">{{text}}</pane>
</div>
</doc:source>
<doc:scenario>
it('should have transcluded', function() {
input('title').enter('TITLE');
input('text').enter('TEXT');
expect(binding('title')).toEqual('TITLE');
expect(binding('text')).toEqual('TEXT');
});
</doc:scenario>
</doc:example>
*
*/
var ngTranscludeDirective = ngDirective({
controller: ['$transclude', '$element', function($transclude, $element) {
$transclude(function(clone) {
$element.append(clone);
});
}]
});
/**
* @ngdoc directive
* @name ng.directive:ngView
* @restrict ECA
*
* @description
* # Overview
* `ngView` is a directive that complements the {@link ng.$route $route} service by
* including the rendered template of the current route into the main layout (`index.html`) file.
* Every time the current route changes, the included view changes with it according to the
* configuration of the `$route` service.
*
* @scope
* @example
<example module="ngView">
<file name="index.html">
<div ng-controller="MainCntl">
Choose:
<a href="Book/Moby">Moby</a> |
<a href="Book/Moby/ch/1">Moby: Ch1</a> |
<a href="Book/Gatsby">Gatsby</a> |
<a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
<a href="Book/Scarlet">Scarlet Letter</a><br/>
<div ng-view></div>
<hr />
<pre>$location.path() = {{$location.path()}}</pre>
<pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
<pre>$route.current.params = {{$route.current.params}}</pre>
<pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
<pre>$routeParams = {{$routeParams}}</pre>
</div>
</file>
<file name="book.html">
controller: {{name}}<br />
Book Id: {{params.bookId}}<br />
</file>
<file name="chapter.html">
controller: {{name}}<br />
Book Id: {{params.bookId}}<br />
Chapter Id: {{params.chapterId}}
</file>
<file name="script.js">
angular.module('ngView', [], function($routeProvider, $locationProvider) {
$routeProvider.when('/Book/:bookId', {
templateUrl: 'book.html',
controller: BookCntl
});
$routeProvider.when('/Book/:bookId/ch/:chapterId', {
templateUrl: 'chapter.html',
controller: ChapterCntl
});
// configure html5 to get links working on jsfiddle
$locationProvider.html5Mode(true);
});
function MainCntl($scope, $route, $routeParams, $location) {
$scope.$route = $route;
$scope.$location = $location;
$scope.$routeParams = $routeParams;
}
function BookCntl($scope, $routeParams) {
$scope.name = "BookCntl";
$scope.params = $routeParams;
}
function ChapterCntl($scope, $routeParams) {
$scope.name = "ChapterCntl";
$scope.params = $routeParams;
}
</file>
<file name="scenario.js">
it('should load and compile correct template', function() {
element('a:contains("Moby: Ch1")').click();
var content = element('.doc-example-live [ng-view]').text();
expect(content).toMatch(/controller\: ChapterCntl/);
expect(content).toMatch(/Book Id\: Moby/);
expect(content).toMatch(/Chapter Id\: 1/);
element('a:contains("Scarlet")').click();
content = element('.doc-example-live [ng-view]').text();
expect(content).toMatch(/controller\: BookCntl/);
expect(content).toMatch(/Book Id\: Scarlet/);
});
</file>
</example>
*/
/**
* @ngdoc event
* @name ng.directive:ngView#$viewContentLoaded
* @eventOf ng.directive:ngView
* @eventType emit on the current ngView scope
* @description
* Emitted every time the ngView content is reloaded.
*/
var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$compile',
'$controller',
function($http, $templateCache, $route, $anchorScroll, $compile,
$controller) {
return {
restrict: 'ECA',
terminal: true,
link: function(scope, element, attr) {
var lastScope,
onloadExp = attr.onload || '';
scope.$on('$routeChangeSuccess', update);
update();
function destroyLastScope() {
if (lastScope) {
lastScope.$destroy();
lastScope = null;
}
}
function clearContent() {
element.html('');
destroyLastScope();
}
function update() {
var locals = $route.current && $route.current.locals,
template = locals && locals.$template;
if (template) {
element.html(template);
destroyLastScope();
var link = $compile(element.contents()),
current = $route.current,
controller;
lastScope = current.scope = scope.$new();
if (current.controller) {
locals.$scope = lastScope;
controller = $controller(current.controller, locals);
element.children().data('$ngControllerController', controller);
}
link(lastScope);
lastScope.$emit('$viewContentLoaded');
lastScope.$eval(onloadExp);
// $anchorScroll might listen on event...
$anchorScroll();
} else {
clearContent();
}
}
}
};
}];
/**
* @ngdoc directive
* @name ng.directive:script
*
* @description
* Load content of a script tag, with type `text/ng-template`, into `$templateCache`, so that the
* template can be used by `ngInclude`, `ngView` or directive templates.
*
* @restrict E
* @param {'text/ng-template'} type must be set to `'text/ng-template'`
*
* @example
<doc:example>
<doc:source>
<script type="text/ng-template" id="/tpl.html">
Content of the template.
</script>
<a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
<div id="tpl-content" ng-include src="currentTpl"></div>
</doc:source>
<doc:scenario>
it('should load template defined inside script tag', function() {
element('#tpl-link').click();
expect(element('#tpl-content').text()).toMatch(/Content of the template/);
});
</doc:scenario>
</doc:example>
*/
var scriptDirective = ['$templateCache', function($templateCache) {
return {
restrict: 'E',
terminal: true,
compile: function(element, attr) {
if (attr.type == 'text/ng-template') {
var templateUrl = attr.id,
// IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent
text = element[0].text;
$templateCache.put(templateUrl, text);
}
}
};
}];
/**
* @ngdoc directive
* @name ng.directive:select
* @restrict E
*
* @description
* HTML `SELECT` element with angular data-binding.
*
* # `ngOptions`
*
* Optionally `ngOptions` attribute can be used to dynamically generate a list of `<option>`
* elements for a `<select>` element using an array or an object obtained by evaluating the
* `ngOptions` expression.
*
* When an item in the `<select>` menu is selected, the value of array element or object property
* represented by the selected option will be bound to the model identified by the `ngModel`
* directive of the parent select element.
*
* Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
* be nested into the `<select>` element. This element will then represent `null` or "not selected"
* option. See example below for demonstration.
*
* Note: `ngOptions` provides iterator facility for `<option>` element which should be used instead
* of {@link ng.directive:ngRepeat ngRepeat} when you want the
* `select` model to be bound to a non-string value. This is because an option element can currently
* be bound to string values only.
*
* @param {string} ngModel Assignable angular expression to data-bind to.
* @param {string=} name Property name of the form under which the control is published.
* @param {string=} required The control is considered valid only if value is entered.
* @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
* the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
* `required` when you want to data-bind to the `required` attribute.
* @param {comprehension_expression=} ngOptions in one of the following forms:
*
* * for array data sources:
* * `label` **`for`** `value` **`in`** `array`
* * `select` **`as`** `label` **`for`** `value` **`in`** `array`
* * `label` **`group by`** `group` **`for`** `value` **`in`** `array`
* * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array`
* * for object data sources:
* * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
* * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
* * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`
* * `select` **`as`** `label` **`group by`** `group`
* **`for` `(`**`key`**`,`** `value`**`) in`** `object`
*
* Where:
*
* * `array` / `object`: an expression which evaluates to an array / object to iterate over.
* * `value`: local variable which will refer to each item in the `array` or each property value
* of `object` during iteration.
* * `key`: local variable which will refer to a property name in `object` during iteration.
* * `label`: The result of this expression will be the label for `<option>` element. The
* `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).
* * `select`: The result of this expression will be bound to the model of the parent `<select>`
* element. If not specified, `select` expression will default to `value`.
* * `group`: The result of this expression will be used to group options using the `<optgroup>`
* DOM element.
*
* @example
<doc:example>
<doc:source>
<script>
function MyCntrl($scope) {
$scope.colors = [
{name:'black', shade:'dark'},
{name:'white', shade:'light'},
{name:'red', shade:'dark'},
{name:'blue', shade:'dark'},
{name:'yellow', shade:'light'}
];
$scope.color = $scope.colors[2]; // red
}
</script>
<div ng-controller="MyCntrl">
<ul>
<li ng-repeat="color in colors">
Name: <input ng-model="color.name">
[<a href ng-click="colors.splice($index, 1)">X</a>]
</li>
<li>
[<a href ng-click="colors.push({})">add</a>]
</li>
</ul>
<hr/>
Color (null not allowed):
<select ng-model="color" ng-options="c.name for c in colors"></select><br>
Color (null allowed):
<span class="nullable">
<select ng-model="color" ng-options="c.name for c in colors">
<option value="">-- chose color --</option>
</select>
</span><br/>
Color grouped by shade:
<select ng-model="color" ng-options="c.name group by c.shade for c in colors">
</select><br/>
Select <a href ng-click="color={name:'not in list'}">bogus</a>.<br>
<hr/>
Currently selected: {{ {selected_color:color} }}
<div style="border:solid 1px black; height:20px"
ng-style="{'background-color':color.name}">
</div>
</div>
</doc:source>
<doc:scenario>
it('should check ng-options', function() {
expect(binding('{selected_color:color}')).toMatch('red');
select('color').option('0');
expect(binding('{selected_color:color}')).toMatch('black');
using('.nullable').select('color').option('');
expect(binding('{selected_color:color}')).toMatch('null');
});
</doc:scenario>
</doc:example>
*/
var ngOptionsDirective = valueFn({ terminal: true });
var selectDirective = ['$compile', '$parse', function($compile, $parse) {
//0000111110000000000022220000000000000000000000333300000000000000444444444444444440000000005555555555555555500000006666666666666666600000000000000077770
var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,
nullModelCtrl = {$setViewValue: noop};
return {
restrict: 'E',
require: ['select', '?ngModel'],
controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
var self = this,
optionsMap = {},
ngModelCtrl = nullModelCtrl,
nullOption,
unknownOption;
self.databound = $attrs.ngModel;
self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {
ngModelCtrl = ngModelCtrl_;
nullOption = nullOption_;
unknownOption = unknownOption_;
}
self.addOption = function(value) {
optionsMap[value] = true;
if (ngModelCtrl.$viewValue == value) {
$element.val(value);
if (unknownOption.parent()) unknownOption.remove();
}
};
self.removeOption = function(value) {
if (this.hasOption(value)) {
delete optionsMap[value];
if (ngModelCtrl.$viewValue == value) {
this.renderUnknownOption(value);
}
}
};
self.renderUnknownOption = function(val) {
var unknownVal = '? ' + hashKey(val) + ' ?';
unknownOption.val(unknownVal);
$element.prepend(unknownOption);
$element.val(unknownVal);
unknownOption.prop('selected', true); // needed for IE
}
self.hasOption = function(value) {
return optionsMap.hasOwnProperty(value);
}
$scope.$on('$destroy', function() {
// disable unknown option so that we don't do work when the whole select is being destroyed
self.renderUnknownOption = noop;
});
}],
link: function(scope, element, attr, ctrls) {
// if ngModel is not defined, we don't need to do anything
if (!ctrls[1]) return;
var selectCtrl = ctrls[0],
ngModelCtrl = ctrls[1],
multiple = attr.multiple,
optionsExp = attr.ngOptions,
nullOption = false, // if false, user will not be able to select it (used by ngOptions)
emptyOption,
// we can't just jqLite('<option>') since jqLite is not smart enough
// to create it in <select> and IE barfs otherwise.
optionTemplate = jqLite(document.createElement('option')),
optGroupTemplate =jqLite(document.createElement('optgroup')),
unknownOption = optionTemplate.clone();
// find "null" option
for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {
if (children[i].value == '') {
emptyOption = nullOption = children.eq(i);
break;
}
}
selectCtrl.init(ngModelCtrl, nullOption, unknownOption);
// required validator
if (multiple && (attr.required || attr.ngRequired)) {
var requiredValidator = function(value) {
ngModelCtrl.$setValidity('required', !attr.required || (value && value.length));
return value;
};
ngModelCtrl.$parsers.push(requiredValidator);
ngModelCtrl.$formatters.unshift(requiredValidator);
attr.$observe('required', function() {
requiredValidator(ngModelCtrl.$viewValue);
});
}
if (optionsExp) Options(scope, element, ngModelCtrl);
else if (multiple) Multiple(scope, element, ngModelCtrl);
else Single(scope, element, ngModelCtrl, selectCtrl);
////////////////////////////
function Single(scope, selectElement, ngModelCtrl, selectCtrl) {
ngModelCtrl.$render = function() {
var viewValue = ngModelCtrl.$viewValue;
if (selectCtrl.hasOption(viewValue)) {
if (unknownOption.parent()) unknownOption.remove();
selectElement.val(viewValue);
if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy
} else {
if (isUndefined(viewValue) && emptyOption) {
selectElement.val('');
} else {
selectCtrl.renderUnknownOption(viewValue);
}
}
};
selectElement.bind('change', function() {
scope.$apply(function() {
if (unknownOption.parent()) unknownOption.remove();
ngModelCtrl.$setViewValue(selectElement.val());
});
});
}
function Multiple(scope, selectElement, ctrl) {
var lastView;
ctrl.$render = function() {
var items = new HashMap(ctrl.$viewValue);
forEach(selectElement.find('option'), function(option) {
option.selected = isDefined(items.get(option.value));
});
};
// we have to do it on each watch since ngModel watches reference, but
// we need to work of an array, so we need to see if anything was inserted/removed
scope.$watch(function selectMultipleWatch() {
if (!equals(lastView, ctrl.$viewValue)) {
lastView = copy(ctrl.$viewValue);
ctrl.$render();
}
});
selectElement.bind('change', function() {
scope.$apply(function() {
var array = [];
forEach(selectElement.find('option'), function(option) {
if (option.selected) {
array.push(option.value);
}
});
ctrl.$setViewValue(array);
});
});
}
function Options(scope, selectElement, ctrl) {
var match;
if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {
throw Error(
"Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +
" but got '" + optionsExp + "'.");
}
var displayFn = $parse(match[2] || match[1]),
valueName = match[4] || match[6],
keyName = match[5],
groupByFn = $parse(match[3] || ''),
valueFn = $parse(match[2] ? match[1] : valueName),
valuesFn = $parse(match[7]),
// This is an array of array of existing option groups in DOM. We try to reuse these if possible
// optionGroupsCache[0] is the options with no option group
// optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element
optionGroupsCache = [[{element: selectElement, label:''}]];
if (nullOption) {
// compile the element since there might be bindings in it
$compile(nullOption)(scope);
// remove the class, which is added automatically because we recompile the element and it
// becomes the compilation root
nullOption.removeClass('ng-scope');
// we need to remove it before calling selectElement.html('') because otherwise IE will
// remove the label from the element. wtf?
nullOption.remove();
}
// clear contents, we'll add what's needed based on the model
selectElement.html('');
selectElement.bind('change', function() {
scope.$apply(function() {
var optionGroup,
collection = valuesFn(scope) || [],
locals = {},
key, value, optionElement, index, groupIndex, length, groupLength;
if (multiple) {
value = [];
for (groupIndex = 0, groupLength = optionGroupsCache.length;
groupIndex < groupLength;
groupIndex++) {
// list of options for that group. (first item has the parent)
optionGroup = optionGroupsCache[groupIndex];
for(index = 1, length = optionGroup.length; index < length; index++) {
if ((optionElement = optionGroup[index].element)[0].selected) {
key = optionElement.val();
if (keyName) locals[keyName] = key;
locals[valueName] = collection[key];
value.push(valueFn(scope, locals));
}
}
}
} else {
key = selectElement.val();
if (key == '?') {
value = undefined;
} else if (key == ''){
value = null;
} else {
locals[valueName] = collection[key];
if (keyName) locals[keyName] = key;
value = valueFn(scope, locals);
}
}
ctrl.$setViewValue(value);
});
});
ctrl.$render = render;
// TODO(vojta): can't we optimize this ?
scope.$watch(render);
function render() {
var optionGroups = {'':[]}, // Temporary location for the option groups before we render them
optionGroupNames = [''],
optionGroupName,
optionGroup,
option,
existingParent, existingOptions, existingOption,
modelValue = ctrl.$modelValue,
values = valuesFn(scope) || [],
keys = keyName ? sortedKeys(values) : values,
groupLength, length,
groupIndex, index,
locals = {},
selected,
selectedSet = false, // nothing is selected yet
lastElement,
element,
label;
if (multiple) {
selectedSet = new HashMap(modelValue);
}
// We now build up the list of options we need (we merge later)
for (index = 0; length = keys.length, index < length; index++) {
locals[valueName] = values[keyName ? locals[keyName]=keys[index]:index];
optionGroupName = groupByFn(scope, locals) || '';
if (!(optionGroup = optionGroups[optionGroupName])) {
optionGroup = optionGroups[optionGroupName] = [];
optionGroupNames.push(optionGroupName);
}
if (multiple) {
selected = selectedSet.remove(valueFn(scope, locals)) != undefined;
} else {
selected = modelValue === valueFn(scope, locals);
selectedSet = selectedSet || selected; // see if at least one item is selected
}
label = displayFn(scope, locals); // what will be seen by the user
label = label === undefined ? '' : label; // doing displayFn(scope, locals) || '' overwrites zero values
optionGroup.push({
id: keyName ? keys[index] : index, // either the index into array or key from object
label: label,
selected: selected // determine if we should be selected
});
}
if (!multiple) {
if (nullOption || modelValue === null) {
// insert null option if we have a placeholder, or the model is null
optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});
} else if (!selectedSet) {
// option could not be found, we have to insert the undefined item
optionGroups[''].unshift({id:'?', label:'', selected:true});
}
}
// Now we need to update the list of DOM nodes to match the optionGroups we computed above
for (groupIndex = 0, groupLength = optionGroupNames.length;
groupIndex < groupLength;
groupIndex++) {
// current option group name or '' if no group
optionGroupName = optionGroupNames[groupIndex];
// list of options for that group. (first item has the parent)
optionGroup = optionGroups[optionGroupName];
if (optionGroupsCache.length <= groupIndex) {
// we need to grow the optionGroups
existingParent = {
element: optGroupTemplate.clone().attr('label', optionGroupName),
label: optionGroup.label
};
existingOptions = [existingParent];
optionGroupsCache.push(existingOptions);
selectElement.append(existingParent.element);
} else {
existingOptions = optionGroupsCache[groupIndex];
existingParent = existingOptions[0]; // either SELECT (no group) or OPTGROUP element
// update the OPTGROUP label if not the same.
if (existingParent.label != optionGroupName) {
existingParent.element.attr('label', existingParent.label = optionGroupName);
}
}
lastElement = null; // start at the beginning
for(index = 0, length = optionGroup.length; index < length; index++) {
option = optionGroup[index];
if ((existingOption = existingOptions[index+1])) {
// reuse elements
lastElement = existingOption.element;
if (existingOption.label !== option.label) {
lastElement.text(existingOption.label = option.label);
}
if (existingOption.id !== option.id) {
lastElement.val(existingOption.id = option.id);
}
// lastElement.prop('selected') provided by jQuery has side-effects
if (lastElement[0].selected !== option.selected) {
lastElement.prop('selected', (existingOption.selected = option.selected));
}
} else {
// grow elements
// if it's a null option
if (option.id === '' && nullOption) {
// put back the pre-compiled element
element = nullOption;
} else {
// jQuery(v1.4.2) Bug: We should be able to chain the method calls, but
// in this version of jQuery on some browser the .text() returns a string
// rather then the element.
(element = optionTemplate.clone())
.val(option.id)
.attr('selected', option.selected)
.text(option.label);
}
existingOptions.push(existingOption = {
element: element,
label: option.label,
id: option.id,
selected: option.selected
});
if (lastElement) {
lastElement.after(element);
} else {
existingParent.element.append(element);
}
lastElement = element;
}
}
// remove any excessive OPTIONs in a group
index++; // increment since the existingOptions[0] is parent element not OPTION
while(existingOptions.length > index) {
existingOptions.pop().element.remove();
}
}
// remove any excessive OPTGROUPs from select
while(optionGroupsCache.length > groupIndex) {
optionGroupsCache.pop()[0].element.remove();
}
}
}
}
}
}];
var optionDirective = ['$interpolate', function($interpolate) {
var nullSelectCtrl = {
addOption: noop,
removeOption: noop
};
return {
restrict: 'E',
priority: 100,
compile: function(element, attr) {
if (isUndefined(attr.value)) {
var interpolateFn = $interpolate(element.text(), true);
if (!interpolateFn) {
attr.$set('value', element.text());
}
}
return function (scope, element, attr) {
var selectCtrlName = '$selectController',
parent = element.parent(),
selectCtrl = parent.data(selectCtrlName) ||
parent.parent().data(selectCtrlName); // in case we are in optgroup
if (selectCtrl && selectCtrl.databound) {
// For some reason Opera defaults to true and if not overridden this messes up the repeater.
// We don't want the view to drive the initialization of the model anyway.
element.prop('selected', false);
} else {
selectCtrl = nullSelectCtrl;
}
if (interpolateFn) {
scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {
attr.$set('value', newVal);
if (newVal !== oldVal) selectCtrl.removeOption(oldVal);
selectCtrl.addOption(newVal);
});
} else {
selectCtrl.addOption(attr.value);
}
element.bind('$destroy', function() {
selectCtrl.removeOption(attr.value);
});
};
}
}
}];
var styleDirective = valueFn({
restrict: 'E',
terminal: true
});
//try to bind to jquery now so that one can write angular.element().read()
//but we will rebind on bootstrap again.
bindJQuery();
publishExternalAPI(angular);
jqLite(document).ready(function() {
angularInit(document, bootstrap);
});
})(window, document);
angular.element(document).find('head').append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none !important;}ng\\:form{display:block;}</style>');
<!DOCTYPE html>
<html ng-app="app">
<head>
<title ng-cloak>Backup Info For {{space.name}}</title>
<link rel="stylesheet" href="/bags/common/tiddlers/normalize.css">
<link rel="stylesheet" href="/backups.css">
</head>
<body ng-controller="BackupsCtrl">
<header>
<div>
<h1 ng-cloak>Backup Info For {{space.name}}</h1>
</div>
</header>
<article>
<div class="intro">
<p>This is a single page application that presents information about
backing up the content of a space, public and private. It also provides
links for doing a quick backup of <em>only</em> the latest revisions of
all your tiddlers. If you need something more complex, hopefully some of
the information provided here can guide you.</p>
</div>
<div class="warning" ng-show="space.isSelf">
<p>Note: In order for the backup links to display, you must include the
<strong>backups</strong> space in your space, via the <em>space control
panel</em> found by visiting the blue and pink dot in the upper right
when viewing your space. Once you do that, visit <code>/backups</code>.</p>
</div>
<div class="meat">
<p ng-show="space.notSelf"><a href="#downloads">Go straight to the links.</a></p>
<h1>About Backups</h1>
<p>When making a backup of your space there are several options, some
requiring more effort than others:</p>
<ul>
<li>You can get just the content in this space, or also content
included from other spaces.</li>
<li>You can choose to get the content as a collection of <a
href="http://json.org/">JSON</a> or as a <a
href="http://tiddlywiki.com/">TiddlyWiki Classic</a> file.</li>
<li>You can choose to get just the latest revision of each tiddler or
all the revisions of all tiddlers.</li>
</ul>
<p>Getting all the tiddlers in a space means getting the tiddlers
generated by the <a href="http://tiddlyweb.tiddlyspace.com/recipe">
recipes</a> whereas to get just the content created in this space
means getting the tiddlers generated by the <a
href="http://tiddlyweb.tiddlyspace.com/bag">bags</a>. The links below
use the bags method.</p>
<p>Which type of output you choose for the content depends on what you
intend to do with the content. If you want to use it somewhere that
uses TiddlyWiki but does <em>not</em> use TiddlyWeb then TiddlyWiki is
the right choice. If you want to use it somewhere uses neither TiddlyWeb
nor TiddlyWiki then JSON is the right choice. If you are making a
simple backup for safekeeping or to move to another TiddlySpace-based
server then either JSON or TiddlyWiki are suitable choices. TiddlyWiki
files can be imported directly, JSON files will require some code to
parse the data and <code>PUT</code> it to the server.</p>
<p>If you want to get all revisions of tiddlers, the links below will
not work, instead you will need to write code that traverses the <a
href="http://tiddlyweb.tiddlyspace.com/%2Fbags%2F%7Bbag_name%7D%2Ftiddlers">list of tiddlers</a>
and then gets all the <a href="http://tiddlyweb.tiddlyspace.com/%2Fbags%2F%7Bbag_name%7D%2Ftiddlers%2F%7Btiddler_title%7D%2Frevisions">revisions</a>
for each tiddler.</p>
<p>Ideally this page would provide links to importing data. Unfortunately
time does not currently allow this.</p>
</div>
<div id="downloads" ng-cloak ng-show="space.notSelf" class="actions">
<h1>Download</h1>
<p>Right click the following links to save all the tiddlers from your
{{ space.name }} to different files, one for public and one for private.
Keep in mind that this is <em>only</em> the latest revisions of the tiddlers
in the space. If you have a large number of tiddlers these will be
a very large files.</p>
<p>In some modern browsers with support for the <code>download</code>
attribute a standard click will work.</p>
<div ng-show="space.isMember" class="downlinks">
<p><a class="downlink public" download="{{space.publicFileName}}.json" href="/bags/{{ space.publicBag }}/tiddlers.json?fat=1">Public Tiddlers as JSON</a>
<a class="downlink private" download={{space.privateFileName}}.json" href="/bags/{{ space.privateBag }}/tiddlers.json?fat=1">Private Tiddlers as JSON</a></p>
<p><a class="downlink public" download="{{space.publicFileName}}.wiki" href="/bags/{{ space.publicBag }}/tiddlers.wiki?fat=1">Public Tiddlers as Wiki</a>
<a class="downlink private" download={{space.privateFileName}}.wiki" href="/bags/{{ space.privateBag }}/tiddlers.wiki?fat=1">Private Tiddlers as Wiki</a></p>
</div>
<p>No links? Are you sure you are logged in or a member of this space?</p>
</div>
<div ng-cloak ng-show="space.isSelf" class="actions">
Include this space (<strong>backups</strong>) in your space to display
backup links here.
</div>
</article>
<footer>
<p>Another fine <a href="//tiddlyspace.com">TiddlySpace</a> <a href="//tsapp.tiddlyspace.com">tsapp</a> from <a href="//cdent.tiddlyspace.com/">cdent</a>.</p>
</footer>
<script src="/status.js"></script>
<script src="/bags/backups_public/tiddlers/angular.js"></script>
<script src="/bags/backups_public/tiddlers/backups.js"></script>
<script src="/bags/common/tiddlers/backstage.js"></script>
</body>
</html>
html {
margin: 0;
padding: 0;
}
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
#app-picker {
top: 6px !important;
right: 24px !important;
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #35313b;
margin: 0;
padding: 0;
}
header {
background: #2c2c2c;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
border-color: #252525;
min-height: 40px;
color: #999;
}
header h1 {
text-transform: uppercase;
font-size: 1.25em;
font-weight: 200;
line-height: 2em;
padding-left: 12px;
margin: 0;
}
a {
color: #0082af;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
article {
width: 50%;
margin: 0 auto 0 auto;
}
.downlinks p {
padding-bottom: 1em;
}
.downlink {
border: thin solid black;
border-radius: .5em;
padding: .5em 2em .5em 2em;
color: black;
}
.public {
background-color: #c1e6fd;
}
.private {
background-color: #f4c4e2;
}
footer {
position: absolute;
right: 20px;
font-size: small;
}
@media all and (max-width: 700px) {
article {
width: 90%;
}
}
var app = angular.module('app', []);
app.controller('BackupsCtrl', ['$scope', function($scope) {
var space = {},
name = tiddlyweb.status.space.name,
timeStamp = +new Date / 1e3 | 0,
isMember = tiddlyweb.status.space.recipe.match(/_private$/);
space.name = name;
space.publicBag = space.name + '_public';
space.privateBag = space.name + '_private';
space.publicFileName = space.publicBag + '-' + timeStamp;
space.privateFileName = space.privateBag + '-' + timeStamp;
space.isSelf = (space.name === 'backups');
space.notSelf = !space.isSelf;
space.isMember = isMember;
$scope.$parent.space = space;
}]);
@@Please do not modify this tiddler; it was created automatically upon space creation.@@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>edit</title>
<link rel="stylesheet"
type="text/css"
href="/bags/common/tiddlers/reset.css">
<link rel="stylesheet"
type="text/css"
href="/edit.css">
</head>
<body>
<div id="container">
<div class="cleancol" id="recents">
<h1>Changes</h1>
<ul>
</ul>
</div>
<div class="cleancol" id="info">
<ul id="actions">
<li><button id="saver">Save & Return</button></li>
<li><button id="save">Save</button></li>
<li><button id="revert">Revert</button></li>
<li><button id="delete">Delete</button></li>
</ul>
<div id="type">
<ul>
<li><label><input name="type" type="radio"
value="text/x-tiddlywiki">TiddlyWikiText</label></li>
<li><label><input name="type" type="radio"
value="text/x-markdown">Markdown</label></li>
<li><label><input name="type" type="radio"
value="text/css">CSS</label></li>
<li><label><input name="type" type="radio"
value="text/javascript">JavaScript</label></li>
<li><label><input name="type" type="radio"
value="text/html">HTML</label></li>
<li><label><input name="type" type="radio"
value="text/plain">Plain Text</label></li>
<li><label><input name="type" type="radio"
value="other">Other</label></li>
</ul>
</div>
<div id="message"></div>
<div id="tags">
</div>
</div>
<div class="cleancol" id="editor">
<h1></h1>
<textarea class="inputs" name="text"></textarea><br/>
<input class="inputs" name="tags" value="">
</div>
</div>
<script src="/bags/common/tiddlers/jquery.js"></script>
<script src="/bags/edit_public/tiddlers/edit.js"></script>
<script src="/status.js"></script>
<script src="/bags/common/tiddlers/backstage.js"></script>
</body>
</html>
html, body {
height: 100%;
max-height: 100%;
background: #F0F4F8;
font-family: "Helvetica Neue",helvetica,arial,sans-serif;
line-height: 1.4;
overflow: auto;
}
button {
cursor: pointer;
}
.privacyicon {
float: right;
}
#delete {
margin-top: 1em;
}
.cleancol > h1 {
font-size: 150%;
text-align: center;
}
#message {
padding: 1em;
display: none;
}
#container {
height: 90%;
margin: 1em auto 0 auto;
width: 100%;
}
.inputs {
white-space: pre-wrap;
font: 90% "Andale Mono", "Lucida Console", "Bitstream Vera Sans Mono", "Courier New", monospace;
border: none;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.5);
}
#editor textarea {
height: 85%;
width: 96%;
padding: 2%;
border-radius: .5em .5em 0 0;
border-top: thin solid lightgrey;
border-left: thin solid lightgrey;
}
#editor input {
width: 100%;
border-radius: 0 0 .5em .5em;
}
.cleancol {
height: 90%;
background: #DCE7F1;
padding: 1em;
border-radius: .5em;
border-top: thin solid #ACA7FF;
border-left: thin solid #ACA7FF;
box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.5);
overflow-x: hide;
}
#recents {
float: right;
width: 20%;
overflow: hide;
margin-right: 1em;
}
#recents span {
cursor: pointer;
padding-right: 1em;
}
#editor {
margin-left: auto;
margin-right: auto;
width: 45%;
}
#info {
position: relative;
float: left;
width: 20%;
margin-left: 1em;
}
#info button {
width: 100%;
}
#tags {
position: absolute;
bottom: 0;
max-height: 15em;
overflow: hide;
width: 90%;
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
column-gap: 1em;
-moz-column-gap: 1em;
-webkit-column-gap: 1em;
}
.taglink {
cursor: pointer;
display: block;
}
a {
color: #BC4378;
text-decoration: none;
}
@media all and (max-width: 50em) {
#recents {
display: none;
}
#editor {
width: 65%;
margin-right: 1em;
}
}
$(function() {
"use strict";
var recentTags,
Set,
localStorage = window.localStorage,
currentFields = {},
currentTimeout = 0,
startHash,
space = tiddlyweb.status.space.name,
freshTiddler = false,
defaultBag = space + '_public',
currentBag = defaultBag,
defaultType = 'text/x-tiddlywiki',
host = '/',
publicIcon = 'bags/tiddlyspace/tiddlers/publicIcon',
privateIcon = 'bags/tiddlyspace/tiddlers/privateIcon',
extracludeRE = /^.extraclude (.+?)\s*$([\s\S]*?)^.extraclude$/mg,
extracludeReplace = {
'text/x-markdown': '{{$1}}'
};
// because we can't use a variable just above...
extracludeReplace[defaultType] = '<<tiddler [[$1]]>>';
Set = function() {};
Set.prototype.add = function(o) { this[o] = true; };
Set.prototype.remove = function(o) { delete this[o]; };
recentTags = new Set();
startHash = adler32('');
$(window).bind('beforeunload', function(e) {
var currentHash = adler32($('input[name=tags]').val()
+ $('textarea[name=text]').val());
e.stopPropagation();
if (currentHash !== startHash) {
e.returnValue = 'You have unsaved changes.';
return e.returnValue;
}
});
$(window).bind('hashchange', checkHash);
$('#revert').bind('click', function() {
$('button, input, .inputs').attr('disabled', 'disabled');
var title = $('#editor > h1').text(),
uri = tiddlerURI(host, currentBag, title);
flushStorage(uri);
startEdit($('#editor > h1').text());
});
$('#save').bind('click', function() {
$('button, input, .inputs').attr('disabled', 'disabled');
saveEdit(function() {
var title = $('#editor > h1').text(),
uri = tiddlerURI(host, currentBag, title);
flushStorage(uri);
changes();
});
});
$('#saver').bind('click', function() {
$('button, input, .inputs').attr('disabled', 'disabled');
saveEdit(function() {
var title = encodeURIComponent($('#editor > h1').text()),
uri = tiddlerURI(host, currentBag, title);
flushStorage(uri);
startHash = adler32($('input[name=tags]').val()
+ $('textarea[name=text]').val());
window.location.href = '/' + title;
});
});
$('#delete').bind('click', function() {
var title = encodeURIComponent($('#editor > h1').text());
$('button, input, .inputs').attr('disabled', 'disabled');
if (currentBag) {
if (confirm('Are you sure you want to delete ' + title + '?')) {
$('input[name=tags]').val('');
$('textarea[name=text]').val('');
$('#editor > h1').text('');
startHash = adler32('');
deleteTiddler(title);
}
} else {
displayMessage('Tiddler never saved to server.');
}
});
/*
* Establish a timeout for auto-saving.
*/
function establishInterval() {
var timeoutId = 0,
currentHash;
if (localStorage) {
timeoutId = setInterval(function () {
var title = $('#editor > h1').text(),
text = $('textarea[name=text]').val(),
tags = readTagView(),
tiddler = {
title: title,
text: text,
tags: tags,
fields: currentFields,
bag: currentBag,
contentType: $('[name=type]:checked').val()
},
uri = tiddlerURI(host, currentBag, title);
currentHash = adler32($('input[name=tags]').val()
+ $('textarea[name=text]').val());
if (currentHash !== startHash) {
localStorage.setItem(uri, JSON.stringify(tiddler));
}
}, 10000);
}
return timeoutId;
}
/*
* Flush the current data out of localStorage.
*/
function flushStorage(uri) {
if (localStorage) {
if (currentTimeout) {
window.clearInterval(currentTimeout);
}
localStorage.removeItem(uri);
}
}
/*
* Fade in an announcement text message.
*/
function displayMessage(message, extra) {
var content = $('<p>').text(message);
$('#message').empty();
$('#message').append(content);
if (extra) {
$('#message').append(extra);
}
$('#message').fadeIn();
}
/*
* Display an icon indicating privacy status of tiddler.
*/
function setIcon(privatep) {
$('.privacyicon').remove();
var img = $('<img>').attr({
src: host + (privatep ? privateIcon : publicIcon),
'class': 'privacyicon'
});
if (freshTiddler) {
img.css('cursor', 'pointer')
.click(function() {
var target = privatep ? 'public' : 'private';
if (confirm('Switch to '
+ (privatep ? 'public' : 'private') + '?')) {
currentBag = space + '_' + target;
setIcon(!privatep);
}
});
}
$('#type').prepend(img);
}
/*
* Given host, bag and title make a good URI
* for a tiddler.
*/
function tiddlerURI(host, bag, title) {
return host + 'bags/'
+ encodeURIComponent(bag ? bag : defaultBag)
+ '/tiddlers/'
+ encodeURIComponent(title);
}
/*
* Send a DELETE for the tiddler named by title.
*/
function deleteTiddler(title) {
if (title && currentBag) {
$(window).unbind('hashchange');
window.location.hash = '';
$(window).bind('hashchange', checkHash);
var uri = tiddlerURI(host, currentBag, title);
$.ajax({
url: uri,
type: 'DELETE',
success: changes
});
} else {
displayMessage('Nothing to delete.');
}
}
/*
* Inform a non-member that they may not edit.
*/
function guestPage() {
$('button, input, .inputs').attr('disabled', 'disabled');
$('#message').text('You are not a member of this space, so cannot edit. ');
var link = $('<a>')
.attr('href', host)
.text('Visit the space.');
$('#message').append(link).fadeIn();
}
/*
* Save the text and tags to the title in currentBag.
*/
function saveEdit(callback) {
callback = callback || changes;
var title = $('#editor > h1').text();
if (title) {
_processText(title, $('textarea[name=text]').val(), callback);
} else {
displayMessage('There is nothing to save');
}
}
/*
* Search for '.extraclude' in page and do an
* extraclusion if found. Multiples possible.
*/
function _processText(title, text, callback) {
var newTiddlers = {},
match,
subtitle,
subtext,
tiddler;
while (match = extracludeRE.exec(text)) {
subtitle = match[1];
subtext = match[2].replace(/^\s*/, '').replace(/\s*$/, '');
tiddler = {
text: subtext,
type: currentFields.type
};
newTiddlers[subtitle] = tiddler;
}
var countTiddlers = Object.keys(newTiddlers).length,
countSuccess = 0,
postExtra = function() {
var replaceType = extracludeReplace[currentFields.type ?
currentFields.type : defaultType];
countSuccess += 1;
if (countSuccess >= countTiddlers) {
text = text.replace(extracludeRE, replaceType);
_saveEdit(title, text, callback);
}
},
postExtraFail = function(xhr, status, errorThrown) {
displayMessage('Extraclude failed' + status);
};
if (countTiddlers) {
for (subtitle in newTiddlers) {
if (newTiddlers.hasOwnProperty(subtitle)) {
_putTiddler(subtitle, newTiddlers[subtitle], postExtra,
postExtraFail);
}
}
} else {
_saveEdit(title, text, callback);
}
}
/*
* PUT a tiddler that was extracluded.
*/
function _putTiddler(title, tiddlerData, successCall, errorCall) {
var jsonText = JSON.stringify(tiddlerData);
$.ajax({
url: tiddlerURI(host, currentBag, title),
type: 'PUT',
data: jsonText,
contentType: 'application/json',
success: successCall,
error: errorCall
});
}
function _saveEdit(title, text, callback) {
var tags = readTagView(),
tiddler = {};
tiddler.text = text;
tiddler.tags = tags;
tiddler.type = currentFields.type;
delete currentFields.type;
tiddler.fields = currentFields;
// update content based on radio buttons
var matchedType = $('[name=type]:checked').val();
if (matchedType !== 'other') {
tiddler.type = matchedType;
}
var jsonText = JSON.stringify(tiddler);
$.ajax({
beforeSend: function(xhr) {
if (tiddler.fields['server.etag']) {
xhr.setRequestHeader('If-Match',
tiddler.fields['server.etag']);
}
},
url: tiddlerURI(host, currentBag, title),
type: "PUT",
contentType: 'application/json',
data: jsonText,
success: callback,
statusCode: {
412: function() {
displayMessage('Edit Conflict');
// re-enable text and tags to allow copy
$('.inputs').removeAttr('disabled');
},
409: function() {
displayMessage('Malformed Tiddler (long title?)');
// re-enable text and tags to allow copy
$('.inputs').removeAttr('disabled');
}
}
});
}
/*
* Read the current tags from the input into an array.
*/
function readTagView(tagString) {
var tags = [];
tagString = tagString || $('input[name=tags]').val();
var matches = tagString.match(/([^ \]\[]+)|(?:\[\[([^\]]+)\]\])/g) || [];
$.each(matches, function(index, value) {
tags.push(value.replace(/[\]\[]+/g, ''));
});
return tags;
}
/*
* Write updated tags into the tag view. If a non-false second
* argument is passed, it is assumed to be a tag that is being
* added or removed.
*/
function updateTagView(tags, changedTag) {
var outputTags = [],
changedIndex;
if (changedTag) {
changedIndex = tags.indexOf(changedTag);
if (changedIndex === -1) {
tags.push(changedTag);
} else {
tags.splice(changedIndex, 1);
}
}
$.each(tags, function(index, tag) {
if (tag.match(/ /)) {
outputTags.push('[[' + tag + ']]');
} else {
outputTags.push(tag);
}
});
$('#editor input').val(outputTags.join(' '));
}
/*
* Display the most recently used tags.
*/
function updateTags(tags) {
$('#tags').empty();
tags = Object.keys(tags);
tags = tags.sort();
$.each(tags, function(index, tag) {
var taglink = $('<a>')
.text(tag)
.addClass('taglink')
.bind('click', function() {
updateTagView(readTagView(), tag);
});
$('#tags').append(taglink);
});
}
function updateContentType(tiddlerType) {
$('[name=type]').prop('checked', false);
var matchedType = $('[name=type]')
.filter('[value="' + tiddlerType + '"]');
if (matchedType.length) {
matchedType.prop('checked', true);
} else if (tiddlerType) {
$('[name=type]')
.filter('[value=other]')
.prop('checked', true);
} else {
$('[name=type]')
.filter('[value="' + defaultType + '"]')
.prop('checked', true);
}
}
/*
* Ask if we'd like to clone.
*/
function cloneTiddler(tiddler) {
var button = $('<button>').attr('id', 'clone')
.text('Clone'),
li = $('<li>').attr('id', 'clone').append(button);
button.on('click', function() {
tiddler.bag = space + '_public';
delete tiddler.fields['server.etag'];
$('#message').fadeOut('slow');
establishEdit(tiddler);
$('button, input, .inputs').removeAttr('disabled');
});
$('#actions').append(li);
}
/*
* Callback after tiddler is GET from server, filling in forms,
* preparing for edit.
*/
function establishEdit(tiddler, status, xhr) {
currentBag = tiddler.bag;
$('#clone').remove();
$('textarea[name=text]').val(tiddler.text);
currentFields = tiddler.fields;
currentFields.type = tiddler.type;
// update the content type buttons
updateContentType(tiddler.type);
if (xhr) {
currentFields['server.etag'] = xhr.getResponseHeader('etag');
}
updateTagView(tiddler.tags, null);
if (tiddler.permissions && tiddler.permissions.indexOf('write') === -1) {
$('button, input, .inputs').attr('disabled', 'disabled');
displayMessage('Edit permission denied. '
+ 'Choose another tiddler or clone.');
return cloneTiddler(tiddler);
} else if (!currentBag.match(space + '_(?:private|public)')) {
$('button, input, .inputs').attr('disabled', 'disabled');
displayMessage('Tiddler must be cloned to edit.');
return cloneTiddler(tiddler);
}
startHash = adler32($('input[name=tags]').val()
+ $('textarea[name=text]').val());
currentTimeout = establishInterval();
if (currentBag.match(/_(private|public)$/)) {
setIcon(currentBag.match(/_private$/));
}
}
/*
* Check to see if there is backup data for the current tiddler
*/
function checkBackup(tiddlerTitle) {
if (localStorage) {
var uri = tiddlerURI(host, currentBag, tiddlerTitle),
data = localStorage.getItem(uri);
return data;
}
return null;
}
/*
* Get the named tiddler to do an edit.
*/
function startEdit(tiddlerTitle, freshTags, freshType) {
$('#message').fadeOut('slow');
$('button, input, .inputs').removeAttr('disabled');
$('#editor > h1').text(tiddlerTitle);
var tiddlerBackup = checkBackup(tiddlerTitle);
if (tiddlerBackup) {
/*
* We flushStorage whether they confirm or cancel:
* we already have the data.
*/
var uri = tiddlerURI(host, currentBag, tiddlerTitle);
flushStorage(uri);
if (confirm("There's a backup for this tiddler. Use it?")) {
var data = JSON.parse(tiddlerBackup);
data.type = data.contentType;
delete data.contentType;
return establishEdit(data);
}
}
$.ajax({
dataType: 'json',
headers: {'Cache-Control': 'max-age=0'},
url: host + encodeURIComponent(tiddlerTitle),
success: establishEdit,
statusCode: {
404: function() {
$('[name=type]')
.filter('[value="' + defaultType + '"]')
.prop('checked', true);
$('textarea[name=text]').val('');
freshTiddler = true;
setIcon(false);
currentTimeout = establishInterval();
updateContentType(freshType);
updateTagView(readTagView(freshTags), null);
currentFields = {};
}
}
});
}
function emptyEdit() {
$('button, input, .inputs').attr('disabled', 'disabled');
var titler = $('<input id="editnew">')
.attr('placeholder', 'Or enter a new title')
.bind('change', editNew);
displayMessage('Select a tiddler to edit from the right.', titler);
}
function editNew() {
var newTitle = $(this).val();
if (newTitle) {
startEdit(newTitle);
}
}
/*
* Check the href anchor to see if we've been told what to edit.
*/
function checkHash() {
var hash = window.location.hash,
title,
tagString,
type,
args;
if (hash) {
hash = hash.replace(/^#/, '');
args = hash.split('/');
if (args.length === 4) {
args[2] = args.slice(2).join('/');
args.pop();
}
$.each(args, function(index, arg) {
args[index] = decodeURIComponent(arg);
});
title = args[0] || emptyEdit();
tagString = args[1] || '';
type = args[2] || '';
startEdit(title, tagString, type);
} else {
emptyEdit();
}
}
/*
* Display the recent changes.
*/
function displayChanges(tiddlers) {
$.each(tiddlers, function(index, tiddler) {
if (!tiddler.type ||
tiddler.type.match(/^text/)) {
$.each(tiddler.tags, function(index, tag) {
recentTags.add(tag);
});
var penSpan = $('<span>').text('\u270E')
.bind('click', function() {
var title = $(this).parent().attr('data-tiddler-title');
$(window).unbind('hashchange');
window.location.hash = title;
$(window).bind('hashchange', checkHash);
startEdit(title);
}),
tiddlerLink = $('<a>').attr({
href: '/' + encodeURIComponent(tiddler.title),
target: '_blank'
}).text(tiddler.title),
list = $('<li>').attr('data-tiddler-title',
tiddler.title).append(tiddlerLink).prepend(penSpan);
$('#recents > ul').append(list);
}
});
updateTags(recentTags);
}
/*
* Get the 20 most recently changed tiddlers in the public and private
* bag of the space, callback to displayChanges.
*/
function changes() {
$('#recents > ul').empty();
$.ajax({
dataType: 'json',
headers: {'Cache-Control': 'max-age=0'},
url: host + 'search?q=bag:' + encodeURIComponent(space)
+ '_public%20OR%20bag:' + encodeURIComponent(space)
+ '_private',
success: displayChanges
});
checkHash();
}
/*
* Start up, establishing if the current user has the power to edit.
*/
function init() {
$.ajaxSetup({
beforeSend: function(xhr) {
xhr.setRequestHeader("X-ControlView", "false");
}
});
var recipe = tiddlyweb.status.space.recipe;
if (recipe.match(/_private$/)) {
changes();
} else {
guestPage();
}
}
function adler32(a){for(var b=65521,c=1,d=0,e=0,f;f=a.charCodeAt(e++);d=(d+c)%b)c=(c+f)%b;return(d<<16)|c}; // see https://gist.github.com/1200559/1c2b2093a661c4727958ff232cd12de8b8fb9db9
init();
});
@@Please do not modify this tiddler; it was created automatically upon space creation.@@
$(document).ready(function() {
// leave if there's no tiddler to work with
var wholething = $('#text-html.section');
if (wholething.length == 0) return;
var place = $("#container").length > 0 ? $("#container")[0] : document.body;
var space = window.location.host.split(".")[0]
var title = $("#title").text();
var bagInfo = $('.bag').first().text().split(/_/);
// don't show edit link if tiddler is not in this space
if (bagInfo[0] !== space) return;
function addLink() {
$("<a id='editLink' />").attr('href'
, '/edit#' + encodeURIComponent(title))
.text("edit tiddler").prependTo(place);
}
// add edit link if user is member
if (window.tiddlyweb && tiddlyweb.status) {
if (tiddlyweb.status.space.recipe.match(/_private$/)) {
addLink();
}
} else {
$.ajax({ url: "/spaces/" + space + "/members",
success: function(r) {
if(r) {
addLink();
}
}
});
}
});
If transclusion is the process of including content from somewhere else, by reference, then extraclusion is the process whereby content in a document is removed to another location and a reference to it is left in its place. With tiddlers, this is a good way of breaking a large tiddler down into several smaller tiddlers while maintaining the overview.
To engage extraclusion in @edit you use some special syntax that wraps around the content you wish to move to another tiddler:
{{{
.extraclude The Name of the New Tiddler
the content
.extraclude
}}}
Those {{{.extraclude}}} statements are at the beginning of the line.
You can have multiple extraclusions in an edit. When the tiddlers is saved each one will be replaced with
{{{<<tiddler [[The Name of the New Tiddler]]>>}}}
and the new tiddler will be created in the same bag as the current tiddler. If the tiddler already exists it will be overwritten.
If you are editing a Markdown syntax tiddler, then the created tiddlers will also be Markdown and the markup left behind in the original tiddler will be correct Markdown transclusion syntax
{{{{{The Name of the New Tiddler}}}}}
!Wikipedia:
>//The English word ''Folk'' is derived from a Germanic noun, *fulka meaning "people" or "army" (i.e. a crowd as opposed to "a people" in a more abstract sense of clan or tribe). The English word folk has cognates in most of the other Germanic languages. Folk may be a Germanic root that is unique to the Germanic languages, although Latin ''vulgus'', "the common people", has been suggested as a possible cognate...//
!What?
>//Ordinary people's music...//
innit
This is our old name, we are now...
!Mortal Tides
@@Please do not modify this tiddler; it was created automatically upon space creation.@@
@@Please do not modify this tiddler; it was created automatically upon space creation.@@
@@Please do not modify this tiddler; it was created automatically upon space creation.@@
@@Please do not modify this tiddler; it was created automatically upon space creation.@@
{"tiddlers":{"$:/Acknowledgements":{"title":"$:/Acknowledgements","text":"TiddlyWiki incorporates code from these fine OpenSource projects:\n\n* [[The Stanford Javascript Crypto Library|http://bitwiseshiftleft.github.io/sjcl/]]\n* [[The Jasmine JavaScript Test Framework|https://jasmine.github.io/]]\n* [[Normalize.css by Nicolas Gallagher|http://necolas.github.io/normalize.css/]]\n\nAnd media from these projects:\n\n* World flag icons from [[Wikipedia|http://commons.wikimedia.org/wiki/Category:SVG_flags_by_country]]\n"},"$:/core/copyright.txt":{"title":"$:/core/copyright.txt","type":"text/plain","text":"TiddlyWiki created by Jeremy Ruston, (jeremy [at] jermolene [dot] com)\n\nCopyright (c) 2004-2007, Jeremy Ruston\nCopyright (c) 2007-2024, UnaMesa Association\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."},"$:/core/icon":{"title":"$:/core/icon","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> viewBox=\"0 0 128 128\"><path d=\"M64 0l54.56 32v64L64 128 9.44 96V32L64 0zm21.127 95.408c-3.578-.103-5.15-.094-6.974-3.152l-1.42.042c-1.653-.075-.964-.04-2.067-.097-1.844-.07-1.548-1.86-1.873-2.8-.52-3.202.687-6.43.65-9.632-.014-1.14-1.593-5.17-2.157-6.61-1.768.34-3.546.406-5.34.497-4.134-.01-8.24-.527-12.317-1.183-.8 3.35-3.16 8.036-1.21 11.44 2.37 3.52 4.03 4.495 6.61 4.707 2.572.212 3.16 3.18 2.53 4.242-.55.73-1.52.864-2.346 1.04l-1.65.08c-1.296-.046-2.455-.404-3.61-.955-1.93-1.097-3.925-3.383-5.406-5.024.345.658.55 1.938.24 2.53-.878 1.27-4.665 1.26-6.4.47-1.97-.89-6.73-7.162-7.468-11.86 1.96-3.78 4.812-7.07 6.255-11.186-3.146-2.05-4.83-5.384-4.61-9.16l.08-.44c-3.097.59-1.49.37-4.82.628-10.608-.032-19.935-7.37-14.68-18.774.34-.673.664-1.287 1.243-.994.466.237.4 1.18.166 2.227-3.005 13.627 11.67 13.732 20.69 11.21.89-.25 2.67-1.936 3.905-2.495 2.016-.91 4.205-1.282 6.376-1.55 5.4-.63 11.893 2.276 15.19 2.37 3.3.096 7.99-.805 10.87-.615 2.09.098 4.143.483 6.16 1.03 1.306-6.49 1.4-11.27 4.492-12.38 1.814.293 3.213 2.818 4.25 4.167 2.112-.086 4.12.46 6.115 1.066 3.61-.522 6.642-2.593 9.833-4.203-3.234 2.69-3.673 7.075-3.303 11.127.138 2.103-.444 4.386-1.164 6.54-1.348 3.507-3.95 7.204-6.97 7.014-1.14-.036-1.805-.695-2.653-1.4-.164 1.427-.81 2.7-1.434 3.96-1.44 2.797-5.203 4.03-8.687 7.016-3.484 2.985 1.114 13.65 2.23 15.594 1.114 1.94 4.226 2.652 3.02 4.406-.37.58-.936.785-1.54 1.01l-.82.11zm-40.097-8.85l.553.14c.694-.27 2.09.15 2.83.353-1.363-1.31-3.417-3.24-4.897-4.46-.485-1.47-.278-2.96-.174-4.46l.02-.123c-.582 1.205-1.322 2.376-1.72 3.645-.465 1.71 2.07 3.557 3.052 4.615l.336.3z\" fill-rule=\"evenodd\"/></svg>"},"$:/core/images/add-comment":{"title":"$:/core/images/add-comment","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-add-comment tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M56 56H36a8 8 0 100 16h20v20a8 8 0 1016 0V72h20a8 8 0 100-16H72V36a8 8 0 10-16 0v20zm-12.595 58.362c-6.683 7.659-20.297 12.903-36.006 12.903-2.196 0-4.35-.102-6.451-.3 9.652-3.836 17.356-12.24 21.01-22.874C8.516 94.28 0 79.734 0 63.5 0 33.953 28.206 10 63 10s63 23.953 63 53.5S97.794 117 63 117c-6.841 0-13.428-.926-19.595-2.638z\"/></svg>"},"$:/core/images/advanced-search-button":{"title":"$:/core/images/advanced-search-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-advanced-search-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M74.565 87.985A47.776 47.776 0 0148 96C21.49 96 0 74.51 0 48S21.49 0 48 0s48 21.49 48 48c0 9.854-2.97 19.015-8.062 26.636l34.347 34.347a9.443 9.443 0 010 13.36 9.446 9.446 0 01-13.36 0l-34.36-34.358zM48 80c17.673 0 32-14.327 32-32 0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32z\"/><circle cx=\"48\" cy=\"48\" r=\"8\"/><circle cx=\"28\" cy=\"48\" r=\"8\"/><circle cx=\"68\" cy=\"48\" r=\"8\"/></g></svg>"},"$:/core/images/auto-height":{"title":"$:/core/images/auto-height","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-auto-height tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M67.987 114.356l-.029-14.477a4 4 0 00-2.067-3.494l-15.966-8.813-1.933 7.502H79.9c4.222 0 5.564-5.693 1.786-7.58L49.797 71.572 48.01 79.15h31.982c4.217 0 5.564-5.682 1.795-7.575L49.805 55.517l-1.795 7.575h31.982c4.212 0 5.563-5.67 1.805-7.57l-16.034-8.105 2.195 3.57V35.614l9.214 9.213a4 4 0 105.656-5.656l-16-16a4 4 0 00-5.656 0l-16 16a4 4 0 105.656 5.656l9.13-9.13v15.288a4 4 0 002.195 3.57l16.035 8.106 1.804-7.57H48.01c-4.217 0-5.564 5.682-1.795 7.574l31.982 16.059 1.795-7.575H48.01c-4.222 0-5.564 5.693-1.787 7.579l31.89 15.923 1.787-7.578H47.992c-4.133 0-5.552 5.504-1.933 7.501l15.966 8.813-2.067-3.494.029 14.436-9.159-9.158a4 4 0 00-5.656 5.656l16 16a4 4 0 005.656 0l16-16a4 4 0 10-5.656-5.656l-9.185 9.184zM16 20h96a4 4 0 100-8H16a4 4 0 100 8z\"/></svg>"},"$:/core/images/blank":{"title":"$:/core/images/blank","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-blank tc-image-button\" viewBox=\"0 0 128 128\"/>"},"$:/core/images/bold":{"title":"$:/core/images/bold","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-bold tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M41.146 51.81V21.87h26.353c2.51 0 4.93.21 7.26.628 2.33.418 4.392 1.165 6.185 2.24 1.793 1.076 3.227 2.57 4.302 4.482 1.076 1.913 1.614 4.363 1.614 7.35 0 5.379-1.613 9.263-4.84 11.653-3.227 2.39-7.35 3.586-12.37 3.586H41.146zM13 0v128h62.028a65.45 65.45 0 0016.762-2.151c5.438-1.434 10.278-3.645 14.52-6.633 4.244-2.988 7.62-6.842 10.13-11.563 2.51-4.721 3.764-10.308 3.764-16.762 0-8.008-1.942-14.85-5.826-20.527-3.884-5.677-9.77-9.65-17.658-11.921 5.737-2.75 10.069-6.275 12.997-10.577 2.928-4.303 4.392-9.681 4.392-16.135 0-5.976-.986-10.995-2.958-15.059-1.972-4.063-4.75-7.32-8.336-9.77-3.585-2.45-7.888-4.213-12.907-5.289C84.888.538 79.33 0 73.235 0H13zm28.146 106.129V70.992H71.8c6.095 0 10.995 1.404 14.7 4.212 3.705 2.81 5.558 7.5 5.558 14.073 0 3.347-.568 6.096-1.703 8.247-1.136 2.151-2.66 3.854-4.572 5.11-1.912 1.254-4.123 2.15-6.633 2.688-2.51.538-5.139.807-7.888.807H41.146z\"/></svg>"},"$:/core/images/cancel-button":{"title":"$:/core/images/cancel-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-cancel-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M64 76.314l-16.97 16.97a7.999 7.999 0 01-11.314 0c-3.118-3.118-3.124-8.19 0-11.313L52.686 65l-16.97-16.97a7.999 7.999 0 010-11.314c3.118-3.118 8.19-3.124 11.313 0L64 53.686l16.97-16.97a7.999 7.999 0 0111.314 0c3.118 3.118 3.124 8.19 0 11.313L75.314 65l16.97 16.97a7.999 7.999 0 010 11.314c-3.118 3.118-8.19 3.124-11.313 0L64 76.314zM64 129c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64C28.654 1 0 29.654 0 65c0 35.346 28.654 64 64 64zm0-16c26.51 0 48-21.49 48-48S90.51 17 64 17 16 38.49 16 65s21.49 48 48 48z\"/></svg>"},"$:/core/images/chevron-down":{"title":"$:/core/images/chevron-down","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-chevron-down tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M64.053 85.456a7.889 7.889 0 01-5.6-2.316L2.473 27.16a7.92 7.92 0 010-11.196c3.086-3.085 8.105-3.092 11.196 0L64.05 66.344l50.382-50.382a7.92 7.92 0 0111.195 0c3.085 3.086 3.092 8.105 0 11.196l-55.98 55.98a7.892 7.892 0 01-5.595 2.317z\"/><path d=\"M64.053 124.069a7.889 7.889 0 01-5.6-2.316l-55.98-55.98a7.92 7.92 0 010-11.196c3.086-3.085 8.105-3.092 11.196 0l50.382 50.382 50.382-50.382a7.92 7.92 0 0111.195 0c3.085 3.086 3.092 8.104 0 11.196l-55.98 55.98a7.892 7.892 0 01-5.595 2.316z\"/></g></svg>"},"$:/core/images/chevron-left":{"title":"$:/core/images/chevron-left","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-chevron-left tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M47.544 64.053c0-2.027.77-4.054 2.316-5.6l55.98-55.98a7.92 7.92 0 0111.196 0c3.085 3.086 3.092 8.105 0 11.196L66.656 64.05l50.382 50.382a7.92 7.92 0 010 11.195c-3.086 3.085-8.105 3.092-11.196 0l-55.98-55.98a7.892 7.892 0 01-2.317-5.595z\"/><path d=\"M8.931 64.053c0-2.027.77-4.054 2.316-5.6l55.98-55.98a7.92 7.92 0 0111.196 0c3.085 3.086 3.092 8.105 0 11.196L28.041 64.05l50.382 50.382a7.92 7.92 0 010 11.195c-3.086 3.085-8.104 3.092-11.196 0l-55.98-55.98a7.892 7.892 0 01-2.316-5.595z\"/></g></svg>"},"$:/core/images/chevron-right":{"title":"$:/core/images/chevron-right","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-chevron-right tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M83.456 63.947c0 2.027-.77 4.054-2.316 5.6l-55.98 55.98a7.92 7.92 0 01-11.196 0c-3.085-3.086-3.092-8.105 0-11.196L64.344 63.95 13.963 13.567a7.92 7.92 0 010-11.195c3.086-3.085 8.105-3.092 11.196 0l55.98 55.98a7.892 7.892 0 012.317 5.595z\"/><path d=\"M122.069 63.947c0 2.027-.77 4.054-2.316 5.6l-55.98 55.98a7.92 7.92 0 01-11.196 0c-3.085-3.086-3.092-8.105 0-11.196l50.382-50.382-50.382-50.382a7.92 7.92 0 010-11.195c3.086-3.085 8.104-3.092 11.196 0l55.98 55.98a7.892 7.892 0 012.316 5.595z\"/></g></svg>"},"$:/core/images/chevron-up":{"title":"$:/core/images/chevron-up","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-chevron-up tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M63.947 44.544c2.027 0 4.054.77 5.6 2.316l55.98 55.98a7.92 7.92 0 010 11.196c-3.086 3.085-8.105 3.092-11.196 0L63.95 63.656l-50.382 50.382a7.92 7.92 0 01-11.195 0c-3.085-3.086-3.092-8.105 0-11.196l55.98-55.98a7.892 7.892 0 015.595-2.317z\"/><path d=\"M63.947 5.931c2.027 0 4.054.77 5.6 2.316l55.98 55.98a7.92 7.92 0 010 11.196c-3.086 3.085-8.105 3.092-11.196 0L63.95 25.041 13.567 75.423a7.92 7.92 0 01-11.195 0c-3.085-3.086-3.092-8.104 0-11.196l55.98-55.98a7.892 7.892 0 015.595-2.316z\"/></g></svg>"},"$:/core/images/clone-button":{"title":"$:/core/images/clone-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-clone-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M32.265 96v24.002A7.996 7.996 0 0040.263 128h79.74a7.996 7.996 0 007.997-7.998v-79.74a7.996 7.996 0 00-7.998-7.997H96V48h12.859a2.99 2.99 0 012.994 2.994v57.865a2.99 2.99 0 01-2.994 2.994H50.994A2.99 2.99 0 0148 108.859V96H32.265z\"/><path d=\"M40 56h-7.993C27.588 56 24 52.418 24 48c0-4.41 3.585-8 8.007-8H40v-7.993C40 27.588 43.582 24 48 24c4.41 0 8 3.585 8 8.007V40h7.993C68.412 40 72 43.582 72 48c0 4.41-3.585 8-8.007 8H56v7.993C56 68.412 52.418 72 48 72c-4.41 0-8-3.585-8-8.007V56zM8 0C3.58 0 0 3.588 0 8v80c0 4.419 3.588 8 8 8h80c4.419 0 8-3.588 8-8V8c0-4.419-3.588-8-8-8H8zM19 16A2.997 2.997 0 0016 19.001v57.998A2.997 2.997 0 0019.001 80h57.998A2.997 2.997 0 0080 76.999V19.001A2.997 2.997 0 0076.999 16H19.001z\"/></g></svg>"},"$:/core/images/close-all-button":{"title":"$:/core/images/close-all-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-close-all-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M28 111.314l-14.144 14.143a8 8 0 01-11.313-11.313L16.686 100 2.543 85.856a8 8 0 0111.313-11.313L28 88.686l14.144-14.143a8 8 0 0111.313 11.313L39.314 100l14.143 14.144a8 8 0 01-11.313 11.313L28 111.314zM28 39.314L13.856 53.457A8 8 0 012.543 42.144L16.686 28 2.543 13.856A8 8 0 0113.856 2.543L28 16.686 42.144 2.543a8 8 0 0111.313 11.313L39.314 28l14.143 14.144a8 8 0 01-11.313 11.313L28 39.314zM100 39.314L85.856 53.457a8 8 0 01-11.313-11.313L88.686 28 74.543 13.856A8 8 0 0185.856 2.543L100 16.686l14.144-14.143a8 8 0 0111.313 11.313L111.314 28l14.143 14.144a8 8 0 01-11.313 11.313L100 39.314zM100 111.314l-14.144 14.143a8 8 0 01-11.313-11.313L88.686 100 74.543 85.856a8 8 0 0111.313-11.313L100 88.686l14.144-14.143a8 8 0 0111.313 11.313L111.314 100l14.143 14.144a8 8 0 01-11.313 11.313L100 111.314z\"/></g></svg>"},"$:/core/images/close-button":{"title":"$:/core/images/close-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-close-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M65.086 75.41l-50.113 50.113c-3.121 3.121-8.192 3.126-11.316.002-3.118-3.118-3.123-8.19.002-11.316l50.114-50.114L3.659 13.982C.538 10.86.533 5.79 3.657 2.666c3.118-3.118 8.19-3.123 11.316.002l50.113 50.114L115.2 2.668c3.121-3.121 8.192-3.126 11.316-.002 3.118 3.118 3.123 8.19-.002 11.316L76.4 64.095l50.114 50.114c3.121 3.121 3.126 8.192.002 11.316-3.118 3.118-8.19 3.123-11.316-.002L65.086 75.409z\"/></svg>"},"$:/core/images/close-others-button":{"title":"$:/core/images/close-others-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-close-others-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M64 128c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64C28.654 0 0 28.654 0 64c0 35.346 28.654 64 64 64zm0-16c26.51 0 48-21.49 48-48S90.51 16 64 16 16 37.49 16 64s21.49 48 48 48zm0-16c17.673 0 32-14.327 32-32 0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32zm0-16c8.837 0 16-7.163 16-16s-7.163-16-16-16-16 7.163-16 16 7.163 16 16 16z\"/></svg>"},"$:/core/images/copy-clipboard":{"title":"$:/core/images/copy-clipboard","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-copy-clipboard tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"33\" height=\"8\" x=\"40\" y=\"40\" rx=\"4\"/><rect width=\"17\" height=\"8\" x=\"40\" y=\"82\" rx=\"4\"/><rect width=\"17\" height=\"8\" x=\"40\" y=\"54\" rx=\"4\"/><rect width=\"33\" height=\"8\" x=\"40\" y=\"96\" rx=\"4\"/><rect width=\"12\" height=\"8\" x=\"40\" y=\"68\" rx=\"4\"/><path d=\"M40 16H24c-4.419 0-8 3.59-8 8a8.031 8.031 0 000 .01v95.98a8.03 8.03 0 000 .01c0 4.41 3.581 8 8 8h80a7.975 7.975 0 005.652-2.34 7.958 7.958 0 002.348-5.652v-16.016c0-4.414-3.582-7.992-8-7.992-4.41 0-8 3.578-8 7.992V112H32V32h64v8.008C96 44.422 99.582 48 104 48c4.41 0 8-3.578 8-7.992V23.992a7.963 7.963 0 00-2.343-5.651A7.995 7.995 0 00104.001 16H88c0-4.41-3.585-8-8.007-8H48.007C43.588 8 40 11.582 40 16zm4-1.004A4.001 4.001 0 0148 11h32c2.21 0 4 1.797 4 3.996v4.008A4.001 4.001 0 0180 23H48c-2.21 0-4-1.797-4-3.996v-4.008z\"/><rect width=\"66\" height=\"16\" x=\"62\" y=\"64\" rx=\"8\"/><path d=\"M84.657 82.343l-16-16v11.314l16-16a8 8 0 10-11.314-11.314l-16 16a8 8 0 000 11.314l16 16a8 8 0 1011.314-11.314z\"/></g></svg>"},"$:/core/images/delete-button":{"title":"$:/core/images/delete-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-delete-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\" transform=\"translate(12)\"><rect width=\"105\" height=\"16\" y=\"11\" rx=\"8\"/><rect width=\"48\" height=\"16\" x=\"28\" rx=\"8\"/><rect width=\"16\" height=\"112\" x=\"8\" y=\"16\" rx=\"8\"/><rect width=\"88\" height=\"16\" x=\"8\" y=\"112\" rx=\"8\"/><rect width=\"16\" height=\"112\" x=\"80\" y=\"16\" rx=\"8\"/><rect width=\"16\" height=\"112\" x=\"56\" y=\"16\" rx=\"8\"/><rect width=\"16\" height=\"112\" x=\"32\" y=\"16\" rx=\"8\"/></g></svg>"},"$:/core/images/discord":{"title":"$:/core/images/discord","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-discord tc-image-button\" viewBox=\"0 -28.5 256 256\"><path d=\"M216.856 16.597A208.502 208.502 0 0 0 164.042 0c-2.275 4.113-4.933 9.645-6.766 14.046-19.692-2.961-39.203-2.961-58.533 0-1.832-4.4-4.55-9.933-6.846-14.046a207.809 207.809 0 0 0-52.855 16.638C5.618 67.147-3.443 116.4 1.087 164.956c22.169 16.555 43.653 26.612 64.775 33.193A161.094 161.094 0 0 0 79.735 175.3a136.413 136.413 0 0 1-21.846-10.632 108.636 108.636 0 0 0 5.356-4.237c42.122 19.702 87.89 19.702 129.51 0a131.66 131.66 0 0 0 5.355 4.237 136.07 136.07 0 0 1-21.886 10.653c4.006 8.02 8.638 15.67 13.873 22.848 21.142-6.58 42.646-16.637 64.815-33.213 5.316-56.288-9.08-105.09-38.056-148.36ZM85.474 135.095c-12.645 0-23.015-11.805-23.015-26.18s10.149-26.2 23.015-26.2c12.867 0 23.236 11.804 23.015 26.2.02 14.375-10.148 26.18-23.015 26.18Zm85.051 0c-12.645 0-23.014-11.805-23.014-26.18s10.148-26.2 23.014-26.2c12.867 0 23.236 11.804 23.015 26.2 0 14.375-10.148 26.18-23.015 26.18Z\"/></svg>"},"$:/core/images/done-button":{"title":"$:/core/images/done-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-done-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M42.26 111.032c-2.051.001-4.103-.78-5.668-2.345L2.662 74.758a8 8 0 01-.005-11.32c3.118-3.117 8.192-3.12 11.32.007l28.278 28.278 72.124-72.124a8.002 8.002 0 0111.314-.001c3.118 3.118 3.124 8.19 0 11.315l-77.78 77.78a7.978 7.978 0 01-5.658 2.343z\"/></svg>"},"$:/core/images/down-arrow":{"title":"$:/core/images/down-arrow","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-down-arrow tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M64.177 100.069a7.889 7.889 0 01-5.6-2.316l-55.98-55.98a7.92 7.92 0 010-11.196c3.086-3.085 8.105-3.092 11.196 0l50.382 50.382 50.382-50.382a7.92 7.92 0 0111.195 0c3.086 3.086 3.092 8.104 0 11.196l-55.98 55.98a7.892 7.892 0 01-5.595 2.316z\"/></svg>"},"$:/core/images/download-button":{"title":"$:/core/images/download-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-download-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M64 128c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64C28.654 0 0 28.654 0 64c0 35.346 28.654 64 64 64zm0-16c26.51 0 48-21.49 48-48S90.51 16 64 16 16 37.49 16 64s21.49 48 48 48z\" class=\"tc-image-download-button-ring\"/><path d=\"M34.35 66.43l26.892 27.205a4.57 4.57 0 006.516 0L94.65 66.43a4.7 4.7 0 000-6.593 4.581 4.581 0 00-3.258-1.365h-8.46c-2.545 0-4.608-2.087-4.608-4.661v-15.15c0-2.575-2.063-4.662-4.608-4.662H55.284c-2.545 0-4.608 2.087-4.608 4.662v15.15c0 2.574-2.063 4.661-4.608 4.661h-8.46c-2.545 0-4.608 2.087-4.608 4.662a4.69 4.69 0 001.35 3.296z\"/></g></svg>"},"$:/core/images/edit-button":{"title":"$:/core/images/edit-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-edit-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M95.627 10.059l-5.656 5.657 11.313 11.313 5.657-5.656-11.314-11.314zm5.657-5.657l1.966-1.966c3.123-3.122 8.194-3.129 11.319-.005 3.117 3.118 3.122 8.192-.005 11.32l-1.966 1.965-11.314-11.314zm-16.97 16.97l-60.25 60.25a8.12 8.12 0 00-.322.342c-.1.087-.198.179-.295.275-5.735 5.735-10.702 22.016-10.702 22.016s16.405-5.09 22.016-10.702c.095-.096.186-.193.272-.292a8.12 8.12 0 00.345-.325l60.25-60.25-11.314-11.313zM35.171 124.19c6.788-.577 13.898-2.272 23.689-5.348 1.825-.573 3.57-1.136 6.336-2.04 16-5.226 21.877-6.807 28.745-7.146 8.358-.413 13.854 2.13 17.58 8.699a4 4 0 006.959-3.946c-5.334-9.406-13.745-13.296-24.933-12.744-7.875.39-14.057 2.052-30.835 7.533-2.739.894-4.46 1.45-6.25 2.012-19.46 6.112-30.77 7.072-39.597 1.747a4 4 0 10-4.132 6.85c6.333 3.82 13.754 5.12 22.438 4.383z\"/></g></svg>"},"$:/core/images/erase":{"title":"$:/core/images/erase","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-erase tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M60.087 127.996l63.015-63.015c6.535-6.535 6.528-17.115-.003-23.646L99.466 17.702c-6.539-6.538-17.117-6.532-23.646-.003L4.898 88.62c-6.535 6.534-6.528 17.115.003 23.646l15.73 15.73h39.456zm-34.95-7.313l-14.324-14.325c-3.267-3.268-3.268-8.564-.008-11.824L46.269 59.07l35.462 35.462-26.15 26.15H25.137z\"/></svg>"},"$:/core/images/excise":{"title":"$:/core/images/excise","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-excise tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M56 107.314l-2.343 2.343a8 8 0 11-11.314-11.314l16-16a8 8 0 0111.314 0l16 16a8 8 0 11-11.314 11.314L72 107.314v14.284c0 3.536-3.582 6.402-8 6.402s-8-2.866-8-6.402v-14.284zM0 40.007C0 35.585 3.59 32 8 32c4.418 0 8 3.588 8 8.007v31.986C16 76.415 12.41 80 8 80c-4.418 0-8-3.588-8-8.007V40.007zm32 0C32 35.585 35.59 32 40 32c4.418 0 8 3.588 8 8.007v31.986C48 76.415 44.41 80 40 80c-4.418 0-8-3.588-8-8.007V40.007zm48 0C80 35.585 83.59 32 88 32c4.418 0 8 3.588 8 8.007v31.986C96 76.415 92.41 80 88 80c-4.418 0-8-3.588-8-8.007V40.007zm-24-32C56 3.585 59.59 0 64 0c4.418 0 8 3.588 8 8.007v31.986C72 44.415 68.41 48 64 48c-4.418 0-8-3.588-8-8.007V8.007zm56 32c0-4.422 3.59-8.007 8-8.007 4.418 0 8 3.588 8 8.007v31.986c0 4.422-3.59 8.007-8 8.007-4.418 0-8-3.588-8-8.007V40.007z\"/></svg>"},"$:/core/images/export-button":{"title":"$:/core/images/export-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-export-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M8.003 128H119.993a7.984 7.984 0 005.664-2.349v.007A7.975 7.975 0 00128 120V56c0-4.418-3.59-8-8-8-4.418 0-8 3.58-8 8v56H16V56c0-4.418-3.59-8-8-8-4.418 0-8 3.58-8 8v64c0 4.418 3.59 8 8 8h.003zm48.62-100.689l-8.965 8.966c-3.125 3.125-8.195 3.13-11.319.005-3.118-3.118-3.122-8.192.005-11.319L58.962 2.346A7.986 7.986 0 0164.625 0l-.006.002c2.05-.001 4.102.78 5.666 2.344l22.618 22.617c3.124 3.125 3.129 8.195.005 11.319-3.118 3.118-8.192 3.122-11.319-.005l-8.965-8.966v61.256c0 4.411-3.582 8-8 8-4.41 0-8-3.582-8-8V27.311z\"/></svg>"},"$:/core/images/file":{"title":"$:/core/images/file","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-file tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M111.968 30.5H112V120a8 8 0 01-8 8H24a8 8 0 01-8-8V8a8 8 0 018-8h57v.02a7.978 7.978 0 015.998 2.337l22.627 22.627a7.975 7.975 0 012.343 5.516zM81 8H24v112h80V30.5H89c-4.418 0-8-3.578-8-8V8z\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"36\" rx=\"4\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"52\" rx=\"4\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"68\" rx=\"4\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"84\" rx=\"4\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"100\" rx=\"4\"/><rect width=\"40\" height=\"8\" x=\"32\" y=\"20\" rx=\"4\"/></svg>"},"$:/core/images/fixed-height":{"title":"$:/core/images/fixed-height","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-fixed-height tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M60 35.657l-9.172 9.171a4 4 0 11-5.656-5.656l16-16a4 4 0 015.656 0l16 16a4 4 0 01-5.656 5.656L68 35.657v57.686l9.172-9.171a4 4 0 115.656 5.656l-16 16a4 4 0 01-5.656 0l-16-16a4 4 0 115.656-5.656L60 93.343V35.657zM16 116h96a4 4 0 100-8H16a4 4 0 100 8zm0-96h96a4 4 0 100-8H16a4 4 0 100 8z\"/></svg>"},"$:/core/images/fold-all-button":{"title":"$:/core/images/fold-all-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-fold-all tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"128\" height=\"16\" rx=\"8\"/><rect width=\"128\" height=\"16\" y=\"64\" rx=\"8\"/><path d=\"M64.03 20.004c-2.05 0-4.102.78-5.667 2.344L35.746 44.966c-3.125 3.124-3.13 8.194-.005 11.318 3.118 3.118 8.192 3.122 11.319-.005l16.965-16.965 16.966 16.965c3.124 3.125 8.194 3.13 11.318.005 3.118-3.118 3.122-8.191-.005-11.318L69.687 22.348a7.986 7.986 0 00-5.663-2.346zM64.03 85.002c-2.05-.001-4.102.78-5.667 2.344l-22.617 22.617c-3.125 3.125-3.13 8.195-.005 11.319 3.118 3.118 8.192 3.122 11.319-.005l16.965-16.966 16.966 16.966c3.124 3.125 8.194 3.13 11.318.005 3.118-3.118 3.122-8.192-.005-11.319L69.687 87.346A7.986 7.986 0 0064.024 85z\"/></g></svg>"},"$:/core/images/fold-button":{"title":"$:/core/images/fold-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-fold tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"128\" height=\"16\" rx=\"8\"/><path d=\"M64.03 25.004c-2.05 0-4.102.78-5.667 2.344L35.746 49.966c-3.125 3.124-3.13 8.194-.005 11.318 3.118 3.118 8.192 3.122 11.319-.005l16.965-16.965 16.966 16.965c3.124 3.125 8.194 3.13 11.318.005 3.118-3.118 3.122-8.191-.005-11.318L69.687 27.348a7.986 7.986 0 00-5.663-2.346zM64.005 67.379c-2.05 0-4.102.78-5.666 2.344L35.722 92.34c-3.125 3.125-3.13 8.195-.006 11.32 3.118 3.117 8.192 3.121 11.32-.006L64 86.69l16.965 16.965c3.125 3.125 8.195 3.13 11.319.005 3.118-3.118 3.122-8.192-.005-11.319L69.663 69.723A7.986 7.986 0 0064 67.377z\"/></g></svg>"},"$:/core/images/fold-others-button":{"title":"$:/core/images/fold-others-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-fold-others tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"128\" height=\"16\" y=\"56.031\" rx=\"8\"/><path d=\"M86.632 79.976c-2.05 0-4.102.78-5.666 2.345L64 99.286 47.034 82.321a7.986 7.986 0 00-5.662-2.346l.005.001c-2.05 0-4.102.78-5.666 2.345l-22.618 22.617c-3.124 3.125-3.129 8.195-.005 11.319 3.118 3.118 8.192 3.122 11.319-.005l16.966-16.966 16.965 16.966a7.986 7.986 0 005.663 2.346l-.005-.002c2.05 0 4.102-.78 5.666-2.344l16.965-16.966 16.966 16.966c3.125 3.124 8.194 3.129 11.319.005 3.118-3.118 3.122-8.192-.005-11.319L92.289 82.321a7.986 7.986 0 00-5.663-2.346zM86.7 48.024c-2.05 0-4.102-.78-5.666-2.345L64.07 28.714 47.103 45.679a7.986 7.986 0 01-5.663 2.346l.005-.001c-2.05 0-4.101-.78-5.666-2.345L13.162 23.062c-3.125-3.125-3.13-8.195-.005-11.319 3.118-3.118 8.192-3.122 11.319.005L41.44 28.714l16.966-16.966a7.986 7.986 0 015.662-2.346l-.005.002c2.05 0 4.102.78 5.666 2.344l16.966 16.966 16.966-16.966c3.124-3.124 8.194-3.129 11.318-.005 3.118 3.118 3.122 8.192-.005 11.319L92.358 45.679a7.986 7.986 0 01-5.663 2.346z\"/></g></svg>"},"$:/core/images/folder":{"title":"$:/core/images/folder","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-folder tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M55.694 128H8C3.58 128 0 124.414 0 119.996V48.004C0 43.584 3.584 40 7.999 40H16v-8c0-4.418 3.578-8 8-8h32a8 8 0 018 8v8h40.001c4.418 0 7.999 3.586 7.999 8.004V59.83l-8-.082v-7.749A4 4 0 0099.997 48H56V36c0-2.21-1.793-4-4.004-4H28.004A4 4 0 0024 36v12H12.003A4 4 0 008 52v64a4 4 0 004.003 4h46.76l-3.069 8z\"/><path d=\"M23.873 55.5h96.003c4.417 0 7.004 4.053 5.774 9.063l-13.344 54.374c-1.228 5.005-5.808 9.063-10.223 9.063H6.08c-4.417 0-7.003-4.053-5.774-9.063L13.65 64.563c1.228-5.005 5.808-9.063 10.223-9.063zm1.78 8.5h87.994c2.211 0 3.504 2.093 2.891 4.666l-11.12 46.668c-.614 2.577-2.902 4.666-5.115 4.666H12.31c-2.211 0-3.504-2.093-2.891-4.666l11.12-46.668C21.152 66.09 23.44 64 25.653 64z\"/></g></svg>"},"$:/core/images/full-screen-button":{"title":"$:/core/images/full-screen-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-full-screen-button tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M0 8a8 8 0 018-8h32a8 8 0 110 16H16v24a8 8 0 11-16 0V8zM128 120a8 8 0 01-8 8H88a8 8 0 110-16h24V88a8 8 0 1116 0v32zM8 128a8 8 0 01-8-8V88a8 8 0 1116 0v24h24a8 8 0 110 16H8zM120 0a8 8 0 018 8v32a8 8 0 11-16 0V16H88a8 8 0 110-16h32z\"/></svg>"},"$:/core/images/github":{"title":"$:/core/images/github","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-github tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M63.938 1.607c-35.336 0-63.994 28.69-63.994 64.084 0 28.312 18.336 52.329 43.768 60.802 3.202.59 4.37-1.388 4.37-3.088 0-1.518-.056-5.55-.087-10.897-17.802 3.871-21.558-8.591-21.558-8.591-2.911-7.404-7.108-9.375-7.108-9.375-5.81-3.973.44-3.895.44-3.895 6.424.453 9.803 6.606 9.803 6.606 5.709 9.791 14.981 6.963 18.627 5.322.582-4.138 2.236-6.963 4.063-8.564-14.211-1.617-29.153-7.117-29.153-31.672 0-6.995 2.495-12.718 6.589-17.195-.66-1.621-2.856-8.14.629-16.96 0 0 5.37-1.722 17.597 6.57 5.104-1.424 10.58-2.132 16.022-2.16 5.438.028 10.91.736 16.022 2.16 12.22-8.292 17.582-6.57 17.582-6.57 3.493 8.82 1.297 15.339.64 16.96 4.102 4.477 6.578 10.2 6.578 17.195 0 24.618-14.966 30.035-29.22 31.62 2.295 1.98 4.342 5.89 4.342 11.87 0 8.564-.079 15.476-.079 17.576 0 1.715 1.155 3.71 4.4 3.084 25.413-8.493 43.733-32.494 43.733-60.798 0-35.394-28.657-64.084-64.006-64.084\"/></svg>"},"$:/core/images/gitter":{"title":"$:/core/images/gitter","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-gitter tc-image-button\" viewBox=\"0 0 18 25\"><path d=\"M15 5h2v10h-2zM10 5h2v20h-2zM5 5h2v20H5zM0 0h2v15H0z\"/></svg>"},"$:/core/images/globe":{"title":"$:/core/images/globe","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-globe tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M72.811 37.128v2.554c0 2.196.978 6.881 0 8.832-1.466 2.928-4.65 3.54-6.394 5.867-1.182 1.577-4.618 10.601-3.69 12.92 3.969 9.922 11.534 3.187 17.962 9.293.864.821 2.887 2.273 3.296 3.296 3.29 8.223-7.576 15.009 3.757 26.3 1.245 1.24 3.813-3.817 4.079-4.614.852-2.563 6.725-5.45 9.088-7.053 2.02-1.37 4.873-2.667 6.328-4.745 2.27-3.244 1.48-7.514 3.098-10.745 2.139-4.274 3.828-9.635 5.998-13.966 3.898-7.781 4.721 2.093 5.067 2.439.358.357 1.011 0 1.517 0 .094 0 1.447.099 1.516 0 .65-.935-1.043-17.92-1.318-19.297-1.404-7.01-6.944-15.781-11.865-20.5-6.274-6.015-7.09-16.197-18.259-14.954-.204.022-5.084 10.148-7.777 13.512-3.728 4.657-2.47-4.153-6.526-4.153-.081 0-1.183-.103-1.253 0-.586.88-1.44 3.896-2.306 4.417-.265.16-1.722-.239-1.846 0-2.243 4.3 8.256 2.212 5.792 7.952-2.352 5.481-6.328-1.997-6.328 8.56M44.467 7.01c9.685 6.13.682 12.198 2.694 16.215 1.655 3.303 4.241 5.395 1.714 9.814-2.063 3.608-6.87 3.966-9.623 6.723-3.04 3.044-5.464 8.94-6.79 12.911-1.617 4.843 14.547 6.866 12.063 11.008-1.386 2.311-6.746 1.466-8.437.198-1.165-.873-3.593-.546-4.417-1.78-2.613-3.915-2.26-8.023-3.625-12.128-.938-2.822-6.313-2.12-7.844-.593-.523.522-.33 1.792-.33 2.505 0 5.285 7.12 3.316 7.12 6.46 0 14.636 3.927 6.534 11.14 11.336 10.036 6.683 7.844 7.303 14.946 14.404 3.673 3.673 7.741 3.686 9.425 9.294 1.602 5.331-9.327 5.339-11.716 7.448-1.123.991-2.813 4.146-4.219 4.615-1.792.598-3.234.496-4.944 1.78-2.427 1.82-3.9 4.932-4.02 4.81-2.148-2.147-3.52-15.479-3.89-18.257-.588-4.42-5.59-5.54-6.986-9.03-1.57-3.927 1.524-9.52-1.129-13.761-6.52-10.424-11.821-14.5-15.35-26.292-.942-3.148 3.342-6.529 4.877-8.833 1.877-2.816 2.662-5.854 4.746-8.635C22.147 24.19 40.855 9.461 43.857 8.635l.61-1.625z\"/><path d=\"M64 126c34.242 0 62-27.758 62-62 0-34.242-27.758-62-62-62C29.758 2 2 29.758 2 64c0 34.242 27.758 62 62 62zm0-6c30.928 0 56-25.072 56-56S94.928 8 64 8 8 33.072 8 64s25.072 56 56 56z\"/></g></svg>"},"$:/core/images/heading-1":{"title":"$:/core/images/heading-1","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-heading-1 tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M14 30h13.25v30.104H61.7V30h13.25v75.684H61.7V71.552H27.25v34.132H14V30zm70.335 13.78c2.544 0 5.017-.212 7.42-.636 2.403-.424 4.576-1.13 6.52-2.12 1.942-.99 3.603-2.261 4.981-3.816 1.378-1.555 2.28-3.463 2.703-5.724h9.858v74.2h-13.25V53.32H84.335v-9.54z\"/></svg>"},"$:/core/images/heading-2":{"title":"$:/core/images/heading-2","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-heading-2 tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M6 30h13.25v30.104H53.7V30h13.25v75.684H53.7V71.552H19.25v34.132H6V30zm119.52 75.684H74.85c.07-6.148 1.555-11.519 4.452-16.112 2.897-4.593 6.855-8.586 11.872-11.978a133.725 133.725 0 017.526-5.141 59.6 59.6 0 007.208-5.353c2.19-1.908 3.993-3.975 5.406-6.201 1.413-2.226 2.155-4.788 2.226-7.685 0-1.343-.159-2.774-.477-4.293a11.357 11.357 0 00-1.855-4.24c-.919-1.307-2.19-2.403-3.816-3.286-1.625-.883-3.745-1.325-6.36-1.325-2.403 0-4.399.477-5.989 1.431-1.59.954-2.862 2.261-3.816 3.922-.954 1.66-1.66 3.622-2.12 5.883-.46 2.261-.724 4.7-.795 7.314H76.23c0-4.099.548-7.897 1.643-11.395 1.095-3.498 2.738-6.519 4.93-9.063 2.19-2.544 4.857-4.54 8.002-5.989C93.95 30.724 97.606 30 101.775 30c4.523 0 8.303.742 11.342 2.226 3.039 1.484 5.494 3.357 7.367 5.618 1.873 2.261 3.198 4.717 3.975 7.367.777 2.65 1.166 5.176 1.166 7.579 0 2.968-.46 5.653-1.378 8.056a25.942 25.942 0 01-3.71 6.625 37.5 37.5 0 01-5.3 5.565 79.468 79.468 0 01-6.148 4.77 165.627 165.627 0 01-6.36 4.24 94.28 94.28 0 00-5.883 4.028c-1.802 1.343-3.374 2.738-4.717 4.187-1.343 1.449-2.261 2.986-2.756 4.611h36.146v10.812z\"/></svg>"},"$:/core/images/heading-3":{"title":"$:/core/images/heading-3","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-heading-3 tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M6 30h13.25v30.104H53.7V30h13.25v75.684H53.7V71.552H19.25v34.132H6V30zm88.885 32.224c1.979.07 3.957-.07 5.936-.424 1.979-.353 3.745-.972 5.3-1.855a10.365 10.365 0 003.763-3.657c.954-1.555 1.431-3.463 1.431-5.724 0-3.18-1.078-5.724-3.233-7.632-2.155-1.908-4.929-2.862-8.32-2.862-2.12 0-3.958.424-5.513 1.272a11.318 11.318 0 00-3.869 3.445c-1.025 1.449-1.784 3.074-2.279 4.876a18.335 18.335 0 00-.636 5.565H75.381c.141-3.604.813-6.943 2.014-10.017 1.201-3.074 2.844-5.742 4.93-8.003 2.084-2.261 4.61-4.028 7.578-5.3C92.871 30.636 96.228 30 99.973 30a29.2 29.2 0 018.533 1.272c2.791.848 5.3 2.085 7.526 3.71s4.01 3.692 5.353 6.201c1.343 2.509 2.014 5.388 2.014 8.639 0 3.745-.848 7.014-2.544 9.805-1.696 2.791-4.346 4.823-7.95 6.095v.212c4.24.848 7.544 2.95 9.911 6.307s3.551 7.438 3.551 12.243c0 3.533-.707 6.696-2.12 9.487a21.538 21.538 0 01-5.724 7.102c-2.403 1.943-5.194 3.445-8.374 4.505-3.18 1.06-6.537 1.59-10.07 1.59-4.31 0-8.074-.618-11.289-1.855s-5.9-2.986-8.056-5.247c-2.155-2.261-3.798-4.982-4.929-8.162-1.13-3.18-1.731-6.713-1.802-10.6h12.084c-.141 4.523.972 8.286 3.34 11.289 2.366 3.003 5.917 4.505 10.652 4.505 4.028 0 7.402-1.148 10.123-3.445 2.72-2.297 4.081-5.565 4.081-9.805 0-2.897-.565-5.194-1.696-6.89a10.97 10.97 0 00-4.452-3.869c-1.837-.883-3.904-1.431-6.2-1.643a58.067 58.067 0 00-7.05-.212v-9.01z\"/></svg>"},"$:/core/images/heading-4":{"title":"$:/core/images/heading-4","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-heading-4 tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M8 30h13.25v30.104H55.7V30h13.25v75.684H55.7V71.552H21.25v34.132H8V30zm76.59 48.548h22.471V45.9h-.212L84.59 78.548zm43.46 9.54h-9.54v17.596H107.06V88.088h-31.8V76.11l31.8-44.626h11.448v47.064h9.54v9.54z\"/></svg>"},"$:/core/images/heading-5":{"title":"$:/core/images/heading-5","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-heading-5 tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M6 30h13.25v30.104H53.7V30h13.25v75.684H53.7V71.552H19.25v34.132H6V30zm77.755 1.484h38.372v10.812H92.765L88.95 61.164l.212.212c1.625-1.837 3.692-3.233 6.201-4.187 2.509-.954 5-1.431 7.473-1.431 3.675 0 6.96.618 9.858 1.855 2.897 1.237 5.335 2.968 7.314 5.194s3.48 4.858 4.505 7.897c1.025 3.039 1.537 6.325 1.537 9.858 0 2.968-.477 6.024-1.43 9.169a25.161 25.161 0 01-4.559 8.586c-2.085 2.58-4.752 4.7-8.003 6.36-3.25 1.66-7.137 2.491-11.66 2.491-3.604 0-6.943-.477-10.017-1.431-3.074-.954-5.777-2.385-8.109-4.293-2.332-1.908-4.187-4.258-5.565-7.049-1.378-2.791-2.138-6.06-2.279-9.805h12.084c.353 4.028 1.731 7.12 4.134 9.275 2.403 2.155 5.583 3.233 9.54 3.233 2.544 0 4.7-.424 6.466-1.272 1.767-.848 3.198-2.014 4.293-3.498 1.095-1.484 1.873-3.215 2.332-5.194.46-1.979.69-4.099.69-6.36 0-2.05-.284-4.01-.849-5.883-.565-1.873-1.413-3.516-2.544-4.929-1.13-1.413-2.597-2.544-4.399-3.392-1.802-.848-3.904-1.272-6.307-1.272-2.544 0-4.929.477-7.155 1.431-2.226.954-3.834 2.738-4.823 5.353H75.805l7.95-40.598z\"/></svg>"},"$:/core/images/heading-6":{"title":"$:/core/images/heading-6","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-heading-6 tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M6 30h13.25v30.104H53.7V30h13.25v75.684H53.7V71.552H19.25v34.132H6V30zm106.587 20.246c-.283-3.039-1.36-5.494-3.233-7.367-1.873-1.873-4.399-2.809-7.579-2.809-2.19 0-4.08.406-5.67 1.219a12.435 12.435 0 00-4.029 3.233c-1.095 1.343-1.979 2.88-2.65 4.611a37.696 37.696 0 00-1.643 5.459 46.08 46.08 0 00-.9 5.671 722.213 722.213 0 00-.478 5.247l.212.212c1.625-2.968 3.87-5.176 6.731-6.625 2.862-1.449 5.954-2.173 9.275-2.173 3.675 0 6.96.636 9.858 1.908 2.897 1.272 5.353 3.021 7.367 5.247 2.014 2.226 3.551 4.858 4.611 7.897 1.06 3.039 1.59 6.325 1.59 9.858 0 3.604-.583 6.943-1.749 10.017-1.166 3.074-2.844 5.76-5.035 8.056-2.19 2.297-4.805 4.081-7.844 5.353-3.039 1.272-6.395 1.908-10.07 1.908-5.441 0-9.91-1.007-13.409-3.021-3.498-2.014-6.254-4.77-8.268-8.268-2.014-3.498-3.41-7.597-4.187-12.296-.777-4.7-1.166-9.77-1.166-15.211 0-4.452.477-8.94 1.431-13.462.954-4.523 2.526-8.639 4.717-12.349 2.19-3.71 5.07-6.731 8.64-9.063C92.676 31.166 97.075 30 102.304 30c2.968 0 5.76.495 8.374 1.484 2.615.99 4.93 2.367 6.943 4.134 2.014 1.767 3.657 3.887 4.93 6.36 1.271 2.473 1.978 5.23 2.12 8.268h-12.085zm-11.66 46.852c2.19 0 4.099-.442 5.724-1.325a12.869 12.869 0 004.081-3.445c1.095-1.413 1.908-3.056 2.438-4.929.53-1.873.795-3.798.795-5.777s-.265-3.887-.795-5.724c-.53-1.837-1.343-3.445-2.438-4.823-1.095-1.378-2.456-2.491-4.08-3.339-1.626-.848-3.534-1.272-5.725-1.272-2.19 0-4.116.406-5.777 1.219-1.66.813-3.056 1.908-4.187 3.286-1.13 1.378-1.979 2.986-2.544 4.823-.565 1.837-.848 3.78-.848 5.83 0 2.05.283 3.993.848 5.83.565 1.837 1.413 3.48 2.544 4.929a12.39 12.39 0 004.187 3.445c1.66.848 3.586 1.272 5.777 1.272z\"/></svg>"},"$:/core/images/help":{"title":"$:/core/images/help","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-help tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M36.055 111.441c-5.24 4.396-15.168 7.362-26.555 7.362-1.635 0-3.24-.06-4.806-.179 7.919-2.64 14.062-8.6 16.367-16.014C8.747 92.845 1.05 78.936 1.05 63.5c0-29.547 28.206-53.5 63-53.5s63 23.953 63 53.5-28.206 53.5-63 53.5c-10.055 0-19.56-2-27.994-5.559zm35.35-33.843a536.471 536.471 0 00.018-4.682 199.02 199.02 0 00-.023-3.042c.008-1.357.595-2.087 3.727-4.235.112-.077 1.085-.74 1.386-.948 3.093-2.133 5.022-3.786 6.762-6.187 2.34-3.228 3.558-7.077 3.558-11.649 0-13.292-9.86-21.952-21.455-21.952-11.103 0-22.499 9.609-24.066 22.295a6.023 6.023 0 1011.956 1.477c.806-6.527 6.972-11.726 12.11-11.726 5.265 0 9.408 3.64 9.408 9.906 0 3.634-1.1 5.153-5.111 7.919l-1.362.93c-2.682 1.84-4.227 3.1-5.7 4.931-2.109 2.62-3.242 5.717-3.258 9.314.013.892.02 1.86.022 2.981a470.766 470.766 0 01-.022 4.943 6.023 6.023 0 1012.046.12l.003-.395zm-6.027 24.499a7.529 7.529 0 100-15.058 7.529 7.529 0 000 15.058z\"/></svg>"},"$:/core/images/home-button":{"title":"$:/core/images/home-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-home-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M112.985 119.502c.01-.165.015-.331.015-.499V67.568c3.137 2.948 8.076 2.884 11.134-.174a7.999 7.999 0 00-.002-11.316L70.396 2.343A7.978 7.978 0 0064.734 0a7.957 7.957 0 00-5.656 2.343L33 28.42V8.007C33 3.585 29.41 0 25 0c-4.418 0-8 3.59-8 8.007V44.42L5.342 56.078c-3.125 3.125-3.12 8.198-.002 11.316a7.999 7.999 0 0011.316-.003l.344-.343v52.945a8.11 8.11 0 000 .007c0 4.418 3.588 8 8 8h80c4.419 0 8-3.59 8-8a8.11 8.11 0 00-.015-.498zM97 112V51.574L64.737 19.31 33 51.048V112h64z\"/></svg>"},"$:/core/images/import-button":{"title":"$:/core/images/import-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-import-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M114.832 60.436s3.235-3.27 6.921.417c3.686 3.686.231 7.14.231 7.14l-42.153 42.92s-30.765 32.367-58.798 4.333C-7 87.213 24.59 55.623 24.59 55.623L67.363 12.85s22.725-24.6 43.587-3.738c20.862 20.862-3.96 43.09-3.96 43.09l-35.04 35.04S49.903 112.546 36.426 99.07c-13.476-13.477 11.83-35.523 11.83-35.523l35.04-35.04s3.902-3.902 7.78-.023c3.879 3.878.118 7.921.118 7.921l-35.04 35.04s-13.212 13.212-8.872 17.551c4.34 4.34 16.77-9.653 16.77-9.653l35.04-35.04s16.668-14.598 3.966-27.3c-13.893-13.892-27.565 3.702-27.565 3.702l-42.91 42.91s-23.698 23.698-3.658 43.738 43.012-4.385 43.012-4.385l42.895-42.533z\"/></svg>"},"$:/core/images/info-button":{"title":"$:/core/images/info-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-info-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\" transform=\"translate(.05)\"><path d=\"M64 128c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64C28.654 0 0 28.654 0 64c0 35.346 28.654 64 64 64zm0-16c26.51 0 48-21.49 48-48S90.51 16 64 16 16 37.49 16 64s21.49 48 48 48z\"/><circle cx=\"64\" cy=\"32\" r=\"8\"/><rect width=\"16\" height=\"56\" x=\"56\" y=\"48\" rx=\"8\"/></g></svg>"},"$:/core/images/input-button":{"title":"$:/core/images/input-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-input-button tc-image-button\" viewBox=\"0 0 22 22\"><path d=\"M1.375 22h19.249c.365 0 .716-.145.973-.404v.001c.258-.257.404-.607.403-.972v-11a1.376 1.376 0 0 0-2.75 0v9.625H2.75V9.625a1.376 1.376 0 0 0-2.75 0v11C0 21.384.617 22 1.375 22Z\"/><path d=\"m9.732 11.904-1.541-1.541a1.375 1.375 0 1 0-1.944 1.944l3.887 3.888c.258.258.608.402.973.402h-.001c.353 0 .705-.134.974-.402l3.888-3.889a1.376 1.376 0 0 0 .001-1.944 1.377 1.377 0 0 0-1.946 0l-1.541 1.542V1.376a1.375 1.375 0 1 0-2.75 0v10.528Z\"/></svg>"},"$:/core/images/italic":{"title":"$:/core/images/italic","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-italic tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M66.711 0h22.41L62.408 128H40z\"/></svg>"},"$:/core/images/layout-button":{"title":"$:/core/images/layout-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-layout-button tc-image-button\" viewBox=\"0 0 24 24\" stroke-width=\"1\" stroke=\"none\"><path d=\"M0 0h24v24H0z\" fill=\"none\"/><rect x=\"2\" y=\"2\" width=\"7\" height=\"7\" rx=\"2\"/><rect x=\"2\" y=\"13\" width=\"7\" height=\"9\" rx=\"2\"/><rect x=\"12\" y=\"2\" width=\"10\" height=\"20\" rx=\"2\"/></svg>"},"$:/core/images/left-arrow":{"title":"$:/core/images/left-arrow","created":"20150315234410875","modified":"20150315235324760","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-left-arrow tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M0 64.177c0-2.026.771-4.054 2.317-5.6l55.98-55.98a7.92 7.92 0 0111.195.001c3.086 3.085 3.092 8.104.001 11.195L19.111 64.175l50.382 50.382a7.92 7.92 0 010 11.195c-3.086 3.086-8.105 3.092-11.196.001l-55.98-55.98A7.892 7.892 0 010 64.177z\"/></svg>"},"$:/core/images/line-width":{"title":"$:/core/images/line-width","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-line-width tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M16 18h96a2 2 0 000-4H16a2 2 0 100 4zm0 17h96a4 4 0 100-8H16a4 4 0 100 8zm0 21h96a6 6 0 000-12H16a6 6 0 100 12zm0 29h96c5.523 0 10-4.477 10-10s-4.477-10-10-10H16c-5.523 0-10 4.477-10 10s4.477 10 10 10zm0 43h96c8.837 0 16-7.163 16-16s-7.163-16-16-16H16c-8.837 0-16 7.163-16 16s7.163 16 16 16z\"/></svg>"},"$:/core/images/link":{"title":"$:/core/images/link","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-link tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M42.263 69.38a31.919 31.919 0 006.841 10.13c12.5 12.5 32.758 12.496 45.255 0l22.627-22.628c12.502-12.501 12.497-32.758 0-45.255-12.5-12.5-32.758-12.496-45.254 0L49.104 34.255a32.333 32.333 0 00-2.666 3.019 36.156 36.156 0 0121.94.334l14.663-14.663c6.25-6.25 16.382-6.254 22.632-.004 6.248 6.249 6.254 16.373-.004 22.631l-22.62 22.62c-6.25 6.25-16.381 6.254-22.631.004a15.93 15.93 0 01-4.428-8.433 11.948 11.948 0 00-7.59 3.48l-6.137 6.137z\"/><path d=\"M86.35 59.234a31.919 31.919 0 00-6.84-10.13c-12.5-12.5-32.758-12.497-45.255 0L11.627 71.732c-12.501 12.5-12.496 32.758 0 45.254 12.5 12.5 32.758 12.497 45.255 0L79.51 94.36a32.333 32.333 0 002.665-3.02 36.156 36.156 0 01-21.94-.333l-14.663 14.663c-6.25 6.25-16.381 6.253-22.63.004-6.25-6.249-6.255-16.374.003-22.632l22.62-22.62c6.25-6.25 16.381-6.253 22.631-.003a15.93 15.93 0 014.428 8.432 11.948 11.948 0 007.59-3.48l6.137-6.136z\"/></g></svg>"},"$:/core/images/linkify":{"title":"$:/core/images/linkify","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-linkify-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M17.031 31.919H9.048V96.85h7.983v6.92H0V25h17.031v6.919zm24.66 0h-7.983V96.85h7.983v6.92H24.66V25h17.03v6.919zM67.77 56.422l11.975-3.903 2.306 7.096-12.063 3.903 7.628 10.379-6.12 4.435-7.63-10.467-7.45 10.2-5.943-4.523L58.1 63.518 45.95 59.35l2.306-7.096 12.064 4.17V43.825h7.45v12.596zM86.31 96.85h7.982V31.92H86.31V25h17.031v78.77H86.31v-6.92zm24.659 0h7.983V31.92h-7.983V25H128v78.77h-17.031v-6.92z\"/></svg>"},"$:/core/images/list-bullet":{"title":"$:/core/images/list-bullet","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-list-bullet tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M11.636 40.273c6.427 0 11.637-5.21 11.637-11.637C23.273 22.21 18.063 17 11.636 17 5.21 17 0 22.21 0 28.636c0 6.427 5.21 11.637 11.636 11.637zm0 34.909c6.427 0 11.637-5.21 11.637-11.637 0-6.426-5.21-11.636-11.637-11.636C5.21 51.91 0 57.12 0 63.545c0 6.427 5.21 11.637 11.636 11.637zm0 34.909c6.427 0 11.637-5.21 11.637-11.636 0-6.427-5.21-11.637-11.637-11.637C5.21 86.818 0 92.028 0 98.455c0 6.426 5.21 11.636 11.636 11.636zM34.91 22.818H128v11.637H34.91V22.818zm0 34.91H128v11.636H34.91V57.727zm0 34.908H128v11.637H34.91V92.636z\"/></svg>"},"$:/core/images/list-number":{"title":"$:/core/images/list-number","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-list-number tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M33.84 22.356H128v11.77H33.84v-11.77zm0 35.31H128v11.77H33.84v-11.77zm0 35.311H128v11.77H33.84v-11.77zM.38 42.631v-2.223h.998c.826 0 1.445-.14 1.858-.42.413-.28.619-.948.619-2.002V22.769c0-1.442-.193-2.336-.58-2.683-.385-.347-1.477-.52-3.275-.52v-2.143c3.502-.147 6.252-.955 8.25-2.423h2.117v22.865c0 .921.15 1.575.449 1.963.3.387.949.58 1.948.58h.998v2.223H.38zm-.3 35.356v-1.902c7.19-6.554 10.786-12.58 10.786-18.08 0-1.562-.326-2.81-.979-3.744-.652-.934-1.524-1.402-2.616-1.402-.893 0-1.655.317-2.287.952-.633.634-.95 1.364-.95 2.192 0 .974.247 1.829.74 2.563.106.16.16.28.16.36 0 .147-.16.28-.48.4-.213.08-.752.308-1.618.681-.839.374-1.358.561-1.558.561-.24 0-.512-.37-.819-1.111A6.2 6.2 0 010 57.064c0-1.949.849-3.544 2.547-4.785 1.698-1.242 3.798-1.862 6.302-1.862 2.463 0 4.53.67 6.202 2.012 1.67 1.341 2.506 3.093 2.506 5.256a8.644 8.644 0 01-.849 3.724c-.566 1.201-1.92 3.053-4.064 5.556a165.471 165.471 0 01-6.272 6.938h11.445l-1.019 5.726h-2.117c.08-.28.12-.534.12-.76 0-.388-.1-.631-.3-.731-.2-.1-.599-.15-1.198-.15H.08zm12.124 19.207c1.745.04 3.236.637 4.474 1.792 1.239 1.154 1.858 2.773 1.858 4.855 0 2.99-1.132 5.393-3.396 7.208-2.263 1.815-5 2.723-8.209 2.723-2.01 0-3.669-.384-4.974-1.151C.652 111.853 0 110.849 0 109.607c0-.774.27-1.398.809-1.872.54-.474 1.128-.71 1.768-.71.639 0 1.162.2 1.568.6.406.4.782 1.055 1.128 1.962.466 1.268 1.239 1.902 2.317 1.902 1.265 0 2.287-.477 3.066-1.431.78-.955 1.169-2.686 1.169-5.196 0-1.709-.12-3.023-.36-3.944-.24-.921-.792-1.382-1.658-1.382-.586 0-1.185.307-1.797.921-.493.494-.932.741-1.319.741-.333 0-.602-.147-.809-.44-.206-.294-.31-.574-.31-.841 0-.32.104-.594.31-.821.207-.227.69-.594 1.449-1.102 2.876-1.922 4.314-4.017 4.314-6.287 0-1.188-.306-2.092-.919-2.713a3.001 3.001 0 00-2.217-.93c-.799 0-1.525.263-2.177.79-.653.528-.979 1.158-.979 1.892 0 .641.253 1.235.76 1.782.172.2.259.367.259.5 0 .121-.57.428-1.708.922-1.139.494-1.854.74-2.147.74-.413 0-.75-.333-1.009-1-.26-.668-.39-1.282-.39-1.842 0-1.749.93-3.224 2.787-4.425 1.858-1.202 3.965-1.802 6.322-1.802 2.064 0 3.851.447 5.363 1.341 1.511.895 2.267 2.116 2.267 3.664 0 1.362-.57 2.623-1.708 3.784a13.387 13.387 0 01-3.945 2.784z\"/></svg>"},"$:/core/images/list":{"title":"$:/core/images/list","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-list tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M87.748 128H23.999c-4.418 0-7.999-3.59-7.999-8.007V8.007C16 3.585 19.588 0 24 0h80c4.419 0 8 3.59 8 8.007V104H91.25c-.965 0-1.84.392-2.473 1.025a3.476 3.476 0 00-1.029 2.476V128zm8-.12l15.88-15.88h-15.88v15.88zM40 15.508A3.502 3.502 0 0143.5 12h55c1.933 0 3.5 1.561 3.5 3.509v.982A3.502 3.502 0 0198.5 20h-55a3.498 3.498 0 01-3.5-3.509v-.982zM32 22a6 6 0 100-12 6 6 0 000 12zm8 9.509A3.502 3.502 0 0143.5 28h55c1.933 0 3.5 1.561 3.5 3.509v.982A3.502 3.502 0 0198.5 36h-55a3.498 3.498 0 01-3.5-3.509v-.982zm0 16A3.502 3.502 0 0143.5 44h55c1.933 0 3.5 1.561 3.5 3.509v.982A3.502 3.502 0 0198.5 52h-55a3.498 3.498 0 01-3.5-3.509v-.982zm0 16A3.502 3.502 0 0143.5 60h55c1.933 0 3.5 1.561 3.5 3.509v.982A3.502 3.502 0 0198.5 68h-55a3.498 3.498 0 01-3.5-3.509v-.982zm0 16A3.502 3.502 0 0143.5 76h55c1.933 0 3.5 1.561 3.5 3.509v.982A3.502 3.502 0 0198.5 84h-55a3.498 3.498 0 01-3.5-3.509v-.982zm0 16A3.502 3.502 0 0143.5 92h55c1.933 0 3.5 1.561 3.5 3.509v.982A3.502 3.502 0 0198.5 100h-55a3.498 3.498 0 01-3.5-3.509v-.982zm0 16A3.505 3.505 0 0143.497 108h33.006A3.497 3.497 0 0180 111.509v.982A3.505 3.505 0 0176.503 116H43.497A3.497 3.497 0 0140 112.491v-.982zM32 38a6 6 0 100-12 6 6 0 000 12zm0 16a6 6 0 100-12 6 6 0 000 12zm0 16a6 6 0 100-12 6 6 0 000 12zm0 16a6 6 0 100-12 6 6 0 000 12zm0 16a6 6 0 100-12 6 6 0 000 12zm0 16a6 6 0 100-12 6 6 0 000 12z\"/></svg>"},"$:/core/images/locked-padlock":{"title":"$:/core/images/locked-padlock","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-locked-padlock tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M96.472 64H105v32.01C105 113.674 90.674 128 73.001 128H56C38.318 128 24 113.677 24 96.01V64h8c.003-15.723.303-47.731 32.16-47.731 31.794 0 32.305 32.057 32.312 47.731zm-15.897 0H48.44c.002-16.287.142-32 15.719-32 15.684 0 16.977 16.136 16.415 32zM67.732 92.364A8.503 8.503 0 0064.5 76a8.5 8.5 0 00-3.498 16.25l-5.095 22.77H72.8l-5.07-22.656z\"/></svg>"},"$:/core/images/mail":{"title":"$:/core/images/mail","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-mail tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M122.827 104.894a7.986 7.986 0 01-2.834.516H8.007c-.812 0-1.597-.12-2.335-.345l34.163-34.163 20.842 20.842a3.998 3.998 0 003.418 1.134 4.003 4.003 0 003.395-1.134L88.594 70.64c.075.09.155.176.24.26l33.993 33.994zm5.076-6.237c.064-.406.097-.823.097-1.247v-64c0-.669-.082-1.318-.237-1.94L94.23 65.006c.09.075.177.154.261.239l33.413 33.413zm-127.698.56A8.023 8.023 0 010 97.41v-64c0-.716.094-1.41.271-2.071l33.907 33.906L.205 99.218zM5.93 25.684a8.012 8.012 0 012.078-.273h111.986c.766 0 1.507.108 2.209.308L64.083 83.837 5.93 25.683z\"/></svg>"},"$:/core/images/mastodon":{"title":"$:/core/images/mastodon","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-mastodon tc-image-button\" viewBox=\"0 0 128 128\">\n <path d=\"M112.716,76.735C111.231,85.764 99.411,95.646 85.836,97.561C78.757,98.559 71.787,99.476 64.355,99.073C52.201,98.415 42.61,95.646 42.61,95.646C42.61,97.044 42.683,98.374 42.829,99.619C44.409,113.79 54.723,114.639 64.493,115.035C74.354,115.434 83.134,112.163 83.134,112.163L83.539,122.695C83.539,122.695 76.642,127.071 64.355,127.875C57.58,128.315 49.167,127.674 39.369,124.61C18.118,117.965 14.463,91.202 13.904,64.048C13.733,55.985 13.839,48.383 13.839,42.024C13.839,14.257 29.238,6.118 29.238,6.118C37.002,1.905 50.326,0.134 64.177,-0L64.517,-0C78.369,0.134 91.701,1.905 99.465,6.118C99.465,6.118 114.864,14.257 114.864,42.024C114.864,42.024 115.057,62.511 112.716,76.735ZM96.7,44.179C96.7,37.307 95.219,31.847 92.245,27.807C89.177,23.767 85.16,21.696 80.174,21.696C74.403,21.696 70.034,24.316 67.146,29.556L64.337,35.118L61.529,29.556C58.64,24.316 54.271,21.696 48.501,21.696C43.514,21.696 39.497,23.767 36.43,27.807C33.455,31.847 31.974,37.307 31.974,44.179L31.974,77.8L43.249,77.8L43.249,45.167C43.249,38.288 45.699,34.796 50.599,34.796C56.017,34.796 58.733,38.938 58.733,47.128L58.733,64.99L69.941,64.99L69.941,47.128C69.941,38.938 72.657,34.796 78.075,34.796C82.975,34.796 85.425,38.288 85.425,45.167L85.425,77.8L96.7,77.8L96.7,44.179Z\"/>\n</svg>\n"},"$:/core/images/menu-button":{"title":"$:/core/images/menu-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-menu-button tc-image-button\" viewBox=\"0 0 128 128\"><rect width=\"128\" height=\"16\" y=\"16\" rx=\"8\"/><rect width=\"128\" height=\"16\" y=\"56\" rx=\"8\"/><rect width=\"128\" height=\"16\" y=\"96\" rx=\"8\"/></svg>"},"$:/core/images/minus-button":{"title":"$:/core/images/minus-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-minus-button tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M64 0c35.346 0 64 28.654 64 64 0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64C0 28.654 28.654 0 64 0zm.332 16c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z\"/><rect width=\"80\" height=\"16\" x=\"24\" y=\"56\" rx=\"8\"/></svg>"},"$:/core/images/mono-block":{"title":"$:/core/images/mono-block","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-mono-block tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M23.965 32.967h.357c.755 0 1.328.192 1.72.577.39.384.586.947.586 1.688 0 .824-.206 1.418-.618 1.782-.413.363-1.094.545-2.045.545h-6.31c-.965 0-1.65-.178-2.056-.535-.405-.356-.608-.954-.608-1.792 0-.811.203-1.391.608-1.74.406-.35 1.09-.525 2.055-.525h.734l-.86-2.453H8.471l-.902 2.453h.734c.95 0 1.632.178 2.044.535.413.356.619.933.619 1.73 0 .824-.206 1.418-.619 1.782-.412.363-1.094.545-2.044.545h-5.41c-.964 0-1.649-.182-2.054-.545-.406-.364-.608-.958-.608-1.782 0-.741.195-1.304.587-1.688.391-.385.964-.577 1.719-.577h.356l5.62-15.641H6.835c-.95 0-1.632-.182-2.044-.546-.412-.363-.619-.95-.619-1.76 0-.825.207-1.42.619-1.783.412-.363 1.094-.545 2.044-.545h7.863c1.244 0 2.118.67 2.62 2.013v.063l6.647 18.2zM12.98 17.326l-3.04 8.848h6.08l-3.04-8.848zm22.402 9.372v6.395h3.145c2.223 0 3.788-.245 4.697-.734.908-.49 1.362-1.307 1.362-2.453 0-1.16-.433-1.985-1.3-2.474-.866-.49-2.383-.734-4.55-.734h-3.354zm10.693-2.327c1.524.559 2.642 1.324 3.355 2.295.713.972 1.07 2.212 1.07 3.722 0 1.272-.308 2.432-.923 3.48-.615 1.049-1.496 1.909-2.642 2.58a7.499 7.499 0 01-2.254.849c-.832.174-2.01.262-3.533.262H30.202c-.922 0-1.583-.182-1.981-.545-.399-.364-.598-.958-.598-1.782 0-.741.189-1.304.566-1.688.378-.385.93-.577 1.657-.577h.356V17.326h-.356c-.727 0-1.28-.196-1.657-.587-.377-.392-.566-.965-.566-1.72 0-.81.203-1.401.608-1.771.406-.37 1.062-.556 1.971-.556h9.645c2.95 0 5.19.573 6.72 1.72 1.53 1.145 2.296 2.823 2.296 5.031 0 1.09-.234 2.052-.703 2.883-.468.832-1.163 1.513-2.086 2.045zM35.381 17.2v5.284h2.83c1.72 0 2.932-.203 3.638-.609.706-.405 1.06-1.09 1.06-2.054 0-.909-.319-1.573-.955-1.992-.636-.42-1.667-.63-3.093-.63h-3.48zm35.863-3.816c.28-.503.566-.86.86-1.07.293-.21.664-.314 1.111-.314.685 0 1.17.182 1.457.545.287.364.43.986.43 1.866l.042 5.452c0 .964-.157 1.614-.472 1.95-.314.335-.884.503-1.709.503-.587 0-1.037-.14-1.352-.42-.314-.28-.584-.796-.807-1.551-.364-1.328-.944-2.282-1.74-2.862-.797-.58-1.901-.87-3.313-.87-2.153 0-3.802.727-4.948 2.18-1.147 1.454-1.72 3.558-1.72 6.311 0 2.74.58 4.844 1.74 6.311 1.16 1.468 2.817 2.202 4.97 2.202 1.467 0 3.085-.49 4.854-1.468 1.768-.978 2.883-1.467 3.344-1.467.545 0 1.003.23 1.373.692.37.46.556 1.034.556 1.719 0 1.23-1.084 2.39-3.25 3.48-2.167 1.09-4.606 1.636-7.318 1.636-3.662 0-6.625-1.21-8.89-3.627-2.264-2.419-3.396-5.578-3.396-9.478 0-3.76 1.146-6.884 3.438-9.372 2.293-2.488 5.2-3.732 8.723-3.732.992 0 1.97.112 2.935.335.964.224 1.992.574 3.082 1.049zm10.22 19.583V17.326h-.356c-.755 0-1.328-.196-1.72-.587-.39-.392-.586-.965-.586-1.72 0-.81.21-1.401.629-1.771.42-.37 1.097-.556 2.034-.556h5.178c2.922 0 5.06.126 6.416.377 1.356.252 2.51.671 3.46 1.258 1.691 1.007 2.988 2.443 3.89 4.31.9 1.865 1.352 4.021 1.352 6.467 0 2.586-.514 4.847-1.541 6.783-1.028 1.936-2.485 3.4-4.372 4.393-.853.447-1.852.772-2.998.975-1.147.203-2.852.304-5.116.304h-6.269c-.965 0-1.65-.178-2.055-.535-.406-.356-.608-.954-.608-1.792 0-.741.195-1.304.587-1.688.391-.385.964-.577 1.72-.577h.356zm5.41-15.725v15.725h1.195c2.642 0 4.592-.646 5.85-1.94 1.258-1.292 1.887-3.28 1.887-5.965 0-2.641-.64-4.612-1.918-5.912-1.28-1.3-3.205-1.95-5.777-1.95-.335 0-.59.003-.765.01a7.992 7.992 0 00-.472.032zm35.067-.126h-9.75v5.368h3.69v-.252c0-.797.175-1.39.524-1.782.35-.392.88-.587 1.594-.587.629 0 1.142.178 1.54.534.4.357.598.808.598 1.353 0 .028.007.118.021.272.014.154.021.308.021.462v4.34c0 .936-.167 1.607-.503 2.013-.335.405-.88.608-1.635.608-.713 0-1.251-.19-1.615-.567-.363-.377-.545-.936-.545-1.677v-.377h-3.69v6.269h9.75v-2.495c0-.937.178-1.608.534-2.013.357-.405.94-.608 1.75-.608.798 0 1.367.2 1.71.597.342.399.513 1.073.513 2.024v5.074c0 .755-.146 1.258-.44 1.51-.293.251-.873.377-1.74.377h-17.172c-.923 0-1.583-.182-1.982-.545-.398-.364-.597-.958-.597-1.782 0-.741.189-1.304.566-1.688.377-.385.93-.577 1.656-.577h.357V17.326h-.357c-.712 0-1.261-.2-1.646-.598-.384-.398-.576-.968-.576-1.709 0-.81.203-1.401.608-1.771.405-.37 1.062-.556 1.97-.556h17.173c.853 0 1.43.13 1.73.388.3.258.45.772.45 1.54v4.698c0 .95-.174 1.631-.524 2.044-.35.412-.915.618-1.698.618-.81 0-1.394-.21-1.75-.629-.357-.419-.535-1.097-.535-2.033v-2.202zM19.77 47.641c.267-.504.55-.86.85-1.07.3-.21.675-.314 1.122-.314.685 0 1.17.181 1.457.545.287.363.43.985.43 1.866l.042 5.451c0 .965-.157 1.615-.472 1.95-.314.336-.891.504-1.73.504-.587 0-1.045-.144-1.373-.43-.329-.287-.598-.8-.807-1.541-.378-1.342-.958-2.3-1.74-2.873-.783-.573-1.88-.86-3.292-.86-2.153 0-3.799.727-4.938 2.181-1.14 1.454-1.709 3.557-1.709 6.311s.598 4.882 1.793 6.385C10.599 67.248 12.294 68 14.488 68c.503 0 1.077-.06 1.72-.179a23.809 23.809 0 002.264-.555v-3.313h-2.37c-.95 0-1.624-.175-2.023-.524-.398-.35-.597-.93-.597-1.74 0-.84.199-1.437.597-1.793.399-.357 1.073-.535 2.024-.535h7.569c.978 0 1.667.175 2.065.524.398.35.598.937.598 1.762 0 .74-.2 1.31-.598 1.708-.398.399-.975.598-1.73.598h-.335v5.242c0 .447-.05.758-.147.933-.098.174-.293.353-.587.534-.797.476-2.062.895-3.795 1.258a25.576 25.576 0 01-5.263.546c-3.662 0-6.625-1.21-8.89-3.628-2.264-2.418-3.397-5.577-3.397-9.477 0-3.76 1.147-6.884 3.44-9.372 2.292-2.488 5.199-3.732 8.721-3.732.979 0 1.954.112 2.925.335.972.224 2.003.573 3.093 1.049zm15.84 3.941v4.823h6.857v-4.823h-.336c-.754 0-1.331-.195-1.73-.587-.398-.391-.597-.964-.597-1.719 0-.825.206-1.419.619-1.782.412-.364 1.093-.545 2.044-.545h5.41c.95 0 1.624.181 2.023.545.398.363.597.957.597 1.782 0 .755-.192 1.328-.576 1.72-.385.39-.947.586-1.688.586h-.357v15.642h.357c.755 0 1.328.192 1.719.576.391.385.587.947.587 1.688 0 .825-.203 1.419-.608 1.782-.405.364-1.09.546-2.055.546h-5.41c-.964 0-1.649-.179-2.054-.535-.405-.357-.608-.954-.608-1.793 0-.74.2-1.303.598-1.688.398-.384.975-.576 1.73-.576h.335v-6.186h-6.856v6.186h.335c.755 0 1.331.192 1.73.576.398.385.597.947.597 1.688 0 .825-.206 1.419-.618 1.782-.412.364-1.094.546-2.044.546h-5.41c-.964 0-1.65-.179-2.055-.535-.405-.357-.608-.954-.608-1.793 0-.74.196-1.303.587-1.688.392-.384.965-.576 1.72-.576h.356V51.582h-.356c-.741 0-1.304-.195-1.688-.587-.385-.391-.577-.964-.577-1.719 0-.825.2-1.419.598-1.782.398-.364 1.073-.545 2.023-.545h5.41c.936 0 1.614.181 2.033.545.42.363.63.957.63 1.782 0 .755-.2 1.328-.598 1.72-.399.39-.975.586-1.73.586h-.335zm31.754 0v15.642h3.523c.95 0 1.632.178 2.044.534.412.357.618.933.618 1.73 0 .811-.21 1.402-.629 1.772-.419.37-1.097.556-2.033.556H58.433c-.95 0-1.632-.182-2.044-.546-.412-.363-.619-.957-.619-1.782 0-.81.203-1.39.608-1.74.406-.35 1.09-.524 2.055-.524h3.523V51.582h-3.523c-.95 0-1.632-.181-2.044-.545-.412-.363-.619-.95-.619-1.761 0-.825.203-1.412.608-1.761.406-.35 1.09-.524 2.055-.524h12.455c.992 0 1.684.174 2.075.524.392.35.587.936.587 1.761 0 .81-.202 1.398-.608 1.761-.405.364-1.09.545-2.054.545h-3.523zm30.496 0v11.994c0 1.873-.122 3.228-.367 4.067a5.876 5.876 0 01-1.227 2.244c-.74.852-1.768 1.495-3.082 1.929-1.314.433-2.893.65-4.738.65-1.3 0-2.555-.126-3.764-.378a16.843 16.843 0 01-3.491-1.132c-.615-.28-1.017-.643-1.206-1.09-.188-.448-.283-1.175-.283-2.18v-4.32c0-1.202.175-2.04.525-2.516.349-.475.957-.713 1.824-.713 1.244 0 1.929.915 2.054 2.747.014.321.035.566.063.733.168 1.622.545 2.73 1.133 3.324.587.594 1.523.89 2.81.89 1.593 0 2.714-.422 3.364-1.268.65-.845.975-2.386.975-4.623V51.582H88.93c-.95 0-1.632-.181-2.044-.545-.413-.363-.619-.95-.619-1.761 0-.825.2-1.412.598-1.761.398-.35 1.086-.524 2.065-.524h10.693c.979 0 1.667.174 2.065.524.399.35.598.936.598 1.761 0 .81-.206 1.398-.619 1.761-.412.364-1.093.545-2.044.545h-1.761zm14.644 0v6.353l6.48-6.478c-.728-.084-1.238-.29-1.531-.619-.294-.328-.44-.85-.44-1.562 0-.825.198-1.419.597-1.782.398-.364 1.073-.545 2.023-.545h5.137c.95 0 1.625.181 2.023.545.399.363.598.957.598 1.782 0 .769-.2 1.345-.598 1.73-.398.384-.982.576-1.75.576h-.483l-6.101 6.06c1.132.839 2.167 1.94 3.103 3.302.937 1.363 2.034 3.456 3.292 6.28h.692c.825 0 1.44.188 1.845.566.405.377.608.943.608 1.698 0 .825-.206 1.419-.619 1.782-.412.364-1.093.546-2.044.546h-2.579c-1.132 0-2.048-.762-2.746-2.286-.126-.28-.224-.503-.294-.67-.923-1.958-1.768-3.467-2.537-4.53a16.616 16.616 0 00-2.705-2.914l-1.97 1.887v3.92h.335c.755 0 1.331.193 1.73.577.398.385.597.947.597 1.688 0 .825-.206 1.419-.618 1.782-.413.364-1.094.546-2.045.546h-5.41c-.964 0-1.649-.179-2.054-.535-.405-.357-.608-.954-.608-1.793 0-.74.196-1.303.587-1.688.391-.384.965-.576 1.72-.576h.356V51.582h-.357c-.74 0-1.303-.195-1.687-.587-.385-.391-.577-.964-.577-1.719 0-.825.2-1.419.598-1.782.398-.364 1.072-.545 2.023-.545h5.41c.936 0 1.614.181 2.033.545.42.363.63.957.63 1.782 0 .755-.2 1.328-.598 1.72-.399.39-.975.586-1.73.586h-.336zM13.44 96.326l4.005-11.889c.251-.782.6-1.352 1.048-1.709.447-.356 1.041-.534 1.782-.534h3.271c.95 0 1.632.182 2.044.545.413.363.619.957.619 1.782 0 .755-.2 1.328-.598 1.72-.398.39-.975.587-1.73.587h-.335l.587 15.641h.357c.754 0 1.32.192 1.698.577.377.384.566.947.566 1.687 0 .825-.2 1.42-.598 1.783-.398.363-1.072.545-2.023.545h-4.718c-.95 0-1.624-.178-2.023-.535-.398-.356-.597-.954-.597-1.793 0-.74.192-1.303.576-1.687.385-.385.954-.577 1.709-.577h.335l-.293-12.79-3.061 9.52c-.224.712-.542 1.226-.954 1.54-.413.315-.982.472-1.709.472-.727 0-1.303-.157-1.73-.472-.426-.314-.751-.828-.975-1.54l-3.04-9.52-.294 12.79h.336c.755 0 1.324.192 1.709.577.384.384.576.947.576 1.687 0 .825-.202 1.42-.608 1.783-.405.363-1.076.545-2.013.545H2.621c-.937 0-1.608-.182-2.013-.545-.405-.364-.608-.958-.608-1.783 0-.74.192-1.303.577-1.687.384-.385.954-.577 1.708-.577h.336l.608-15.641h-.336c-.754 0-1.331-.196-1.73-.588-.398-.39-.597-.964-.597-1.719 0-.825.206-1.419.619-1.782.412-.363 1.093-.545 2.044-.545h3.27c.728 0 1.311.175 1.752.524.44.35.8.923 1.08 1.72l4.109 11.888zm30.454 2.054V86.828H42.74c-.922 0-1.583-.182-1.981-.546-.398-.363-.598-.95-.598-1.76 0-.812.2-1.402.598-1.773.398-.37 1.059-.555 1.981-.555h5.955c.909 0 1.566.185 1.97.555.406.37.609.961.609 1.772 0 .741-.192 1.31-.577 1.709-.384.398-.933.598-1.646.598h-.356v19.038c0 .657-.07 1.069-.21 1.237-.14.167-.454.251-.943.251h-2.097c-.67 0-1.143-.07-1.415-.21-.273-.14-.507-.384-.703-.733l-8.722-15.327v11.385h1.216c.909 0 1.559.175 1.95.524.392.35.587.93.587 1.74 0 .825-.199 1.42-.597 1.783-.399.363-1.045.545-1.94.545h-6.017c-.909 0-1.566-.182-1.971-.545-.406-.364-.608-.958-.608-1.783 0-.74.188-1.303.566-1.687.377-.385.936-.577 1.677-.577h.336V86.828h-.336c-.713 0-1.265-.2-1.656-.598-.392-.398-.587-.968-.587-1.709 0-.81.206-1.401.618-1.772.413-.37 1.066-.555 1.96-.555h3.44c.824 0 1.383.108 1.677.325.293.216.622.653.985 1.31l7.989 14.551zM64.66 86.366c-1.803 0-3.218.727-4.245 2.18-1.028 1.455-1.541 3.474-1.541 6.06 0 2.586.517 4.613 1.551 6.08 1.034 1.468 2.446 2.202 4.235 2.202 1.804 0 3.222-.73 4.257-2.19 1.034-1.461 1.551-3.492 1.551-6.092 0-2.586-.513-4.605-1.54-6.06-1.028-1.453-2.45-2.18-4.268-2.18zm0-4.864c3.44 0 6.27 1.23 8.492 3.69 2.223 2.46 3.334 5.598 3.334 9.414 0 3.844-1.104 6.99-3.313 9.436-2.208 2.446-5.046 3.669-8.513 3.669-3.424 0-6.255-1.234-8.491-3.701-2.237-2.467-3.355-5.602-3.355-9.404 0-3.83 1.108-6.971 3.323-9.424 2.216-2.454 5.057-3.68 8.523-3.68zM87.461 98.17v4.298h2.16c.908 0 1.555.175 1.94.524.384.35.576.93.576 1.74 0 .825-.196 1.42-.587 1.783-.392.363-1.035.545-1.93.545h-7.254c-.922 0-1.583-.182-1.981-.545-.399-.364-.598-.958-.598-1.783 0-.74.189-1.303.566-1.687.378-.385.93-.577 1.657-.577h.356V86.828h-.356c-.713 0-1.262-.2-1.646-.598-.385-.398-.577-.968-.577-1.709 0-.81.203-1.401.608-1.772.406-.37 1.063-.555 1.971-.555h8.66c3.424 0 6.014.657 7.768 1.97 1.754 1.315 2.631 3.25 2.631 5.809 0 2.697-.873 4.738-2.62 6.122-1.748 1.384-4.34 2.076-7.78 2.076h-3.564zm0-11.343v6.625h2.977c1.65 0 2.89-.28 3.722-.839.832-.559 1.248-1.397 1.248-2.516 0-1.048-.43-1.855-1.29-2.421-.86-.566-2.086-.85-3.68-.85h-2.977zm27.267 20.568l-1.636 1.636a12.37 12.37 0 011.772-.44c.58-.098 1.15-.147 1.709-.147 1.104 0 2.268.164 3.491.492 1.223.329 1.967.493 2.233.493.447 0 1.03-.15 1.75-.45.72-.301 1.206-.452 1.458-.452.517 0 .947.2 1.29.598.342.398.513.898.513 1.5 0 .796-.472 1.474-1.415 2.033-.944.56-2.1.839-3.47.839-.937 0-2.139-.22-3.607-.66-1.467-.441-2.53-.661-3.187-.661-.992 0-2.11.272-3.354.817-1.244.546-2.013.818-2.307.818a2.14 2.14 0 01-1.53-.597c-.42-.399-.63-.878-.63-1.437 0-.391.134-.807.4-1.247.265-.44.733-1.01 1.404-1.709l2.118-2.139c-2.335-.852-4.194-2.386-5.578-4.602-1.384-2.215-2.075-4.763-2.075-7.642 0-3.802 1.104-6.909 3.312-9.32 2.209-2.411 5.053-3.617 8.534-3.617 3.467 0 6.304 1.209 8.513 3.627 2.208 2.418 3.312 5.522 3.312 9.31 0 3.774-1.097 6.884-3.291 9.33-2.195 2.446-4.977 3.67-8.345 3.67a22.5 22.5 0 01-1.384-.043zm1.195-21.03c-1.803 0-3.218.727-4.246 2.18-1.027 1.455-1.54 3.474-1.54 6.06 0 2.586.516 4.613 1.55 6.08 1.035 1.468 2.447 2.202 4.236 2.202 1.803 0 3.222-.73 4.256-2.19 1.035-1.461 1.552-3.492 1.552-6.092 0-2.586-.514-4.605-1.541-6.06-1.028-1.453-2.45-2.18-4.267-2.18z\"/></svg>"},"$:/core/images/mono-line":{"title":"$:/core/images/mono-line","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-mono-line tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M60.437 84.523h.908c1.922 0 3.381.489 4.378 1.468.997.979 1.495 2.411 1.495 4.298 0 2.1-.525 3.612-1.575 4.538-1.05.925-2.785 1.388-5.206 1.388h-16.07c-2.456 0-4.2-.454-5.232-1.361-1.032-.908-1.548-2.43-1.548-4.565 0-2.065.516-3.542 1.548-4.432 1.032-.89 2.776-1.334 5.232-1.334h1.869l-2.19-6.247H20.983l-2.296 6.247h1.87c2.42 0 4.155.453 5.205 1.361 1.05.908 1.575 2.376 1.575 4.405 0 2.1-.525 3.612-1.575 4.538-1.05.925-2.785 1.388-5.206 1.388H6.781c-2.456 0-4.2-.463-5.233-1.388C.516 93.9 0 92.389 0 90.289c0-1.887.498-3.32 1.495-4.298.997-.979 2.456-1.468 4.378-1.468h.908l14.308-39.83h-4.271c-2.42 0-4.156-.462-5.206-1.387-1.05-.926-1.575-2.42-1.575-4.485 0-2.1.525-3.613 1.575-4.538 1.05-.926 2.785-1.388 5.206-1.388h20.021c3.168 0 5.392 1.708 6.674 5.125v.16l16.924 46.343zm-27.976-39.83L24.72 67.225h15.483l-7.742-22.53zM89.506 68.56v16.284h8.008c5.66 0 9.646-.623 11.96-1.869 2.313-1.245 3.47-3.328 3.47-6.246 0-2.955-1.103-5.055-3.31-6.3-2.207-1.246-6.069-1.869-11.586-1.869h-8.542zm27.229-5.926c3.88 1.423 6.727 3.372 8.542 5.846 1.815 2.474 2.723 5.633 2.723 9.477 0 3.239-.783 6.193-2.35 8.862-1.565 2.67-3.808 4.859-6.726 6.567-1.709.997-3.622 1.718-5.74 2.163-2.118.445-5.116.667-8.996.667h-27.87c-2.349 0-4.03-.463-5.045-1.388-1.014-.926-1.521-2.438-1.521-4.538 0-1.887.48-3.32 1.441-4.298.961-.979 2.367-1.468 4.218-1.468h.907v-39.83h-.907c-1.851 0-3.257-.498-4.218-1.494-.961-.997-1.441-2.456-1.441-4.378 0-2.065.516-3.568 1.548-4.512 1.032-.943 2.705-1.414 5.018-1.414h24.56c7.51 0 13.214 1.459 17.111 4.377 3.898 2.92 5.847 7.19 5.847 12.814 0 2.776-.597 5.223-1.789 7.341-1.192 2.118-2.963 3.853-5.312 5.206zm-27.23-18.26v13.455h7.208c4.378 0 7.466-.516 9.264-1.549 1.797-1.032 2.696-2.776 2.696-5.232 0-2.313-.81-4.004-2.43-5.072-1.619-1.068-4.244-1.602-7.874-1.602h-8.863z\"/></svg>"},"$:/core/images/network-activity":{"title":"$:/core/images/network-activity","tags":"$:/tags/Image","text":"<svg width=\"22pt\" height=\"22pt\" class=\"tc-image-network-activity tc-image-button\" viewBox=\"0 0 128 128\"><g class={{{ [{$:/state/http-requests}match[0]then[]else[tc-network-activity-background]] }}}>\n<$list filter=\"[{$:/state/http-requests}match[0]]\" variable=\"ignore\">\n<path d=\"M64.043 45.153a4.002 4.002 0 0 1 4.367 2.21l.084.188 30.403 73.4a4 4 0 0 1-7.307 3.25l-.084-.188-3.103-7.49-8.898 8.899a3.985 3.985 0 0 1-2.624 1.166l-.205.005a3.987 3.987 0 0 1-2.828-1.171l-9.849-9.848-9.847 9.848a3.985 3.985 0 0 1-2.624 1.166l-.204.005a3.987 3.987 0 0 1-2.829-1.171l-8.899-8.9-3.102 7.491a4 4 0 1 1-7.391-3.062l30.403-73.4a4.001 4.001 0 0 1 4.495-2.39l.042-.008Zm13.636 56.74-8.023 8.024 7.02 7.019 8.023-8.022-7.02-7.02Zm-27.353.008-7.019 7.019 8.016 8.016 7.019-7.02-8.016-8.015Zm13.68-13.68-8.023 8.023 8.016 8.016 8.023-8.023-8.016-8.016Zm-8.971-8.971-4.687 11.315 8.001-8.001-3.314-3.314Zm17.933.009-3.305 3.305 7.979 7.979-4.674-11.284ZM64 57.607l-5.666 13.68c.096.072.188.15.278.232l.133.126 5.261 5.262 5.262-5.262c.128-.127.261-.244.4-.35L64 57.607Zm0-34.69a8 8 0 1 1 0 16 8 8 0 0 1 0-16Z\"/>\n</$list>\n<$list filter=\"[{$:/state/http-requests}!match[0]]\" variable=\"ignore\">\n<path d=\"M109.395.952a4.002 4.002 0 0 1 3.787 2.708C117.529 11.62 120 20.753 120 30.462c0 15.186-6.044 28.96-15.858 39.047a4 4 0 1 1-6.47-4.626l-.12-.094C106.466 56.074 112 43.914 112 30.462c0-8.492-2.205-16.469-6.074-23.39l.054-.036a4 4 0 0 1 3.415-6.084Zm-90.762 0a4 4 0 0 1 3.072 6.562l.093.06A47.786 47.786 0 0 0 16 30.463c0 13.315 5.42 25.363 14.176 34.058l-.01.007a4 4 0 1 1-6.312 4.863l-.063.05C14.017 59.359 8 45.613 8 30.462c0-9.77 2.502-18.956 6.9-26.952A4.002 4.002 0 0 1 18.634.952Z\"/><path d=\"M64.043 44.698a4.002 4.002 0 0 1 4.367 2.21l.084.188 30.403 73.4a4 4 0 0 1-7.307 3.25l-.084-.188-3.103-7.49-8.898 8.9a3.985 3.985 0 0 1-2.624 1.166l-.205.005a3.987 3.987 0 0 1-2.828-1.172l-9.849-9.848-9.847 9.848a3.985 3.985 0 0 1-2.624 1.167l-.204.005a3.987 3.987 0 0 1-2.829-1.172l-8.899-8.899-3.102 7.49a4 4 0 0 1-7.391-3.061l30.403-73.4a4.001 4.001 0 0 1 4.495-2.39l.042-.009ZM77.68 101.44l-8.023 8.023 7.02 7.019 8.023-8.022-7.02-7.02Zm-27.353.007-7.019 7.019 8.016 8.016 7.019-7.019-8.016-8.016Zm13.68-13.68-8.023 8.023 8.016 8.016 8.023-8.023-8.016-8.016Zm-8.971-8.971L50.348 90.11l8.001-8.001-3.314-3.314Zm17.933.009-3.305 3.305 7.979 7.979-4.674-11.284ZM64 57.152l-5.666 13.68c.096.073.188.15.278.232l.133.127 5.261 5.261 5.262-5.261c.128-.128.261-.244.4-.351L64 57.152ZM38.503 1.058a4 4 0 0 1 2.7 6.952l.17-.175C35.582 13.625 32 21.625 32 30.462c0 8.838 3.582 16.838 9.374 22.629a4 4 0 0 1-5.659 5.658l-.01.01C28.473 51.52 24 41.526 24 30.485 24 19.567 28.374 9.67 35.466 2.453a3.995 3.995 0 0 1 3.037-1.395ZM89.369.952c1.14 0 2.17.478 2.899 1.244l.005-.006C99.518 9.43 104 19.434 104 30.485c0 10.826-4.3 20.648-11.287 27.85a4 4 0 1 1-6.054-5.213l-.032-.032C92.418 47.299 96 39.299 96 30.462c0-8.73-3.496-16.643-9.164-22.416A4 4 0 0 1 89.368.952Zm-39.282 11.14a4 4 0 0 1 2.59 7.048l.01.009A15.95 15.95 0 0 0 48 30.462a15.95 15.95 0 0 0 4.687 11.315l-.01.01a4 4 0 1 1-5.82 5.47l.173.177A23.925 23.925 0 0 1 40 30.462a23.925 23.925 0 0 1 7.03-16.97l.01.01a3.991 3.991 0 0 1 3.047-1.41Zm27.895.07a3.99 3.99 0 0 1 2.984 1.336l.006-.005A23.925 23.925 0 0 1 88 30.463a23.92 23.92 0 0 1-6.707 16.642l-.3.305a4 4 0 1 1-5.679-5.632v-.002A15.95 15.95 0 0 0 80 30.462a15.95 15.95 0 0 0-4.685-11.312 4.012 4.012 0 0 1-1.333-2.987 4 4 0 0 1 4-4ZM64 22.463a8 8 0 1 1 0 16 8 8 0 0 1 0-16Z\"/>\n</$list>\n</g></svg>"},"$:/core/images/new-button":{"title":"$:/core/images/new-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-new-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M56 72H8.007C3.591 72 0 68.418 0 64c0-4.41 3.585-8 8.007-8H56V8.007C56 3.591 59.582 0 64 0c4.41 0 8 3.585 8 8.007V56h47.993c4.416 0 8.007 3.582 8.007 8 0 4.41-3.585 8-8.007 8H72v47.993c0 4.416-3.582 8.007-8 8.007-4.41 0-8-3.585-8-8.007V72z\"/></svg>"},"$:/core/images/new-here-button":{"title":"$:/core/images/new-here-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-new-here-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M55.838 20.935l-3.572.938c-3.688.968-8.23 4.43-10.136 7.731L3.37 96.738c-1.905 3.3-.771 7.524 2.534 9.432l33.717 19.466c3.297 1.904 7.53.78 9.435-2.521l38.76-67.134c1.905-3.3 2.632-8.963 1.623-12.646L83.285 20.88c-1.009-3.68-4.821-5.884-8.513-4.915l-7.603 1.995.043.287c.524 3.394 2.053 7.498 4.18 11.55.418.163.829.36 1.23.59a8.864 8.864 0 014.438 8.169c.104.132.21.264.316.395l-.386.318a8.663 8.663 0 01-1.082 3.137c-2.42 4.192-7.816 5.608-12.051 3.163-4.12-2.379-5.624-7.534-3.476-11.671-2.177-4.394-3.788-8.874-4.543-12.964z\"/><path d=\"M69.554 44.76c-5.944-7.476-10.74-17.196-11.955-25.059-1.68-10.875 3.503-18.216 15.082-18.04 10.407.158 19.975 5.851 24.728 13.785 5.208 8.695 2.95 17.868-6.855 20.496l-2.037-7.601c4.232-1.134 4.999-4.248 2.24-8.853-3.37-5.626-10.465-9.848-18.146-9.965-6.392-.097-8.31 2.62-7.323 9.01.999 6.465 5.318 15.138 10.582 21.65l-.072.06c.559 1.553-4.17 6.44-5.938 4.888l-.005.004-.028-.034a1.323 1.323 0 01-.124-.135 2.618 2.618 0 01-.149-.205z\"/><rect width=\"16\" height=\"48\" x=\"96\" y=\"80\" rx=\"8\"/><rect width=\"48\" height=\"16\" x=\"80\" y=\"96\" rx=\"8\"/></g></svg>"},"$:/core/images/new-image-button":{"title":"$:/core/images/new-image-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-new-image-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M81.362 73.627l15.826-27.41a2.626 2.626 0 00-.962-3.59l-50.01-28.872a2.626 2.626 0 00-3.588.961L30.058 36.49l10.04-5.261c3.042-1.595 6.771.114 7.55 3.46l3.607 17.702 9.88.85a5.25 5.25 0 014.571 3.77c.034.115.1.344.199.671.165.553.353 1.172.562 1.843.595 1.914 1.23 3.85 1.872 5.678.207.588.412 1.156.614 1.701.625 1.685 1.209 3.114 1.725 4.207.255.54.485.977.726 1.427.214.212.547.425 1.011.622 1.141.482 2.784.74 4.657.758.864.008 1.71-.034 2.492-.11.448-.043.753-.085.871-.104.315-.053.625-.077.927-.076zM37.47 2.649A5.257 5.257 0 0144.649.725l63.645 36.746a5.257 5.257 0 011.923 7.178L73.47 108.294a5.257 5.257 0 01-7.177 1.923L2.649 73.47a5.257 5.257 0 01-1.924-7.177L37.471 2.649zm42.837 50.49a5.25 5.25 0 105.25-9.092 5.25 5.25 0 00-5.25 9.093zM96 112h-7.993c-4.419 0-8.007-3.582-8.007-8 0-4.41 3.585-8 8.007-8H96v-7.993C96 83.588 99.582 80 104 80c4.41 0 8 3.585 8 8.007V96h7.993c4.419 0 8.007 3.582 8.007 8 0 4.41-3.585 8-8.007 8H112v7.993c0 4.419-3.582 8.007-8 8.007-4.41 0-8-3.585-8-8.007V112zM33.347 51.791c7.428 7.948 9.01 10.69 7.449 13.394-1.56 2.703-13.838-2.328-16.094 1.58-2.256 3.908-.907 3.258-2.437 5.908l19.73 11.39s-5.605-8.255-4.235-10.628c2.515-4.356 8.77-1.256 10.365-4.019 2.414-4.181-5.103-9.639-14.778-17.625z\"/></svg>"},"$:/core/images/new-journal-button":{"title":"$:/core/images/new-journal-button","tags":"$:/tags/Image","text":"<$parameters size=\"22pt\" day=<<now \"DD\">>><svg width=<<size>> height=<<size>> class=\"tc-image-new-journal-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M102.545 112.818v11.818c0 1.306 1.086 2.364 2.425 2.364h6.06c1.34 0 2.425-1.058 2.425-2.364v-11.818h12.12c1.34 0 2.425-1.058 2.425-2.363v-5.91c0-1.305-1.085-2.363-2.424-2.363h-12.121V90.364c0-1.306-1.086-2.364-2.425-2.364h-6.06c-1.34 0-2.425 1.058-2.425 2.364v11.818h-12.12c-1.34 0-2.425 1.058-2.425 2.363v5.91c0 1.305 1.085 2.363 2.424 2.363h12.121zM60.016 4.965c-4.781-2.76-10.897-1.118-13.656 3.66L5.553 79.305A9.993 9.993 0 009.21 92.963l51.04 29.468c4.78 2.76 10.897 1.118 13.655-3.66l40.808-70.681a9.993 9.993 0 00-3.658-13.656L60.016 4.965zm-3.567 27.963a6 6 0 106-10.393 6 6 0 00-6 10.393zm31.697 17.928a6 6 0 106-10.392 6 6 0 00-6 10.392z\"/><text class=\"tc-fill-background\" font-family=\"Helvetica\" font-size=\"47.172\" font-weight=\"bold\" transform=\"rotate(30 25.742 95.82)\"><tspan x=\"42\" y=\"77.485\" text-anchor=\"middle\"><$text text=<<day>>/></tspan></text></g></svg></$parameters>"},"$:/core/images/opacity":{"title":"$:/core/images/opacity","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-opacity tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M102.362 65a51.595 51.595 0 01-1.942 6H82.584a35.867 35.867 0 002.997-6h16.78zm.472-2c.423-1.961.734-3.963.929-6H87.656a35.78 35.78 0 01-1.368 6h16.546zm-3.249 10a51.847 51.847 0 01-3.135 6H75.812a36.205 36.205 0 005.432-6h18.341zm-4.416 8c-1.424 2.116-3 4.12-4.71 6H60.46a35.843 35.843 0 0012.874-6h21.834zm-7.513-34h16.107C101.247 20.627 79.033 0 52 0 23.281 0 0 23.281 0 52c0 25.228 17.965 46.26 41.8 51h20.4a51.66 51.66 0 0015.875-6H39v-2h42.25a52.257 52.257 0 007.288-6H39v-2h4.539C27.739 83.194 16 68.968 16 52c0-19.882 16.118-36 36-36 18.186 0 33.222 13.484 35.656 31zm.22 2h16.039a52.823 52.823 0 010 6H87.877a36.483 36.483 0 000-6z\"/><path d=\"M76 128c28.719 0 52-23.281 52-52s-23.281-52-52-52-52 23.281-52 52 23.281 52 52 52zm0-16c19.882 0 36-16.118 36-36S95.882 40 76 40 40 56.118 40 76s16.118 36 36 36z\"/><path d=\"M37 58h53v4H37v-4zm3-8h53v4H40v-4zm0-8h53v4H40v-4zm-8 24h53v4H32v-4zm-2 8h53v4H30v-4zm-3 8h53v4H27v-4z\"/></g></svg>"},"$:/core/images/open-window":{"title":"$:/core/images/open-window","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-open-window tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M16 112h88.994c3.87 0 7.006 3.59 7.006 8 0 4.418-3.142 8-7.006 8H7.006C3.136 128 0 124.41 0 120a9.321 9.321 0 010-.01V24.01C0 19.586 3.59 16 8 16c4.418 0 8 3.584 8 8.01V112z\"/><path d=\"M96 43.196V56a8 8 0 1016 0V24c0-4.41-3.585-8-8.007-8H72.007C67.588 16 64 19.582 64 24c0 4.41 3.585 8 8.007 8H84.57l-36.3 36.299a8 8 0 00-.001 11.316c3.117 3.117 8.19 3.123 11.316-.003L96 43.196zM32 7.999C32 3.581 35.588 0 40 0h80c4.419 0 8 3.588 8 8v80c0 4.419-3.588 8-8 8H40c-4.419 0-8-3.588-8-8V8z\"/></g></svg>"},"$:/core/images/options-button":{"title":"$:/core/images/options-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-options-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M110.488 76a47.712 47.712 0 01-5.134 12.384l6.724 6.724c3.123 3.123 3.132 8.192.011 11.313l-5.668 5.668c-3.12 3.12-8.186 3.117-11.313-.01l-6.724-6.725c-3.82 2.258-7.98 4-12.384 5.134v9.505c0 4.417-3.578 8.007-7.992 8.007h-8.016C55.58 128 52 124.415 52 119.993v-9.505a47.712 47.712 0 01-12.384-5.134l-6.724 6.725c-3.123 3.122-8.192 3.131-11.313.01l-5.668-5.668c-3.12-3.12-3.116-8.186.01-11.313l6.725-6.724c-2.257-3.82-4-7.98-5.134-12.384H8.007C3.591 76 0 72.422 0 68.01v-8.017C0 55.58 3.585 52 8.007 52h9.505a47.712 47.712 0 015.134-12.383l-6.724-6.725c-3.123-3.122-3.132-8.191-.011-11.312l5.668-5.669c3.12-3.12 8.186-3.116 11.313.01l6.724 6.725c3.82-2.257 7.98-4 12.384-5.134V8.007C52 3.591 55.578 0 59.992 0h8.016C72.42 0 76 3.585 76 8.007v9.505a47.712 47.712 0 0112.384 5.134l6.724-6.724c3.123-3.123 8.192-3.132 11.313-.01l5.668 5.668c3.12 3.12 3.116 8.186-.01 11.312l-6.725 6.725c2.257 3.82 4 7.979 5.134 12.383h9.505c4.416 0 8.007 3.578 8.007 7.992v8.017c0 4.411-3.585 7.991-8.007 7.991h-9.505zM64 96c17.673 0 32-14.327 32-32 0-17.673-14.327-32-32-32-17.673 0-32 14.327-32 32 0 17.673 14.327 32 32 32z\"/></svg>"},"$:/core/images/paint":{"title":"$:/core/images/paint","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-paint tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M83.527 76.19C90.43 69.287 91.892 59 87.91 50.665l37.903-37.902c2.919-2.92 2.913-7.659 0-10.572a7.474 7.474 0 00-10.572 0L77.338 40.093c-8.335-3.982-18.622-2.521-25.526 4.383l31.715 31.715zm-2.643 2.644L49.169 47.119S8.506 81.243 0 80.282c0 0 3.782 5.592 6.827 8.039 14.024-5.69 37.326-24.6 37.326-24.6l.661.66S19.45 90.222 9.18 92.047c1.222 1.44 4.354 4.053 6.247 5.776 5.417-1.488 34.733-28.57 34.733-28.57l.661.66-32.407 31.022 5.285 5.286L56.106 75.2l.662.66s-27.864 30.536-28.684 32.432c0 0 6.032 6.853 7.569 7.824.702-2.836 27.884-33.485 27.884-33.485l.661.66s-20.597 23.755-24.964 36.732c3.21 3.549 7.5 5.137 10.926 6.298-2.19-11.817 30.724-47.487 30.724-47.487z\"/></svg>"},"$:/core/images/palette":{"title":"$:/core/images/palette","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-palette tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M80.247 39.182a93.52 93.52 0 00-16.228-1.4C28.662 37.781 0 57.131 0 81.002c0 9.642 4.676 18.546 12.58 25.735C23.504 91.19 26.34 72.395 36.89 63.562c15.183-12.713 26.538-7.828 26.538-7.828l16.82-16.552zm26.535 9.655c13.049 7.913 21.257 19.392 21.257 32.166 0 9.35.519 17.411-11.874 25.08-10.797 6.681-3.824-6.536-11.844-10.898s-19.946 1.308-18.213 7.906c3.2 12.181 19.422 11.455 6.314 16.658-13.107 5.202-18.202 4.476-28.403 4.476-7.821 0-15.315-.947-22.243-2.68 9.844-4.197 27.88-12.539 33.354-19.456C82.788 92.409 87.37 80 83.324 72.484c-.194-.359 11.215-11.668 23.458-23.647zM1.134 123.867l-.66.002c33.479-14.94 22.161-64.226 58.818-64.226.317 1.418.644 2.944 1.062 4.494-25.907-4.166-23.567 48.031-59.22 59.73zm.713-.007c38.872-.506 78.152-22.347 78.152-44.813-9.27 0-14.073-3.48-16.816-7.942-16.597-7.003-30.365 45.715-61.336 52.755zm65.351-64.008c-4.45 4.115 4.886 16.433 11.318 11.318l45.27-45.27c11.317-11.318 0-22.635-11.318-11.318-11.317 11.318-33.518 34.405-45.27 45.27z\"/></svg>"},"$:/core/images/permalink-button":{"title":"$:/core/images/permalink-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-permalink-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M80.483 48l-7.387 32h-25.58l7.388-32h25.58zm3.694-16l5.624-24.358c.993-4.303 5.29-6.996 9.596-6.002 4.296.992 6.988 5.293 5.994 9.602L100.598 32h3.403c4.41 0 7.999 3.582 7.999 8 0 4.41-3.581 8-8 8h-7.096l-7.387 32H104c4.41 0 7.999 3.582 7.999 8 0 4.41-3.581 8-8 8H85.824l-5.624 24.358c-.993 4.303-5.29 6.996-9.596 6.002-4.296-.992-6.988-5.293-5.994-9.602L69.402 96h-25.58L38.2 120.358c-.993 4.303-5.29 6.996-9.596 6.002-4.296-.992-6.988-5.293-5.994-9.602L27.402 96h-3.403C19.59 96 16 92.418 16 88c0-4.41 3.581-8 8-8h7.096l7.387-32H24C19.59 48 16 44.418 16 40c0-4.41 3.581-8 8-8h18.177l5.624-24.358c.993-4.303 5.29-6.996 9.596-6.002 4.296.992 6.988 5.293 5.994 9.602L58.598 32h25.58z\"/></svg>"},"$:/core/images/permaview-button":{"title":"$:/core/images/permaview-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-permaview-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M81.483 48l-1.846 8h-5.58l1.847-8h5.58zm3.694-16l5.624-24.358c.993-4.303 5.29-6.996 9.596-6.002 4.296.992 6.988 5.293 5.994 9.602L101.598 32h2.403c4.41 0 7.999 3.582 7.999 8 0 4.41-3.581 8-8 8h-6.096l-1.847 8h7.944c4.41 0 7.999 3.582 7.999 8 0 4.41-3.581 8-8 8H92.364l-1.846 8H104c4.41 0 7.999 3.582 7.999 8 0 4.41-3.581 8-8 8H86.824l-5.624 24.358c-.993 4.303-5.29 6.996-9.596 6.002-4.296-.992-6.988-5.293-5.994-9.602L70.402 96h-5.58L59.2 120.358c-.993 4.303-5.29 6.996-9.596 6.002-4.296-.992-6.988-5.293-5.994-9.602L48.402 96h-5.58L37.2 120.358c-.993 4.303-5.29 6.996-9.596 6.002-4.296-.992-6.988-5.293-5.994-9.602L26.402 96h-2.403C19.59 96 16 92.418 16 88c0-4.41 3.581-8 8-8h6.096l1.847-8h-7.944C19.59 72 16 68.418 16 64c0-4.41 3.581-8 8-8h11.637l1.846-8H24C19.59 48 16 44.418 16 40c0-4.41 3.581-8 8-8h17.177l5.624-24.358c.993-4.303 5.29-6.996 9.596-6.002 4.296.992 6.988 5.293 5.994 9.602L57.598 32h5.58L68.8 7.642c.993-4.303 5.29-6.996 9.596-6.002 4.296.992 6.988 5.293 5.994 9.602L79.598 32h5.58zM53.904 48l-1.847 8h5.58l1.846-8h-5.579zm22.039 24l-1.847 8h-5.58l1.847-8h5.58zm-27.58 0l-1.846 8h5.579l1.847-8h-5.58z\"/></svg>"},"$:/core/images/picture":{"title":"$:/core/images/picture","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-picture tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M112 68.233v-48.23A4.001 4.001 0 00107.997 16H20.003A4.001 4.001 0 0016 20.003v38.31l9.241-14.593c2.8-4.422 9.023-5.008 12.6-1.186l18.247 20.613 13.687-6.407a8 8 0 018.903 1.492 264.97 264.97 0 002.92 2.739 249.44 249.44 0 006.798 6.066 166.5 166.5 0 002.106 1.778c2.108 1.747 3.967 3.188 5.482 4.237.748.518 1.383.92 2.044 1.33.444.117 1.046.144 1.809.05 1.873-.233 4.238-1.144 6.723-2.547a36.016 36.016 0 003.205-2.044c.558-.4.93-.686 1.07-.802.376-.31.765-.577 1.165-.806zM0 8.007A8.01 8.01 0 018.007 0h111.986A8.01 8.01 0 01128 8.007v111.986a8.01 8.01 0 01-8.007 8.007H8.007A8.01 8.01 0 010 119.993V8.007zM95 42a8 8 0 100-16 8 8 0 000 16zM32 76c15.859 4.83 20.035 7.244 20.035 12S32 95.471 32 102.347c0 6.876 1.285 4.99 1.285 9.653H68s-13.685-6.625-13.685-10.8c0-7.665 10.615-8.34 10.615-13.2 0-7.357-14.078-8.833-32.93-12z\"/></svg>"},"$:/core/images/plugin-generic-language":{"title":"$:/core/images/plugin-generic-language","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> viewBox=\"0 0 128 128\" class=\"tc-image-plugin-generic-language tc-image-button\"><path fill-rule=\"evenodd\" d=\"M61.207 68.137c-4.324 2.795-6.999 6.656-6.999 10.921 0 7.906 9.19 14.424 21.042 15.336 2.162 3.902 8.598 6.785 16.318 7.01-5.126-1.125-9.117-3.742-10.62-7.01C92.805 93.487 102 86.967 102 79.059c0-8.53-10.699-15.445-23.896-15.445-6.599 0-12.572 1.729-16.897 4.524zm12.794-14.158c-4.324 2.795-10.298 4.524-16.897 4.524-2.619 0-5.14-.272-7.497-.775-3.312 2.25-8.383 3.69-14.067 3.69l-.255-.002c4.119-.892 7.511-2.747 9.478-5.13-6.925-2.704-11.555-7.617-11.555-13.228 0-8.53 10.699-15.445 23.896-15.445C70.301 27.613 81 34.528 81 43.058c0 4.265-2.675 8.126-6.999 10.921zM64 0l54.56 32v64L64 128 9.44 96V32L64 0z\"/></svg>"},"$:/core/images/plugin-generic-plugin":{"title":"$:/core/images/plugin-generic-plugin","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> viewBox=\"0 0 128 128\" class=\"tc-image-plugin-generic-plugin tc-image-button\"><path fill-rule=\"evenodd\" d=\"M40.397 76.446V95.34h14.12l-.001-.005a6.912 6.912 0 005.364-11.593l.046-.023a6.912 6.912 0 119.979.526l.086.055a6.914 6.914 0 004.408 10.948l-.023.092h21.32V75.568l-.15.038a6.912 6.912 0 00-11.593-5.364l-.022-.046a6.912 6.912 0 11.526-9.979l.055-.086a6.914 6.914 0 0010.948-4.408c.079.018.158.038.236.059v-15.74h-21.32l.023-.094a6.914 6.914 0 01-4.408-10.947 10.23 10.23 0 00-.086-.055 6.912 6.912 0 10-9.979-.526l-.046.023a6.912 6.912 0 01-5.364 11.593l.001.005h-14.12v12.847A6.912 6.912 0 0129.5 59.843l-.054.086a6.912 6.912 0 10-.526 9.979l.023.046a6.912 6.912 0 0111.455 6.492zM64 0l54.56 32v64L64 128 9.44 96V32L64 0z\"/></svg>"},"$:/core/images/plugin-generic-theme":{"title":"$:/core/images/plugin-generic-theme","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> viewBox=\"0 0 128 128\" class=\"tc-image-plugin-generic-theme tc-image-button\"><path fill-rule=\"evenodd\" d=\"M29.408 91.472L51.469 69.41l-.004-.005a2.22 2.22 0 01.004-3.146c.87-.87 2.281-.872 3.147-.005l9.465 9.464a2.22 2.22 0 01-.005 3.147c-.87.87-2.28.871-3.147.005l-.005-.005-22.061 22.062a6.686 6.686 0 11-9.455-9.455zM60.802 66.38c-2.436-2.704-4.465-5.091-5.817-6.869-6.855-9.014-10.313-4.268-14.226 0-3.913 4.268 1.03 7.726-2.683 10.741-3.713 3.015-3.484 4.06-9.752-1.455-6.267-5.516-6.7-7.034-3.823-10.181 2.877-3.147 5.281 1.808 11.159-3.785 5.877-5.593.94-10.55.94-10.55s12.237-25.014 28.588-23.167c16.351 1.848-6.186-2.392-11.792 17.226-2.4 8.4.447 6.42 4.998 9.968 1.394 1.086 6.03 4.401 11.794 8.685l20.677-20.676 1.615-4.766 7.84-4.689 3.151 3.152-4.688 7.84-4.766 1.615-20.224 20.223c12.663 9.547 28.312 22.146 28.312 26.709 0 7.217-3.071 11.526-9.535 9.164-4.693-1.715-18.768-15.192-28.753-25.897l-2.893 2.893-3.151-3.152 3.029-3.029zM63.953 0l54.56 32v64l-54.56 32-54.56-32V32l54.56-32z\"/></svg>"},"$:/core/images/plus-button":{"title":"$:/core/images/plus-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-plus-button tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M64-.333c35.346 0 64 28.654 64 64 0 35.346-28.654 64-64 64-35.346 0-64-28.654-64-64 0-35.346 28.654-64 64-64zM64 16c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48z\"/><rect width=\"80\" height=\"16\" x=\"24\" y=\"56\" rx=\"8\"/><rect width=\"16\" height=\"80\" x=\"56\" y=\"24\" rx=\"8\"/></svg>"},"$:/core/images/preview-closed":{"title":"$:/core/images/preview-closed","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-preview-closed tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M.088 64a7.144 7.144 0 001.378 5.458C16.246 88.818 39.17 100.414 64 100.414c24.83 0 47.753-11.596 62.534-30.956A7.144 7.144 0 00127.912 64C110.582 78.416 88.304 87.086 64 87.086 39.696 87.086 17.418 78.416.088 64z\"/><rect width=\"4\" height=\"16\" x=\"62\" y=\"96\" rx=\"4\"/><rect width=\"4\" height=\"16\" x=\"78\" y=\"93\" rx=\"4\" transform=\"rotate(-5 80 101)\"/><rect width=\"4\" height=\"16\" x=\"46\" y=\"93\" rx=\"4\" transform=\"rotate(5 48 101)\"/><rect width=\"4\" height=\"16\" x=\"30\" y=\"88\" rx=\"4\" transform=\"rotate(10 32 96)\"/><rect width=\"4\" height=\"16\" x=\"94\" y=\"88\" rx=\"4\" transform=\"rotate(-10 96 96)\"/><rect width=\"4\" height=\"16\" x=\"110\" y=\"80\" rx=\"4\" transform=\"rotate(-20 112 88)\"/><rect width=\"4\" height=\"16\" x=\"14\" y=\"80\" rx=\"4\" transform=\"rotate(20 16 88)\"/></g></svg>"},"$:/core/images/preview-open":{"title":"$:/core/images/preview-open","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-preview-open tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M64.11 99.588c-24.83 0-47.754-11.596-62.534-30.957a7.148 7.148 0 010-8.675C16.356 40.596 39.28 29 64.11 29c24.83 0 47.753 11.596 62.534 30.956a7.148 7.148 0 010 8.675c-14.78 19.36-37.703 30.957-62.534 30.957zm46.104-32.007c1.44-1.524 1.44-3.638 0-5.162C99.326 50.9 82.439 44 64.147 44S28.968 50.9 18.08 62.42c-1.44 1.523-1.44 3.637 0 5.16C28.968 79.1 45.855 86 64.147 86s35.179-6.9 46.067-18.42z\"/><path d=\"M63.5 88C76.479 88 87 77.479 87 64.5S76.479 41 63.5 41 40 51.521 40 64.5 50.521 88 63.5 88z\"/></g></svg>"},"$:/core/images/print-button":{"title":"$:/core/images/print-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-print-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M112 71V30.5h-.032c-.035-2-.816-3.99-2.343-5.516L86.998 2.357A7.978 7.978 0 0081 .02V0H24a8 8 0 00-8 8v63h8V8h57v14.5c0 4.422 3.582 8 8 8h15V71h8z\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"36\" rx=\"4\"/><rect width=\"64\" height=\"8\" x=\"32\" y=\"52\" rx=\"4\"/><rect width=\"40\" height=\"8\" x=\"32\" y=\"20\" rx=\"4\"/><path d=\"M0 80.005C0 71.165 7.156 64 16 64h96c8.836 0 16 7.155 16 16.005v31.99c0 8.84-7.156 16.005-16 16.005H16c-8.836 0-16-7.155-16-16.005v-31.99zM104 96a8 8 0 100-16 8 8 0 000 16z\"/></g></svg>"},"$:/core/images/quote":{"title":"$:/core/images/quote","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-quote tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M51.219 117.713V62.199H27.427c0-8.891 1.683-16.401 5.047-22.53 3.365-6.127 9.613-10.754 18.745-13.878V2c-7.45.961-14.36 3.184-20.728 6.669-6.368 3.484-11.835 7.87-16.401 13.157C9.524 27.113 5.98 33.241 3.456 40.21.933 47.18-.21 54.63.03 62.56v55.153H51.22zm76.781 0V62.199h-23.791c0-8.891 1.682-16.401 5.046-22.53 3.365-6.127 9.613-10.754 18.745-13.878V2c-7.45.961-14.359 3.184-20.727 6.669-6.369 3.484-11.836 7.87-16.402 13.157-4.566 5.287-8.11 11.415-10.634 18.384-2.523 6.97-3.665 14.42-3.424 22.35v55.153H128z\"/></svg>"},"$:/core/images/refresh-button":{"title":"$:/core/images/refresh-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-refresh-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M106.369 39.433c10.16 20.879 6.57 46.764-10.771 64.106-21.87 21.87-57.327 21.87-79.196 0-21.87-21.87-21.87-57.326 0-79.196a8 8 0 1111.314 11.314c-15.621 15.62-15.621 40.947 0 56.568 15.62 15.621 40.947 15.621 56.568 0C97.72 78.79 99.6 58.175 89.924 42.73l-6.44 12.264a8 8 0 11-14.166-7.437L84.435 18.76a8 8 0 0110.838-3.345l28.873 15.345a8 8 0 11-7.51 14.129l-10.267-5.457zm-8.222-12.368c-.167-.19-.336-.38-.506-.57l.96-.296-.454.866z\"/></svg>"},"$:/core/images/right-arrow":{"title":"$:/core/images/right-arrow","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-right-arrow tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M99.069 64.173c0 2.027-.77 4.054-2.316 5.6l-55.98 55.98a7.92 7.92 0 01-11.196 0c-3.085-3.086-3.092-8.105 0-11.196l50.382-50.382-50.382-50.382a7.92 7.92 0 010-11.195c3.086-3.085 8.104-3.092 11.196 0l55.98 55.98a7.892 7.892 0 012.316 5.595z\"/></svg>"},"$:/core/images/rotate-left":{"title":"$:/core/images/rotate-left","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-rotate-left tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"32\" height=\"80\" rx=\"8\"/><rect width=\"80\" height=\"32\" x=\"48\" y=\"96\" rx=\"8\"/><path d=\"M61.32 36.65c19.743 2.45 35.023 19.287 35.023 39.693a4 4 0 01-8 0c0-15.663-11.254-28.698-26.117-31.46l3.916 3.916a4 4 0 11-5.657 5.657L49.172 43.142a4 4 0 010-5.657l11.313-11.313a4 4 0 115.657 5.656l-4.821 4.822z\"/></g></svg>"},"$:/core/images/save-button-dynamic":{"title":"$:/core/images/save-button-dynamic","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-save-button-dynamic tc-image-button\" viewBox=\"0 0 128 128\">\n<g class=\"tc-image-save-button-dynamic-clean\">\n<path fill-rule=\"evenodd\" d=\"M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z\"/>\n</g>\n<g class=\"tc-image-save-button-dynamic-dirty\">\n<path d=\"M64.856912,0 C100.203136,0 128.856912,28.653776 128.856912,64 C128.856912,99.346224 100.203136,128 64.856912,128 C29.510688,128 0.856911958,99.346224 0.856911958,64 C0.856911958,28.653776 29.510688,0 64.856912,0 Z M64.856912,16 C38.347244,16 16.856912,37.490332 16.856912,64 C16.856912,90.509668 38.347244,112 64.856912,112 C91.3665799,112 112.856912,90.509668 112.856912,64 C112.856912,37.490332 91.3665799,16 64.856912,16 Z\"></path>\n<circle cx=\"65\" cy=\"64\" r=\"32\"></circle>\n</g>\n</svg>"},"$:/core/images/save-button":{"title":"$:/core/images/save-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-save-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M120.783 34.33c4.641 8.862 7.266 18.948 7.266 29.646 0 35.347-28.653 64-64 64-35.346 0-64-28.653-64-64 0-35.346 28.654-64 64-64 18.808 0 35.72 8.113 47.43 21.03l2.68-2.68c3.13-3.13 8.197-3.132 11.321-.008 3.118 3.118 3.121 8.193-.007 11.32l-4.69 4.691zm-12.058 12.058a47.876 47.876 0 013.324 17.588c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48c14.39 0 27.3 6.332 36.098 16.362L58.941 73.544 41.976 56.578c-3.127-3.127-8.201-3.123-11.32-.005-3.123 3.124-3.119 8.194.006 11.319l22.617 22.617a7.992 7.992 0 005.659 2.347c2.05 0 4.101-.783 5.667-2.349l44.12-44.12z\"/></svg>"},"$:/core/images/size":{"title":"$:/core/images/size","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-size tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M92.343 26l-9.171 9.172a4 4 0 105.656 5.656l16-16a4 4 0 000-5.656l-16-16a4 4 0 10-5.656 5.656L92.343 18H22a4 4 0 00-4 4v70.343l-9.172-9.171a4 4 0 10-5.656 5.656l16 16a4 4 0 005.656 0l16-16a4 4 0 10-5.656-5.656L26 92.343V22l-4 4h70.343zM112 52v64l4-4H52a4 4 0 100 8h64a4 4 0 004-4V52a4 4 0 10-8 0z\"/></svg>"},"$:/core/images/spiral":{"title":"$:/core/images/spiral","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-spiral tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M64.534 68.348c3.39 0 6.097-2.62 6.476-5.968l-4.755-.538 4.75.583c.377-3.07-1.194-6.054-3.89-7.78-2.757-1.773-6.34-2.01-9.566-.7-3.46 1.403-6.14 4.392-7.35 8.148l-.01.026c-1.3 4.08-.72 8.64 1.58 12.52 2.5 4.2 6.77 7.2 11.76 8.27 5.37 1.15 11.11-.05 15.83-3.31 5.04-3.51 8.46-9.02 9.45-15.3 1.05-6.7-.72-13.63-4.92-19.19l.02.02c-4.42-5.93-11.2-9.82-18.78-10.78-7.96-1.01-16.13 1.31-22.59 6.43-6.81 5.39-11.18 13.41-12.11 22.26-.98 9.27 1.87 18.65 7.93 26.02 6.32 7.69 15.6 12.56 25.74 13.48 10.54.96 21.15-2.42 29.45-9.4l.01-.01c8.58-7.25 13.94-17.78 14.86-29.21.94-11.84-2.96-23.69-10.86-32.9-8.19-9.5-19.95-15.36-32.69-16.27-13.16-.94-26.24 3.49-36.34 12.34l.01-.01c-10.41 9.08-16.78 22.1-17.68 36.15-.93 14.44 4.03 28.77 13.79 39.78 10.03 11.32 24.28 18.2 39.6 19.09 15.73.92 31.31-4.56 43.24-15.234 12.23-10.954 19.61-26.44 20.5-43.074a4.785 4.785 0 00-4.52-5.03 4.778 4.778 0 00-5.03 4.52c-.75 14.1-7 27.2-17.33 36.45-10.03 8.98-23.11 13.58-36.3 12.81-12.79-.75-24.67-6.48-33-15.89-8.07-9.11-12.17-20.94-11.41-32.827.74-11.52 5.942-22.15 14.43-29.54l.01-.01c8.18-7.17 18.74-10.75 29.35-9.998 10.21.726 19.6 5.41 26.11 12.96 6.24 7.273 9.32 16.61 8.573 25.894-.718 8.9-4.88 17.064-11.504 22.66l.01-.007c-6.36 5.342-14.44 7.92-22.425 7.19-7.604-.68-14.52-4.314-19.21-10.027-4.44-5.4-6.517-12.23-5.806-18.94.67-6.3 3.76-11.977 8.54-15.766 4.46-3.54 10.05-5.128 15.44-4.44 5.03.63 9.46 3.18 12.32 7.01l.02.024c2.65 3.5 3.75 7.814 3.1 11.92-.59 3.71-2.58 6.925-5.45 8.924-2.56 1.767-5.61 2.403-8.38 1.81-2.42-.516-4.42-1.92-5.53-3.79-.93-1.56-1.15-3.3-.69-4.75l-4.56-1.446L59.325 65c.36-1.12 1.068-1.905 1.84-2.22.25-.103.48-.14.668-.13.06.006.11.015.14.025.01 0 .01 0-.01-.01a1.047 1.047 0 01-.264-.332c-.15-.29-.23-.678-.18-1.11l-.005.04c.15-1.332 1.38-2.523 3.035-2.523-2.65 0-4.79 2.144-4.79 4.787s2.14 4.785 4.78 4.785z\"/></svg>"},"$:/core/images/stamp":{"title":"$:/core/images/stamp","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-stamp tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M49.733 64H16.01C11.584 64 8 67.583 8 72.003V97h112V72.003A8 8 0 00111.99 64H78.267A22.813 22.813 0 0175.5 53.077c0-6.475 2.687-12.324 7.009-16.497A22.818 22.818 0 0087 22.952C87 10.276 76.703 0 64 0S41 10.276 41 22.952c0 5.103 1.669 9.817 4.491 13.628 4.322 4.173 7.009 10.022 7.009 16.497 0 3.954-1.002 7.675-2.767 10.923zM8 104h112v8H8v-8z\"/></svg>"},"$:/core/images/standard-layout":{"title":"$:/core/images/standard-layout","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-standard-layout tc-image-button\" viewBox=\"0 0 128 128\">\n <path d=\"M71.93 72A8.07 8.07 0 0 1 80 80.07v7.86A8.071 8.071 0 0 1 71.93 96H8.07A8.067 8.067 0 0 1 0 87.93v-7.86A8.072 8.072 0 0 1 8.07 72h63.86Zm0 32a8.07 8.07 0 0 1 8.07 8.07v7.86a8.071 8.071 0 0 1-8.07 8.07H8.07A8.067 8.067 0 0 1 0 119.93v-7.86A8.072 8.072 0 0 1 8.07 104h63.86Zm0-104A8.068 8.068 0 0 1 80 8.07v47.86A8.073 8.073 0 0 1 71.93 64H8.07A8.07 8.07 0 0 1 0 55.93V8.07A8.072 8.072 0 0 1 8.07 0h63.86Zm48 0c2.14 0 4.193.85 5.706 2.364A8.067 8.067 0 0 1 128 8.07v111.86c0 2.14-.85 4.193-2.364 5.706A8.067 8.067 0 0 1 119.93 128H96.07c-2.14 0-4.193-.85-5.706-2.364A8.067 8.067 0 0 1 88 119.93V8.07c0-2.14.85-4.193 2.364-5.706A8.067 8.067 0 0 1 96.07 0h23.86ZM116 24h-16a3.995 3.995 0 0 0-2.828 1.172 3.995 3.995 0 0 0 0 5.656A3.995 3.995 0 0 0 100 32h16a3.995 3.995 0 0 0 2.828-1.172 3.995 3.995 0 0 0 0-5.656A3.995 3.995 0 0 0 116 24Z\"/>\n</svg>"},"$:/core/images/star-filled":{"title":"$:/core/images/star-filled","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-star-filled tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M61.836 96.823l37.327 27.287c2.72 1.99 6.379-.69 5.343-3.912L90.29 75.988l-1.26 3.91 37.285-27.345c2.718-1.993 1.32-6.327-2.041-6.33l-46.113-.036 3.3 2.416L67.176 4.416c-1.04-3.221-5.563-3.221-6.604 0L46.29 48.603l3.3-2.416-46.113.036c-3.362.003-4.759 4.337-2.04 6.33L38.72 79.898l-1.26-3.91-14.216 44.21c-1.036 3.223 2.622 5.901 5.343 3.912l37.326-27.287h-4.078z\"/></svg>"},"$:/core/images/storyview-classic":{"title":"$:/core/images/storyview-classic","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-storyview-classic tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M8.007 0A8.01 8.01 0 000 8.007v111.986A8.01 8.01 0 008.007 128h111.986a8.01 8.01 0 008.007-8.007V8.007A8.01 8.01 0 00119.993 0H8.007zm15.992 16C19.581 16 16 19.578 16 23.992v16.016C16 44.422 19.588 48 24 48h80c4.419 0 8-3.578 8-7.992V23.992c0-4.414-3.588-7.992-8-7.992H24zm0 48C19.581 64 16 67.59 16 72c0 4.418 3.588 8 8 8h80c4.419 0 8-3.59 8-8 0-4.418-3.588-8-8-8H24zm0 32C19.581 96 16 99.59 16 104c0 4.418 3.588 8 8 8h80c4.419 0 8-3.59 8-8 0-4.418-3.588-8-8-8H24z\"/></svg>"},"$:/core/images/storyview-pop":{"title":"$:/core/images/storyview-pop","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-storyview-pop tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M8.007 0A8.01 8.01 0 000 8.007v111.986A8.01 8.01 0 008.007 128h111.986a8.01 8.01 0 008.007-8.007V8.007A8.01 8.01 0 00119.993 0H8.007zm15.992 16C19.581 16 16 19.578 16 23.992v16.016C16 44.422 19.588 48 24 48h80c4.419 0 8-3.578 8-7.992V23.992c0-4.414-3.588-7.992-8-7.992H24zm-7.99 40C11.587 56 8 59.578 8 63.992v16.016C8 84.422 11.584 88 16.01 88h95.98c4.424 0 8.01-3.578 8.01-7.992V63.992c0-4.414-3.584-7.992-8.01-7.992H16.01zM24 96C19.581 96 16 99.59 16 104c0 4.418 3.588 8 8 8h80c4.419 0 8-3.59 8-8 0-4.418-3.588-8-8-8H24zm0-32C19.581 64 16 67.59 16 72c0 4.418 3.588 8 8 8h80c4.419 0 8-3.59 8-8 0-4.418-3.588-8-8-8H24z\"/></svg>"},"$:/core/images/storyview-zoomin":{"title":"$:/core/images/storyview-zoomin","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-storyview-zoomin tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M8.007 0A8.01 8.01 0 000 8.007v111.986A8.01 8.01 0 008.007 128h111.986a8.01 8.01 0 008.007-8.007V8.007A8.01 8.01 0 00119.993 0H8.007zm15.992 16A8 8 0 0016 24.009V71.99C16 76.414 19.588 80 24 80h80a8 8 0 008-8.009V24.01c0-4.423-3.588-8.009-8-8.009H24z\"/></svg>"},"$:/core/images/strikethrough":{"title":"$:/core/images/strikethrough","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-strikethrough tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M92.794 38.726h15.422c-.229-6.74-1.514-12.538-3.856-17.393-2.342-4.855-5.54-8.881-9.596-12.08-4.055-3.199-8.767-5.54-14.136-7.025C75.258.743 69.433 0 63.15 0a62.76 62.76 0 00-16.364 2.142C41.474 3.57 36.733 5.74 32.564 8.653c-4.17 2.913-7.511 6.626-10.025 11.138-2.513 4.512-3.77 9.853-3.77 16.022 0 5.597 1.115 10.252 3.342 13.965 2.228 3.712 5.198 6.74 8.91 9.081 3.713 2.342 7.911 4.227 12.595 5.655a194.641 194.641 0 0014.308 3.77c4.855 1.085 9.624 2.142 14.308 3.17 4.683 1.028 8.881 2.37 12.594 4.027 3.713 1.656 6.683 3.798 8.91 6.425 2.228 2.628 3.342 6.055 3.342 10.281 0 4.456-.914 8.111-2.742 10.967a19.953 19.953 0 01-7.197 6.768c-2.97 1.657-6.311 2.828-10.024 3.513a60.771 60.771 0 01-11.052 1.028c-4.57 0-9.025-.571-13.366-1.713-4.34-1.143-8.139-2.913-11.394-5.312-3.256-2.4-5.884-5.455-7.883-9.168-1.999-3.712-2.998-8.139-2.998-13.28H15c0 7.426 1.342 13.852 4.027 19.278 2.684 5.426 6.34 9.881 10.966 13.365 4.627 3.484 9.996 6.083 16.107 7.797 6.112 1.713 12.595 2.57 19.449 2.57 5.597 0 11.223-.657 16.878-1.97 5.655-1.314 10.767-3.428 15.336-6.34 4.57-2.914 8.31-6.683 11.224-11.31 2.913-4.626 4.37-10.195 4.37-16.707 0-6.054-1.115-11.08-3.342-15.079-2.228-3.998-5.198-7.31-8.91-9.938-3.713-2.627-7.911-4.712-12.595-6.254a170.83 170.83 0 00-14.308-4.027 549.669 549.669 0 00-14.308-3.17c-4.683-.971-8.881-2.2-12.594-3.684-3.713-1.485-6.683-3.399-8.91-5.74-2.228-2.342-3.342-5.398-3.342-9.168 0-3.998.771-7.34 2.313-10.024 1.543-2.685 3.599-4.826 6.17-6.426 2.57-1.599 5.51-2.741 8.824-3.427a49.767 49.767 0 0110.11-1.028c8.453 0 15.393 1.97 20.819 5.912 5.426 3.94 8.596 10.31 9.51 19.106z\"/><path d=\"M5 54h118v16H5z\"/></g></svg>"},"$:/core/images/subscript":{"title":"$:/core/images/subscript","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-subscript tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M2.272 16h19.91l21.649 33.675L66.414 16h18.708L53.585 61.969l33.809 49.443H67.082L43.296 74.93l-24.187 36.48H0L33.808 61.97 2.272 16zM127.91 128.412H85.328c.059-5.168 1.306-9.681 3.741-13.542 2.435-3.86 5.761-7.216 9.978-10.066a112.388 112.388 0 016.325-4.321 50.09 50.09 0 006.058-4.499c1.841-1.603 3.356-3.34 4.543-5.211 1.188-1.871 1.812-4.024 1.871-6.46 0-1.128-.133-2.33-.4-3.607a9.545 9.545 0 00-1.56-3.564c-.772-1.098-1.84-2.019-3.207-2.761-1.366-.743-3.148-1.114-5.345-1.114-2.02 0-3.697.4-5.033 1.203-1.337.801-2.406 1.9-3.208 3.296-.801 1.396-1.395 3.044-1.781 4.944-.386 1.9-.609 3.95-.668 6.147H86.486c0-3.445.46-6.637 1.38-9.577.921-2.94 2.302-5.478 4.143-7.617 1.841-2.138 4.083-3.815 6.726-5.033 2.643-1.217 5.716-1.826 9.22-1.826 3.802 0 6.979.623 9.533 1.87 2.554 1.248 4.617 2.822 6.191 4.722 1.574 1.9 2.688 3.965 3.341 6.192.653 2.227.98 4.35.98 6.37 0 2.494-.386 4.75-1.158 6.77a21.803 21.803 0 01-3.118 5.568 31.516 31.516 0 01-4.454 4.677 66.788 66.788 0 01-5.167 4.009 139.198 139.198 0 01-5.346 3.563 79.237 79.237 0 00-4.944 3.386c-1.514 1.128-2.836 2.3-3.964 3.518-1.129 1.218-1.9 2.51-2.317 3.876h30.379v9.087z\"/></svg>"},"$:/core/images/superscript":{"title":"$:/core/images/superscript","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-superscript tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M2.272 16h19.91l21.649 33.675L66.414 16h18.708L53.585 61.969l33.809 49.443H67.082L43.296 74.93l-24.187 36.48H0L33.808 61.97 2.272 16zM127.91 63.412H85.328c.059-5.168 1.306-9.681 3.741-13.542 2.435-3.86 5.761-7.216 9.978-10.066a112.388 112.388 0 016.325-4.321 50.09 50.09 0 006.058-4.499c1.841-1.603 3.356-3.34 4.543-5.211 1.188-1.871 1.812-4.024 1.871-6.46 0-1.128-.133-2.33-.4-3.607a9.545 9.545 0 00-1.56-3.564c-.772-1.098-1.84-2.019-3.207-2.761-1.366-.743-3.148-1.114-5.345-1.114-2.02 0-3.697.4-5.033 1.203-1.337.801-2.406 1.9-3.208 3.296-.801 1.396-1.395 3.044-1.781 4.944-.386 1.9-.609 3.95-.668 6.147H86.486c0-3.445.46-6.637 1.38-9.577.921-2.94 2.302-5.478 4.143-7.617 1.841-2.138 4.083-3.815 6.726-5.033 2.643-1.217 5.716-1.826 9.22-1.826 3.802 0 6.979.623 9.533 1.87 2.554 1.248 4.617 2.822 6.191 4.722 1.574 1.9 2.688 3.965 3.341 6.192.653 2.227.98 4.35.98 6.37 0 2.494-.386 4.75-1.158 6.77a21.803 21.803 0 01-3.118 5.568 31.516 31.516 0 01-4.454 4.677 66.788 66.788 0 01-5.167 4.009 139.198 139.198 0 01-5.346 3.563 79.237 79.237 0 00-4.944 3.386c-1.514 1.128-2.836 2.3-3.964 3.518-1.129 1.218-1.9 2.51-2.317 3.876h30.379v9.087z\"/></svg>"},"$:/core/images/tag-button":{"title":"$:/core/images/tag-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-tag-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M18.164 47.66l.004 4.105c.003 3.823 2.19 9.097 4.885 11.792l61.85 61.85c2.697 2.697 7.068 2.69 9.769-.01L125.767 94.3a6.903 6.903 0 00.01-9.77L63.928 22.683c-2.697-2.697-7.976-4.88-11.796-4.881l-27.076-.007a6.902 6.902 0 00-6.91 6.91l.008 9.96.287.033c3.73.411 8.489-.044 13.365-1.153a9.702 9.702 0 0111.14-3.662l.291-.13.128.285a9.7 9.7 0 013.3 2.17c3.796 3.796 3.801 9.945.012 13.734-3.618 3.618-9.386 3.777-13.204.482-5.365 1.122-10.674 1.596-15.309 1.237z\"/><path d=\"M47.633 39.532l.023.051c-9.689 4.356-21.584 6.799-30.396 5.828C5.273 44.089-1.028 36.43 2.443 24.078 5.562 12.976 14.3 4.361 24.047 1.548c10.68-3.083 19.749 1.968 19.749 13.225h-8.623c0-4.859-3.078-6.573-8.735-4.94-6.91 1.995-13.392 8.383-15.694 16.577-1.915 6.818.417 9.653 7.46 10.43 7.126.785 17.531-1.352 25.917-5.121l.027.06.036-.017c1.76-.758 6.266 6.549 3.524 7.74a2.8 2.8 0 01-.075.03z\"/></g></svg>"},"$:/core/images/theme-button":{"title":"$:/core/images/theme-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-theme-button tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M55.854 66.945a122.626 122.626 0 01-3.9-4.819c-11.064-14.548-16.645-6.888-22.96 0-6.315 6.888 1.664 12.47-4.33 17.335-5.993 4.866-5.623 6.552-15.737-2.35-10.115-8.9-10.815-11.351-6.172-16.43 4.644-5.08 8.524 2.918 18.01-6.108 9.485-9.026 1.517-17.026 1.517-17.026S42.03-2.824 68.42.157c26.39 2.982-9.984-3.86-19.031 27.801-3.874 13.556.72 10.362 8.066 16.087 1.707 1.33 6.428 4.732 12.671 9.318-6.129 5.879-11.157 10.669-14.273 13.582zm11.641 12.947c16.013 17.036 37.742 37.726 45.117 40.42 10.432 3.813 15.388-3.141 15.388-14.79 0-7.151-23.83-26.542-43.924-41.769-7.408 7.156-13.376 12.953-16.58 16.139z\"/><path d=\"M11.069 109.828L46.31 74.587a3.56 3.56 0 115.037-5.032l15.098 15.098a3.56 3.56 0 11-5.032 5.037l-35.24 35.241c-4.171 4.17-10.933 4.17-15.104 0-4.17-4.17-4.17-10.933 0-15.103zM124.344 6.622l5.034 5.034-7.49 12.524-7.613 2.58L61.413 79.62l-5.034-5.034 52.861-52.862 2.58-7.614 12.524-7.49z\"/></g></svg>"},"$:/core/images/timestamp-off":{"title":"$:/core/images/timestamp-off","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-timestamp-off tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M58.25 11C26.08 11 0 37.082 0 69.25s26.08 58.25 58.25 58.25c32.175 0 58.25-26.082 58.25-58.25S90.425 11 58.25 11zm0 100.5C34.914 111.5 16 92.586 16 69.25 16 45.92 34.914 27 58.25 27s42.25 18.92 42.25 42.25c0 23.336-18.914 42.25-42.25 42.25zM49.704 10a5 5 0 010-10H66.69a5 5 0 015 5c.006 2.757-2.238 5-5 5H49.705z\"/><path d=\"M58.25 35.88c-18.777 0-33.998 15.224-33.998 33.998 0 18.773 15.22 34.002 33.998 34.002 18.784 0 34.002-15.23 34.002-34.002 0-18.774-15.218-33.998-34.002-33.998zm-3.03 50.123H44.196v-34H55.22v34zm16.976 0H61.17v-34h11.025v34z\"/></g></svg>"},"$:/core/images/timestamp-on":{"title":"$:/core/images/timestamp-on","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-timestamp-on tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><path d=\"M58.25 11C26.08 11 0 37.082 0 69.25s26.08 58.25 58.25 58.25c32.175 0 58.25-26.082 58.25-58.25S90.425 11 58.25 11zm0 100.5C34.914 111.5 16 92.586 16 69.25 16 45.92 34.914 27 58.25 27s42.25 18.92 42.25 42.25c0 23.336-18.914 42.25-42.25 42.25zM49.704 10a5 5 0 010-10H66.69a5 5 0 015 5c.006 2.757-2.238 5-5 5H49.705z\"/><path d=\"M13.41 27.178a5.005 5.005 0 01-7.045-.613 5.008 5.008 0 01.616-7.047l9.95-8.348a5 5 0 016.429 7.661l-9.95 8.348zm89.573 0a5.005 5.005 0 007.045-.613 5.008 5.008 0 00-.616-7.047l-9.95-8.348a5 5 0 00-6.428 7.661l9.95 8.348zM65.097 71.072c0 3.826-3.09 6.928-6.897 6.928-3.804.006-6.9-3.102-6.903-6.928 0 0 4.76-39.072 6.903-39.072s6.897 39.072 6.897 39.072z\"/></g></svg>"},"$:/core/images/tip":{"title":"$:/core/images/tip","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-tip tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M64 128.242c35.346 0 64-28.654 64-64 0-35.346-28.654-64-64-64-35.346 0-64 28.654-64 64 0 35.346 28.654 64 64 64zm11.936-36.789c-.624 4.129-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349C54.33 94.05 58.824 95.82 64 95.82c5.175 0 9.67-1.769 11.936-4.366zm0 4.492c-.624 4.13-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zm0 4.456c-.624 4.129-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zm0 4.492c-.624 4.13-5.73 7.349-11.936 7.349-6.206 0-11.312-3.22-11.936-7.349 2.266 2.597 6.76 4.366 11.936 4.366 5.175 0 9.67-1.769 11.936-4.366zM64.3 24.242c11.618 0 23.699 7.82 23.699 24.2S75.92 71.754 75.92 83.576c0 5.873-5.868 9.26-11.92 9.26s-12.027-3.006-12.027-9.26C51.973 71.147 40 65.47 40 48.442s12.683-24.2 24.301-24.2z\"/></svg>"},"$:/core/images/transcludify":{"title":"$:/core/images/transcludify","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-transcludify-button tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M0 59.482c.591 0 1.36-.089 2.306-.266a10.417 10.417 0 002.75-.932 6.762 6.762 0 002.306-1.907c.651-.828.976-1.863.976-3.104V35.709c0-2.01.414-3.74 1.242-5.19.828-1.448 1.833-2.66 3.016-3.636s2.425-1.7 3.726-2.173c1.3-.473 2.424-.71 3.37-.71h8.073v7.451h-4.88c-1.241 0-2.232.207-2.97.621-.74.414-1.302.932-1.686 1.552a4.909 4.909 0 00-.71 1.996c-.089.71-.133 1.39-.133 2.04v16.677c0 1.715-.325 3.134-.976 4.258-.65 1.123-1.434 2.025-2.35 2.705-.917.68-1.863 1.168-2.839 1.464-.976.296-1.818.473-2.528.532v.178c.71.059 1.552.207 2.528.443.976.237 1.922.68 2.839 1.33.916.651 1.7 1.583 2.35 2.795.65 1.212.976 2.853.976 4.923v16.144c0 .65.044 1.33.133 2.04.089.71.325 1.375.71 1.996.384.621.946 1.139 1.685 1.553.74.414 1.73.62 2.972.62h4.879v7.452h-8.073c-.946 0-2.07-.237-3.37-.71-1.301-.473-2.543-1.197-3.726-2.173-1.183-.976-2.188-2.188-3.016-3.637-.828-1.449-1.242-3.179-1.242-5.19V74.119c0-1.42-.325-2.572-.976-3.46-.65-.886-1.419-1.581-2.306-2.084a8.868 8.868 0 00-2.75-1.02C1.36 67.377.591 67.288 0 67.288v-7.806zm24.66 0c.591 0 1.36-.089 2.306-.266a10.417 10.417 0 002.75-.932 6.762 6.762 0 002.306-1.907c.65-.828.976-1.863.976-3.104V35.709c0-2.01.414-3.74 1.242-5.19.828-1.448 1.833-2.66 3.016-3.636s2.425-1.7 3.726-2.173c1.3-.473 2.424-.71 3.37-.71h8.073v7.451h-4.88c-1.241 0-2.232.207-2.97.621-.74.414-1.302.932-1.686 1.552a4.909 4.909 0 00-.71 1.996c-.089.71-.133 1.39-.133 2.04v16.677c0 1.715-.325 3.134-.976 4.258-.65 1.123-1.434 2.025-2.35 2.705-.917.68-1.863 1.168-2.839 1.464-.976.296-1.818.473-2.528.532v.178c.71.059 1.552.207 2.528.443.976.237 1.922.68 2.839 1.33.916.651 1.7 1.583 2.35 2.795.65 1.212.976 2.853.976 4.923v16.144c0 .65.044 1.33.133 2.04.089.71.325 1.375.71 1.996.384.621.946 1.139 1.685 1.553.74.414 1.73.62 2.972.62h4.879v7.452h-8.073c-.946 0-2.07-.237-3.37-.71-1.301-.473-2.543-1.197-3.726-2.173-1.183-.976-2.188-2.188-3.016-3.637-.828-1.449-1.242-3.179-1.242-5.19V74.119c0-1.42-.325-2.572-.976-3.46-.65-.886-1.419-1.581-2.306-2.084a8.868 8.868 0 00-2.75-1.02c-.946-.177-1.715-.266-2.306-.266v-7.806zm43.965-3.538L80.6 52.041l2.306 7.097-12.063 3.903 7.628 10.378-6.12 4.435-7.63-10.467-7.45 10.201-5.943-4.524 7.628-10.023-12.152-4.17 2.306-7.096 12.064 4.17V43.347h7.451v12.596zm34.425 11.344c-.65 0-1.449.089-2.395.266-.946.177-1.863.488-2.75.931a6.356 6.356 0 00-2.262 1.908c-.62.828-.931 1.862-.931 3.104v17.564c0 2.01-.414 3.74-1.242 5.189-.828 1.449-1.833 2.661-3.016 3.637s-2.425 1.7-3.726 2.173c-1.3.473-2.424.71-3.37.71h-8.073v-7.451h4.88c1.241 0 2.232-.207 2.97-.621.74-.414 1.302-.932 1.686-1.553a4.9 4.9 0 00.71-1.995c.089-.71.133-1.39.133-2.04V72.432c0-1.715.325-3.134.976-4.258.65-1.124 1.434-2.01 2.35-2.661.917-.65 1.863-1.124 2.839-1.42.976-.295 1.818-.502 2.528-.62v-.178c-.71-.059-1.552-.207-2.528-.443-.976-.237-1.922-.68-2.839-1.33-.916-.651-1.7-1.583-2.35-2.795-.65-1.212-.976-2.853-.976-4.923V37.66c0-.651-.044-1.331-.133-2.04a4.909 4.909 0 00-.71-1.997c-.384-.62-.946-1.138-1.685-1.552-.74-.414-1.73-.62-2.972-.62h-4.879V24h8.073c.946 0 2.07.237 3.37.71 1.301.473 2.543 1.197 3.726 2.173 1.183.976 2.188 2.188 3.016 3.637.828 1.449 1.242 3.178 1.242 5.189v16.943c0 1.419.31 2.572.931 3.46a6.897 6.897 0 002.262 2.084 8.868 8.868 0 002.75 1.02c.946.177 1.745.266 2.395.266v7.806zm24.66 0c-.65 0-1.449.089-2.395.266-.946.177-1.863.488-2.75.931a6.356 6.356 0 00-2.262 1.908c-.62.828-.931 1.862-.931 3.104v17.564c0 2.01-.414 3.74-1.242 5.189-.828 1.449-1.833 2.661-3.016 3.637s-2.425 1.7-3.726 2.173c-1.3.473-2.424.71-3.37.71h-8.073v-7.451h4.88c1.241 0 2.232-.207 2.97-.621.74-.414 1.302-.932 1.686-1.553a4.9 4.9 0 00.71-1.995c.089-.71.133-1.39.133-2.04V72.432c0-1.715.325-3.134.976-4.258.65-1.124 1.434-2.01 2.35-2.661.917-.65 1.863-1.124 2.839-1.42.976-.295 1.818-.502 2.528-.62v-.178c-.71-.059-1.552-.207-2.528-.443-.976-.237-1.922-.68-2.839-1.33-.916-.651-1.7-1.583-2.35-2.795-.65-1.212-.976-2.853-.976-4.923V37.66c0-.651-.044-1.331-.133-2.04a4.909 4.909 0 00-.71-1.997c-.384-.62-.946-1.138-1.685-1.552-.74-.414-1.73-.62-2.972-.62h-4.879V24h8.073c.946 0 2.07.237 3.37.71 1.301.473 2.543 1.197 3.726 2.173 1.183.976 2.188 2.188 3.016 3.637.828 1.449 1.242 3.178 1.242 5.189v16.943c0 1.419.31 2.572.931 3.46a6.897 6.897 0 002.262 2.084 8.868 8.868 0 002.75 1.02c.946.177 1.745.266 2.395.266v7.806z\"/></svg>"},"$:/core/images/twitter":{"title":"$:/core/images/twitter","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-twitter tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M41.626 115.803A73.376 73.376 0 012 104.235c2.022.238 4.08.36 6.166.36 12.111 0 23.258-4.117 32.105-11.023-11.312-.208-20.859-7.653-24.148-17.883a25.98 25.98 0 0011.674-.441C15.971 72.881 7.061 62.474 7.061 49.997c0-.108 0-.216.002-.323a25.824 25.824 0 0011.709 3.22c-6.936-4.617-11.5-12.5-11.5-21.433 0-4.719 1.274-9.142 3.5-12.945 12.75 15.579 31.797 25.83 53.281 26.904-.44-1.884-.67-3.85-.67-5.868 0-14.22 11.575-25.75 25.852-25.75a25.865 25.865 0 0118.869 8.132 51.892 51.892 0 0016.415-6.248c-1.93 6.012-6.029 11.059-11.366 14.246A51.844 51.844 0 00128 25.878a52.428 52.428 0 01-12.9 13.33c.05 1.104.075 2.214.075 3.33 0 34.028-26 73.265-73.549 73.265\"/></svg>"},"$:/core/images/underline":{"title":"$:/core/images/underline","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-underline tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M7 117.421h114.248V128H7v-10.579zm97.871-18.525V0h-16.26v55.856c0 4.463-.605 8.576-1.816 12.338-1.212 3.762-3.03 7.046-5.452 9.851-2.423 2.806-5.452 4.974-9.086 6.504-3.635 1.53-7.939 2.296-12.912 2.296-6.25 0-11.159-1.786-14.73-5.356-3.57-3.571-5.356-8.417-5.356-14.538V0H23v65.038c0 5.356.542 10.234 1.626 14.633 1.084 4.4 2.965 8.194 5.643 11.382 2.678 3.188 6.185 5.643 10.52 7.365 4.337 1.721 9.756 2.582 16.26 2.582 7.27 0 13.582-1.435 18.938-4.304 5.356-2.87 9.755-7.365 13.199-13.486h.382v15.686h15.303z\"/></svg>"},"$:/core/images/unfold-all-button":{"title":"$:/core/images/unfold-all-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-unfold-all tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"128\" height=\"16\" rx=\"8\"/><rect width=\"128\" height=\"16\" y=\"64\" rx=\"8\"/><path d=\"M63.945 60.624c-2.05 0-4.101-.78-5.666-2.345L35.662 35.662c-3.125-3.125-3.13-8.195-.005-11.319 3.118-3.118 8.192-3.122 11.319.005L63.94 41.314l16.966-16.966c3.124-3.124 8.194-3.129 11.318-.005 3.118 3.118 3.122 8.192-.005 11.319L69.603 58.279a7.986 7.986 0 01-5.663 2.346zM64.004 124.565c-2.05 0-4.102-.78-5.666-2.345L35.721 99.603c-3.125-3.125-3.13-8.195-.005-11.319 3.118-3.118 8.191-3.122 11.318.005L64 105.255l16.966-16.966c3.124-3.124 8.194-3.129 11.318-.005 3.118 3.118 3.122 8.192-.005 11.319L69.662 122.22a7.986 7.986 0 01-5.663 2.346z\"/></g></svg>"},"$:/core/images/unfold-button":{"title":"$:/core/images/unfold-button","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-unfold tc-image-button\" viewBox=\"0 0 128 128\"><g fill-rule=\"evenodd\"><rect width=\"128\" height=\"16\" rx=\"8\"/><path d=\"M63.945 63.624c-2.05 0-4.101-.78-5.666-2.345L35.662 38.662c-3.125-3.125-3.13-8.195-.005-11.319 3.118-3.118 8.192-3.122 11.319.005L63.94 44.314l16.966-16.966c3.124-3.124 8.194-3.129 11.318-.005 3.118 3.118 3.122 8.192-.005 11.319L69.603 61.279a7.986 7.986 0 01-5.663 2.346zM64.004 105.682c-2.05.001-4.102-.78-5.666-2.344L35.721 80.721c-3.125-3.125-3.13-8.195-.005-11.319 3.118-3.118 8.191-3.122 11.318.005L64 86.373l16.966-16.966c3.124-3.125 8.194-3.13 11.318-.005 3.118 3.118 3.122 8.192-.005 11.319l-22.617 22.617a7.986 7.986 0 01-5.663 2.346z\"/></g></svg>"},"$:/core/images/unlocked-padlock":{"title":"$:/core/images/unlocked-padlock","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-unlocked-padlock tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M48.627 64H105v32.01C105 113.674 90.674 128 73.001 128H56C38.318 128 24 113.677 24 96.01V64h6.136c-10.455-12.651-27.364-35.788-4.3-55.142 24.636-20.672 45.835 4.353 55.777 16.201 9.943 11.85-2.676 22.437-12.457 9.892-9.78-12.545-21.167-24.146-33.207-14.043-12.041 10.104-1.757 22.36 8.813 34.958 2.467 2.94 3.641 5.732 3.865 8.134zm19.105 28.364A8.503 8.503 0 0064.5 76a8.5 8.5 0 00-3.498 16.25l-5.095 22.77H72.8l-5.07-22.656z\"/></svg>"},"$:/core/images/up-arrow":{"title":"$:/core/images/up-arrow","created":"20150316000544368","modified":"20150316000831867","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-up-arrow tc-image-button\" viewBox=\"0 0 128 128\"><path d=\"M63.892.281c2.027 0 4.054.77 5.6 2.316l55.98 55.98a7.92 7.92 0 010 11.196c-3.086 3.085-8.104 3.092-11.196 0L63.894 19.393 13.513 69.774a7.92 7.92 0 01-11.196 0c-3.085-3.086-3.092-8.105 0-11.196l55.98-55.98A7.892 7.892 0 0163.893.28z\"/></svg>"},"$:/core/images/video":{"title":"$:/core/images/video","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-video tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M64 12c-34.91 0-55.273 2.917-58.182 5.833C2.91 20.75 0 41.167 0 64.5c0 23.333 2.91 43.75 5.818 46.667C8.728 114.083 29.091 117 64 117c34.91 0 55.273-2.917 58.182-5.833C125.09 108.25 128 87.833 128 64.5c0-23.333-2.91-43.75-5.818-46.667C119.272 14.917 98.909 12 64 12zm-9.084 32.618c-3.813-2.542-6.905-.879-6.905 3.698v31.368c0 4.585 3.099 6.235 6.905 3.698l22.168-14.779c3.813-2.542 3.806-6.669 0-9.206L54.916 44.618z\"/></svg>"},"$:/core/images/warning":{"title":"$:/core/images/warning","tags":"$:/tags/Image","text":"\\parameters (size:\"22pt\")\n<svg width=<<size>> height=<<size>> class=\"tc-image-warning tc-image-button\" viewBox=\"0 0 128 128\"><path fill-rule=\"evenodd\" d=\"M57.072 11c3.079-5.333 10.777-5.333 13.856 0l55.426 96c3.079 5.333-.77 12-6.928 12H8.574c-6.158 0-10.007-6.667-6.928-12l55.426-96zM64 37c-4.418 0-8 3.582-8 7.994v28.012C56 77.421 59.59 81 64 81c4.418 0 8-3.582 8-7.994V44.994C72 40.579 68.41 37 64 37zm0 67a8 8 0 100-16 8 8 0 000 16z\"/></svg>"},"$:/language/Buttons/AdvancedSearch/Caption":{"title":"$:/language/Buttons/AdvancedSearch/Caption","text":"advanced search"},"$:/language/Buttons/AdvancedSearch/Hint":{"title":"$:/language/Buttons/AdvancedSearch/Hint","text":"Advanced search"},"$:/language/Buttons/Cancel/Caption":{"title":"$:/language/Buttons/Cancel/Caption","text":"cancel"},"$:/language/Buttons/Cancel/Hint":{"title":"$:/language/Buttons/Cancel/Hint","text":"Discard changes to this tiddler"},"$:/language/Buttons/Clone/Caption":{"title":"$:/language/Buttons/Clone/Caption","text":"clone"},"$:/language/Buttons/Clone/Hint":{"title":"$:/language/Buttons/Clone/Hint","text":"Clone this tiddler"},"$:/language/Buttons/Close/Caption":{"title":"$:/language/Buttons/Close/Caption","text":"close"},"$:/language/Buttons/Close/Hint":{"title":"$:/language/Buttons/Close/Hint","text":"Close this tiddler"},"$:/language/Buttons/CloseAll/Caption":{"title":"$:/language/Buttons/CloseAll/Caption","text":"close all"},"$:/language/Buttons/CloseAll/Hint":{"title":"$:/language/Buttons/CloseAll/Hint","text":"Close all tiddlers"},"$:/language/Buttons/CloseOthers/Caption":{"title":"$:/language/Buttons/CloseOthers/Caption","text":"close others"},"$:/language/Buttons/CloseOthers/Hint":{"title":"$:/language/Buttons/CloseOthers/Hint","text":"Close other tiddlers"},"$:/language/Buttons/ControlPanel/Caption":{"title":"$:/language/Buttons/ControlPanel/Caption","text":"control panel"},"$:/language/Buttons/ControlPanel/Hint":{"title":"$:/language/Buttons/ControlPanel/Hint","text":"Open control panel"},"$:/language/Buttons/CopyToClipboard/Caption":{"title":"$:/language/Buttons/CopyToClipboard/Caption","text":"copy to clipboard"},"$:/language/Buttons/CopyToClipboard/Hint":{"title":"$:/language/Buttons/CopyToClipboard/Hint","text":"Copy this text to the clipboard"},"$:/language/Buttons/Delete/Caption":{"title":"$:/language/Buttons/Delete/Caption","text":"delete"},"$:/language/Buttons/Delete/Hint":{"title":"$:/language/Buttons/Delete/Hint","text":"Delete this tiddler"},"$:/language/Buttons/DeleteTiddlers/Caption":{"title":"$:/language/Buttons/DeleteTiddlers/Caption","text":"delete tiddlers"},"$:/language/Buttons/DeleteTiddlers/Hint":{"title":"$:/language/Buttons/DeleteTiddlers/Hint","text":"Delete tiddlers"},"$:/language/Buttons/Edit/Caption":{"title":"$:/language/Buttons/Edit/Caption","text":"edit"},"$:/language/Buttons/Edit/Hint":{"title":"$:/language/Buttons/Edit/Hint","text":"Edit this tiddler"},"$:/language/Buttons/Encryption/Caption":{"title":"$:/language/Buttons/Encryption/Caption","text":"encryption"},"$:/language/Buttons/Encryption/Hint":{"title":"$:/language/Buttons/Encryption/Hint","text":"Set or clear a password for saving this wiki"},"$:/language/Buttons/Encryption/ClearPassword/Caption":{"title":"$:/language/Buttons/Encryption/ClearPassword/Caption","text":"clear password"},"$:/language/Buttons/Encryption/ClearPassword/Hint":{"title":"$:/language/Buttons/Encryption/ClearPassword/Hint","text":"Clear the password and save this wiki without encryption"},"$:/language/Buttons/Encryption/SetPassword/Caption":{"title":"$:/language/Buttons/Encryption/SetPassword/Caption","text":"set password"},"$:/language/Buttons/Encryption/SetPassword/Hint":{"title":"$:/language/Buttons/Encryption/SetPassword/Hint","text":"Set a password for saving this wiki with encryption"},"$:/language/Buttons/EmergencyDownload/Caption":{"title":"$:/language/Buttons/EmergencyDownload/Caption","text":"download tiddlers as json"},"$:/language/Buttons/ExportPage/Caption":{"title":"$:/language/Buttons/ExportPage/Caption","text":"export all"},"$:/language/Buttons/ExportPage/Hint":{"title":"$:/language/Buttons/ExportPage/Hint","text":"Export all tiddlers"},"$:/language/Buttons/ExportTiddler/Caption":{"title":"$:/language/Buttons/ExportTiddler/Caption","text":"export tiddler"},"$:/language/Buttons/ExportTiddler/Hint":{"title":"$:/language/Buttons/ExportTiddler/Hint","text":"Export tiddler"},"$:/language/Buttons/ExportTiddlers/Caption":{"title":"$:/language/Buttons/ExportTiddlers/Caption","text":"export tiddlers"},"$:/language/Buttons/ExportTiddlers/Hint":{"title":"$:/language/Buttons/ExportTiddlers/Hint","text":"Export tiddlers"},"$:/language/Buttons/SidebarSearch/Hint":{"title":"$:/language/Buttons/SidebarSearch/Hint","text":"Select the sidebar search field"},"$:/language/Buttons/Fold/Caption":{"title":"$:/language/Buttons/Fold/Caption","text":"fold tiddler"},"$:/language/Buttons/Fold/Hint":{"title":"$:/language/Buttons/Fold/Hint","text":"Fold the body of this tiddler"},"$:/language/Buttons/Fold/FoldBar/Caption":{"title":"$:/language/Buttons/Fold/FoldBar/Caption","text":"fold-bar"},"$:/language/Buttons/Fold/FoldBar/Hint":{"title":"$:/language/Buttons/Fold/FoldBar/Hint","text":"Optional bars to fold and unfold tiddlers"},"$:/language/Buttons/Unfold/Caption":{"title":"$:/language/Buttons/Unfold/Caption","text":"unfold tiddler"},"$:/language/Buttons/Unfold/Hint":{"title":"$:/language/Buttons/Unfold/Hint","text":"Unfold the body of this tiddler"},"$:/language/Buttons/FoldOthers/Caption":{"title":"$:/language/Buttons/FoldOthers/Caption","text":"fold other tiddlers"},"$:/language/Buttons/FoldOthers/Hint":{"title":"$:/language/Buttons/FoldOthers/Hint","text":"Fold the bodies of other opened tiddlers"},"$:/language/Buttons/FoldAll/Caption":{"title":"$:/language/Buttons/FoldAll/Caption","text":"fold all tiddlers"},"$:/language/Buttons/FoldAll/Hint":{"title":"$:/language/Buttons/FoldAll/Hint","text":"Fold the bodies of all opened tiddlers"},"$:/language/Buttons/UnfoldAll/Caption":{"title":"$:/language/Buttons/UnfoldAll/Caption","text":"unfold all tiddlers"},"$:/language/Buttons/UnfoldAll/Hint":{"title":"$:/language/Buttons/UnfoldAll/Hint","text":"Unfold the bodies of all opened tiddlers"},"$:/language/Buttons/FullScreen/Caption":{"title":"$:/language/Buttons/FullScreen/Caption","text":"full-screen"},"$:/language/Buttons/FullScreen/Hint":{"title":"$:/language/Buttons/FullScreen/Hint","text":"Enter or leave full-screen mode"},"$:/language/Buttons/Help/Caption":{"title":"$:/language/Buttons/Help/Caption","text":"help"},"$:/language/Buttons/Help/Hint":{"title":"$:/language/Buttons/Help/Hint","text":"Show help panel"},"$:/language/Buttons/Import/Caption":{"title":"$:/language/Buttons/Import/Caption","text":"import"},"$:/language/Buttons/Import/Hint":{"title":"$:/language/Buttons/Import/Hint","text":"Import many types of file including text, image, TiddlyWiki or JSON"},"$:/language/Buttons/Info/Caption":{"title":"$:/language/Buttons/Info/Caption","text":"info"},"$:/language/Buttons/Info/Hint":{"title":"$:/language/Buttons/Info/Hint","text":"Show information for this tiddler"},"$:/language/Buttons/Home/Caption":{"title":"$:/language/Buttons/Home/Caption","text":"home"},"$:/language/Buttons/Home/Hint":{"title":"$:/language/Buttons/Home/Hint","text":"Open the default tiddlers"},"$:/language/Buttons/Language/Caption":{"title":"$:/language/Buttons/Language/Caption","text":"language"},"$:/language/Buttons/Language/Hint":{"title":"$:/language/Buttons/Language/Hint","text":"Choose the user interface language"},"$:/language/Buttons/LayoutSwitcher/Hint":{"title":"$:/language/Buttons/LayoutSwitcher/Hint","text":"Open layout switcher"},"$:/language/Buttons/LayoutSwitcher/Caption":{"title":"$:/language/Buttons/LayoutSwitcher/Caption","text":"layout"},"$:/language/Buttons/Manager/Caption":{"title":"$:/language/Buttons/Manager/Caption","text":"tiddler manager"},"$:/language/Buttons/Manager/Hint":{"title":"$:/language/Buttons/Manager/Hint","text":"Open tiddler manager"},"$:/language/Buttons/More/Caption":{"title":"$:/language/Buttons/More/Caption","text":"more"},"$:/language/Buttons/More/Hint":{"title":"$:/language/Buttons/More/Hint","text":"More actions"},"$:/language/Buttons/NewHere/Caption":{"title":"$:/language/Buttons/NewHere/Caption","text":"new here"},"$:/language/Buttons/NewHere/Hint":{"title":"$:/language/Buttons/NewHere/Hint","text":"Create a new tiddler tagged with this one"},"$:/language/Buttons/NetworkActivity/Caption":{"title":"$:/language/Buttons/NetworkActivity/Caption","text":"network activity"},"$:/language/Buttons/NetworkActivity/Hint":{"title":"$:/language/Buttons/NetworkActivity/Hint","text":"Cancel all network activity"},"$:/language/Buttons/NewJournal/Caption":{"title":"$:/language/Buttons/NewJournal/Caption","text":"new journal"},"$:/language/Buttons/NewJournal/Hint":{"title":"$:/language/Buttons/NewJournal/Hint","text":"Create a new journal tiddler"},"$:/language/Buttons/NewJournalHere/Caption":{"title":"$:/language/Buttons/NewJournalHere/Caption","text":"new journal here"},"$:/language/Buttons/NewJournalHere/Hint":{"title":"$:/language/Buttons/NewJournalHere/Hint","text":"Create a new journal tiddler tagged with this one"},"$:/language/Buttons/NewImage/Caption":{"title":"$:/language/Buttons/NewImage/Caption","text":"new image"},"$:/language/Buttons/NewImage/Hint":{"title":"$:/language/Buttons/NewImage/Hint","text":"Create a new image tiddler"},"$:/language/Buttons/NewMarkdown/Caption":{"title":"$:/language/Buttons/NewMarkdown/Caption","text":"new Markdown tiddler"},"$:/language/Buttons/NewMarkdown/Hint":{"title":"$:/language/Buttons/NewMarkdown/Hint","text":"Create a new Markdown tiddler"},"$:/language/Buttons/NewTiddler/Caption":{"title":"$:/language/Buttons/NewTiddler/Caption","text":"new tiddler"},"$:/language/Buttons/NewTiddler/Hint":{"title":"$:/language/Buttons/NewTiddler/Hint","text":"Create a new tiddler"},"$:/language/Buttons/OpenControlPanel/Hint":{"title":"$:/language/Buttons/OpenControlPanel/Hint","text":"Open control panel"},"$:/language/Buttons/OpenWindow/Caption":{"title":"$:/language/Buttons/OpenWindow/Caption","text":"open in new window"},"$:/language/Buttons/OpenWindow/Hint":{"title":"$:/language/Buttons/OpenWindow/Hint","text":"Open tiddler in new window"},"$:/language/Buttons/Palette/Caption":{"title":"$:/language/Buttons/Palette/Caption","text":"palette"},"$:/language/Buttons/Palette/Hint":{"title":"$:/language/Buttons/Palette/Hint","text":"Choose the colour palette"},"$:/language/Buttons/Permalink/Caption":{"title":"$:/language/Buttons/Permalink/Caption","text":"permalink"},"$:/language/Buttons/Permalink/Hint":{"title":"$:/language/Buttons/Permalink/Hint","text":"Set browser address bar to a direct link to this tiddler"},"$:/language/Buttons/Permaview/Caption":{"title":"$:/language/Buttons/Permaview/Caption","text":"permaview"},"$:/language/Buttons/Permaview/Hint":{"title":"$:/language/Buttons/Permaview/Hint","text":"Set browser address bar to a direct link to all the tiddlers in this story"},"$:/language/Buttons/Print/Caption":{"title":"$:/language/Buttons/Print/Caption","text":"print page"},"$:/language/Buttons/Print/Hint":{"title":"$:/language/Buttons/Print/Hint","text":"Print the current page"},"$:/language/Buttons/Refresh/Caption":{"title":"$:/language/Buttons/Refresh/Caption","text":"refresh"},"$:/language/Buttons/Refresh/Hint":{"title":"$:/language/Buttons/Refresh/Hint","text":"Perform a full refresh of the wiki"},"$:/language/Buttons/Save/Caption":{"title":"$:/language/Buttons/Save/Caption","text":"ok"},"$:/language/Buttons/Save/Hint":{"title":"$:/language/Buttons/Save/Hint","text":"Confirm changes to this tiddler"},"$:/language/Buttons/SaveWiki/Caption":{"title":"$:/language/Buttons/SaveWiki/Caption","text":"save changes"},"$:/language/Buttons/SaveWiki/Hint":{"title":"$:/language/Buttons/SaveWiki/Hint","text":"Save changes"},"$:/language/Buttons/StoryView/Caption":{"title":"$:/language/Buttons/StoryView/Caption","text":"storyview"},"$:/language/Buttons/StoryView/Hint":{"title":"$:/language/Buttons/StoryView/Hint","text":"Choose the story visualisation"},"$:/language/Buttons/HideSideBar/Caption":{"title":"$:/language/Buttons/HideSideBar/Caption","text":"hide sidebar"},"$:/language/Buttons/HideSideBar/Hint":{"title":"$:/language/Buttons/HideSideBar/Hint","text":"Hide sidebar"},"$:/language/Buttons/ShowSideBar/Caption":{"title":"$:/language/Buttons/ShowSideBar/Caption","text":"show sidebar"},"$:/language/Buttons/ShowSideBar/Hint":{"title":"$:/language/Buttons/ShowSideBar/Hint","text":"Show sidebar"},"$:/language/Buttons/TagManager/Caption":{"title":"$:/language/Buttons/TagManager/Caption","text":"tag manager"},"$:/language/Buttons/TagManager/Hint":{"title":"$:/language/Buttons/TagManager/Hint","text":"Open tag manager"},"$:/language/Buttons/TestCaseImport/Caption":{"title":"$:/language/Buttons/TestCaseImport/Caption","text":"import tiddlers"},"$:/language/Buttons/TestCaseImport/Hint":{"title":"$:/language/Buttons/TestCaseImport/Hint","text":"Import tiddlers"},"$:/language/Buttons/Timestamp/Caption":{"title":"$:/language/Buttons/Timestamp/Caption","text":"timestamps"},"$:/language/Buttons/Timestamp/Hint":{"title":"$:/language/Buttons/Timestamp/Hint","text":"Choose whether modifications update timestamps"},"$:/language/Buttons/Timestamp/On/Caption":{"title":"$:/language/Buttons/Timestamp/On/Caption","text":"timestamps are on"},"$:/language/Buttons/Timestamp/On/Hint":{"title":"$:/language/Buttons/Timestamp/On/Hint","text":"Update timestamps when tiddlers are modified"},"$:/language/Buttons/Timestamp/Off/Caption":{"title":"$:/language/Buttons/Timestamp/Off/Caption","text":"timestamps are off"},"$:/language/Buttons/Timestamp/Off/Hint":{"title":"$:/language/Buttons/Timestamp/Off/Hint","text":"Don't update timestamps when tiddlers are modified"},"$:/language/Buttons/Theme/Caption":{"title":"$:/language/Buttons/Theme/Caption","text":"theme"},"$:/language/Buttons/Theme/Hint":{"title":"$:/language/Buttons/Theme/Hint","text":"Choose the display theme"},"$:/language/Buttons/Bold/Caption":{"title":"$:/language/Buttons/Bold/Caption","text":"bold"},"$:/language/Buttons/Bold/Hint":{"title":"$:/language/Buttons/Bold/Hint","text":"Apply bold formatting to selection"},"$:/language/Buttons/Clear/Caption":{"title":"$:/language/Buttons/Clear/Caption","text":"clear"},"$:/language/Buttons/Clear/Hint":{"title":"$:/language/Buttons/Clear/Hint","text":"Clear image to solid colour"},"$:/language/Buttons/EditorHeight/Caption":{"title":"$:/language/Buttons/EditorHeight/Caption","text":"editor height"},"$:/language/Buttons/EditorHeight/Caption/Auto":{"title":"$:/language/Buttons/EditorHeight/Caption/Auto","text":"Automatically adjust height to fit content"},"$:/language/Buttons/EditorHeight/Caption/Fixed":{"title":"$:/language/Buttons/EditorHeight/Caption/Fixed","text":"Fixed height:"},"$:/language/Buttons/EditorHeight/Hint":{"title":"$:/language/Buttons/EditorHeight/Hint","text":"Choose the height of the text editor"},"$:/language/Buttons/Excise/Caption":{"title":"$:/language/Buttons/Excise/Caption","text":"excise"},"$:/language/Buttons/Excise/Caption/Excise":{"title":"$:/language/Buttons/Excise/Caption/Excise","text":"Perform excision"},"$:/language/Buttons/Excise/Caption/MacroName":{"title":"$:/language/Buttons/Excise/Caption/MacroName","text":"Macro name:"},"$:/language/Buttons/Excise/Caption/NewTitle":{"title":"$:/language/Buttons/Excise/Caption/NewTitle","text":"Title of new tiddler:"},"$:/language/Buttons/Excise/Caption/Replace":{"title":"$:/language/Buttons/Excise/Caption/Replace","text":"Replace excised text with:"},"$:/language/Buttons/Excise/Caption/Replace/Macro":{"title":"$:/language/Buttons/Excise/Caption/Replace/Macro","text":"macro"},"$:/language/Buttons/Excise/Caption/Replace/Link":{"title":"$:/language/Buttons/Excise/Caption/Replace/Link","text":"link"},"$:/language/Buttons/Excise/Caption/Replace/Transclusion":{"title":"$:/language/Buttons/Excise/Caption/Replace/Transclusion","text":"transclusion"},"$:/language/Buttons/Excise/Caption/Tag":{"title":"$:/language/Buttons/Excise/Caption/Tag","text":"Tag new tiddler with the title of this tiddler"},"$:/language/Buttons/Excise/Caption/TiddlerExists":{"title":"$:/language/Buttons/Excise/Caption/TiddlerExists","text":"Warning: tiddler already exists"},"$:/language/Buttons/Excise/DefaultTitle":{"title":"$:/language/Buttons/Excise/DefaultTitle","text":"New Excision"},"$:/language/Buttons/Excise/Hint":{"title":"$:/language/Buttons/Excise/Hint","text":"Excise the selected text into a new tiddler"},"$:/language/Buttons/Heading1/Caption":{"title":"$:/language/Buttons/Heading1/Caption","text":"heading 1"},"$:/language/Buttons/Heading1/Hint":{"title":"$:/language/Buttons/Heading1/Hint","text":"Apply heading level 1 formatting to lines containing selection"},"$:/language/Buttons/Heading2/Caption":{"title":"$:/language/Buttons/Heading2/Caption","text":"heading 2"},"$:/language/Buttons/Heading2/Hint":{"title":"$:/language/Buttons/Heading2/Hint","text":"Apply heading level 2 formatting to lines containing selection"},"$:/language/Buttons/Heading3/Caption":{"title":"$:/language/Buttons/Heading3/Caption","text":"heading 3"},"$:/language/Buttons/Heading3/Hint":{"title":"$:/language/Buttons/Heading3/Hint","text":"Apply heading level 3 formatting to lines containing selection"},"$:/language/Buttons/Heading4/Caption":{"title":"$:/language/Buttons/Heading4/Caption","text":"heading 4"},"$:/language/Buttons/Heading4/Hint":{"title":"$:/language/Buttons/Heading4/Hint","text":"Apply heading level 4 formatting to lines containing selection"},"$:/language/Buttons/Heading5/Caption":{"title":"$:/language/Buttons/Heading5/Caption","text":"heading 5"},"$:/language/Buttons/Heading5/Hint":{"title":"$:/language/Buttons/Heading5/Hint","text":"Apply heading level 5 formatting to lines containing selection"},"$:/language/Buttons/Heading6/Caption":{"title":"$:/language/Buttons/Heading6/Caption","text":"heading 6"},"$:/language/Buttons/Heading6/Hint":{"title":"$:/language/Buttons/Heading6/Hint","text":"Apply heading level 6 formatting to lines containing selection"},"$:/language/Buttons/Italic/Caption":{"title":"$:/language/Buttons/Italic/Caption","text":"italic"},"$:/language/Buttons/Italic/Hint":{"title":"$:/language/Buttons/Italic/Hint","text":"Apply italic formatting to selection"},"$:/language/Buttons/LineWidth/Caption":{"title":"$:/language/Buttons/LineWidth/Caption","text":"line width"},"$:/language/Buttons/LineWidth/Hint":{"title":"$:/language/Buttons/LineWidth/Hint","text":"Set line width for painting"},"$:/language/Buttons/Link/Caption":{"title":"$:/language/Buttons/Link/Caption","text":"link"},"$:/language/Buttons/Link/Hint":{"title":"$:/language/Buttons/Link/Hint","text":"Create wikitext link"},"$:/language/Buttons/Linkify/Caption":{"title":"$:/language/Buttons/Linkify/Caption","text":"wikilink"},"$:/language/Buttons/Linkify/Hint":{"title":"$:/language/Buttons/Linkify/Hint","text":"Wrap selection in square brackets"},"$:/language/Buttons/ListBullet/Caption":{"title":"$:/language/Buttons/ListBullet/Caption","text":"bulleted list"},"$:/language/Buttons/ListBullet/Hint":{"title":"$:/language/Buttons/ListBullet/Hint","text":"Apply bulleted list formatting to lines containing selection"},"$:/language/Buttons/ListNumber/Caption":{"title":"$:/language/Buttons/ListNumber/Caption","text":"numbered list"},"$:/language/Buttons/ListNumber/Hint":{"title":"$:/language/Buttons/ListNumber/Hint","text":"Apply numbered list formatting to lines containing selection"},"$:/language/Buttons/MonoBlock/Caption":{"title":"$:/language/Buttons/MonoBlock/Caption","text":"monospaced block"},"$:/language/Buttons/MonoBlock/Hint":{"title":"$:/language/Buttons/MonoBlock/Hint","text":"Apply monospaced block formatting to lines containing selection"},"$:/language/Buttons/MonoLine/Caption":{"title":"$:/language/Buttons/MonoLine/Caption","text":"monospaced"},"$:/language/Buttons/MonoLine/Hint":{"title":"$:/language/Buttons/MonoLine/Hint","text":"Apply monospaced character formatting to selection"},"$:/language/Buttons/Opacity/Caption":{"title":"$:/language/Buttons/Opacity/Caption","text":"opacity"},"$:/language/Buttons/Opacity/Hint":{"title":"$:/language/Buttons/Opacity/Hint","text":"Set painting opacity"},"$:/language/Buttons/Paint/Caption":{"title":"$:/language/Buttons/Paint/Caption","text":"paint colour"},"$:/language/Buttons/Paint/Hint":{"title":"$:/language/Buttons/Paint/Hint","text":"Set painting colour"},"$:/language/Buttons/Picture/Caption":{"title":"$:/language/Buttons/Picture/Caption","text":"picture"},"$:/language/Buttons/Picture/Hint":{"title":"$:/language/Buttons/Picture/Hint","text":"Insert picture"},"$:/language/Buttons/Preview/Caption":{"title":"$:/language/Buttons/Preview/Caption","text":"preview"},"$:/language/Buttons/Preview/Hint":{"title":"$:/language/Buttons/Preview/Hint","text":"Show preview pane"},"$:/language/Buttons/PreviewType/Caption":{"title":"$:/language/Buttons/PreviewType/Caption","text":"preview type"},"$:/language/Buttons/PreviewType/Hint":{"title":"$:/language/Buttons/PreviewType/Hint","text":"Choose preview type"},"$:/language/Buttons/Quote/Caption":{"title":"$:/language/Buttons/Quote/Caption","text":"quote"},"$:/language/Buttons/Quote/Hint":{"title":"$:/language/Buttons/Quote/Hint","text":"Apply quoted text formatting to lines containing selection"},"$:/language/Buttons/RotateLeft/Caption":{"title":"$:/language/Buttons/RotateLeft/Caption","text":"rotate left"},"$:/language/Buttons/RotateLeft/Hint":{"title":"$:/language/Buttons/RotateLeft/Hint","text":"Rotate image left by 90 degrees"},"$:/language/Buttons/Size/Caption":{"title":"$:/language/Buttons/Size/Caption","text":"image size"},"$:/language/Buttons/Size/Caption/Height":{"title":"$:/language/Buttons/Size/Caption/Height","text":"Height:"},"$:/language/Buttons/Size/Caption/Resize":{"title":"$:/language/Buttons/Size/Caption/Resize","text":"Resize image"},"$:/language/Buttons/Size/Caption/Width":{"title":"$:/language/Buttons/Size/Caption/Width","text":"Width:"},"$:/language/Buttons/Size/Hint":{"title":"$:/language/Buttons/Size/Hint","text":"Set image size"},"$:/language/Buttons/Stamp/Caption":{"title":"$:/language/Buttons/Stamp/Caption","text":"stamp"},"$:/language/Buttons/Stamp/Caption/New":{"title":"$:/language/Buttons/Stamp/Caption/New","text":"Add your own"},"$:/language/Buttons/Stamp/Hint":{"title":"$:/language/Buttons/Stamp/Hint","text":"Insert a preconfigured snippet of text"},"$:/language/Buttons/Stamp/New/Title":{"title":"$:/language/Buttons/Stamp/New/Title","text":"Name as shown in menu"},"$:/language/Buttons/Stamp/New/Text":{"title":"$:/language/Buttons/Stamp/New/Text","text":"Text of snippet. (Remember to add a descriptive title in the caption field)."},"$:/language/Buttons/Strikethrough/Caption":{"title":"$:/language/Buttons/Strikethrough/Caption","text":"strikethrough"},"$:/language/Buttons/Strikethrough/Hint":{"title":"$:/language/Buttons/Strikethrough/Hint","text":"Apply strikethrough formatting to selection"},"$:/language/Buttons/Subscript/Caption":{"title":"$:/language/Buttons/Subscript/Caption","text":"subscript"},"$:/language/Buttons/Subscript/Hint":{"title":"$:/language/Buttons/Subscript/Hint","text":"Apply subscript formatting to selection"},"$:/language/Buttons/Superscript/Caption":{"title":"$:/language/Buttons/Superscript/Caption","text":"superscript"},"$:/language/Buttons/Superscript/Hint":{"title":"$:/language/Buttons/Superscript/Hint","text":"Apply superscript formatting to selection"},"$:/language/Buttons/ToggleSidebar/Hint":{"title":"$:/language/Buttons/ToggleSidebar/Hint","text":"Toggle the sidebar visibility"},"$:/language/Buttons/Transcludify/Caption":{"title":"$:/language/Buttons/Transcludify/Caption","text":"transclusion"},"$:/language/Buttons/Transcludify/Hint":{"title":"$:/language/Buttons/Transcludify/Hint","text":"Wrap selection in curly brackets"},"$:/language/Buttons/Underline/Caption":{"title":"$:/language/Buttons/Underline/Caption","text":"underline"},"$:/language/Buttons/Underline/Hint":{"title":"$:/language/Buttons/Underline/Hint","text":"Apply underline formatting to selection"},"$:/language/ControlPanel/Advanced/Caption":{"title":"$:/language/ControlPanel/Advanced/Caption","text":"Advanced"},"$:/language/ControlPanel/Advanced/Hint":{"title":"$:/language/ControlPanel/Advanced/Hint","text":"Internal information about this TiddlyWiki"},"$:/language/ControlPanel/Appearance/Caption":{"title":"$:/language/ControlPanel/Appearance/Caption","text":"Appearance"},"$:/language/ControlPanel/Appearance/Hint":{"title":"$:/language/ControlPanel/Appearance/Hint","text":"Ways to customise the appearance of your TiddlyWiki."},"$:/language/ControlPanel/Basics/AnimDuration/Prompt":{"title":"$:/language/ControlPanel/Basics/AnimDuration/Prompt","text":"Animation duration"},"$:/language/ControlPanel/Basics/AutoFocus/Prompt":{"title":"$:/language/ControlPanel/Basics/AutoFocus/Prompt","text":"Default focus field for new tiddlers"},"$:/language/ControlPanel/Basics/Caption":{"title":"$:/language/ControlPanel/Basics/Caption","text":"Basics"},"$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint":{"title":"$:/language/ControlPanel/Basics/DefaultTiddlers/BottomHint","text":"Use [[double square brackets]] for titles with spaces. Or you can choose to {{retain story ordering||$:/snippets/retain-story-ordering-button}}"},"$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt":{"title":"$:/language/ControlPanel/Basics/DefaultTiddlers/Prompt","text":"Default tiddlers"},"$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint":{"title":"$:/language/ControlPanel/Basics/DefaultTiddlers/TopHint","text":"Choose which tiddlers are displayed at startup"},"$:/language/ControlPanel/Basics/Language/Prompt":{"title":"$:/language/ControlPanel/Basics/Language/Prompt","text":"Hello! Current language:"},"$:/language/ControlPanel/Basics/NewJournal/Title/Prompt":{"title":"$:/language/ControlPanel/Basics/NewJournal/Title/Prompt","text":"Title of new journal tiddlers"},"$:/language/ControlPanel/Basics/NewJournal/Text/Prompt":{"title":"$:/language/ControlPanel/Basics/NewJournal/Text/Prompt","text":"Text for new journal tiddlers"},"$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt":{"title":"$:/language/ControlPanel/Basics/NewJournal/Tags/Prompt","text":"Tags for new journal tiddlers"},"$:/language/ControlPanel/Basics/NewTiddler/Title/Prompt":{"title":"$:/language/ControlPanel/Basics/NewTiddler/Title/Prompt","text":"Title of new tiddlers"},"$:/language/ControlPanel/Basics/NewTiddler/Tags/Prompt":{"title":"$:/language/ControlPanel/Basics/NewTiddler/Tags/Prompt","text":"Tags for new tiddlers"},"$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt":{"title":"$:/language/ControlPanel/Basics/OverriddenShadowTiddlers/Prompt","text":"Number of overridden shadow tiddlers"},"$:/language/ControlPanel/Basics/RemoveTags":{"title":"$:/language/ControlPanel/Basics/RemoveTags","text":"Update to current format"},"$:/language/ControlPanel/Basics/RemoveTags/Hint":{"title":"$:/language/ControlPanel/Basics/RemoveTags/Hint","text":"Update the tags configuration to the latest format"},"$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt":{"title":"$:/language/ControlPanel/Basics/ShadowTiddlers/Prompt","text":"Number of shadow tiddlers"},"$:/language/ControlPanel/Basics/Subtitle/Prompt":{"title":"$:/language/ControlPanel/Basics/Subtitle/Prompt","text":"Subtitle"},"$:/language/ControlPanel/Basics/SystemTiddlers/Prompt":{"title":"$:/language/ControlPanel/Basics/SystemTiddlers/Prompt","text":"Number of system tiddlers"},"$:/language/ControlPanel/Basics/Tags/Prompt":{"title":"$:/language/ControlPanel/Basics/Tags/Prompt","text":"Number of tags"},"$:/language/ControlPanel/Basics/Tiddlers/Prompt":{"title":"$:/language/ControlPanel/Basics/Tiddlers/Prompt","text":"Number of tiddlers"},"$:/language/ControlPanel/Basics/Title/Prompt":{"title":"$:/language/ControlPanel/Basics/Title/Prompt","text":"Title of this ~TiddlyWiki"},"$:/language/ControlPanel/Basics/Username/Prompt":{"title":"$:/language/ControlPanel/Basics/Username/Prompt","text":"Username for signing edits"},"$:/language/ControlPanel/Basics/Version/Prompt":{"title":"$:/language/ControlPanel/Basics/Version/Prompt","text":"~TiddlyWiki version"},"$:/language/ControlPanel/Cascades/Caption":{"title":"$:/language/ControlPanel/Cascades/Caption","text":"Cascades"},"$:/language/ControlPanel/Cascades/Hint":{"title":"$:/language/ControlPanel/Cascades/Hint","text":"These global rules are used to dynamically choose certain templates. The result of the cascade is the result of the first filter in the sequence that returns a result"},"$:/language/ControlPanel/Cascades/TagPrompt":{"title":"$:/language/ControlPanel/Cascades/TagPrompt","text":"Filters tagged <$macrocall $name=\"tag\" tag=<<currentTiddler>>/>"},"$:/language/ControlPanel/EditorTypes/Caption":{"title":"$:/language/ControlPanel/EditorTypes/Caption","text":"Editor Types"},"$:/language/ControlPanel/EditorTypes/Editor/Caption":{"title":"$:/language/ControlPanel/EditorTypes/Editor/Caption","text":"Editor"},"$:/language/ControlPanel/EditorTypes/Hint":{"title":"$:/language/ControlPanel/EditorTypes/Hint","text":"These tiddlers determine which editor is used to edit specific tiddler types."},"$:/language/ControlPanel/EditorTypes/Type/Caption":{"title":"$:/language/ControlPanel/EditorTypes/Type/Caption","text":"Type"},"$:/language/ControlPanel/EditTemplateBody/Caption":{"title":"$:/language/ControlPanel/EditTemplateBody/Caption","text":"Edit Template Body"},"$:/language/ControlPanel/EditTemplateBody/Hint":{"title":"$:/language/ControlPanel/EditTemplateBody/Hint","text":"This rule cascade is used by the default edit template to dynamically choose the template for editing the body of a tiddler."},"$:/language/ControlPanel/FieldEditor/Caption":{"title":"$:/language/ControlPanel/FieldEditor/Caption","text":"Field Editor"},"$:/language/ControlPanel/FieldEditor/Hint":{"title":"$:/language/ControlPanel/FieldEditor/Hint","text":"This rules cascade is used to dynamically choose the template for rendering a tiddler field based on its name. It is used within the Edit Template."},"$:/language/ControlPanel/Info/Caption":{"title":"$:/language/ControlPanel/Info/Caption","text":"Info"},"$:/language/ControlPanel/Info/Hint":{"title":"$:/language/ControlPanel/Info/Hint","text":"Information about this TiddlyWiki"},"$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt","text":"Type shortcut here"},"$:/language/ControlPanel/KeyboardShortcuts/Add/Caption":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Add/Caption","text":"add shortcut"},"$:/language/ControlPanel/KeyboardShortcuts/Caption":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Caption","text":"Keyboard Shortcuts"},"$:/language/ControlPanel/KeyboardShortcuts/Hint":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Hint","text":"Manage keyboard shortcut assignments"},"$:/language/ControlPanel/KeyboardShortcuts/NoShortcuts/Caption":{"title":"$:/language/ControlPanel/KeyboardShortcuts/NoShortcuts/Caption","text":"No keyboard shortcuts assigned"},"$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Remove/Hint","text":"remove keyboard shortcut"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/All":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/All","text":"All platforms"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/Mac":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/Mac","text":"Macintosh platform only"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonMac":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonMac","text":"Non-Macintosh platforms only"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/Linux":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/Linux","text":"Linux platform only"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonLinux":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonLinux","text":"Non-Linux platforms only"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/Windows":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/Windows","text":"Windows platform only"},"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonWindows":{"title":"$:/language/ControlPanel/KeyboardShortcuts/Platform/NonWindows","text":"Non-Windows platforms only"},"$:/language/ControlPanel/LayoutSwitcher/Caption":{"title":"$:/language/ControlPanel/LayoutSwitcher/Caption","text":"Layout"},"$:/language/ControlPanel/LoadedModules/Caption":{"title":"$:/language/ControlPanel/LoadedModules/Caption","text":"Loaded Modules"},"$:/language/ControlPanel/LoadedModules/Hint":{"title":"$:/language/ControlPanel/LoadedModules/Hint","text":"These are the currently loaded tiddler modules linked to their source tiddlers. Any italicised modules lack a source tiddler, typically because they were setup during the boot process."},"$:/language/ControlPanel/Palette/Caption":{"title":"$:/language/ControlPanel/Palette/Caption","text":"Palette"},"$:/language/ControlPanel/Palette/Editor/Clone/Caption":{"title":"$:/language/ControlPanel/Palette/Editor/Clone/Caption","text":"clone"},"$:/language/ControlPanel/Palette/Editor/Clone/Prompt":{"title":"$:/language/ControlPanel/Palette/Editor/Clone/Prompt","text":"It is recommended that you clone this shadow palette before editing it"},"$:/language/ControlPanel/Palette/Editor/Delete/Hint":{"title":"$:/language/ControlPanel/Palette/Editor/Delete/Hint","text":"delete this entry from the current palette"},"$:/language/ControlPanel/Palette/Editor/Names/External/Show":{"title":"$:/language/ControlPanel/Palette/Editor/Names/External/Show","text":"Show color names that are not part of the current palette"},"$:/language/ControlPanel/Palette/Editor/Prompt/Modified":{"title":"$:/language/ControlPanel/Palette/Editor/Prompt/Modified","text":"This shadow palette has been modified"},"$:/language/ControlPanel/Palette/Editor/Prompt":{"title":"$:/language/ControlPanel/Palette/Editor/Prompt","text":"Editing"},"$:/language/ControlPanel/Palette/Editor/Reset/Caption":{"title":"$:/language/ControlPanel/Palette/Editor/Reset/Caption","text":"reset"},"$:/language/ControlPanel/Palette/HideEditor/Caption":{"title":"$:/language/ControlPanel/Palette/HideEditor/Caption","text":"hide editor"},"$:/language/ControlPanel/Palette/Prompt":{"title":"$:/language/ControlPanel/Palette/Prompt","text":"Current palette:"},"$:/language/ControlPanel/Palette/ShowEditor/Caption":{"title":"$:/language/ControlPanel/Palette/ShowEditor/Caption","text":"show editor"},"$:/language/ControlPanel/Parsing/Caption":{"title":"$:/language/ControlPanel/Parsing/Caption","text":"Parsing"},"$:/language/ControlPanel/Parsing/Hint":{"title":"$:/language/ControlPanel/Parsing/Hint","text":"Here you can globally disable/enable wiki parser rules. For changes to take effect, save and reload your wiki. Disabling certain parser rules can prevent <$text text=\"TiddlyWiki\"/> from functioning correctly. Use [[safe mode|https://tiddlywiki.com/#SafeMode]] to restore normal operation."},"$:/language/ControlPanel/Parsing/Block/Caption":{"title":"$:/language/ControlPanel/Parsing/Block/Caption","text":"Block Parse Rules"},"$:/language/ControlPanel/Parsing/Inline/Caption":{"title":"$:/language/ControlPanel/Parsing/Inline/Caption","text":"Inline Parse Rules"},"$:/language/ControlPanel/Parsing/Pragma/Caption":{"title":"$:/language/ControlPanel/Parsing/Pragma/Caption","text":"Pragma Parse Rules"},"$:/language/ControlPanel/Plugins/Add/Caption":{"title":"$:/language/ControlPanel/Plugins/Add/Caption","text":"Get more plugins"},"$:/language/ControlPanel/Plugins/Add/Hint":{"title":"$:/language/ControlPanel/Plugins/Add/Hint","text":"Install plugins from the official library"},"$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint":{"title":"$:/language/ControlPanel/Plugins/AlreadyInstalled/Hint","text":"This plugin is already installed at version <$text text=<<installedVersion>>/>"},"$:/language/ControlPanel/Plugins/AlsoRequires":{"title":"$:/language/ControlPanel/Plugins/AlsoRequires","text":"Also requires:"},"$:/language/ControlPanel/Plugins/Caption":{"title":"$:/language/ControlPanel/Plugins/Caption","text":"Plugins"},"$:/language/ControlPanel/Plugins/Disable/Caption":{"title":"$:/language/ControlPanel/Plugins/Disable/Caption","text":"disable"},"$:/language/ControlPanel/Plugins/Disable/Hint":{"title":"$:/language/ControlPanel/Plugins/Disable/Hint","text":"Disable this plugin when reloading page"},"$:/language/ControlPanel/Plugins/Disabled/Status":{"title":"$:/language/ControlPanel/Plugins/Disabled/Status","text":"(disabled)"},"$:/language/ControlPanel/Plugins/Downgrade/Caption":{"title":"$:/language/ControlPanel/Plugins/Downgrade/Caption","text":"downgrade"},"$:/language/ControlPanel/Plugins/Empty/Hint":{"title":"$:/language/ControlPanel/Plugins/Empty/Hint","text":"None"},"$:/language/ControlPanel/Plugins/Enable/Caption":{"title":"$:/language/ControlPanel/Plugins/Enable/Caption","text":"enable"},"$:/language/ControlPanel/Plugins/Enable/Hint":{"title":"$:/language/ControlPanel/Plugins/Enable/Hint","text":"Enable this plugin when reloading page"},"$:/language/ControlPanel/Plugins/Install/Caption":{"title":"$:/language/ControlPanel/Plugins/Install/Caption","text":"install"},"$:/language/ControlPanel/Plugins/Installed/Hint":{"title":"$:/language/ControlPanel/Plugins/Installed/Hint","text":"Currently installed plugins:"},"$:/language/ControlPanel/Plugins/Languages/Caption":{"title":"$:/language/ControlPanel/Plugins/Languages/Caption","text":"Languages"},"$:/language/ControlPanel/Plugins/Languages/Hint":{"title":"$:/language/ControlPanel/Plugins/Languages/Hint","text":"Language pack plugins"},"$:/language/ControlPanel/Plugins/NoInfoFound/Hint":{"title":"$:/language/ControlPanel/Plugins/NoInfoFound/Hint","text":"No ''\"<$text text=<<currentTab>>/>\"'' found"},"$:/language/ControlPanel/Plugins/NotInstalled/Hint":{"title":"$:/language/ControlPanel/Plugins/NotInstalled/Hint","text":"This plugin is not currently installed"},"$:/language/ControlPanel/Plugins/OpenPluginLibrary":{"title":"$:/language/ControlPanel/Plugins/OpenPluginLibrary","text":"Open plugin library"},"$:/language/ControlPanel/Plugins/ClosePluginLibrary":{"title":"$:/language/ControlPanel/Plugins/ClosePluginLibrary","text":"Close plugin library"},"$:/language/ControlPanel/Plugins/PluginWillRequireReload":{"title":"$:/language/ControlPanel/Plugins/PluginWillRequireReload","text":"(requires reload)"},"$:/language/ControlPanel/Plugins/Plugins/Caption":{"title":"$:/language/ControlPanel/Plugins/Plugins/Caption","text":"Plugins"},"$:/language/ControlPanel/Plugins/Plugins/Hint":{"title":"$:/language/ControlPanel/Plugins/Plugins/Hint","text":"Plugins"},"$:/language/ControlPanel/Plugins/Reinstall/Caption":{"title":"$:/language/ControlPanel/Plugins/Reinstall/Caption","text":"reinstall"},"$:/language/ControlPanel/Plugins/Stability/Deprecated":{"title":"$:/language/ControlPanel/Plugins/Stability/Deprecated","text":"DEPRECATED"},"$:/language/ControlPanel/Plugins/Stability/Experimental":{"title":"$:/language/ControlPanel/Plugins/Stability/Experimental","text":"EXPERIMENTAL"},"$:/language/ControlPanel/Plugins/Stability/Legacy":{"title":"$:/language/ControlPanel/Plugins/Stability/Legacy","text":"LEGACY"},"$:/language/ControlPanel/Plugins/Stability/Stable":{"title":"$:/language/ControlPanel/Plugins/Stability/Stable","text":"STABLE"},"$:/language/ControlPanel/Plugins/Themes/Caption":{"title":"$:/language/ControlPanel/Plugins/Themes/Caption","text":"Themes"},"$:/language/ControlPanel/Plugins/Themes/Hint":{"title":"$:/language/ControlPanel/Plugins/Themes/Hint","text":"Theme plugins"},"$:/language/ControlPanel/Plugins/Update/Caption":{"title":"$:/language/ControlPanel/Plugins/Update/Caption","text":"update"},"$:/language/ControlPanel/Plugins/Updates/Caption":{"title":"$:/language/ControlPanel/Plugins/Updates/Caption","text":"Updates"},"$:/language/ControlPanel/Plugins/Updates/Hint":{"title":"$:/language/ControlPanel/Plugins/Updates/Hint","text":"Available updates to installed plugins"},"$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption":{"title":"$:/language/ControlPanel/Plugins/Updates/UpdateAll/Caption","text":"Update <<update-count>> plugins"},"$:/language/ControlPanel/Plugins/SubPluginPrompt":{"title":"$:/language/ControlPanel/Plugins/SubPluginPrompt","text":"With <<count>> sub-plugins available"},"$:/language/ControlPanel/Saving/Caption":{"title":"$:/language/ControlPanel/Saving/Caption","text":"Saving"},"$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Description":{"title":"$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Description","text":"Permit automatic saving for the download saver"},"$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Hint":{"title":"$:/language/ControlPanel/Saving/DownloadSaver/AutoSave/Hint","text":"Enable Autosave for Download Saver"},"$:/language/ControlPanel/Saving/DownloadSaver/Caption":{"title":"$:/language/ControlPanel/Saving/DownloadSaver/Caption","text":"Download Saver"},"$:/language/ControlPanel/Saving/DownloadSaver/Hint":{"title":"$:/language/ControlPanel/Saving/DownloadSaver/Hint","text":"These settings apply to the HTML5-compatible download saver"},"$:/language/ControlPanel/Saving/General/Caption":{"title":"$:/language/ControlPanel/Saving/General/Caption","text":"General"},"$:/language/ControlPanel/Saving/General/Hint":{"title":"$:/language/ControlPanel/Saving/General/Hint","text":"These settings apply to all the loaded savers"},"$:/language/ControlPanel/Saving/Hint":{"title":"$:/language/ControlPanel/Saving/Hint","text":"Settings used for saving the entire TiddlyWiki as a single file via a saver module"},"$:/language/ControlPanel/Saving/GitService/Branch":{"title":"$:/language/ControlPanel/Saving/GitService/Branch","text":"Target branch for saving"},"$:/language/ControlPanel/Saving/GitService/CommitMessage":{"title":"$:/language/ControlPanel/Saving/GitService/CommitMessage","text":"Saved by TiddlyWiki"},"$:/language/ControlPanel/Saving/GitService/Description":{"title":"$:/language/ControlPanel/Saving/GitService/Description","text":"These settings are only used when saving to <<service-name>>"},"$:/language/ControlPanel/Saving/GitService/Filename":{"title":"$:/language/ControlPanel/Saving/GitService/Filename","text":"Filename of target file (e.g. `index.html`)"},"$:/language/ControlPanel/Saving/GitService/Path":{"title":"$:/language/ControlPanel/Saving/GitService/Path","text":"Path to target file (e.g. `/wiki/`)"},"$:/language/ControlPanel/Saving/GitService/Repo":{"title":"$:/language/ControlPanel/Saving/GitService/Repo","text":"Target repository (e.g. `Jermolene/TiddlyWiki5`)"},"$:/language/ControlPanel/Saving/GitService/ServerURL":{"title":"$:/language/ControlPanel/Saving/GitService/ServerURL","text":"Server API URL"},"$:/language/ControlPanel/Saving/GitService/UserName":{"title":"$:/language/ControlPanel/Saving/GitService/UserName","text":"Username"},"$:/language/ControlPanel/Saving/GitService/GitHub/Caption":{"title":"$:/language/ControlPanel/Saving/GitService/GitHub/Caption","text":"~GitHub Saver"},"$:/language/ControlPanel/Saving/GitService/GitHub/Password":{"title":"$:/language/ControlPanel/Saving/GitService/GitHub/Password","text":"Password, OAUTH token, or personal access token (see [[GitHub help page|https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line]] for details)"},"$:/language/ControlPanel/Saving/GitService/GitLab/Caption":{"title":"$:/language/ControlPanel/Saving/GitService/GitLab/Caption","text":"~GitLab Saver"},"$:/language/ControlPanel/Saving/GitService/GitLab/Password":{"title":"$:/language/ControlPanel/Saving/GitService/GitLab/Password","text":"Personal access token for API (see [[GitLab help page|https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html]] for details)"},"$:/language/ControlPanel/Saving/GitService/Gitea/Caption":{"title":"$:/language/ControlPanel/Saving/GitService/Gitea/Caption","text":"Gitea Saver"},"$:/language/ControlPanel/Saving/GitService/Gitea/Password":{"title":"$:/language/ControlPanel/Saving/GitService/Gitea/Password","text":"Personal access token for API (via Gitea’s web interface: `Settings | Applications | Generate New Token`)"},"$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Advanced/Heading","text":"Advanced Settings"},"$:/language/ControlPanel/Saving/TiddlySpot/BackupDir":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/BackupDir","text":"Backup Directory"},"$:/language/ControlPanel/Saving/TiddlySpot/ControlPanel":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/ControlPanel","text":"~TiddlySpot Control Panel"},"$:/language/ControlPanel/Saving/TiddlySpot/Backups":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Backups","text":"Backups"},"$:/language/ControlPanel/Saving/TiddlySpot/Caption":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Caption","text":"~TiddlySpot Saver"},"$:/language/ControlPanel/Saving/TiddlySpot/Description":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Description","text":"These settings are only used when saving to [[TiddlySpot|http://tiddlyspot.com]], [[TiddlyHost|https://tiddlyhost.com]], or a compatible remote server. See [[here|https://github.com/simonbaird/tiddlyhost/wiki/TiddlySpot-Saver-configuration-for-Tiddlyhost-and-Tiddlyspot]] for information on ~TiddlySpot and ~TiddlyHost saving configuration."},"$:/language/ControlPanel/Saving/TiddlySpot/Filename":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Filename","text":"Upload Filename"},"$:/language/ControlPanel/Saving/TiddlySpot/Heading":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Heading","text":"~TiddlySpot"},"$:/language/ControlPanel/Saving/TiddlySpot/Hint":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Hint","text":"//The server URL defaults to `http://<wikiname>.tiddlyspot.com/store.cgi` and can be changed to use a custom server address, e.g. `http://example.com/store.php`.//"},"$:/language/ControlPanel/Saving/TiddlySpot/Password":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/Password","text":"Password"},"$:/language/ControlPanel/Saving/TiddlySpot/ReadOnly":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/ReadOnly","text":"Note that [[TiddlySpot|http://tiddlyspot.com]] no longer allows the creation of new sites. For new sites, you can use [[TiddlyHost|https://tiddlyhost.com]], a new hosting service that replaces ~TiddlySpot."},"$:/language/ControlPanel/Saving/TiddlySpot/ServerURL":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/ServerURL","text":"Server URL"},"$:/language/ControlPanel/Saving/TiddlySpot/UploadDir":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/UploadDir","text":"Upload Directory"},"$:/language/ControlPanel/Saving/TiddlySpot/UserName":{"title":"$:/language/ControlPanel/Saving/TiddlySpot/UserName","text":"Wiki Name"},"$:/language/ControlPanel/Settings/AutoSave/Caption":{"title":"$:/language/ControlPanel/Settings/AutoSave/Caption","text":"Autosave"},"$:/language/ControlPanel/Settings/AutoSave/Disabled/Description":{"title":"$:/language/ControlPanel/Settings/AutoSave/Disabled/Description","text":"Do not save changes automatically"},"$:/language/ControlPanel/Settings/AutoSave/Enabled/Description":{"title":"$:/language/ControlPanel/Settings/AutoSave/Enabled/Description","text":"Save changes automatically"},"$:/language/ControlPanel/Settings/AutoSave/Hint":{"title":"$:/language/ControlPanel/Settings/AutoSave/Hint","text":"Attempt to automatically save changes during editing when using a supporting saver"},"$:/language/ControlPanel/Settings/CamelCase/Caption":{"title":"$:/language/ControlPanel/Settings/CamelCase/Caption","text":"Camel Case Wiki Links"},"$:/language/ControlPanel/Settings/CamelCase/Hint":{"title":"$:/language/ControlPanel/Settings/CamelCase/Hint","text":"You can globally disable automatic linking of ~CamelCase phrases. Requires reload to take effect"},"$:/language/ControlPanel/Settings/CamelCase/Description":{"title":"$:/language/ControlPanel/Settings/CamelCase/Description","text":"Enable automatic ~CamelCase linking"},"$:/language/ControlPanel/Settings/Caption":{"title":"$:/language/ControlPanel/Settings/Caption","text":"Settings"},"$:/language/ControlPanel/Settings/EditorToolbar/Caption":{"title":"$:/language/ControlPanel/Settings/EditorToolbar/Caption","text":"Editor Toolbar"},"$:/language/ControlPanel/Settings/EditorToolbar/Hint":{"title":"$:/language/ControlPanel/Settings/EditorToolbar/Hint","text":"Enable or disable the editor toolbar:"},"$:/language/ControlPanel/Settings/EditorToolbar/Description":{"title":"$:/language/ControlPanel/Settings/EditorToolbar/Description","text":"Show editor toolbar"},"$:/language/ControlPanel/Settings/InfoPanelMode/Caption":{"title":"$:/language/ControlPanel/Settings/InfoPanelMode/Caption","text":"Tiddler Info Panel Mode"},"$:/language/ControlPanel/Settings/InfoPanelMode/Hint":{"title":"$:/language/ControlPanel/Settings/InfoPanelMode/Hint","text":"Control when the tiddler info panel closes:"},"$:/language/ControlPanel/Settings/InfoPanelMode/Popup/Description":{"title":"$:/language/ControlPanel/Settings/InfoPanelMode/Popup/Description","text":"Tiddler info panel closes automatically"},"$:/language/ControlPanel/Settings/InfoPanelMode/Sticky/Description":{"title":"$:/language/ControlPanel/Settings/InfoPanelMode/Sticky/Description","text":"Tiddler info panel stays open until explicitly closed"},"$:/language/ControlPanel/Settings/Hint":{"title":"$:/language/ControlPanel/Settings/Hint","text":"These settings let you customise the behaviour of TiddlyWiki."},"$:/language/ControlPanel/Settings/NavigationAddressBar/Caption":{"title":"$:/language/ControlPanel/Settings/NavigationAddressBar/Caption","text":"Navigation Address Bar"},"$:/language/ControlPanel/Settings/NavigationAddressBar/Hint":{"title":"$:/language/ControlPanel/Settings/NavigationAddressBar/Hint","text":"Behaviour of the browser address bar when navigating to a tiddler:"},"$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description":{"title":"$:/language/ControlPanel/Settings/NavigationAddressBar/No/Description","text":"Do not update the address bar"},"$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description":{"title":"$:/language/ControlPanel/Settings/NavigationAddressBar/Permalink/Description","text":"Include the target tiddler"},"$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description":{"title":"$:/language/ControlPanel/Settings/NavigationAddressBar/Permaview/Description","text":"Include the target tiddler and the current story sequence"},"$:/language/ControlPanel/Settings/NavigationHistory/Caption":{"title":"$:/language/ControlPanel/Settings/NavigationHistory/Caption","text":"Navigation History"},"$:/language/ControlPanel/Settings/NavigationHistory/Hint":{"title":"$:/language/ControlPanel/Settings/NavigationHistory/Hint","text":"Update browser history when navigating to a tiddler:"},"$:/language/ControlPanel/Settings/NavigationHistory/No/Description":{"title":"$:/language/ControlPanel/Settings/NavigationHistory/No/Description","text":"Do not update history"},"$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description":{"title":"$:/language/ControlPanel/Settings/NavigationHistory/Yes/Description","text":"Update history"},"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption":{"title":"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Caption","text":"Permalink/permaview Mode"},"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Hint":{"title":"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/Hint","text":"Choose how permalink/permaview is handled:"},"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/CopyToClipboard/Description":{"title":"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/CopyToClipboard/Description","text":"Copy permalink/permaview URL to clipboard"},"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description":{"title":"$:/language/ControlPanel/Settings/NavigationPermalinkviewMode/UpdateAddressBar/Description","text":"Update address bar with permalink/permaview URL"},"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption":{"title":"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Caption","text":"Performance Instrumentation"},"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint":{"title":"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Hint","text":"Displays performance statistics in the browser developer console. Requires reload to take effect"},"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description":{"title":"$:/language/ControlPanel/Settings/PerformanceInstrumentation/Description","text":"Enable performance instrumentation"},"$:/language/ControlPanel/Settings/RecentLimit/Caption":{"title":"$:/language/ControlPanel/Settings/RecentLimit/Caption","text":"Recent Tab Limit"},"$:/language/ControlPanel/Settings/RecentLimit/Hint":{"title":"$:/language/ControlPanel/Settings/RecentLimit/Hint","text":"Maximum number of tiddlers to be displayed under the sidebar \"Recent\" tab"},"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption":{"title":"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Caption","text":"Toolbar Button Style"},"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Hint":{"title":"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Hint","text":"Choose the style for toolbar buttons:"},"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless":{"title":"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Borderless","text":"Borderless"},"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed":{"title":"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Boxed","text":"Boxed"},"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded":{"title":"$:/language/ControlPanel/Settings/ToolbarButtonStyle/Styles/Rounded","text":"Rounded"},"$:/language/ControlPanel/Settings/ToolbarButtons/Caption":{"title":"$:/language/ControlPanel/Settings/ToolbarButtons/Caption","text":"Toolbar Buttons"},"$:/language/ControlPanel/Settings/ToolbarButtons/Hint":{"title":"$:/language/ControlPanel/Settings/ToolbarButtons/Hint","text":"Default toolbar button appearance:"},"$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description":{"title":"$:/language/ControlPanel/Settings/ToolbarButtons/Icons/Description","text":"Include icon"},"$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description":{"title":"$:/language/ControlPanel/Settings/ToolbarButtons/Text/Description","text":"Include text"},"$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption":{"title":"$:/language/ControlPanel/Settings/DefaultSidebarTab/Caption","text":"Default Sidebar Tab"},"$:/language/ControlPanel/Settings/DefaultSidebarTab/Hint":{"title":"$:/language/ControlPanel/Settings/DefaultSidebarTab/Hint","text":"Specify which sidebar tab is displayed by default"},"$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Caption":{"title":"$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Caption","text":"Default More Sidebar Tab"},"$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Hint":{"title":"$:/language/ControlPanel/Settings/DefaultMoreSidebarTab/Hint","text":"Specify which More sidebar tab is displayed by default"},"$:/language/ControlPanel/Settings/LinkToBehaviour/Caption":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/Caption","text":"Tiddler Opening Behaviour"},"$:/language/ControlPanel/Settings/LinkToBehaviour/InsideRiver/Hint":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/InsideRiver/Hint","text":"Navigation from //within// the story river"},"$:/language/ControlPanel/Settings/LinkToBehaviour/OutsideRiver/Hint":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/OutsideRiver/Hint","text":"Navigation from //outside// the story river"},"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAbove":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAbove","text":"Open above the current tiddler"},"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenBelow":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenBelow","text":"Open below the current tiddler"},"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtTop":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtTop","text":"Open at the top of the story river"},"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtBottom":{"title":"$:/language/ControlPanel/Settings/LinkToBehaviour/OpenAtBottom","text":"Open at the bottom of the story river"},"$:/language/ControlPanel/Settings/TitleLinks/Caption":{"title":"$:/language/ControlPanel/Settings/TitleLinks/Caption","text":"Tiddler Titles"},"$:/language/ControlPanel/Settings/TitleLinks/Hint":{"title":"$:/language/ControlPanel/Settings/TitleLinks/Hint","text":"Optionally display tiddler titles as links"},"$:/language/ControlPanel/Settings/TitleLinks/No/Description":{"title":"$:/language/ControlPanel/Settings/TitleLinks/No/Description","text":"Do not display tiddler titles as links"},"$:/language/ControlPanel/Settings/TitleLinks/Yes/Description":{"title":"$:/language/ControlPanel/Settings/TitleLinks/Yes/Description","text":"Display tiddler titles as links"},"$:/language/ControlPanel/Settings/MissingLinks/Caption":{"title":"$:/language/ControlPanel/Settings/MissingLinks/Caption","text":"Wiki Links"},"$:/language/ControlPanel/Settings/MissingLinks/Hint":{"title":"$:/language/ControlPanel/Settings/MissingLinks/Hint","text":"Choose whether to link to tiddlers that do not exist yet"},"$:/language/ControlPanel/Settings/MissingLinks/Description":{"title":"$:/language/ControlPanel/Settings/MissingLinks/Description","text":"Enable links to missing tiddlers"},"$:/language/ControlPanel/SocialCard/Caption":{"title":"$:/language/ControlPanel/SocialCard/Caption","text":"Social Media Card"},"$:/language/ControlPanel/SocialCard/Domain/Prompt":{"title":"$:/language/ControlPanel/SocialCard/Domain/Prompt","text":"Domain name to display for the link (for example, ''tiddlywiki.com'')"},"$:/language/ControlPanel/SocialCard/Hint":{"title":"$:/language/ControlPanel/SocialCard/Hint","text":"This information is used by social and messaging services to display a preview card for links to this TiddlyWiki when hosted online"},"$:/language/ControlPanel/SocialCard/PreviewUrl/Prompt":{"title":"$:/language/ControlPanel/SocialCard/PreviewUrl/Prompt","text":"Full URL to preview image for this TiddlyWiki"},"$:/language/ControlPanel/SocialCard/PreviewUrl/Preview":{"title":"$:/language/ControlPanel/SocialCard/PreviewUrl/Preview","text":"Preview image:"},"$:/language/ControlPanel/SocialCard/Url/Prompt":{"title":"$:/language/ControlPanel/SocialCard/Url/Prompt","text":"Full URL of this TiddlyWiki"},"$:/language/ControlPanel/StoryTiddler/Caption":{"title":"$:/language/ControlPanel/StoryTiddler/Caption","text":"Story Tiddler"},"$:/language/ControlPanel/StoryTiddler/Hint":{"title":"$:/language/ControlPanel/StoryTiddler/Hint","text":"This rule cascade is used to dynamically choose the template for displaying a tiddler in the story river."},"$:/language/ControlPanel/StoryView/Caption":{"title":"$:/language/ControlPanel/StoryView/Caption","text":"Story View"},"$:/language/ControlPanel/StoryView/Prompt":{"title":"$:/language/ControlPanel/StoryView/Prompt","text":"Current view:"},"$:/language/ControlPanel/Stylesheets/Caption":{"title":"$:/language/ControlPanel/Stylesheets/Caption","text":"Stylesheets"},"$:/language/ControlPanel/Stylesheets/Expand/Caption":{"title":"$:/language/ControlPanel/Stylesheets/Expand/Caption","text":"Expand All"},"$:/language/ControlPanel/Stylesheets/Hint":{"title":"$:/language/ControlPanel/Stylesheets/Hint","text":"This is the rendered CSS of the current stylesheet tiddlers tagged with <<tag \"$:/tags/Stylesheet\">>"},"$:/language/ControlPanel/Stylesheets/Restore/Caption":{"title":"$:/language/ControlPanel/Stylesheets/Restore/Caption","text":"Restore"},"$:/language/ControlPanel/TestCases/Caption":{"title":"$:/language/ControlPanel/TestCases/Caption","text":"Test Cases"},"$:/language/ControlPanel/TestCases/Hint":{"title":"$:/language/ControlPanel/TestCases/Hint","text":"Test cases are self contained examples for testing and learning"},"$:/language/ControlPanel/TestCases/All/Caption":{"title":"$:/language/ControlPanel/TestCases/All/Caption","text":"All Test Cases"},"$:/language/ControlPanel/TestCases/All/Hint":{"title":"$:/language/ControlPanel/TestCases/All/Hint","text":"All Test Cases"},"$:/language/ControlPanel/TestCases/Failed/Caption":{"title":"$:/language/ControlPanel/TestCases/Failed/Caption","text":"Failed Test Cases"},"$:/language/ControlPanel/TestCases/Failed/Hint":{"title":"$:/language/ControlPanel/TestCases/Failed/Hint","text":"Only Failed Test Cases"},"$:/language/ControlPanel/Theme/Caption":{"title":"$:/language/ControlPanel/Theme/Caption","text":"Theme"},"$:/language/ControlPanel/Theme/Prompt":{"title":"$:/language/ControlPanel/Theme/Prompt","text":"Current theme:"},"$:/language/ControlPanel/TiddlerFields/Caption":{"title":"$:/language/ControlPanel/TiddlerFields/Caption","text":"Tiddler Fields"},"$:/language/ControlPanel/TiddlerFields/Hint":{"title":"$:/language/ControlPanel/TiddlerFields/Hint","text":"This is the full set of TiddlerFields in use in this wiki (including system tiddlers but excluding shadow tiddlers)."},"$:/language/ControlPanel/TiddlerColour/Caption":{"title":"$:/language/ControlPanel/TiddlerColour/Caption","text":"Tiddler Colour"},"$:/language/ControlPanel/TiddlerColour/Hint":{"title":"$:/language/ControlPanel/TiddlerColour/Hint","text":"This rules cascade is used to dynamically choose the colour for a tiddler (used for the icon and the associated tag pill)."},"$:/language/ControlPanel/TiddlerIcon/Caption":{"title":"$:/language/ControlPanel/TiddlerIcon/Caption","text":"Tiddler Icon"},"$:/language/ControlPanel/TiddlerIcon/Hint":{"title":"$:/language/ControlPanel/TiddlerIcon/Hint","text":"This rules cascade is used to dynamically choose the icon for a tiddler."},"$:/language/ControlPanel/Toolbars/Caption":{"title":"$:/language/ControlPanel/Toolbars/Caption","text":"Toolbars"},"$:/language/ControlPanel/Toolbars/EditToolbar/Caption":{"title":"$:/language/ControlPanel/Toolbars/EditToolbar/Caption","text":"Edit Toolbar"},"$:/language/ControlPanel/Toolbars/EditToolbar/Hint":{"title":"$:/language/ControlPanel/Toolbars/EditToolbar/Hint","text":"Choose which buttons are displayed for tiddlers in edit mode. Drag and drop to change the ordering"},"$:/language/ControlPanel/Toolbars/Hint":{"title":"$:/language/ControlPanel/Toolbars/Hint","text":"Select which toolbar buttons are displayed"},"$:/language/ControlPanel/Toolbars/PageControls/Caption":{"title":"$:/language/ControlPanel/Toolbars/PageControls/Caption","text":"Page Toolbar"},"$:/language/ControlPanel/Toolbars/PageControls/Hint":{"title":"$:/language/ControlPanel/Toolbars/PageControls/Hint","text":"Choose which buttons are displayed on the main page toolbar. Drag and drop to change the ordering"},"$:/language/ControlPanel/Toolbars/EditorToolbar/Caption":{"title":"$:/language/ControlPanel/Toolbars/EditorToolbar/Caption","text":"Editor Toolbar"},"$:/language/ControlPanel/Toolbars/EditorToolbar/Hint":{"title":"$:/language/ControlPanel/Toolbars/EditorToolbar/Hint","text":"Choose which buttons are displayed in the editor toolbar. Note that some buttons will only appear when editing tiddlers of a certain type. Drag and drop to change the ordering"},"$:/language/ControlPanel/Toolbars/ViewToolbar/Caption":{"title":"$:/language/ControlPanel/Toolbars/ViewToolbar/Caption","text":"View Toolbar"},"$:/language/ControlPanel/Toolbars/ViewToolbar/Hint":{"title":"$:/language/ControlPanel/Toolbars/ViewToolbar/Hint","text":"Choose which buttons are displayed for tiddlers in view mode. Drag and drop to change the ordering"},"$:/language/ControlPanel/Tools/Download/Full/Caption":{"title":"$:/language/ControlPanel/Tools/Download/Full/Caption","text":"Download full wiki"},"$:/language/ControlPanel/ViewTemplateBody/Caption":{"title":"$:/language/ControlPanel/ViewTemplateBody/Caption","text":"View Template Body"},"$:/language/ControlPanel/ViewTemplateBody/Hint":{"title":"$:/language/ControlPanel/ViewTemplateBody/Hint","text":"This rule cascade is used by the default view template to dynamically choose the template for displaying the body of a tiddler."},"$:/language/ControlPanel/ViewTemplateTitle/Caption":{"title":"$:/language/ControlPanel/ViewTemplateTitle/Caption","text":"View Template Title"},"$:/language/ControlPanel/ViewTemplateTitle/Hint":{"title":"$:/language/ControlPanel/ViewTemplateTitle/Hint","text":"This rule cascade is used by the default view template to dynamically choose the template for displaying the title of a tiddler."},"$:/language/ControlPanel/ViewTemplateSubtitle/Caption":{"title":"$:/language/ControlPanel/ViewTemplateSubtitle/Caption","text":"View Template Subtitle"},"$:/language/ControlPanel/ViewTemplateSubtitle/Hint":{"title":"$:/language/ControlPanel/ViewTemplateSubtitle/Hint","text":"This rule cascade is used by the default view template to dynamically choose the template for displaying the subtitle of a tiddler."},"$:/language/ControlPanel/ViewTemplateTags/Caption":{"title":"$:/language/ControlPanel/ViewTemplateTags/Caption","text":"View Template Tags"},"$:/language/ControlPanel/ViewTemplateTags/Hint":{"title":"$:/language/ControlPanel/ViewTemplateTags/Hint","text":"This rule cascade is used by the default view template to dynamically choose the template for displaying the tags area of a tiddler."},"$:/language/Date/DaySuffix/1":{"title":"$:/language/Date/DaySuffix/1","text":"st"},"$:/language/Date/DaySuffix/2":{"title":"$:/language/Date/DaySuffix/2","text":"nd"},"$:/language/Date/DaySuffix/3":{"title":"$:/language/Date/DaySuffix/3","text":"rd"},"$:/language/Date/DaySuffix/4":{"title":"$:/language/Date/DaySuffix/4","text":"th"},"$:/language/Date/DaySuffix/5":{"title":"$:/language/Date/DaySuffix/5","text":"th"},"$:/language/Date/DaySuffix/6":{"title":"$:/language/Date/DaySuffix/6","text":"th"},"$:/language/Date/DaySuffix/7":{"title":"$:/language/Date/DaySuffix/7","text":"th"},"$:/language/Date/DaySuffix/8":{"title":"$:/language/Date/DaySuffix/8","text":"th"},"$:/language/Date/DaySuffix/9":{"title":"$:/language/Date/DaySuffix/9","text":"th"},"$:/language/Date/DaySuffix/10":{"title":"$:/language/Date/DaySuffix/10","text":"th"}