Skip to content
Browse files

tagger first pass

  • Loading branch information...
1 parent a520506 commit 9e042165d67b518620803e04327e9d22ed5565d0 @benbalter benbalter committed Oct 5, 2012
Showing with 39,183 additions and 0 deletions.
  1. BIN public/tagger/compressed.tracemonkey-pldi-09.pdf
  2. +6 −0 public/tagger/css/tagger.css
  3. +1,355 −0 public/tagger/css/viewer.css
  4. +3 −0 public/tagger/images/annotation-check.svg
  5. +3 −0 public/tagger/images/annotation-comment.svg
  6. +46 −0 public/tagger/images/annotation-text.svg
  7. BIN public/tagger/images/loading-icon.gif
  8. BIN public/tagger/images/texture.png
  9. BIN public/tagger/images/toolbarButton-bookmark.png
  10. BIN public/tagger/images/toolbarButton-download.png
  11. BIN public/tagger/images/toolbarButton-fullscreen.png
  12. BIN public/tagger/images/toolbarButton-menuArrows.png
  13. BIN public/tagger/images/toolbarButton-openFile.png
  14. BIN public/tagger/images/toolbarButton-pageDown-rtl.png
  15. BIN public/tagger/images/toolbarButton-pageDown.png
  16. BIN public/tagger/images/toolbarButton-pageUp-rtl.png
  17. BIN public/tagger/images/toolbarButton-pageUp.png
  18. BIN public/tagger/images/toolbarButton-print.png
  19. BIN public/tagger/images/toolbarButton-search.png
  20. BIN public/tagger/images/toolbarButton-sidebarToggle.png
  21. BIN public/tagger/images/toolbarButton-viewOutline.png
  22. BIN public/tagger/images/toolbarButton-viewThumbnail.png
  23. BIN public/tagger/images/toolbarButton-zoomIn.png
  24. BIN public/tagger/images/toolbarButton-zoomOut.png
  25. +240 −0 public/tagger/index.html
  26. +14 −0 public/tagger/js/compatibility.js
  27. +25 −0 public/tagger/js/l10n.js
  28. +4 −0 public/tagger/js/mustache.js
  29. +36,074 −0 public/tagger/js/pdf.js
  30. +65 −0 public/tagger/js/tagger.coffee
  31. +2 −0 public/tagger/js/tagger.js
  32. +15 −0 public/tagger/js/viewer.js
  33. +1,331 −0 public/tagger/locale.properties
View
BIN public/tagger/compressed.tracemonkey-pldi-09.pdf
Binary file not shown.
View
6 public/tagger/css/tagger.css
@@ -0,0 +1,6 @@
+#tagger { position: absolute; width: 250px; background: white; border: 1px solid #ccc; border-radius: 15px; padding: 10px; }
+#tagger .formRow { clear: both; float: left; margin: 2px 0 2px 0 }
+#tagger .formField, #tagger .formLabel { float: left; width: 100px; }
+#tagger #addTag { clear: both; float: left; margin-top: 10px; }
+#tagger label { font-weight: bold; }
+#tagSubmit { color: red; width: 60px; padding-bottom: 4px; font-weight: bold; }
View
1,355 public/tagger/css/viewer.css
@@ -0,0 +1,1355 @@
+/* Copyright 2012 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+* {
+ padding: 0;
+ margin: 0;
+}
+
+html {
+ height: 100%;
+}
+
+body {
+ height: 100%;
+ background-color: #404040;
+ background-image: url(../images/texture.png);
+}
+
+body,
+input,
+button,
+select {
+ font: message-box;
+}
+
+.hidden {
+ display: none;
+}
+[hidden] {
+ display: none !important;
+}
+
+#viewerContainer:-webkit-full-screen {
+ top: 0px;
+ border-top: 5px solid transparent;
+ background-color: #404040;
+ background-image: url(../images/texture.png);
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+
+#viewerContainer:-moz-full-screen {
+ top: 0px;
+ border-top: 5px solid transparent;
+ background-color: #404040;
+ background-image: url(../images/texture.png);
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+
+:-webkit-full-screen .page:last-child {
+ margin-bottom: 40px;
+}
+
+:-moz-full-screen .page:last-child {
+ margin-bottom: 40px;
+}
+
+#viewerContainer:full-screen {
+ top: 0px;
+ background-color: #404040;
+ background-image: url(../images/texture.png);
+ width: 100%;
+ height: 100%;
+}
+
+/* outer/inner center provides horizontal center */
+html[dir='ltr'] .outerCenter {
+ float: right;
+ position: relative;
+ right: 50%;
+}
+html[dir='rtl'] .outerCenter {
+ float: left;
+ position: relative;
+ left: 50%;
+}
+html[dir='ltr'] .innerCenter {
+ float: right;
+ position: relative;
+ right: -50%;
+}
+html[dir='rtl'] .innerCenter {
+ float: left;
+ position: relative;
+ left: -50%;
+}
+
+#outerContainer {
+ width: 100%;
+ height: 100%;
+}
+
+#sidebarContainer {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ width: 200px;
+ visibility: hidden;
+ -webkit-transition-duration: 200ms;
+ -webkit-transition-timing-function: ease;
+ -moz-transition-duration: 200ms;
+ -moz-transition-timing-function: ease;
+ -ms-transition-duration: 200ms;
+ -ms-transition-timing-function: ease;
+ -o-transition-duration: 200ms;
+ -o-transition-timing-function: ease;
+ transition-duration: 200ms;
+ transition-timing-function: ease;
+
+}
+html[dir='ltr'] #sidebarContainer {
+ -webkit-transition-property: left;
+ -moz-transition-property: left;
+ -ms-transition-property: left;
+ -o-transition-property: left;
+ transition-property: left;
+ left: -200px;
+}
+html[dir='rtl'] #sidebarContainer {
+ -webkit-transition-property: right;
+ -ms-transition-property: right;
+ -o-transition-property: right;
+ transition-property: right;
+ right: -200px;
+}
+
+#outerContainer.sidebarMoving > #sidebarContainer,
+#outerContainer.sidebarOpen > #sidebarContainer {
+ visibility: visible;
+}
+html[dir='ltr'] #outerContainer.sidebarOpen > #sidebarContainer {
+ left: 0px;
+}
+html[dir='rtl'] #outerContainer.sidebarOpen > #sidebarContainer {
+ right: 0px;
+}
+
+#mainContainer {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ -webkit-transition-duration: 200ms;
+ -webkit-transition-timing-function: ease;
+ -moz-transition-duration: 200ms;
+ -moz-transition-timing-function: ease;
+ -ms-transition-duration: 200ms;
+ -ms-transition-timing-function: ease;
+ -o-transition-duration: 200ms;
+ -o-transition-timing-function: ease;
+ transition-duration: 200ms;
+ transition-timing-function: ease;
+}
+html[dir='ltr'] #outerContainer.sidebarOpen > #mainContainer {
+ -webkit-transition-property: left;
+ -moz-transition-property: left;
+ -ms-transition-property: left;
+ -o-transition-property: left;
+ transition-property: left;
+ left: 200px;
+}
+html[dir='rtl'] #outerContainer.sidebarOpen > #mainContainer {
+ -webkit-transition-property: right;
+ -moz-transition-property: right;
+ -ms-transition-property: right;
+ -o-transition-property: right;
+ transition-property: right;
+ right: 200px;
+}
+
+#sidebarContent {
+ top: 32px;
+ bottom: 0;
+ overflow: auto;
+ position: absolute;
+ width: 200px;
+
+ background-color: hsla(0,0%,0%,.1);
+ box-shadow: inset -1px 0 0 hsla(0,0%,0%,.25);
+}
+html[dir='ltr'] #sidebarContent {
+ left: 0;
+}
+html[dir='rtl'] #sidebarContent {
+ right: 0;
+}
+
+#viewerContainer {
+ overflow: auto;
+ box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05);
+ padding-top: 30px;
+ position: absolute;
+ top: 32px;
+ right: 0;
+ bottom: 0;
+ left: 0;
+}
+
+.toolbar {
+ position: absolute;
+ left: 0;
+ right: 0;
+ height: 32px;
+ z-index: 9999;
+ cursor: default;
+}
+
+#toolbarContainer {
+ width: 100%;
+}
+
+#toolbarSidebar {
+ width: 200px;
+ height: 29px;
+ background-image: url(../images/texture.png),
+ -webkit-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
+ background-image: url(../images/texture.png),
+ -moz-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
+ background-image: url(../images/texture.png),
+ -ms-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
+ background-image: url(../images/texture.png),
+ -o-linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
+ background-image: url(../images/texture.png),
+ linear-gradient(hsla(0,0%,30%,.99), hsla(0,0%,25%,.95));
+ box-shadow: inset -2px 0 0 hsla(0,0%,100%,.08),
+ inset 0 1px 1px hsla(0,0%,0%,.15),
+ inset 0 -1px 0 hsla(0,0%,100%,.05),
+ 0 1px 0 hsla(0,0%,0%,.15),
+ 0 1px 1px hsla(0,0%,0%,.1);
+}
+
+#toolbarViewer, .findbar {
+ position: relative;
+ height: 32px;
+ background-image: url(../images/texture.png),
+ -webkit-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
+ background-image: url(../images/texture.png),
+ -moz-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
+ background-image: url(../images/texture.png),
+ -ms-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
+ background-image: url(../images/texture.png),
+ -o-linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
+ background-image: url(../images/texture.png),
+ linear-gradient(hsla(0,0%,32%,.99), hsla(0,0%,27%,.95));
+ border-left: 1px solid hsla(0,0%,0%,.5);
+ box-shadow: inset 1px 0 0 hsla(0,0%,100%,.08),
+ inset 0 1px 1px hsla(0,0%,0%,.15),
+ inset 0 -1px 0 hsla(0,0%,100%,.05),
+ 0 1px 0 hsla(0,0%,0%,.15),
+ 0 1px 1px hsla(0,0%,0%,.1);
+}
+
+.findbar {
+ top: 32px;
+ left: 68px;
+ position: absolute;
+ z-index: 10000;
+ height: 20px;
+
+ min-width: 16px;
+ padding: 3px 6px 3px 6px;
+ margin: 4px 2px 4px 0;
+ color: hsl(0,0%,85%);
+ font-size: 12px;
+ line-height: 14px;
+ text-align: left;
+ cursor: default;
+}
+
+.findbar label {
+ -webkit-user-select:none;
+ -moz-user-select:none;
+}
+
+.doorHanger {
+ border: 1px solid hsla(0,0%,0%,.5);
+ border-radius: 2px;
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
+}
+.doorHanger:after, .doorHanger:before {
+ bottom: 100%;
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+}
+.doorHanger:after {
+ border-bottom-color: hsla(0,0%,32%,.99);
+ border-width: 8px;
+ left: 16px;
+ margin-left: -8px;
+}
+.doorHanger:before {
+ border-bottom-color: hsla(0,0%,0%,.5);
+ border-width: 9px;
+ left: 16px;
+ margin-left: -9px;
+}
+
+#findMsg {
+ font-style: italic;
+ color: #A6B7D0;
+}
+
+.notFound {
+ background-color: rgb(255, 137, 153);
+}
+
+html[dir='ltr'] #toolbarViewerLeft {
+ margin-left: -1px;
+}
+html[dir='rtl'] #toolbarViewerRight {
+ margin-left: -1px;
+}
+
+
+html[dir='ltr'] #toolbarViewerLeft,
+html[dir='rtl'] #toolbarViewerRight {
+ position: absolute;
+ top: 0;
+ left: 0;
+}
+html[dir='ltr'] #toolbarViewerRight,
+html[dir='rtl'] #toolbarViewerLeft {
+ position: absolute;
+ top: 0;
+ right: 0;
+}
+html[dir='ltr'] #toolbarViewerLeft > *,
+html[dir='ltr'] #toolbarViewerMiddle > *,
+html[dir='ltr'] #toolbarViewerRight > * {
+ float: left;
+}
+html[dir='rtl'] #toolbarViewerLeft > *,
+html[dir='rtl'] #toolbarViewerMiddle > *,
+html[dir='rtl'] #toolbarViewerRight > * {
+ float: right;
+}
+
+html[dir='ltr'] .splitToolbarButton {
+ margin: 3px 2px 4px 0;
+ display: inline-block;
+}
+html[dir='rtl'] .splitToolbarButton {
+ margin: 3px 0 4px 2px;
+ display: inline-block;
+}
+html[dir='ltr'] .splitToolbarButton > .toolbarButton {
+ border-radius: 0;
+ float: left;
+}
+html[dir='rtl'] .splitToolbarButton > .toolbarButton {
+ border-radius: 0;
+ float: right;
+}
+
+.toolbarButton {
+ border: 0 none;
+ background-color: rgba(0, 0, 0, 0);
+ width: 32px;
+ height: 25px;
+}
+
+.toolbarButton > span {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ overflow: hidden;
+}
+
+.toolbarButton[disabled] {
+ opacity: .5;
+}
+
+.toolbarButton.group {
+ margin-right:0;
+}
+
+.splitToolbarButton.toggled .toolbarButton {
+ margin: 0;
+}
+
+.splitToolbarButton:hover > .toolbarButton,
+.splitToolbarButton:focus > .toolbarButton,
+.splitToolbarButton.toggled > .toolbarButton,
+.toolbarButton.textButton {
+ background-color: hsla(0,0%,0%,.12);
+ background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -ms-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -o-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ border: 1px solid hsla(0,0%,0%,.35);
+ border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.15) inset,
+ 0 1px 0 hsla(0,0%,100%,.05);
+ -webkit-transition-property: background-color, border-color, box-shadow;
+ -webkit-transition-duration: 150ms;
+ -webkit-transition-timing-function: ease;
+ -moz-transition-property: background-color, border-color, box-shadow;
+ -moz-transition-duration: 150ms;
+ -moz-transition-timing-function: ease;
+ -ms-transition-property: background-color, border-color, box-shadow;
+ -ms-transition-duration: 150ms;
+ -ms-transition-timing-function: ease;
+ -o-transition-property: background-color, border-color, box-shadow;
+ -o-transition-duration: 150ms;
+ -o-transition-timing-function: ease;
+ transition-property: background-color, border-color, box-shadow;
+ transition-duration: 150ms;
+ transition-timing-function: ease;
+
+}
+.splitToolbarButton > .toolbarButton:hover,
+.splitToolbarButton > .toolbarButton:focus,
+.dropdownToolbarButton:hover,
+.toolbarButton.textButton:hover,
+.toolbarButton.textButton:focus {
+ background-color: hsla(0,0%,0%,.2);
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.15) inset,
+ 0 0 1px hsla(0,0%,0%,.05);
+ z-index: 199;
+}
+html[dir='ltr'] .splitToolbarButton > .toolbarButton:first-child,
+html[dir='rtl'] .splitToolbarButton > .toolbarButton:last-child {
+ position: relative;
+ margin: 0;
+ margin-right: -1px;
+ border-top-left-radius: 2px;
+ border-bottom-left-radius: 2px;
+ border-right-color: transparent;
+}
+html[dir='ltr'] .splitToolbarButton > .toolbarButton:last-child,
+html[dir='rtl'] .splitToolbarButton > .toolbarButton:first-child {
+ position: relative;
+ margin: 0;
+ margin-left: -1px;
+ border-top-right-radius: 2px;
+ border-bottom-right-radius: 2px;
+ border-left-color: transparent;
+}
+.splitToolbarButtonSeparator {
+ padding: 8px 0;
+ width: 1px;
+ background-color: hsla(0,0%,00%,.5);
+ z-index: 99;
+ box-shadow: 0 0 0 1px hsla(0,0%,100%,.08);
+ display: inline-block;
+ margin: 5px 0;
+}
+html[dir='ltr'] .splitToolbarButtonSeparator {
+ float:left;
+}
+html[dir='rtl'] .splitToolbarButtonSeparator {
+ float:right;
+}
+.splitToolbarButton:hover > .splitToolbarButtonSeparator,
+.splitToolbarButton.toggled > .splitToolbarButtonSeparator {
+ padding: 12px 0;
+ margin: 0;
+ box-shadow: 0 0 0 1px hsla(0,0%,100%,.03);
+ -webkit-transition-property: padding;
+ -webkit-transition-duration: 10ms;
+ -webkit-transition-timing-function: ease;
+ -moz-transition-property: padding;
+ -moz-transition-duration: 10ms;
+ -moz-transition-timing-function: ease;
+ -ms-transition-property: padding;
+ -ms-transition-duration: 10ms;
+ -ms-transition-timing-function: ease;
+ -o-transition-property: padding;
+ -o-transition-duration: 10ms;
+ -o-transition-timing-function: ease;
+ transition-property: padding;
+ transition-duration: 10ms;
+ transition-timing-function: ease;
+}
+
+.toolbarButton,
+.dropdownToolbarButton {
+ min-width: 16px;
+ padding: 2px 6px 0;
+ border: 1px solid transparent;
+ border-radius: 2px;
+ color: hsl(0,0%,95%);
+ font-size: 12px;
+ line-height: 14px;
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ -ms-user-select:none;
+ /* Opera does not support user-select, use <... unselectable="on"> instead */
+ cursor: default;
+ -webkit-transition-property: background-color, border-color, box-shadow;
+ -webkit-transition-duration: 150ms;
+ -webkit-transition-timing-function: ease;
+ -moz-transition-property: background-color, border-color, box-shadow;
+ -moz-transition-duration: 150ms;
+ -moz-transition-timing-function: ease;
+ -ms-transition-property: background-color, border-color, box-shadow;
+ -ms-transition-duration: 150ms;
+ -ms-transition-timing-function: ease;
+ -o-transition-property: background-color, border-color, box-shadow;
+ -o-transition-duration: 150ms;
+ -o-transition-timing-function: ease;
+ transition-property: background-color, border-color, box-shadow;
+ transition-duration: 150ms;
+ transition-timing-function: ease;
+}
+
+html[dir='ltr'] .toolbarButton,
+html[dir='ltr'] .dropdownToolbarButton {
+ margin: 3px 2px 4px 0;
+}
+html[dir='rtl'] .toolbarButton,
+html[dir='rtl'] .dropdownToolbarButton {
+ margin: 3px 0 4px 2px;
+}
+
+.toolbarButton:hover,
+.toolbarButton:focus,
+.dropdownToolbarButton {
+ background-color: hsla(0,0%,0%,.12);
+ background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -ms-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -o-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ border: 1px solid hsla(0,0%,0%,.35);
+ border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.15) inset,
+ 0 1px 0 hsla(0,0%,100%,.05);
+}
+
+.toolbarButton:hover:active,
+.dropdownToolbarButton:hover:active {
+ background-color: hsla(0,0%,0%,.2);
+ background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -ms-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -o-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ border-color: hsla(0,0%,0%,.35) hsla(0,0%,0%,.4) hsla(0,0%,0%,.45);
+ box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
+ 0 0 1px hsla(0,0%,0%,.2) inset,
+ 0 1px 0 hsla(0,0%,100%,.05);
+ -webkit-transition-property: background-color, border-color, box-shadow;
+ -webkit-transition-duration: 10ms;
+ -webkit-transition-timing-function: linear;
+ -moz-transition-property: background-color, border-color, box-shadow;
+ -moz-transition-duration: 10ms;
+ -moz-transition-timing-function: linear;
+ -ms-transition-property: background-color, border-color, box-shadow;
+ -ms-transition-duration: 10ms;
+ -ms-transition-timing-function: linear;
+ -o-transition-property: background-color, border-color, box-shadow;
+ -o-transition-duration: 10ms;
+ -o-transition-timing-function: linear;
+ transition-property: background-color, border-color, box-shadow;
+ transition-duration: 10ms;
+ transition-timing-function: linear;
+}
+
+.toolbarButton.toggled,
+.splitToolbarButton.toggled > .toolbarButton.toggled {
+ background-color: hsla(0,0%,0%,.3);
+ background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -ms-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -o-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.45) hsla(0,0%,0%,.5);
+ box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
+ 0 0 1px hsla(0,0%,0%,.2) inset,
+ 0 1px 0 hsla(0,0%,100%,.05);
+ -webkit-transition-property: background-color, border-color, box-shadow;
+ -webkit-transition-duration: 10ms;
+ -webkit-transition-timing-function: linear;
+ -moz-transition-property: background-color, border-color, box-shadow;
+ -moz-transition-duration: 10ms;
+ -moz-transition-timing-function: linear;
+ -ms-transition-property: background-color, border-color, box-shadow;
+ -ms-transition-duration: 10ms;
+ -ms-transition-timing-function: linear;
+ -o-transition-property: background-color, border-color, box-shadow;
+ -o-transition-duration: 10ms;
+ -o-transition-timing-function: linear;
+ transition-property: background-color, border-color, box-shadow;
+ transition-duration: 10ms;
+ transition-timing-function: linear;
+}
+
+.toolbarButton.toggled:hover:active,
+.splitToolbarButton.toggled > .toolbarButton.toggled:hover:active {
+ background-color: hsla(0,0%,0%,.4);
+ border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.5) hsla(0,0%,0%,.55);
+ box-shadow: 0 1px 1px hsla(0,0%,0%,.2) inset,
+ 0 0 1px hsla(0,0%,0%,.3) inset,
+ 0 1px 0 hsla(0,0%,100%,.05);
+}
+
+.dropdownToolbarButton {
+ min-width: 120px;
+ max-width: 120px;
+ padding: 3px 2px 2px;
+ overflow: hidden;
+ background: url(../images/toolbarButton-menuArrows.png) no-repeat;
+}
+html[dir='ltr'] .dropdownToolbarButton {
+ background-position: 95%;
+}
+html[dir='rtl'] .dropdownToolbarButton {
+ background-position: 5%;
+}
+
+.dropdownToolbarButton > select {
+ -webkit-appearance: none;
+ -moz-appearance: none; /* in the future this might matter, see bugzilla bug #649849 */
+ min-width: 140px;
+ font-size: 12px;
+ color: hsl(0,0%,95%);
+ margin:0;
+ padding:0;
+ border:none;
+ background: rgba(0,0,0,0); /* Opera does not support 'transparent' <select> background */
+}
+
+.dropdownToolbarButton > select > option {
+ background: hsl(0,0%,24%);
+}
+
+#customScaleOption {
+ display: none;
+}
+
+#pageWidthOption {
+ border-bottom: 1px rgba(255, 255, 255, .5) solid;
+}
+
+html[dir='ltr'] .splitToolbarButton:first-child,
+html[dir='ltr'] .toolbarButton:first-child,
+html[dir='rtl'] .splitToolbarButton:last-child,
+html[dir='rtl'] .toolbarButton:last-child {
+ margin-left: 4px;
+}
+html[dir='ltr'] .splitToolbarButton:last-child,
+html[dir='ltr'] .toolbarButton:last-child,
+html[dir='rtl'] .splitToolbarButton:first-child,
+html[dir='rtl'] .toolbarButton:first-child {
+ margin-right: 4px;
+}
+
+.toolbarButtonSpacer {
+ width: 30px;
+ display: inline-block;
+ height: 1px;
+}
+
+.toolbarButtonFlexibleSpacer {
+ -webkit-box-flex: 1;
+ -moz-box-flex: 1;
+ min-width: 30px;
+}
+
+.toolbarButton#sidebarToggle::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-sidebarToggle.png);
+}
+
+html[dir='ltr'] .toolbarButton.pageUp::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-pageUp.png);
+}
+
+html[dir='rtl'] .toolbarButton.pageUp::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-pageUp-rtl.png);
+}
+
+html[dir='ltr'] .toolbarButton.pageDown::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-pageDown.png);
+}
+
+html[dir='rtl'] .toolbarButton.pageDown::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-pageDown-rtl.png);
+}
+
+.toolbarButton.zoomOut::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-zoomOut.png);
+}
+
+.toolbarButton.zoomIn::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-zoomIn.png);
+}
+
+.toolbarButton.fullscreen::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-fullscreen.png);
+}
+
+.toolbarButton.print::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-print.png);
+}
+
+.toolbarButton.openFile::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-openFile.png);
+}
+
+.toolbarButton.download::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-download.png);
+}
+
+.toolbarButton.bookmark {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ margin-top: 3px;
+ padding-top: 4px;
+}
+
+.toolbarButton.bookmark::before {
+ content: url(../images/toolbarButton-bookmark.png);
+}
+
+#viewThumbnail.toolbarButton::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-viewThumbnail.png);
+}
+
+#viewOutline.toolbarButton::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-viewOutline.png);
+}
+
+#viewFind.toolbarButton::before {
+ display: inline-block;
+ content: url(../images/toolbarButton-search.png);
+}
+
+
+.toolbarField {
+ padding: 3px 6px;
+ margin: 4px 0 4px 0;
+ border: 1px solid transparent;
+ border-radius: 2px;
+ background-color: hsla(0,0%,100%,.09);
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ border: 1px solid hsla(0,0%,0%,.35);
+ border-color: hsla(0,0%,0%,.32) hsla(0,0%,0%,.38) hsla(0,0%,0%,.42);
+ box-shadow: 0 1px 0 hsla(0,0%,0%,.05) inset,
+ 0 1px 0 hsla(0,0%,100%,.05);
+ color: hsl(0,0%,95%);
+ font-size: 12px;
+ line-height: 14px;
+ outline-style: none;
+ -moz-transition-property: background-color, border-color, box-shadow;
+ -moz-transition-duration: 150ms;
+ -moz-transition-timing-function: ease;
+}
+
+.toolbarField.pageNumber {
+ min-width: 16px;
+ text-align: right;
+ width: 40px;
+}
+
+.toolbarField.pageNumber::-webkit-inner-spin-button,
+.toolbarField.pageNumber::-webkit-outer-spin-button {
+ -webkit-appearance: none;
+ margin: 0;
+}
+
+.toolbarField:hover {
+ background-color: hsla(0,0%,100%,.11);
+ border-color: hsla(0,0%,0%,.4) hsla(0,0%,0%,.43) hsla(0,0%,0%,.45);
+}
+
+.toolbarField:focus {
+ background-color: hsla(0,0%,100%,.15);
+ border-color: hsla(204,100%,65%,.8) hsla(204,100%,65%,.85) hsla(204,100%,65%,.9);
+}
+
+.toolbarLabel {
+ min-width: 16px;
+ padding: 3px 6px 3px 2px;
+ margin: 4px 2px 4px 0;
+ border: 1px solid transparent;
+ border-radius: 2px;
+ color: hsl(0,0%,85%);
+ font-size: 12px;
+ line-height: 14px;
+ text-align: left;
+ -webkit-user-select:none;
+ -moz-user-select:none;
+ cursor: default;
+}
+
+#thumbnailView {
+ position: absolute;
+ width: 120px;
+ top: 0;
+ bottom: 0;
+ padding: 10px 40px 0;
+ overflow: auto;
+}
+
+.thumbnail {
+ margin-bottom: 15px;
+ float: left;
+}
+
+.thumbnail:not([data-loaded]) {
+ border: 1px dashed rgba(255, 255, 255, 0.5);
+}
+
+.thumbnailImage {
+ -moz-transition-duration: 150ms;
+ border: 1px solid transparent;
+ box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
+ opacity: 0.8;
+ z-index: 99;
+}
+
+.thumbnailSelectionRing {
+ border-radius: 2px;
+ padding: 7px;
+ -moz-transition-duration: 150ms;
+}
+
+a:focus > .thumbnail > .thumbnailSelectionRing > .thumbnailImage,
+.thumbnail:hover > .thumbnailSelectionRing > .thumbnailImage {
+ opacity: .9;
+}
+
+a:focus > .thumbnail > .thumbnailSelectionRing,
+.thumbnail:hover > .thumbnailSelectionRing {
+ background-color: hsla(0,0%,100%,.15);
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.2) inset,
+ 0 0 1px hsla(0,0%,0%,.2);
+ color: hsla(0,0%,100%,.9);
+}
+
+.thumbnail.selected > .thumbnailSelectionRing > .thumbnailImage {
+ box-shadow: 0 0 0 1px hsla(0,0%,0%,.5);
+ opacity: 1;
+}
+
+.thumbnail.selected > .thumbnailSelectionRing {
+ background-color: hsla(0,0%,100%,.3);
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.1) inset,
+ 0 0 1px hsla(0,0%,0%,.2);
+ color: hsla(0,0%,100%,1);
+}
+
+#outlineView {
+ position: absolute;
+ width: 192px;
+ top: 0;
+ bottom: 0;
+ padding: 4px 4px 0;
+ overflow: auto;
+ -webkit-user-select:none;
+ -moz-user-select:none;
+}
+
+.outlineItem > .outlineItems {
+ margin-left: 20px;
+}
+
+.outlineItem > a {
+ text-decoration: none;
+ display: inline-block;
+ min-width: 95%;
+ height: 20px;
+ padding: 2px 0 0 10px;
+ margin-bottom: 1px;
+ border-radius: 2px;
+ color: hsla(0,0%,100%,.8);
+ font-size: 13px;
+ line-height: 15px;
+ -moz-user-select:none;
+ cursor: default;
+ white-space: nowrap;
+}
+
+.outlineItem > a:hover {
+ background-color: hsla(0,0%,100%,.02);
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.2) inset,
+ 0 0 1px hsla(0,0%,0%,.2);
+ color: hsla(0,0%,100%,.9);
+}
+
+.outlineItem.selected {
+ background-color: hsla(0,0%,100%,.08);
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-clip: padding-box;
+ box-shadow: 0 1px 0 hsla(0,0%,100%,.05) inset,
+ 0 0 1px hsla(0,0%,100%,.1) inset,
+ 0 0 1px hsla(0,0%,0%,.2);
+ color: hsla(0,0%,100%,1);
+}
+
+.noOutline,
+.noResults {
+ font-size: 12px;
+ color: hsla(0,0%,100%,.8);
+ font-style: italic;
+}
+
+#findScrollView {
+ position: absolute;
+ top: 10px;
+ bottom: 10px;
+ left: 10px;
+ width: 280px;
+}
+
+#sidebarControls {
+ position:absolute;
+ width: 180px;
+ height: 32px;
+ left: 15px;
+ bottom: 35px;
+}
+
+canvas {
+ margin: auto;
+ display: block;
+}
+
+.page {
+ direction: ltr;
+ width: 816px;
+ height: 1056px;
+ margin: 10px auto;
+ position: relative;
+ overflow: hidden;
+ -webkit-box-shadow: 0px 4px 10px #000;
+ -moz-box-shadow: 0px 4px 10px #000;
+ box-shadow: 0px 4px 10px #000;
+ background-color: white;
+}
+
+.page > a {
+ display: block;
+ position: absolute;
+}
+
+.page > a:hover {
+ opacity: 0.2;
+ background: #ff0;
+ -webkit-box-shadow: 0px 2px 10px #ff0;
+ -moz-box-shadow: 0px 2px 10px #ff0;
+ box-shadow: 0px 2px 10px #ff0;
+}
+
+.loadingIcon {
+ position: absolute;
+ display: block;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ background: url('../images/loading-icon.gif') center no-repeat;
+}
+
+#loadingBox {
+ position: absolute;
+ top: 50%;
+ margin-top: -25px;
+ left: 0;
+ right: 0;
+ text-align: center;
+ color: #ddd;
+ font-size: 14px;
+}
+
+#loadingBar {
+ display: inline-block;
+ clear: both;
+ margin: 0px;
+ margin-top: 5px;
+ line-height: 0;
+ border-radius: 2px;
+ width: 200px;
+ height: 25px;
+
+ background-color: hsla(0,0%,0%,.3);
+ background-image: -moz-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ background-image: -webkit-linear-gradient(hsla(0,0%,100%,.05), hsla(0,0%,100%,0));
+ border: 1px solid #000;
+ box-shadow: 0 1px 1px hsla(0,0%,0%,.1) inset,
+ 0 0 1px hsla(0,0%,0%,.2) inset,
+ 0 0 1px 1px rgba(255, 255, 255, 0.1);
+}
+
+#loadingBar .progress {
+ display: inline-block;
+ float: left;
+
+ background: #666;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b2b2b2), color-stop(100%,#898989));
+ background: -webkit-linear-gradient(top, #b2b2b2 0%,#898989 100%);
+ background: -moz-linear-gradient(top, #b2b2b2 0%,#898989 100%);
+ background: -ms-linear-gradient(top, #b2b2b2 0%,#898989 100%);
+ background: -o-linear-gradient(top, #b2b2b2 0%,#898989 100%);
+ background: linear-gradient(top, #b2b2b2 0%,#898989 100%);
+
+ border-top-left-radius: 2px;
+ border-bottom-left-radius: 2px;
+
+ width: 0%;
+ height: 100%;
+}
+
+#loadingBar .progress.full {
+ border-top-right-radius: 2px;
+ border-bottom-right-radius: 2px;
+}
+
+#loadingBar .progress.indeterminate {
+ width: 100%;
+ height: 25px;
+ background-image: -moz-linear-gradient( 30deg, #404040, #404040 15%, #898989, #404040 85%, #404040);
+ background-image: -webkit-linear-gradient( 30deg, #404040, #404040 15%, #898989, #404040 85%, #404040);
+ background-image: -ms-linear-gradient( 30deg, #404040, #404040 15%, #898989, #404040 85%, #404040);
+ background-image: -o-linear-gradient( 30deg, #404040, #404040 15%, #898989, #404040 85%, #404040);
+ background-size: 75px 25px;
+ -moz-animation: progressIndeterminate 1s linear infinite;
+ -webkit-animation: progressIndeterminate 1s linear infinite;
+}
+
+@-moz-keyframes progressIndeterminate {
+ from { background-position: 0px 0px; }
+ to { background-position: 75px 0px; }
+}
+
+@-webkit-keyframes progressIndeterminate {
+ from { background-position: 0px 0px; }
+ to { background-position: 75px 0px; }
+}
+
+.textLayer {
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ color: #000;
+ font-family: sans-serif;
+}
+
+.textLayer > div {
+ color: transparent;
+ position: absolute;
+ line-height:1.3;
+ white-space:pre;
+}
+
+.textLayer .highlight {
+ margin: -1px;
+ padding: 1px;
+
+ background-color: rgba(180, 0, 170, 0.2);
+ border-radius: 4px;
+}
+
+.textLayer .highlight.begin {
+ border-radius: 4px 0px 0px 4px;
+}
+
+.textLayer .highlight.end {
+ border-radius: 0px 4px 4px 0px;
+}
+
+.textLayer .highlight.middle {
+ border-radius: 0px;
+}
+
+.textLayer .highlight.selected {
+ background-color: rgba(0, 100, 0, 0.2);
+}
+
+/* TODO: file FF bug to support ::-moz-selection:window-inactive
+ so we can override the opaque grey background when the window is inactive;
+ see https://bugzilla.mozilla.org/show_bug.cgi?id=706209 */
+::selection { background:rgba(0,0,255,0.3); }
+::-moz-selection { background:rgba(0,0,255,0.3); }
+
+.annotComment > div {
+ position: absolute;
+}
+
+.annotComment > img {
+ position: absolute;
+}
+
+.annotComment > img:hover {
+ cursor: pointer;
+ opacity: 0.7;
+}
+
+.annotComment > div {
+ padding: 0.2em;
+ max-width: 20em;
+ background-color: #F1E47B;
+ -webkit-box-shadow: 0px 2px 10px #333;
+ -moz-box-shadow: 0px 2px 10px #333;
+ box-shadow: 0px 2px 10px #333;
+}
+
+.annotComment > div > h1 {
+ font-weight: normal;
+ font-size: 1.2em;
+ border-bottom: 1px solid #000000;
+ margin: 0px;
+}
+
+#errorWrapper {
+ background: none repeat scroll 0 0 #FF5555;
+ color: white;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 32px;
+ z-index: 1000;
+ padding: 3px;
+ font-size: 0.8em;
+}
+
+#errorMessageLeft {
+ float: left;
+}
+
+#errorMessageRight {
+ float: right;
+}
+
+#errorMoreInfo {
+ background-color: #FFFFFF;
+ color: black;
+ padding: 3px;
+ margin: 3px;
+ width: 98%;
+}
+
+.clearBoth {
+ clear: both;
+}
+
+.fileInput {
+ background: white;
+ color: black;
+ margin-top: 5px;
+}
+
+#PDFBug {
+ background: none repeat scroll 0 0 white;
+ border: 1px solid #666666;
+ position: fixed;
+ top: 32px;
+ right: 0;
+ bottom: 0;
+ font-size: 10px;
+ padding: 0;
+ width: 300px;
+}
+#PDFBug .controls {
+ background:#EEEEEE;
+ border-bottom: 1px solid #666666;
+ padding: 3px;
+}
+#PDFBug .panels {
+ bottom: 0;
+ left: 0;
+ overflow: auto;
+ position: absolute;
+ right: 0;
+ top: 27px;
+}
+#PDFBug button.active {
+ font-weight: bold;
+}
+.debuggerShowText {
+ background: none repeat scroll 0 0 yellow;
+ color: blue;
+ opacity: 0.3;
+}
+.debuggerHideText:hover {
+ background: none repeat scroll 0 0 yellow;
+ opacity: 0.3;
+}
+#PDFBug .stats {
+ font-family: courier;
+ font-size: 10px;
+ white-space: pre;
+}
+#PDFBug .stats .title {
+ font-weight: bold;
+}
+#PDFBug table {
+ font-size: 10px;
+}
+
+#viewer.textLayer-visible .textLayer > div,
+#viewer.textLayer-hover .textLayer > div:hover {
+ background-color: white;
+ color: black;
+}
+
+#viewer.textLayer-shadow .textLayer > div {
+ background-color: rgba(255,255,255, .6);
+ color: black;
+}
+
+@page {
+ margin: 0;
+}
+
+#printContainer {
+ display: none;
+}
+
+@media print {
+ /* Rules for browsers that don't support mozPrintCallback. */
+ #sidebarContainer, .toolbar, #loadingBox, #errorWrapper, .textLayer {
+ display: none;
+ }
+
+ #mainContainer, #viewerContainer, .page, .page canvas {
+ position: static;
+ padding: 0;
+ margin: 0;
+ }
+
+ .page {
+ float: left;
+ display: none;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ }
+
+ .page[data-loaded] {
+ display: block;
+ }
+
+ /* Rules for browsers that support mozPrintCallback */
+ body[data-mozPrintCallback] #outerContainer {
+ display: none;
+ }
+ body[data-mozPrintCallback] #printContainer {
+ display: block;
+ }
+ #printContainer canvas {
+ position: relative;
+ top: 0;
+ left: 0;
+ }
+}
+
+@media all and (max-width: 950px) {
+ html[dir='ltr'] #outerContainer.sidebarMoving .outerCenter,
+ html[dir='ltr'] #outerContainer.sidebarOpen .outerCenter {
+ float: left;
+ left: 180px;
+ }
+ html[dir='rtl'] #outerContainer.sidebarMoving .outerCenter,
+ html[dir='rtl'] #outerContainer.sidebarOpen .outerCenter {
+ float: right;
+ right: 180px;
+ }
+}
+
+@media all and (max-width: 770px) {
+ #sidebarContainer {
+ top: 33px;
+ z-index: 100;
+ }
+ #sidebarContent {
+ top: 32px;
+ background-color: hsla(0,0%,0%,.7);
+ }
+ #thumbnailView, #outlineView {
+ top: 66px;
+ }
+
+ html[dir='ltr'] #outerContainer.sidebarOpen > #mainContainer {
+ left: 0px;
+ }
+ html[dir='rtl'] #outerContainer.sidebarOpen > #mainContainer {
+ right: 0px;
+ }
+
+ html[dir='ltr'] .outerCenter {
+ float: left;
+ left: 180px;
+ }
+ html[dir='rtl'] .outerCenter {
+ float: right;
+ right: 180px;
+ }
+}
+
+@media all and (max-width: 600px) {
+ #toolbarViewerRight, #findbar, #viewFind {
+ display: none;
+ }
+}
+
+@media all and (max-width: 500px) {
+ #scaleSelectContainer, #pageNumberLabel {
+ display: none;
+ }
+}
+
View
3 public/tagger/images/annotation-check.svg
@@ -0,0 +1,3 @@
+<svg height="40" width="40" xmlns="http://www.w3.org/2000/svg">
+ <path d="M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z" fill="#333333"></path>
+</svg>
View
3 public/tagger/images/annotation-comment.svg
@@ -0,0 +1,3 @@
+<svg height="40" width="40" xmlns="http://www.w3.org/2000/svg">
+ <path d="M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z" fill="#333333"></path>
+</svg>
View
46 public/tagger/images/annotation-text.svg
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<svg
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ height="40"
+ width="40"
+ id="svg2995"
+ version="1.1">
+
+ <rect
+ style="fill:#f1e47b;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-opacity:1"
+ id="rect3009"
+ width="30.169491"
+ height="24.576269"
+ x="4.237288"
+ y="6.7796612" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="rect3781"
+ width="23.38983"
+ height="1.1864407"
+ x="7.6271186"
+ y="11.389831" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="rect3781-1"
+ width="23.38983"
+ height="0.67796612"
+ x="7.6271191"
+ y="21.61017" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="rect3781-7"
+ width="23.38983"
+ height="0.67796612"
+ x="7.4576273"
+ y="26.152542" />
+ <rect
+ style="fill:#000000;fill-opacity:1;stroke:none"
+ id="rect3781-1-4"
+ width="23.38983"
+ height="0.67796612"
+ x="7.6271186"
+ y="17.033899" />
+</svg>
View
BIN public/tagger/images/loading-icon.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/texture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-bookmark.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-download.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-fullscreen.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-menuArrows.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-openFile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-pageDown-rtl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-pageDown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-pageUp-rtl.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-pageUp.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-print.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-search.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-sidebarToggle.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-viewOutline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-viewThumbnail.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-zoomIn.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN public/tagger/images/toolbarButton-zoomOut.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
240 public/tagger/index.html
@@ -0,0 +1,240 @@
+<!DOCTYPE html>
+<!--
+Copyright 2012 Mozilla Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<html dir="ltr">
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <title>PDF.js viewer</title>
+
+
+ <link rel="stylesheet" href="css/viewer.css"/>
+ <link rel="stylesheet" href="css/tagger.css"/>
+
+ <script type="text/javascript" src="js/compatibility.js"></script>
+ <link rel="resource" type="application/l10n" href="locale.properties"/>
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
+ <script type="text/javascript" src="js/l10n.js"></script>
+ <script type="text/javascript" src="js/pdf.js"></script>
+ <script type="text/javascript" src="js/viewer.js"></script>
+ <script type="text/javascript" src="js/mustache.js"></script>
+ <script type="text/javascript" src="js/tagger.js"></script>
+
+ <script type="text/template" id="taggerTemplate">
+ <form id="taggerForm">
+ <div class="formRow">
+ <div class="formLabel">
+ <label>Page:</label>
+ </div>
+ <div class="formField">
+ {{ page }}
+ </div>
+ </div>
+ <div class="formRow">
+ <div class="formLabel">
+ <label>Coordinates:</label>
+ </div>
+ <div class="formField">
+ {{ x }}, {{ y }}
+ </div>
+ </div>
+ <div class="formRow">
+ <div class="formLabel">
+ <label for="tagName">Name:</label>
+ </div>
+ <div class="formField">
+ <input type="text" id="tagName" name="tagName" />
+ </div>
+ </div>
+ <div class="formRow">
+ <div class="formLabel">
+ <label for="tagType">Type:</label>
+ </div>
+ <div class="formField">
+ <select name="tagType" id="tagType" >
+ <option value="">(optional)</option>
+ <option>Name</option>
+ <option>Address</option>
+ <option>City</option>
+ <option>State</option>
+ <option>Zip</option>
+ </select>
+ </div>
+ </div>
+ <div class="formRow">
+ <div class="formLabel">&nbsp;</div>
+ <div class="formField">
+ <input type="submit" value="Add" id="addTag" />
+ </div>
+ </div>
+ </form>
+ </script>
+
+ </head>
+
+ <body>
+ <div id="outerContainer">
+
+ <div id="sidebarContainer">
+ <div id="toolbarSidebar" class="splitToolbarButton toggled">
+ <button id="viewThumbnail" class="toolbarButton group toggled" title="Show Thumbnails" tabindex="1" data-l10n-id="thumbs">
+ <span data-l10n-id="thumbs_label">Thumbnails</span>
+ </button>
+ <button id="viewOutline" class="toolbarButton group" title="Show Document Outline" tabindex="2" data-l10n-id="outline">
+ <span data-l10n-id="outline_label">Document Outline</span>
+ </button>
+ </div>
+ <div id="sidebarContent">
+ <div id="thumbnailView">
+ </div>
+ <div id="outlineView" class="hidden">
+ </div>
+ </div>
+ </div> <!-- sidebarContainer -->
+
+ <div id="mainContainer">
+ <div class="findbar hidden doorHanger" id="findbar">
+ <label for="findInput" data-l10n-id="find_label">Find</label>:
+ <input id="findInput" type="search">
+ <button id="findPrevious" data-l10n-id="find_previous" title="">&lt;</button>
+ <button id="findNext" data-l10n-id="find_next">&gt;</button>
+ <input type="checkbox" id="findHighlightAll">
+ <label for="findHighlightAll" data-l10n-id="find_highlight">Highlight all</label>
+ <input type="checkbox" id="findMatchCase">
+ <label for="findMatchCase" data-l10n-id="find_match_case_label">Match case</label>
+ <span id="findMsg"></span>
+ </div>
+ <div class="toolbar">
+ <div id="toolbarContainer">
+ <div id="toolbarViewer">
+ <div id="toolbarViewerLeft">
+ <button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="3" data-l10n-id="toggle_slider">
+ <span data-l10n-id="toggle_slider_label">Toggle Sidebar</span>
+ </button>
+ <div class="toolbarButtonSpacer"></div>
+ <button id="viewFind" class="toolbarButton group" title="Find in Document" tabindex="4" data-l10n-id="find">
+ <span data-l10n-id="find_label">Find</span>
+ </button>
+ <div class="splitToolbarButton">
+ <button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="5" data-l10n-id="previous">
+ <span data-l10n-id="previous_label">Previous</span>
+ </button>
+ <div class="splitToolbarButtonSeparator"></div>
+ <button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="6" data-l10n-id="next">
+ <span data-l10n-id="next_label">Next</span>
+ </button>
+ </div>
+ <label id="pageNumberLabel" class="toolbarLabel" for="pageNumber" data-l10n-id="page_label">Page: </label>
+ <input type="number" id="pageNumber" class="toolbarField pageNumber" value="1" size="4" min="1" tabindex="7">
+ </input>
+ <span id="numPages" class="toolbarLabel"></span>
+ </div>
+ <div id="toolbarViewerRight">
+ <input id="fileInput" class="fileInput" type="file" oncontextmenu="return false;" style="visibility: hidden; position: fixed; right: 0; top: 0" />
+
+
+ <button id="fullscreen" class="toolbarButton fullscreen" title="Switch to Presentation Mode" tabindex="11" data-l10n-id="presentation_mode">
+ <span data-l10n-id="presentation_mode_label">Presentation Mode</span>
+ </button>
+
+ <button id="openFile" class="toolbarButton openFile" title="Open File" tabindex="12" data-l10n-id="open_file">
+ <span data-l10n-id="open_file_label">Open</span>
+ </button>
+
+ <button id="print" class="toolbarButton print" title="Print" tabindex="13" data-l10n-id="print">
+ <span data-l10n-id="print_label">Print</span>
+ </button>
+
+ <button id="download" class="toolbarButton download" title="Download" tabindex="14" data-l10n-id="download">
+ <span data-l10n-id="download_label">Download</span>
+ </button>
+ <!-- <div class="toolbarButtonSpacer"></div> -->
+ <a href="#" id="viewBookmark" class="toolbarButton bookmark" title="Current view (copy or open in new window)" tabindex="15" data-l10n-id="bookmark"><span data-l10n-id="bookmark_label">Current View</span></a>
+ </div>
+ <div class="outerCenter">
+ <div class="innerCenter" id="toolbarViewerMiddle">
+ <div class="splitToolbarButton">
+ <button class="toolbarButton zoomOut" title="Zoom Out" tabindex="8" data-l10n-id="zoom_out">
+ <span data-l10n-id="zoom_out_label">Zoom Out</span>
+ </button>
+ <div class="splitToolbarButtonSeparator"></div>
+ <button class="toolbarButton zoomIn" title="Zoom In" tabindex="9" data-l10n-id="zoom_in">
+ <span data-l10n-id="zoom_in_label">Zoom In</span>
+ </button>
+ </div>
+ <span id="scaleSelectContainer" class="dropdownToolbarButton">
+ <select id="scaleSelect" title="Zoom" oncontextmenu="return false;" tabindex="10" data-l10n-id="zoom">
+ <option id="pageAutoOption" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
+ <option id="pageActualOption" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
+ <option id="pageFitOption" value="page-fit" data-l10n-id="page_scale_fit">Fit Page</option>
+ <option id="pageWidthOption" value="page-width" data-l10n-id="page_scale_width">Full Width</option>
+ <option id="customScaleOption" value="custom"></option>
+ <option value="0.5">50%</option>
+ <option value="0.75">75%</option>
+ <option value="1">100%</option>
+ <option value="1.25">125%</option>
+ <option value="1.5">150%</option>
+ <option value="2">200%</option>
+ </select>
+ </span>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <menu type="context" id="viewerContextMenu">
+ <menuitem label="Rotate Counter-Clockwise" id="page_rotate_ccw"
+ data-l10n-id="page_rotate_ccw" ></menuitem>
+ <menuitem label="Rotate Clockwise" id="page_rotate_cw"
+ data-l10n-id="page_rotate_cw" ></menuitem>
+ </menu>
+
+ <div id="viewerContainer">
+ <div id="viewer" contextmenu="viewerContextMenu"></div>
+ </div>
+
+ <div id="loadingBox">
+ <div id="loading"></div>
+ <div id="loadingBar"><div class="progress"></div></div>
+ </div>
+
+ <div id="errorWrapper" hidden='true'>
+ <div id="errorMessageLeft">
+ <span id="errorMessage"></span>
+ <button id="errorShowMore" onclick="" oncontextmenu="return false;" data-l10n-id="error_more_info">
+ More Information
+ </button>
+ <button id="errorShowLess" onclick="" oncontextmenu="return false;" data-l10n-id="error_less_info" hidden='true'>
+ Less Information
+ </button>
+ </div>
+ <div id="errorMessageRight">
+ <button id="errorClose" oncontextmenu="return false;" data-l10n-id="error_close">
+ Close
+ </button>
+ </div>
+ <div class="clearBoth"></div>
+ <textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
+ </div>
+ </div> <!-- mainContainer -->
+
+ </div> <!-- outerContainer -->
+ <div id="printContainer"></div>
+ </body>
+</html>
+
View
14 public/tagger/js/compatibility.js
@@ -0,0 +1,14 @@
+/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- *//* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: *//* Copyright 2012 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */"use strict";(function(){function t(e,t){return new r(this.slice(e,t))}function n(e,t){arguments.length<2&&(t=0);for(var n=0,r=e.length;n<r;++n,++t)this[t]=e[n]&255}function r(e){var r;if(typeof e=="number"){r=[];for(var i=0;i<e;++i)r[i]=0}else r=e.slice(0);return r.subarray=t,r.buffer=r,r.byteLength=r.length,r.set=n,typeof e=="object"&&e.buffer&&(r.buffer=e.buffer),r}if(typeof Uint8Array!="undefined"){typeof Uint8Array.prototype.subarray=="undefined"&&(Uint8Array.prototype.subarray=function(t,n){return new Uint8Array(this.slice(t,n))},Float32Array.prototype.subarray=function(t,n){return new Float32Array(this.slice(t,n))}),typeof Float64Array=="undefined"&&(window.Float64Array=Float32Array);return}window.Uint8Array=r,window.Uint32Array=r,window.Int32Array=r,window.Uint16Array=r,window.Float32Array=r,window.Float64Array=r})(),function(){if(typeof Object.create!="undefined")return;Object.create=function(t){var n=function(){};return n.prototype=t,new n}}(),function(){if(typeof Object.defineProperty!="undefined"){var t=!0;try{Object.defineProperty(new Image,"id",{value:"test"});var n=function(){};n.prototype={get id(){}},Object.defineProperty(new n,"id",{value:"",configurable:!0,enumerable:!0,writable:!1})}catch(r){t=!1}if(t)return}Object.defineProperty=function(t,n,r){delete t[n],"get"in r&&t.__defineGetter__(n,r.get),"set"in r&&t.__defineSetter__(n,r.set),"value"in r&&(t.__defineSetter__(n,function(t){return this.__defineGetter__(n,function(){return t}),t}),t[n]=r.value)}}(),function(){if(typeof Object.keys!="undefined")return;Object.keys=function(t){var n=[];for(var r in t)t.hasOwnProperty(r)&&n.push(r);return n}}(),function(){if(typeof FileReader=="undefined")return;var t=FileReader.prototype;if("readAsArrayBuffer"in t)return;Object.defineProperty(t,"readAsArrayBuffer",{value:function(t){var n=new FileReader,r=this;n.onload=function(t){var n=t.target.result,i=new ArrayBuffer(n.length),s=new Uint8Array(i);for(var o=0,u=n.length;o<u;o++)s[o]=n.charCodeAt(o);Object.defineProperty(r,"result",{value:i,enumerable:!0,writable:!1,configurable:!0});var a=document.createEvent("HTMLEvents");a.initEvent("load",!1,!1),r.dispatchEvent(a)},n.readAsBinaryString(t)}})}(),function(){function n(){this.overrideMimeType("text/plain; charset=x-user-defined")}function r(){var e=this.responseText,t,n=e.length,r=new Uint8Array(n);for(t=0;t<n;++t)r[t]=e.charCodeAt(t)&255;return r}var t=XMLHttpRequest.prototype;"overrideMimeType"in t||Object.defineProperty(t,"overrideMimeType",{value:function(t){}});if("response"in t||"mozResponseArrayBuffer"in t||"mozResponse"in t||"responseArrayBuffer"in t)return;if(typeof VBArray!="undefined"){Object.defineProperty(t,"response",{get:function(){return new Uint8Array((new VBArray(this.responseBody)).toArray())}});return}typeof t.overrideMimeType=="function"&&Object.defineProperty(t,"responseType",{set:n}),Object.defineProperty(t,"response",{get:r})}(),function(){if("btoa"in window)return;var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";window.btoa=function(n){var r="",i,s;for(i=0,s=n.length;i<s;i+=3){var o=n.charCodeAt(i)&255,u=n.charCodeAt(i+1)&255,a=n.charCodeAt(i+2)&255,f=o>>2,l=(o&3)<<4|u>>4,c=i+1<s?(u&15)<<2|a>>6:64,h=i+2<s?a&63:64;r+=t.charAt(f)+t.charAt(l)+t.charAt(c)+t.charAt(h)}return r}}(),function(){if(typeof Function.prototype.bind!="undefined")return;Function.prototype.bind=function(t){var n=this,r=Array.prototype.slice.call(arguments,1),i=function(){var i=Array.prototype.concat.apply(r,arguments);return n.apply(t,i)};return i}}(),function(){if(!("documentMode"in document)||document.documentMode!==9&&document.documentMode!==10)return;var t=Object.getOwnPropertyDescriptor(HTMLIFrameElement.prototype,"src");Object.defineProperty(HTMLIFrameElement.prototype,"src",{get:function(){return this.$src},set:function(n){this.$src=n;if(n.substr(0,14)!="data:text/html"){t.set.call(this,n);return}t.set.call(this,"about:blank"),setTimeout(function(){var t=this.contentDocument;t.open("text/html"),t.write(n.substr(n.indexOf(",")+1)),t.close()}.bind(this),0)},enumerable:!0})}(),function(){var t=document.createElement("div");if("dataset"in t)return;Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)return this._dataset;var e={};for(var t=0,n=this.attributes.length;t<n;t++){var r=this.attributes[t];if(r.name.substring(0,5)!="data-")continue;var i=r.name.substring(5).replace(/\-([a-z])/g,function(e,t){return t.toUpperCase()});e[i]=r.value}return Object.defineProperty(this,"_dataset",{value:e,writable:!1,enumerable:!1}),e},enumerable:!0})}(),function(){function n(e,t,n,r){var i=e.className||"",s=i.split(/\s+/g);s[0]==""&&s.shift();var o=s.indexOf(t);o<0&&n&&s.push(t),o>=0&&r&&s.splice(o,1),e.className=s.join(" ")}var t=document.createElement("div");if("classList"in t)return;var r={add:function(e){n(this.element,e,!0,!1)},remove:function(e){n(this.element,e,!1,!0)},toggle:function(e){n(this.element,e,!0,!0)}};Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){if(this._classList)return this._classList;var e=Object.create(r,{element:{value:this,writable:!1,enumerable:!0}});return Object.defineProperty(this,"_classList",{value:e,writable:!1,enumerable:!1}),e},enumerable:!0})}(),function(){typeof console=="undefined"?console={log:function(){},error:function(){}}:"bind"in console.log||(console.log=function(e){return function(t){return e(t)}}(console.log),console.error=function(e){return function(t){return e(t)}}(console.error))}(),function(){function t(e){n(e.target)&&e.stopPropagation()}function n(e){return e.disabled||e.parentNode&&n(e.parentNode)}navigator.userAgent.indexOf("Opera")!=-1&&document.addEventListener("click",t,!0)}(),function(){if("language"in navigator)return;Object.defineProperty(navigator,"language",{get:function(){var t=navigator.userLanguage||"en-US";return t.substring(0,2).toLowerCase()+t.substring(2).toUpperCase()},enumerable:!0})}();
View
25 public/tagger/js/l10n.js
@@ -0,0 +1,25 @@
+/* Copyright (c) 2011-2012 Fabien Cazenave, Mozilla.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *//*
+ Additional modifications for PDF.js project:
+ - Loading resources from <script type='application/l10n'>;
+ - Disabling language initialization on page loading;
+ - Add fallback argument to the translateString.
+*/"use strict";(function(e){function i(e){return e.replace(/\\\\/g,"\\").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\b/g,"\b").replace(/\\f/g,"\f").replace(/\\{/g,"{").replace(/\\}/g,"}").replace(/\\"/g,'"').replace(/\\'/g,"'")}function s(e,n){var r=/^\s*|\s*$/,s=/^\s*#|^\s*$/,o=/^\s*\[(.*)\]\s*$/,u=/^\s*@import\s+url\((.*)\)\s*$/i,a="*",f=[],l=!1,c=[],h="",p=e.replace(r,"").split(/[\r\n]+/);for(var d=0;d<p.length;d++){var v=p[d];if(s.test(v))continue;if(o.test(v)){h=o.exec(v),a=h[1],l=a!=n&&a!="*"&&a!=n.substring(0,2);continue}if(l)continue;u.test(v)&&(h=u.exec(v));var m=v.split("=");m.length>1&&(c[m[0]]=i(m[1]))}for(var g in c){var y,b,w=g.lastIndexOf(".");w>0?(y=g.substring(0,w),b=g.substr(w+1)):(y=g,b="textContent"),t[y]||(t[y]={}),t[y][b]=c[g]}}function o(e,t){return n+=e,s(e,t)}function u(e,t,n,r){var i=new XMLHttpRequest;i.open("GET",e,!0),i.overrideMimeType("text/plain; charset=utf-8"),i.onreadystatechange=function(){i.readyState==4&&(i.status==200||i.status==0?(o(i.responseText,t),n&&n()):r&&r())},i.send(null)}function a(t,n){function p(e){var t=e.href,n=e.type;this.load=function(e,n){var r=e;return u(t,e,n,function(){console.warn(t+" not found."),r=""}),r}}d();var i=document.querySelectorAll('link[type="application/l10n"]'),s=i.length,a=document.querySelectorAll('script[type="application/l10n"]'),f=a.length,l=s+f,c=null,h=0;c=function(){h++;if(h>=l){n&&n();var r=document.createEvent("Event");r.initEvent("localized",!1,!1),r.language=t,e.dispatchEvent(r)}},r=t;for(var v=0;v<s;v++){var m=new p(i[v]),g=m.load(t,c);g!=t&&(r="")}for(var v=0;v<f;v++){var y=a[v].text;o(y,t),c()}}function f(e){var n=t[e];return n||console.warn("[l10n] #"+e+" missing for ["+r+"]"),n}function l(e,n){var r=/\{\{\s*([a-zA-Z\.]+)\s*\}\}/,i=r.exec(e);while(i){if(!i||i.length<2)return e;var s=i[1],o="";if(s in n)o=n[s];else{if(!(s in t))return console.warn("[l10n] could not find argument {{"+s+"}}"),e;o=t[s].textContent}e=e.substring(0,i.index)+o+e.substr(i.index+i[0].length),i=r.exec(e)}return e}function c(e,t,n){var r=f(e);return!r&&n&&(r={textContent:n}),r?l(r.textContent,t):"{{"+e+"}}"}function h(e){if(!e||!e.dataset)return;var t=e.dataset.l10nId,n=f(t);if(!n)return;var r;if(e.dataset.l10nArgs)try{r=JSON.parse(e.dataset.l10nArgs)}catch(i){console.warn("[l10n] could not parse arguments for #"+t+"")}for(var s in n)e[s]=l(n[s],r)}function p(e){e=e||document.querySelector("html");var t=e.querySelectorAll("*[data-l10n-id]"),n=t.length;for(var r=0;r<n;r++)h(t[r]);e.dataset.l10nId&&h(e)}function d(){t={},n="",r=""}var t={},n="",r="";document.mozL10n={get:c,get language(){return{get code(){return r},set code(e){a(e,p)},get direction(){var e=["ar","he","fa","ps","ur"];return e.indexOf(r)>=0?"rtl":"ltr"}}}}})(this);
View
4 public/tagger/js/mustache.js
@@ -0,0 +1,4 @@
+/*!
+ * mustache.js - Logic-less {{mustache}} templates with JavaScript
+ * http://github.com/janl/mustache.js
+ *//*global define: false*/var Mustache;(function(e){typeof module!="undefined"&&module.exports?module.exports=e:typeof define=="function"?define(e):Mustache=e})(function(){function u(e,t){return RegExp.prototype.test.call(e,t)}function a(e){return!u(r,e)}function l(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function h(e){return String(e).replace(/[&<>"'\/]/g,function(e){return c[e]})}function p(e){this.string=e,this.tail=e,this.pos=0}function d(e,t){this.view=e,this.parent=t,this.clearCache()}function v(){this.clearCache()}function m(e){var t=e[3],n=t,r;while((r=e[4])&&r.length)e=r[r.length-1],n=e[3];return[t,n]}function g(e){function n(e,n,r){if(!t[e]){var i=g(n);t[e]=function(e,t){return i(e,t,r)}}return t[e]}var t={};return function(t,r,i){var s="",o,u;for(var a=0,f=e.length;a<f;++a){o=e[a];switch(o[0]){case"#":u=i.slice.apply(i,m(o)),s+=t._section(o[1],r,u,n(a,o[4],i));break;case"^":s+=t._inverted(o[1],r,n(a,o[4],i));break;case">":s+=t._partial(o[1],r);break;case"&":s+=t._name(o[1],r);break;case"name":s+=t._escaped(o[1],r);break;case"text":s+=o[1]}}return s}}function y(e){var t=[],n=t,r=[],i,s;for(var o=0;o<e.length;++o){i=e[o];switch(i[0]){case"#":case"^":i[4]=[],r.push(i),n.push(i),n=i[4];break;case"/":if(r.length===0)throw new Error("Unopened section: "+i[1]);s=r.pop();if(s[1]!==i[1])throw new Error("Unclosed section: "+s[1]);r.length>0?n=r[r.length-1][4]:n=t;break;default:n.push(i)}}s=r.pop();if(s)throw new Error("Unclosed section: "+s[1]);return t}function b(e){var t,n;for(var r=0;r<e.length;++r)t=e[r],n&&n[0]==="text"&&t[0]==="text"?(n[1]+=t[1],n[3]=t[3],e.splice(r--,1)):n=t}function w(e){if(e.length!==2)throw new Error("Invalid tags: "+e.join(" "));return[new RegExp(l(e[0])+"\\s*"),new RegExp("\\s*"+l(e[1]))]}var e={};e.name="mustache.js",e.version="0.7.0",e.tags=["{{","}}"],e.Scanner=p,e.Context=d,e.Writer=v;var t=/\s*/,n=/\s+/,r=/\S/,i=/\s*=/,s=/\s*\}/,o=/#|\^|\/|>|\{|&|=|!/,f=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"},c={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};e.escape=h,p.prototype.eos=function(){return this.tail===""},p.prototype.scan=function(e){var t=this.tail.match(e);return t&&t.index===0?(this.tail=this.tail.substring(t[0].length),this.pos+=t[0].length,t[0]):""},p.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.pos+=this.tail.length,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n),this.pos+=n}return t},d.make=function(e){return e instanceof d?e:new d(e)},d.prototype.clearCache=function(){this._cache={}},d.prototype.push=function(e){return new d(e,this)},d.prototype.lookup=function(e){var t=this._cache[e];if(!t){if(e===".")t=this.view;else{var n=this;while(n){if(e.indexOf(".")>0){var r=e.split("."),i=0;t=n.view;while(t&&i<r.length)t=t[r[i++]]}else t=n.view[e];if(t!=null)break;n=n.parent}}this._cache[e]=t}return typeof t=="function"&&(t=t.call(this.view)),t},v.prototype.clearCache=function(){this._cache={},this._partialCache={}},v.prototype.compile=function(t,n){var r=this._cache[t];if(!r){var i=e.parse(t,n);r=this._cache[t]=this.compileTokens(i,t)}return r},v.prototype.compilePartial=function(e,t,n){var r=this.compile(t,n);return this._partialCache[e]=r,r},v.prototype.compileTokens=function(e,t){var n=g(e),r=this;return function(e,i){if(i)if(typeof i=="function")r._loadPartial=i;else for(var s in i)r.compilePartial(s,i[s]);return n(r,d.make(e),t)}},v.prototype.render=function(e,t,n){return this.compile(e)(t,n)},v.prototype._section=function(e,t,n,r){var i=t.lookup(e);switch(typeof i){case"object":if(f(i)){var s="";for(var o=0,u=i.length;o<u;++o)s+=r(this,t.push(i[o]));return s}return i?r(this,t.push(i)):"";case"function":var a=this,l=function(e){return a.render(e,t)};return i.call(t.view,n,l)||"";default:if(i)return r(this,t)}return""},v.prototype._inverted=function(e,t,n){var r=t.lookup(e);return!r||f(r)&&r.length===0?n(this,t):""},v.prototype._partial=function(e,t){!(e in this._partialCache)&&this._loadPartial&&this.compilePartial(e,this._loadPartial(e));var n=this._partialCache[e];return n?n(t):""},v.prototype._name=function(e,t){var n=t.lookup(e);return typeof n=="function"&&(n=n.call(t.view)),n==null?"":String(n)},v.prototype._escaped=function(t,n){return e.escape(this._name(t,n))},e.parse=function(r,u){function g(){if(v&&!m)while(d.length)h.splice(d.pop(),1);else d=[];v=!1,m=!1}u=u||e.tags;var f=w(u),c=new p(r),h=[],d=[],v=!1,m=!1,E,S,x,T;while(!c.eos()){E=c.pos,x=c.scanUntil(f[0]);if(x)for(var N=0,C=x.length;N<C;++N)T=x.charAt(N),a(T)?d.push(h.length):m=!0,h.push(["text",T,E,E+1]),E+=1,T==="\n"&&g();E=c.pos;if(!c.scan(f[0]))break;v=!0,S=c.scan(o)||"name",c.scan(t);if(S==="=")x=c.scanUntil(i),c.scan(i),c.scanUntil(f[1]);else if(S==="{"){var k=new RegExp("\\s*"+l("}"+u[1]));x=c.scanUntil(k),c.scan(s),c.scanUntil(f[1]),S="&"}else x=c.scanUntil(f[1]);if(!c.scan(f[1]))throw new Error("Unclosed tag at "+c.pos);h.push([S,x,E,c.pos]);if(S==="name"||S==="{"||S==="&")m=!0;S==="="&&(u=x.split(n),f=w(u))}return b(h),y(h)};var E=new v;return e.clearCache=function(){return E.clearCache()},e.compile=function(e,t){return E.compile(e,t)},e.compilePartial=function(e,t,n){return E.compilePartial(e,t,n)},e.compileTokens=function(e,t){return E.compileTokens(e,t)},e.render=function(e,t,n){return E.render(e,t,n)},e.to_html=function(t,n,r,i){var s=e.render(t,n,r);if(typeof i!="function")return s;i(s)},e}());
View
36,074 public/tagger/js/pdf.js
36,074 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
65 public/tagger/js/tagger.coffee
@@ -0,0 +1,65 @@
+jQuery ->
+
+ tagger = {
+
+ tags: []
+ currentTag: {}
+
+ #bind to DOM events
+ init: ->
+
+ jQuery('.textLayer').live( 'click', tagger.click )
+ jQuery('#addTag').live( 'click', tagger.addHandler )
+ jQuery('#toolbarContainer .innerCenter').append('<button class="toolbarButton" id="tagSubmit">Submit</a>')
+ jQuery('#tagSubmit').live( 'click', tagger.submit )
+
+ #handle PDF Click
+ click: (e) ->
+
+ #calculate the X.Y coordinates of the click
+ #0,0 is the top left corner
+ offset = $(this).offset()
+ left = e.clientX - offset.left
+ top = e.clientY - offset.top
+
+ #convert to plane in which 0,0 is bottom left as PDF sees it
+ bottom = $(this).height() - top
+
+ tag = { x: left, y: bottom, page: $('#pageNumber').val() }
+ tagger.popup( e.pageX, e.pageY, tag )
+
+ #render popup
+ popup: (x, y, tag ) ->
+ tagger.reset()
+ div = $('<div id="tagger"></div>').css( 'top', y ).css( 'left', x )
+ div.html( Mustache.render( $('#taggerTemplate').html(), tag ) )
+ tagger.currentTag = tag
+ $('body').append( div )
+
+ #callback to handle adding tag to data array
+ addHandler: (e) ->
+ e.preventDefault()
+ tag = tagger.currentTag
+ tag.name = $('#tagName').val()
+ tag.type = $('#tagType').val()
+ tagger.add( tag )
+ tagger.reset()
+ false
+
+ #reset tagger state to default
+ reset: ->
+ $('#tagger').remove()
+ tagger.currentTag = {}
+
+ #add tag to tag array
+ add: (tag) ->
+ tagger.tags.push( tag )
+
+ submit: ->
+ alert( "Here are your tags:\n\n" + JSON.stringify( tagger.tags ) )
+
+ }
+
+ #make accessible as global tagger object and init
+ window.tagger = tagger
+ tagger.init()
View
2 public/tagger/js/tagger.js
@@ -0,0 +1,2 @@
+// Generated by CoffeeScript 1.3.3
+(function(){jQuery(function(){var e;return e={tags:[],currentTag:{},init:function(){return jQuery(".textLayer").live("click",e.click),jQuery("#addTag").live("click",e.addHandler),jQuery("#toolbarContainer .innerCenter").append('<button class="toolbarButton" id="tagSubmit">Submit</a>'),jQuery("#tagSubmit").live("click",e.submit)},click:function(t){var n,r,i,s,o;return i=$(this).offset(),r=t.clientX-i.left,o=t.clientY-i.top,n=$(this).height()-o,s={x:r,y:n,page:$("#pageNumber").val()},e.popup(t.pageX,t.pageY,s)},popup:function(t,n,r){var i;return e.reset(),i=$('<div id="tagger"></div>').css("top",n).css("left",t),i.html(Mustache.render($("#taggerTemplate").html(),r)),e.currentTag=r,$("body").append(i)},addHandler:function(t){var n;return t.preventDefault(),n=e.currentTag,n.name=$("#tagName").val(),n.type=$("#tagType").val(),e.add(n),e.reset(),!1},reset:function(){return $("#tagger").remove(),e.currentTag={}},add:function(t){return e.tags.push(t)},submit:function(){return alert("Here are your tags:\n\n"+JSON.stringify(e.tags))}},window.tagger=e,e.init()})}).call(this);
View
15 public/tagger/js/viewer.js
@@ -0,0 +1,15 @@
+/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- *//* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: *//* Copyright 2012 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */"use strict";function getFileName(e){var t=e.indexOf("#"),n=e.indexOf("?"),r=Math.min(t>0?t:e.length,n>0?n:e.length);return e.substring(e.lastIndexOf("/",r)+1,r)}function scrollIntoView(e,t){var n=e.offsetParent,r=e.offsetTop;while(n.clientHeight==n.scrollHeight){r+=n.offsetTop,n=n.offsetParent;if(!n)return}t&&(r+=t.top),n.scrollTop=r}function updateViewarea(){if(!PDFView.initialized)return;var e=PDFView.getVisiblePages(),t=e.views;PDFView.renderHighestPriority();var n=PDFView.page,r=e.first;for(var i=0,s=t.length,o=!1;i<s;++i){var u=t[i];if(u.percent<100)break;if(u.id===PDFView.page){o=!0;break}}o||(n=t[0].id),PDFView.isFullscreen||(updateViewarea.inProgress=!0,PDFView.page=n,updateViewarea.inProgress=!1);var a=PDFView.currentScale,f=PDFView.currentScaleValue,l=f==a?a*100:f,c=r.id,h="#page="+c;h+="&zoom="+l;var p=PDFView.pages[c-1],d=p.getPagePoint(PDFView.container.scrollLeft,PDFView.container.scrollTop-r.y);h+=","+Math.round(d[0])+","+Math.round(d[1]);var v=PDFView.store;v.initializedPromise.then(function(){v.set("exists",!0),v.set("page",c),v.set("zoom",l),v.set("scrollLeft",Math.round(d[0])),v.set("scrollTop",Math.round(d[1]))});var m=PDFView.getAnchorUrl(h);document.getElementById("viewBookmark").href=m}function selectScaleOption(e){var t=document.getElementById("scaleSelect").options,n=!1;for(var r=0;r<t.length;r++){var i=t[r];if(i.value!=e){i.selected=!1;continue}i.selected=!0,n=!0}return n}var kDefaultURL="compressed.tracemonkey-pldi-09.pdf",kDefaultScale="auto",kDefaultScaleDelta=1.1,kUnknownScale=0,kCacheSize=20,kCssUnits=96/72,kScrollbarPadding=40,kMinScale=.25,kMaxScale=4,kImageDirectory="./images/",kSettingsMemory=20,RenderingStates={INITIAL:0,RUNNING:1,PAUSED:2,FINISHED:3},FindStates={FIND_FOUND:0,FIND_NOTFOUND:1,FIND_WRAPPED:2,FIND_PENDING:3};PDFJS.workerSrc="js/pdf.js";var mozL10n=document.mozL10n||document.webL10n,Cache=function(t){var n=[];this.push=function(r){var i=n.indexOf(r);i>=0&&n.splice(i),n.push(r),n.length>t&&n.shift().destroy()}},ProgressBar=function(){function t(e,t,n){return Math.min(Math.max(e,t),n)}function n(e,t){this.div=document.querySelector(e+" .progress"),this.height=t.height||100,this.width=t.width||100,this.units=t.units||"%",this.div.style.height=this.height+this.units}return n.prototype={updateBar:function(){if(this._indeterminate){this.div.classList.add("indeterminate");return}var t=this.width*this._percent/100;this._percent>95?this.div.classList.add("full"):this.div.classList.remove("full"),this.div.classList.remove("indeterminate"),this.div.style.width=t+this.units},get percent(){return this._percent},set percent(e){this._indeterminate=isNaN(e),this._percent=t(e,0,100),this.updateBar()}},n}(),Settings=function(){function n(e){this.fingerprint=e,this.initializedPromise=new PDFJS.Promise;var n=function(t){this.initialize(t||"{}"),this.initializedPromise.resolve()}.bind(this);t&&n(localStorage.getItem("database"))}var t=function(){try{return"localStorage"in window&&window.localStorage!==null&&localStorage}catch(t){return!1}}();return n.prototype={initialize:function(t){t=JSON.parse(t),"files"in t||(t.files=[]),t.files.length>=kSettingsMemory&&t.files.shift();var n;for(var r=0,i=t.files.length;r<i;r++){var s=t.files[r];if(s.fingerprint==this.fingerprint){n=r;break}}typeof n!="number"&&(n=t.files.push({fingerprint:this.fingerprint})-1),this.file=t.files[n],this.database=t},set:function(n,r){if(!this.initializedPromise.isResolved)return;var i=this.file;i[n]=r;var s=JSON.stringify(this.database);t&&localStorage.setItem("database",s)},get:function(t,n){return this.initializedPromise.isResolved?this.file[t]||n:n}},n}(),cache=new Cache(kCacheSize),currentPageNumber=1,PDFFindController={startedTextExtraction:!1,active:!1,pageContents:[],pageMatches:[],selected:{pageIdx:0,matchIdx:0},dirtyMatch:!1,findTimeout:null,initialize:function(){var e=["find","findagain","findhighlightallchange","findcasesensitivitychange"];this.handleEvent=this.handleEvent.bind(this);for(var t=0;t<e.length;t++)window.addEventListener(e[t],this.handleEvent)},calcFindMatch:function(e){var t=this.state.query,n=this.state.caseSensitive,r=t.length;if(r===0)return[];n||(e=e.toLowerCase(),t=t.toLowerCase());var i=[],s=-r;for(;;){s=e.indexOf(t,s+r);if(s===-1)break;i.push(s)}return i},extractText:function(){function t(n){PDFView.pages[n].getTextContent().then(function(i){var s=i.bidiTexts,o="";for(var u=0;u<s.length;u++)o+=s[u].str;e.pageContents.push(o),e.pageMatches.push([]),n+1<PDFView.pages.length&&t(n+1)})}if(this.startedTextExtraction)return;this.startedTextExtraction=!0;var e=this;t(0)},handleEvent:function(e){this.state=e.detail,e.detail.findPrevious===undefined&&(this.dirtyMatch=!0),clearTimeout(this.findTimeout),e.type==="find"?this.findTimeout=setTimeout(this.performFind.bind(this),250):this.performFind()},updatePage:function(e){var t=PDFView.pages[e];this.selected.pageIdx===e&&t.scrollIntoView(),t.textLayer&&t.textLayer.updateMatches()},performFind:function(){var e=PDFView.pages,t=this.pageContents,n=this.pageMatches;this.active=!0,this.updateUIState(FindStates.FIND_PENDING);if(this.dirtyMatch){this.dirtyMatch=!1,this.selected={pageIdx:-1,matchIdx:-1};var r=!0;for(var i=0;i<t.length;i++){var s=n[i]=this.calcFindMatch(t[i]);r&&s.length!==0&&(r=!1,this.selected={pageIdx:i,matchIdx:0}),this.updatePage(i,!0)}!r||!this.state.query?this.updateUIState(FindStates.FIND_FOUND):this.updateUIState(FindStates.FIND_NOTFOUND)}else{if(this.selected.pageIdx===-1){this.updateUIState(FindStates.FIND_NOTFOUND);return}var o=this.state.findPrevious,u=this.selected.pageIdx,a=this.selected.matchIdx,f=FindStates.FIND_FOUND;if(o)if(a!==0)this.selected.matchIdx-=1;else{var l=n.length;for(var i=u-1;i!=u;i--){i<0&&(i+=l);if(n[i].length!==0){this.selected={pageIdx:i,matchIdx:n[i].length-1};break}}this.selected.pageIdx===u?(this.selected.matchIdx=n[u].length-1,f=FindStates.FIND_WRAPPED):this.selected.pageIdx>u&&(f=FindStates.FIND_WRAPPED)}else if(n[u].length!==a+1)this.selected.matchIdx+=1;else{var l=n.length;for(var i=u+1;i<l+u;i++)if(n[i%l].length!==0){this.selected={pageIdx:i%l,matchIdx:0};break}this.selected.pageIdx===u?(this.selected.matchIdx=0,f=FindStates.FIND_WRAPPED):this.selected.pageIdx<u&&(f=FindStates.FIND_WRAPPED)}this.updateUIState(f,o),this.updatePage(u,u===this.selected.pageIdx),u!==this.selected.pageIdx&&this.updatePage(this.selected.pageIdx,!0)}},updateUIState:function(e,t){PDFFindBar.updateUIState(e,t)}},PDFFindBar={opened:!1,initialize:function(){this.bar=document.getElementById("findbar"),this.toggleButton=document.getElementById("viewFind"),this.findField=document.getElementById("findInput"),this.highlightAll=document.getElementById("findHighlightAll"),this.caseSensitive=document.getElementById("findMatchCase"),this.findMsg=document.getElementById("findMsg");var e=this;this.toggleButton.addEventListener("click",function(){e.toggle()}),this.findField.addEventListener("input",function(){e.dispatchEvent("")}),this.findField.addEventListener("keydown",function(t){switch(t.keyCode){case 13:e.dispatchEvent("again",t.shiftKey)}}),document.getElementById("findPrevious").addEventListener("click",function(){e.dispatchEvent("again",!0)}),document.getElementById("findNext").addEventListener("click",function(){e.dispatchEvent("again",!1)}),this.highlightAll.addEventListener("click",function(){e.dispatchEvent("highlightallchange")}),this.caseSensitive.addEventListener("click",function(){e.dispatchEvent("casesensitivitychange")})},dispatchEvent:function(e,t){var n=document.createEvent("CustomEvent");return n.initCustomEvent("find"+e,!0,!0,{query:this.findField.value,caseSensitive:this.caseSensitive.checked,highlightAll:this.highlightAll.checked,findPrevious:t}),window.dispatchEvent(n)},updateUIState:function(e,t){var n=!1,r="",i="pending";switch(e){case FindStates.FIND_FOUND:break;case FindStates.FIND_NOTFOUND:r=mozL10n.get("find_not_found",null,"Phrase not found"),n=!0;break;case FindStates.FIND_WRAPPED:t?r=mozL10n.get("find_wrapped_to_bottom",null,"Reached end of page, continued from bottom"):r=mozL10n.get("find_wrapped_to_top",null,"Reached end of page, continued from top")}n?this.findField.classList.add("notFound"):this.findField.classList.remove("notFound"),this.findMsg.textContent=r},open:function(){if(this.opened)return;this.opened=!0,this.toggleButton.classList.add("toggled"),this.bar.classList.remove("hidden"),this.findField.select(),this.findField.focus()},close:function(){if(!this.opened)return;this.opened=!1,this.toggleButton.classList.remove("toggled"),this.bar.classList.add("hidden"),PDFFindController.active=!1},toggle:function(){this.opened?this.close():this.open()}},PDFView={pages:[],thumbnails:[],currentScale:kUnknownScale,currentScaleValue:null,initialBookmark:document.location.hash.substring(1),startedTextExtraction:!1,pageText:[],container:null,thumbnailContainer:null,initialized:!1,fellback:!1,pdfDocument:null,sidebarOpen:!1,pageViewScroll:null,thumbnailViewScroll:null,isFullscreen:!1,previousScale:null,pageRotation:0,lastScroll:0,initialize:function(){var t=this,n=this.container=document.getElementById("viewerContainer");this.pageViewScroll={},this.watchScroll(n,this.pageViewScroll,updateViewarea);var r=this.thumbnailContainer=document.getElementById("thumbnailView");this.thumbnailViewScroll={},this.watchScroll(r,this.thumbnailViewScroll,this.renderHighestPriority.bind(this)),PDFFindBar.initialize(),PDFFindController.initialize(),this.initialized=!0,n.addEventListener("scroll",function(){t.lastScroll=Date.now()},!1)},watchScroll:function(t,n,r){n.down=!0,n.lastY=t.scrollTop,t.addEventListener("scroll",function(i){var s=t.scrollTop,o=n.lastY;s>o?n.down=!0:s<o&&(n.down=!1),n.lastY=s,r()},!0)},setScale:function(t,n,r){if(t==this.currentScale)return;var i=this.pages;for(var s=0;s<i.length;s++)i[s].update(t*kCssUnits);!r&&this.currentScale!=t&&this.pages[this.page-1].scrollIntoView(),this.currentScale=t;var o=document.createEvent("UIEvents");o.initUIEvent("scalechange",!1,!1,window,0),o.scale=t,o.resetAutoSettings=n,window.dispatchEvent(o)},parseScale:function(t,n,r){if("custom"==t)return;var i=parseFloat(t);this.currentScaleValue=t;if(i){this.setScale(i,!0,r);return}var s=this.container,o=this.pages[this.page-1],u=(s.clientWidth-kScrollbarPadding)/o.width*o.scale/kCssUnits,a=(s.clientHeight-kScrollbarPadding)/o.height*o.scale/kCssUnits;switch(t){case"page-actual":i=1;break;case"page-width":i=u;break;case"page-height":i=a;break;case"page-fit":i=Math.min(u,a);break;case"auto":i=Math.min(1,u)}this.setScale(i,n,r),selectScaleOption(t)},zoomIn:function(){var t=(this.currentScale*kDefaultScaleDelta).toFixed(2);t=Math.min(kMaxScale,t),this.parseScale(t,!0)},zoomOut:function(){var t=(this.currentScale/kDefaultScaleDelta).toFixed(2);t=Math.max(kMinScale,t),this.parseScale(t,!0)},set page(e){var t=this.pages,n=document.getElementById("pageNumber"),r=document.createEvent("UIEvents");r.initUIEvent("pagechange",!1,!1,window,0);if(!(0<e&&e<=t.length)){r.pageNumber=this.page,window.dispatchEvent(r);return}t[e-1].updateStats(),currentPageNumber=e,r.pageNumber=e,window.dispatchEvent(r);if(updateViewarea.inProgress)return;if(this.loading&&e==1)return;t[e-1].scrollIntoView()},get page(){return currentPageNumber},get supportsPrinting(){var e=document.createElement("canvas"),t="mozPrintCallback"in e;return Object.defineProperty(this,"supportsPrinting",{value:t,enumerable:!0,configurable:!0,writable:!1}),t},get supportsFullscreen(){var e=document.documentElement,t=e.requestFullscreen||e.mozRequestFullScreen||e.webkitRequestFullScreen;return Object.defineProperty(this,"supportsFullScreen",{value:t,enumerable:!0,configurable:!0,writable:!1}),t},initPassiveLoading:function(){PDFView.loadingBar||(PDFView.loadingBar=new ProgressBar("#loadingBar",{})),window.addEventListener("message",function(t){var n=t.data;if(!(typeof n=="object"&&"pdfjsLoadAction"in n))return;switch(n.pdfjsLoadAction){case"progress":PDFView.progress(n.loaded/n.total);break;case"complete":if(!n.data){PDFView.error(mozL10n.get("loading_error",null,"An error occurred while loading the PDF."),t);break}PDFView.open(n.data,0)}}),FirefoxCom.requestSync("initPassiveLoading",null)},setTitleUsingUrl:function(t){this.url=t;try{document.title=decodeURIComponent(getFileName(t))||t}catch(n){document.title=t}},open:function(t,n,r){var i={password:r};typeof t=="string"?(this.setTitleUsingUrl(t),i.url=t):t&&"byteLength"in t&&(i.data=t),PDFView.loadingBar||(PDFView.loadingBar=new ProgressBar("#loadingBar",{})),this.pdfDocument=null;var s=this;s.loading=!0,PDFJS.getDocument(i).then(function(t){s.load(t,n),s.loading=!1},function(i,o){if(o&&o.name==="PasswordException"&&o.code==="needpassword"){var u=mozL10n.get("request_password",null,"PDF is protected by a password:");r=prompt(u);if(r&&r.length>0)return PDFView.open(t,n,r)}var a=document.getElementById("loading");a.textContent=mozL10n.get("loading_error_indicator",null,"Error");var f={message:i};s.error(mozL10n.get("loading_error",null,"An error occurred while loading the PDF."),f),s.loading=!1},function(t){s.progress(t.loaded/t.total)})},download:function(){function t(){FirefoxCom.request("download",{originalUrl:n})}var n=this.url.split("#")[0];n+="#pdfjs.action=download",window.open(n,"_parent")},fallback:function(){return},navigateTo:function(t){typeof t=="string"&&(t=this.destinations[t]);if(!(t instanceof Array))return;var n=t[0],r=n instanceof Object?this.pagesRefMap[n.num+" "+n.gen+" R"]:n+1;r>this.pages.length&&(r=this.pages.length);if(r){this.page=r;var i=this.pages[r-1];i.scrollIntoView(t)}},getDestinationHash:function(t){if(typeof t=="string")return PDFView.getAnchorUrl("#"+escape(t));if(t instanceof Array){var n=t[0],r=n instanceof Object?this.pagesRefMap[n.num+" "+n.gen+" R"]:n+1;if(r){var i=PDFView.getAnchorUrl("#page="+r),s=t[1];if(typeof s=="object"&&"name"in s&&s.name=="XYZ"){var o=t[4]||this.currentScale;i+="&zoom="+o*100;if(t[2]||t[3])i+=","+(t[2]||0)+","+(t[3]||0)}return i}}return""},getAnchorUrl:function(t){return t},error:function(t,n){var r=mozL10n.get("error_build",{build:PDFJS.build},"PDF.JS Build: {{build}}")+"\n";n&&(r+=mozL10n.get("error_message",{message:n.message},"Message: {{message}}"),n.stack?r+="\n"+mozL10n.get("error_stack",{stack:n.stack},"Stack: {{stack}}"):(n.filename&&(r+="\n"+mozL10n.get("error_file",{file:n.filename},"File: {{file}}")),n.lineNumber&&(r+="\n"+mozL10n.get("error_line",{line:n.lineNumber},"Line: {{line}}"))));var i=document.getElementById("loadingBox");i.setAttribute("hidden","true");var s=document.getElementById("errorWrapper");s.removeAttribute("hidden");var o=document.getElementById("errorMessage");o.textContent=t;var u=document.getElementById("errorClose");u.onclick=function(){s.setAttribute("hidden","true")};var a=document.getElementById("errorMoreInfo"),f=document.getElementById("errorShowMore"),l=document.getElementById("errorShowLess");f.onclick=function(){a.removeAttribute("hidden"),f.setAttribute("hidden","true"),l.removeAttribute("hidden")},l.onclick=function(){a.setAttribute("hidden","true"),f.removeAttribute("hidden"),l.setAttribute("hidden","true")},f.removeAttribute("hidden"),l.setAttribute("hidden","true"),a.value=r,a.rows=r.split("\n").length-1},progress:function(t){var n=Math.round(t*100);PDFView.loadingBar.percent=n},load:function(t,n){function r(e,t){e.onAfterDraw=function(){t.setImage(e.canvas)}}this.pdfDocument=t;var i=document.getElementById("errorWrapper");i.setAttribute("hidden","true");var s=document.getElementById("loadingBox");s.setAttribute("hidden","true");var o=document.getElementById("loading");o.textContent="";var u=document.getElementById("thumbnailView");u.parentNode.scrollTop=0;while(u.hasChildNodes())u.removeChild(u.lastChild);"_loadingInterval"in u&&clearInterval(u._loadingInterval);var a=document.getElementById("viewer");while(a.hasChildNodes())a.removeChild(a.lastChild);var f=t.numPages,l=t.fingerprint;document.getElementById("numPages").textContent=mozL10n.get("page_of",{pageCount:f},"of {{pageCount}}"),document.getElementById("pageNumber").max=f,PDFView.documentFingerprint=l;var c=PDFView.store=new Settings(l),h=c.initializedPromise;this.pageRotation=0;var p=this.pages=[];this.pageText=[],this.startedTextExtraction=!1;var d={},v=this.thumbnails=[],m=[];for(var g=1;g<=f;g++)m.push(t.getPage(g));var y=this,b=PDFJS.Promise.all(m);b.then(function(e){for(var t=1;t<=f;t++){var i=e[t-1],s=new PageView(a,i,t,n,i.stats,y.navigateTo.bind(y)),o=new ThumbnailView(u,i,t);r(s,o),p.push(s),v.push(o);var l=i.ref;d[l.num+" "+l.gen+" R"]=t,PDFFindController.extractText()}y.pagesRefMap=d});var w=t.getDestinations();w.then(function(e){y.destinations=e});var E=[b,w,h];PDFJS.Promise.all(E).then(function(){t.getOutline().then(function(e){y.outline=new DocumentOutlineView(e)});var e=null;if(c.get("exists",!1)){var r=c.get("page","1"),i=c.get("zoom",PDFView.currentScale),s=c.get("scrollLeft","0"),o=c.get("scrollTop","0");e="page="+r+"&zoom="+i+","+s+","+o}y.setInitialView(e,n)}),t.getMetadata().then(function(e){var t=e.info,n=e.metadata;y.documentInfo=t,y.metadata=n;var r;n&&n.has("dc:title")&&(r=n.get("dc:title")),!r&&t&&t.Title&&(r=t.Title),r&&(document.title=r+" - "+document.title)})},setInitialView:function(t,n){this.currentScale=0,this.currentScaleValue=null,this.initialBookmark?(this.setHash(this.initialBookmark),this.initialBookmark=null):t?this.setHash(t):n&&(this.parseScale(n,!0),this.page=1),PDFView.currentScale===kUnknownScale&&this.parseScale(kDefaultScale,!0)},renderHighestPriority:function(){var t=this.getVisiblePages(),n=this.getHighestPriority(t,this.pages,this.pageViewScroll.down);if(n){this.renderView(n,"page");return}if(this.sidebarOpen){var r=this.getVisibleThumbs(),i=this.getHighestPriority(r,this.thumbnails,this.thumbnailViewScroll.down);i&&this.renderView(i,"thumbnail")}},getHighestPriority:function(t,n,r){var i=t.views,s=i.length;if(s===0)return!1;for(var o=0;o<s;++o){var u=i[o].view;if(!this.isViewFinished(u))return u}if(r){var a=t.last.id;if(n[a]&&!this.isViewFinished(n[a]))return n[a]}else{var f=t.first.id-2;if(n[f]&&!this.isViewFinished(n[f]))return n[f]}return!1},isViewFinished:function(t){return t.renderingState===RenderingStates.FINISHED},renderView:function(t,n){var r=t.renderingState;switch(r){case RenderingStates.FINISHED:return!1;case RenderingStates.PAUSED:PDFView.highestPriorityPage=n+t.id,t.resume();break;case RenderingStates.RUNNING:PDFView.highestPriorityPage=n+t.id;break;case RenderingStates.INITIAL:PDFView.highestPriorityPage=n+t.id,t.draw(this.renderHighestPriority.bind(this))}return!0},setHash:function(t){if(!t)return;if(t.indexOf("=")>=0){var n=PDFView.parseQueryString(t);if("nameddest"in n){PDFView.navigateTo(n.nameddest);return}if("page"in n){var r=n.page|0||1;if("zoom"in n){var i=n.zoom.split(","),s=i[0],o=parseFloat(s);o&&(s=o/100);var u=[null,{name:"XYZ"},i[1]|0,i[2]|0,s],a=this.pages[r-1];a.scrollIntoView(u)}else this.page=r}}else/^\d+$/.test(t)?this.page=t:PDFView.navigateTo(unescape(t))},switchSidebarView:function(t){var n=document.getElementById("thumbnailView"),r=document.getElementById("outlineView"),i=document.getElementById("viewThumbnail"),s=document.getElementById("viewOutline");switch(t){case"thumbs":i.classList.add("toggled"),s.classList.remove("toggled"),n.classList.remove("hidden"),r.classList.add("hidden"),PDFView.renderHighestPriority();break;case"outline":i.classList.remove("toggled"),s.classList.add("toggled"),n.classList.add("hidden"),r.classList.remove("hidden");if(s.getAttribute("disabled"))return}},getVisiblePages:function(){return this.getVisibleElements(this.container,this.pages,!0)},getVisibleThumbs:function(){return this.getVisibleElements(this.thumbnailContainer,this.thumbnails)},getVisibleElements:function(t,n,r){var i=0,s,o=t.scrollTop;for(var u=1,a=n.length;u<=a;++u){s=n[u-1],i=s.el.offsetTop;if(i+s.el.clientHeight>o)break;i+=s.el.clientHeight}var f=[];if(this.isFullscreen){var l=this.pages[this.page-1];return f.push({id:l.id,view:l}),{first:l,last:l,views:f}}var c=o+t.clientHeight,h,p,d,v;for(;u<=a&&i<c;++u)s=n[u-1],v=s.el.clientHeight,i=s.el.offsetTop,h=i+v,p=Math.max(0,o-i)+Math.max(0,h-c),d=Math.floor((v-p)*100/v),f.push({id:s.id,y:i,view:s,percent:d}),i=h;var m=f[0],g=f[f.length-1];return r&&f.sort(function(e,t){var n=e.percent-t.percent;return Math.abs(n)>.001?-n:e.id-t.id}),{first:m,last:g,views:f}},parseQueryString:function(t){var n=t.split("&"),r={};for(var i=0,s=n.length;i<n.length;++i){var o=n[i].split("="),u=o[0],a=o.length>1?o[1]:null;r[unescape(u)]=unescape(a)}return r},beforePrint:function(){if(!this.supportsPrinting){var t=mozL10n.get("printing_not_supported",null,"Warning: Printing is not fully supported by this browser.");this.error(t);return}var n=document.querySelector("body");n.setAttribute("data-mozPrintCallback",!0);for(var r=0,i=this.pages.length;r<i;++r)this.pages[r].beforePrint()},afterPrint:function(){var t=document.getElementById("printContainer");while(t.hasChildNodes())t.removeChild(t.lastChild)},fullscreen:function(){var t=document.fullscreenElement||document.mozFullScreen||document.webkitIsFullScreen;if(t)return!1;var n=document.getElementById("viewerContainer");if(document.documentElement.requestFullscreen)n.requestFullscreen();else if(document.documentElement.mozRequestFullScreen)n.mozRequestFullScreen();else{if(!document.documentElement.webkitRequestFullScreen)return!1;n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}this.isFullscreen=!0;var r=this.pages[this.page-1];return this.previousScale=this.currentScaleValue,this.parseScale("page-fit",!0),setTimeout(function(){r.scrollIntoView()},0),!0},exitFullscreen:function(){this.isFullscreen=!1,this.parseScale(this.previousScale),this.page=this.page},rotatePages:function(t){this.pageRotation=(this.pageRotation+360+t)%360;for(var n=0,r=this.pages.length;n<r;n++){var i=this.pages[n];i.update(i.scale,this.pageRotation)}for(var n=0,r=this.thumbnails.length;n<r;n++){var s=this.thumbnails[n];s.updateRotation(this.pageRotation)}var o=this.pages[this.page-1];this.parseScale(this.currentScaleValue,!0),this.renderHighestPriority(),setTimeout(function(){o.scrollIntoView()},0)}},PageView=function(t,n,r,i,s,o){function f(e,t){function n(e,t){e.href=PDFView.getDestinationHash(t),e.onclick=function(){return t&&PDFView.navigateTo(t),!1}}function r(e,n){var r=t.convertToViewportRectangle(n.rect);r=PDFJS.Util.normalizeRect(r);var i=document.createElement(e);return i.style.left=Math.floor(r[0])+"px",i.style.top=Math.floor(r[1])+"px",i.style.width=Math.ceil(r[2]-r[0])+"px",i.style.height=Math.ceil(r[3]-r[1])+"px",i}function i(e,n){var i=document.createElement("section");i.className="annotComment";var s=r("img",n),e=n.type,o=t.convertToViewportRectangle(n.rect);o=PDFJS.Util.normalizeRect(o),s.src=kImageDirectory+"annotation-"+e.toLowerCase()+".svg",s.alt=mozL10n.get("text_annotation_type",{type:e},"[{{type}} Annotation]");var u=document.createElement("div");u.setAttribute("hidden",!0);var a=document.createElement("h1"),f=document.createElement("p");u.style.left=Math.floor(o[2])+"px",u.style.top=Math.floor(o[1])+"px",a.textContent=n.title;if(!n.content&&!n.title)u.setAttribute("hidden",!0);else{var l=document.createElement("span"),c=n.content.split("\n");for(var h=0,p=c.length;h<p;++h){var d=c[h];l.appendChild(document.createTextNode(d)),h<p-1&&l.appendChild(document.createElement("br"))}f.appendChild(l),s.addEventListener("mouseover",function(){u.removeAttribute("hidden")},!1),s.addEventListener("mouseout",function(){u.setAttribute("hidden",!0)},!1)}return u.appendChild(a),u.appendChild(f),i.appendChild(s),i.appendChild(u),i}e.getAnnotations().then(function(e){for(var t=0;t<e.length;t++){var s=e[t];switch(s.type){case"Link":var o=r("a",s);o.href=s.url||"",s.url||n(o,"dest"in s?s.dest:null),a.appendChild(o);break;case"Text":var u=i(s.name,s);u&&a.appendChild(u);break;case"Widget":PDFView.fallback()}}})}this.id=r,this.pdfPage=n,this.rotation=0,this.scale=i||1,this.viewport=this.pdfPage.getViewport(this.scale,this.pdfPage.rotate),this.renderingState=RenderingStates.INITIAL,this.resume=null,this.textContent=null,this.textLayer=null;var u=document.createElement("a");u.name=""+this.id;var a=this.el=document.createElement("div");a.id="pageContainer"+this.id,a.className="page",a.style.width=this.viewport.width+"px",a.style.height=this.viewport.height+"px",t.appendChild(u),t.appendChild(a),this.destroy=function(){this.update(),this.pdfPage.destroy()},this.update=function(t,n){this.renderingState=RenderingStates.INITIAL,this.resume=null,typeof n!="undefined"&&(this.rotation=n),this.scale=t||this.scale;var r=(this.rotation+this.pdfPage.rotate)%360,i=this.pdfPage.getViewport(this.scale,r);this.viewport=i,a.style.width=i.width+"px",a.style.height=i.height+"px";while(a.hasChildNodes())a.removeChild(a.lastChild);a.removeAttribute("data-loaded"),delete this.canvas,this.loadingIconDiv=document.createElement("div"),this.loadingIconDiv.className="loadingIcon",a.appendChild(this.loadingIconDiv)},Object.defineProperty(this,"width",{get:function(){return this.viewport.width},enumerable:!0}),Object.defineProperty(this,"height",{get:function(){return this.viewport.height},enumerable:!0}),this.getPagePoint=function(t,n){return this.viewport.convertToPdfPoint(t,n)},this.scrollIntoView=function(t){if(!t){scrollIntoView(a);return}var n=0,r=0,i=0,s=0,o,u,f=0;switch(t[1].name){case"XYZ":n=t[2],r=t[3],f=t[4];break;case"Fit":case"FitB":f="page-fit";break;case"FitH":case"FitBH":r=t[2],f="page-width";break;case"FitV":case"FitBV":n=t[2],f="page-height";break;case"FitR":n=t[2],r=t[3],i=t[4]-n,s=t[5]-r,o=(this.container.clientWidth-kScrollbarPadding)/i/kCssUnits,u=(this.container.clientHeight-kScrollbarPadding)/s/kCssUnits,f=Math.min(o,u);break;default:return}f&&f!==PDFView.currentScale?PDFView.parseScale(f,!0,!0):PDFView.currentScale===kUnknownScale&&PDFView.parseScale(kDefaultScale,!0,!0);var l=[this.viewport.convertToViewportPoint(n,r),this.viewport.convertToViewportPoint(n+i,r+s)];setTimeout(function(){var t=PDFView.currentScale,n=Math.min(l[0][0],l[1][0]),r=Math.min(l[0][1],l[1][1]),i=Math.abs(l[0][0]-l[1][0]),s=Math.abs(l[0][1]-l[1][1]);scrollIntoView(a,{left:n,top:r,width:i,height:s})},0)},this.getTextContent=function(){return this.textContent||(this.textContent=this.pdfPage.getTextContent()),this.textContent},this.draw=function(t){function h(e){c.renderingState=RenderingStates.FINISHED,c.loadingIconDiv&&(a.removeChild(c.loadingIconDiv),delete c.loadingIconDiv),e&&PDFView.error(mozL10n.get("rendering_error",null,"An error occurred while rendering the page."),e),c.stats=n.stats,c.updateStats(),c.onAfterDraw&&c.onAfterDraw(),cache.push(c),t()}this.renderingState!==RenderingStates.INITIAL&&error("Must be in new state before drawing"),this.renderingState=RenderingStates.RUNNING;var r=document.createElement("canvas");r.id="page"+this.id,r.mozOpaque=!0,a.appendChild(r),this.canvas=r;var i=null;PDFJS.disableTextLayer||(i=document.createElement("div"),i.className="textLayer",a.appendChild(i));var s=this.textLayer=i?new TextLayerBuilder(i,this.id-1):null,o=this.scale,u=this.viewport;r.width=u.width,r.height=u.height;var l=r.getContext("2d");l.save(),l.fillStyle="rgb(255, 255, 255)",l.fillRect(0,0,r.width,r.height),l.restore();var c=this,p={canvasContext:l,viewport:this.viewport,textLayer:s,continueCallback:function(t){if(PDFView.highestPriorityPage!=="page"+c.id){c.renderingState=RenderingStates.PAUSED,c.resume=function(){c.renderingState=RenderingStates.RUNNING,t()};return}t()}};this.pdfPage.render(p).then(function(){h(null)},function(t){h(t)}),s&&this.getTextContent().then(function(t){s.setTextContent(t)}),f(this.pdfPage,this.viewport),a.setAttribute("data-loaded",!0)},this.beforePrint=function(){var t=this.pdfPage,n=t.getViewport(1),r=this.canvas=document.createElement("canvas");r.width=n.width,r.height=n.height,r.style.width=n.width+"pt",r.style.height=n.height+"pt";var i=document.getElementById("printContainer");i.appendChild(r);var s=this;r.mozPrintCallback=function(e){var r=e.context,i={canvasContext:r,viewport:n};t.render(i).then(function(){e.done(),s.pdfPage.destroy()},function(t){console.error(t),"abort"in object?e.abort():e.done(),s.pdfPage.destroy()})}},this.updateStats=function(){if(PDFJS.pdfBug&&Stats.enabled){var t=this.stats;Stats.add(this.id,t)}}},ThumbnailView=function(t,n,r){function g(){var e=document.createElement("canvas");e.id="thumbnail"+r,e.mozOpaque=!0,e.width=c,e.height=h,e.className="thumbnailImage",e.setAttribute("aria-label",mozL10n.get("thumb_page_canvas",{page:r},"Thumbnail of Page {{page}}")),v.setAttribute("data-loaded",!0),m.appendChild(e);var t=e.getContext("2d");return t.save(),t.fillStyle="rgb(255, 255, 255)",t.fillRect(0,0,c,h),t.restore(),t}var i=document.createElement("a");i.href=PDFView.getAnchorUrl("#page="+r),i.title=mozL10n.get("thumb_page_title",{page:r},"Page {{page}}"),i.onclick=function(){return PDFView.page=r,!1};var s=0,o=(s+n.rotate)%360,u=n.getViewport(1,o),a=this.width=u.width,f=this.height=u.height,l=a/f;this.id=r;var c=98,h=c/this.width*this.height,p=this.scaleX=c/a,d=this.scaleY=h/f,v=this.el=document.createElement("div");v.id="thumbnailContainer"+r,v.className="thumbnail";var m=document.createElement("div");m.className="thumbnailSelectionRing",m.style.width=c+"px",m.style.height=h+"px",v.appendChild(m),i.appendChild(v),t.appendChild(i),this.hasImage=!1,this.renderingState=RenderingStates.INITIAL,this.updateRotation=function(e){s=e,o=(s+n.rotate)%360,u=n.getViewport(1,o),a=this.width=u.width,f=this.height=u.height,l=a/f,h=c/this.width*this.height,p=this.scaleX=c/a,d=this.scaleY=h/f,v.removeAttribute("data-loaded"),m.textContent="",m.style.width=c+"px",m.style.height=h+"px",this.hasImage=!1,this.renderingState=RenderingStates.INITIAL,this.resume=null},this.drawingRequired=function(){return!this.hasImage},this.draw=function(t){this.renderingState!==RenderingStates.INITIAL&&error("Must be in new state before drawing"),this.renderingState=RenderingStates.RUNNING;if(this.hasImage){t();return}var r=this,i=g(),s=n.getViewport(p,o),u={canvasContext:i,viewport:s,continueCallback:function(e){if(PDFView.highestPriorityPage!=="thumbnail"+r.id){r.renderingState=RenderingStates.PAUSED,r.resume=function(){r.renderingState=RenderingStates.RUNNING,e()};return}e()}};n.render(u).then(function(){r.renderingState=RenderingStates.FINISHED,t()},function(n){r.renderingState=RenderingStates.FINISHED,t()}),this.hasImage=!0},this.setImage=function(t){if(this.hasImage||!t)return;this.renderingState=RenderingStates.FINISHED;var n=g();n.drawImage(t,0,0,t.width,t.height,0,0,n.canvas.width,n.canvas.height),this.hasImage=!0}},DocumentOutlineView=function(t){function r(e,t){e.href=PDFView.getDestinationHash(t.dest),e.onclick=function(n){return PDFView.navigateTo(t.dest),!1}}var n=document.getElementById("outlineView");while(n.firstChild)n.removeChild(n.firstChild);if(!t){var i=document.createElement("div");i.classList.add("noOutline"),i.textContent=mozL10n.get("no_outline",null,"No Outline Available"),n.appendChild(i);return}var s=[{parent:n,items:t}];while(s.length>0){var o=s.shift(),u,a=o.items.length;for(u=0;u<a;u++){var f=o.items[u],l=document.createElement("div");l.className="outlineItem";var c=document.createElement("a");r(c,f),c.textContent=f.title,l.appendChild(c);if(f.items.length>0){var h=document.createElement("div");h.className="outlineItems",l.appendChild(h),s.push({parent:h,items:f.items})}o.parent.appendChild(l)}}},CustomStyle=function(){function r(){}var t=["ms","Moz","Webkit","O"],n={};return r.getProp=function(r,i){if(arguments.length==1&&typeof n[r]=="string")return n[r];i=i||document.documentElement;var s=i.style,o,u;if(typeof s[r]=="string")return n[r]=r;u=r.charAt(0).toUpperCase()+r.slice(1);for(var a=0,f=t.length;a<f;a++){o=t[a]+u;if(typeof s[o]=="string")return n[r]=o}return n[r]="undefined"},r.setProp=function(t,n,r){var i=this.getProp(t);i!="undefined"&&(n.style[i]=r)},r}(),TextLayerBuilder=function(t,n){var r=document.createDocumentFragment();this.textLayerDiv=t,this.layoutDone=!1,this.divContentDone=!1
+,this.pageIdx=n,this.matches=[],this.beginLayout=function(){this.textDivs=[],this.textLayerQueue=[],this.renderingDone=!1},this.endLayout=function(){this.layoutDone=!0,this.insertDivContent()},this.renderLayer=function(){var t=this,n=this.textDivs,i=this.textLayerDiv,s=document.createElement("canvas"),o=s.getContext("2d");if(n.length>1e5)return;var u=n.length;while(u!==0){u--;var a=n[u];r.appendChild(a),o.font=a.style.fontSize+" "+a.style.fontFamily;var f=o.measureText(a.textContent).width;if(f>0){var l=a.dataset.canvasWidth/f;CustomStyle.setProp("transform",a,"scale("+l+", 1)"),CustomStyle.setProp("transformOrigin",a,"0% 0%"),i.appendChild(a)}}this.renderingDone=!0,this.updateMatches(),i.appendChild(r)},this.setupRenderLayoutTimer=function(){var t=200,n=this;Date.now()-PDFView.lastScroll>t?this.renderLayer():(this.renderTimer&&clearTimeout(this.renderTimer),this.renderTimer=setTimeout(function(){n.setupRenderLayoutTimer()},t))},this.appendText=function(t,n,r){var i=document.createElement("div"),s=n*r.vScale;i.dataset.canvasWidth=r.canvasWidth*r.hScale,i.dataset.fontName=t,i.style.fontSize=s+"px",i.style.fontFamily=t,i.style.left=r.x+"px",i.style.top=r.y-s+"px",this.textDivs.push(i)},this.insertDivContent=function(){if(!this.layoutDone||this.divContentDone||!this.textContent)return;this.divContentDone=!0;var t=this.textDivs,n=this.textContent.bidiTexts;for(var r=0;r<n.length;r++){var i=n[r],s=t[r];s.textContent=i.str,s.dir=i.ltr?"ltr":"rtl"}this.setupRenderLayoutTimer()},this.setTextContent=function(t){this.textContent=t,this.insertDivContent()},this.convertMatches=function(t){var n=0,r=0,i=this.textContent.bidiTexts,s=i.length-1,o=PDFFindController.state.query.length,u=-1,a,f=[];for(var l=0;l<t.length;l++){var c=t[l];while(n!==s&&c>=r+i[n].str.length)r+=i[n].str.length,n++;n==i.length&&console.error("Could not find matching mapping");var h={begin:{divIdx:n,offset:c-r}};c+=o;while(n!==s&&c>r+i[n].str.length)r+=i[n].str.length,n++;h.end={divIdx:n,offset:c-r},f.push(h)}return f},this.renderMatches=function(t){function f(e,t){var i=e.divIdx,u=r[i];u.innerHTML="";var a=n[i].str.substring(0,e.offset),f=document.createTextNode(a);if(t){var l=s&&i===o,c=document.createElement("span");c.className=t+(l?" selected":""),c.appendChild(f),u.appendChild(c);return}u.appendChild(f)}function l(e,t,i){var s=e.divIdx,o=r[s],u=n[s].str.substring(e.offset,t.offset),a=document.createTextNode(u);if(i){var f=document.createElement("span");f.className=i,f.appendChild(a),o.appendChild(f);return}o.appendChild(a)}function c(e,t){r[e].className=t}if(t.length===0)return;var n=this.textContent.bidiTexts,r=this.textDivs,i=null,s=this.pageIdx===PDFFindController.selected.pageIdx,o=PDFFindController.selected.matchIdx,u=PDFFindController.state.highlightAll,a={divIdx:-1,offset:undefined},h=o,p=h+1,d;if(u)h=0,p=t.length;else if(!s)return;for(d=h;d<p;d++){var v=t[d],m=v.begin,g=v.end,y=s&&d===o,b=y?" selected":"";y&&scrollIntoView(r[m.divIdx],{top:-50}),!i||m.divIdx!==i.divIdx?(i!==null&&l(i,a),f(m)):l(i,m);if(m.divIdx===g.divIdx)l(m,g,"highlight"+b);else{l(m,a,"highlight begin"+b);for(var w=m.divIdx+1;w<g.divIdx;w++)c(w,"highlight middle"+b);f(g,"highlight end"+b)}i=g}i&&l(i,a)},this.updateMatches=function(){if(!this.renderingDone)return;var t=this.matches,n=this.textDivs,r=this.textContent.bidiTexts,i=-1;for(var s=0;s<t.length;s++){var o=t[s],u=Math.max(i,o.begin.divIdx);for(var a=u;a<=o.end.divIdx;a++){var f=n[a];f.textContent=r[a].str,f.className=""}i=o.end.divIdx+1}if(!PDFFindController.active)return;this.matches=t=this.convertMatches(PDFFindController.pageMatches[this.pageIdx]||[]),this.renderMatches(this.matches)}};document.addEventListener("DOMContentLoaded",function(t){PDFView.initialize();var n=PDFView.parseQueryString(document.location.search.substring(1)),r=n.file||kDefaultURL;!window.File||!window.FileReader||!window.FileList||!window.Blob?document.getElementById("openFile").setAttribute("hidden","true"):document.getElementById("fileInput").value=null;var i=document.location.hash.substring(1),s=PDFView.parseQueryString(i);"disableWorker"in s&&(PDFJS.disableWorker=s.disableWorker==="true");var o=navigator.language;"locale"in s&&(o=s.locale),mozL10n.language.code=o;if("textLayer"in s)switch(s.textLayer){case"off":PDFJS.disableTextLayer=!0;break;case"visible":case"shadow":case"hover":var u=document.getElementById("viewer");u.classList.add("textLayer-"+s.textLayer)}if("pdfBug"in s){PDFJS.pdfBug=!0;var a=s.pdfBug,f=a.split(",");PDFBug.enable(f),PDFBug.init()}PDFView.supportsPrinting||document.getElementById("print").classList.add("hidden"),PDFView.supportsFullscreen||document.getElementById("fullscreen").classList.add("hidden"),PDFJS.LogManager.addLogger({warn:function(){PDFView.fallback()}});var l=document.getElementById("mainContainer"),c=document.getElementById("outerContainer");l.addEventListener("transitionend",function(e){if(e.target==l){var t=document.createEvent("UIEvents");t.initUIEvent("resize",!1,!1,window,0),window.dispatchEvent(t),c.classList.remove("sidebarMoving")}},!0),document.getElementById("sidebarToggle").addEventListener("click",function(){this.classList.toggle("toggled"),c.classList.add("sidebarMoving"),c.classList.toggle("sidebarOpen"),PDFView.sidebarOpen=c.classList.contains("sidebarOpen"),PDFView.renderHighestPriority()}),document.getElementById("viewThumbnail").addEventListener("click",function(){PDFView.switchSidebarView("thumbs")}),document.getElementById("viewOutline").addEventListener("click",function(){PDFView.switchSidebarView("outline")}),document.getElementById("previous").addEventListener("click",function(){PDFView.page--}),document.getElementById("next").addEventListener("click",function(){PDFView.page++}),document.querySelector(".zoomIn").addEventListener("click",function(){PDFView.zoomIn()}),document.querySelector(".zoomOut").addEventListener("click",function(){PDFView.zoomOut()}),document.getElementById("fullscreen").addEventListener("click",function(){PDFView.fullscreen()}),document.getElementById("openFile").addEventListener("click",function(){document.getElementById("fileInput").click()}),document.getElementById("print").addEventListener("click",function(){window.print()}),document.getElementById("download").addEventListener("click",function(){PDFView.download()}),document.getElementById("pageNumber").addEventListener("change",function(){PDFView.page=this.value}),document.getElementById("scaleSelect").addEventListener("change",function(){PDFView.parseScale(this.value)}),document.getElementById("page_rotate_ccw").addEventListener("click",function(){PDFView.rotatePages(-90)}),document.getElementById("page_rotate_cw").addEventListener("click",function(){PDFView.rotatePages(90)}),PDFView.open(r,0)},!0),window.addEventListener("resize",function(t){PDFView.initialized&&(document.getElementById("pageWidthOption").selected||document.getElementById("pageFitOption").selected||document.getElementById("pageAutoOption").selected)&&PDFView.parseScale(document.getElementById("scaleSelect").value),updateViewarea()}),window.addEventListener("hashchange",function(t){PDFView.setHash(document.location.hash.substring(1))}),window.addEventListener("change",function(t){var n=t.target.files;if(!n||n.length==0)return;var r=new FileReader;r.onload=function(t){var n=t.target.result,r=new Uint8Array(n);PDFView.open(r,0)};var i=n[0];r.readAsArrayBuffer(i),PDFView.setTitleUsingUrl(i.name),document.getElementById("viewBookmark").setAttribute("hidden","true"),document.getElementById("download").setAttribute("hidden","true")},!0),window.addEventListener("localized",function(t){document.getElementsByTagName("html")[0].dir=mozL10n.language.direction},!0),window.addEventListener("scalechange",function(t){var n=document.getElementById("customScaleOption");n.selected=!1;if(!t.resetAutoSettings&&(document.getElementById("pageWidthOption").selected||document.getElementById("pageFitOption").selected||document.getElementById("pageAutoOption").selected)){updateViewarea();return}var r=selectScaleOption(""+t.scale);r||(n.textContent=Math.round(t.scale*1e4)/100+"%",n.selected=!0),updateViewarea()},!0),window.addEventListener("pagechange",function(t){var n=t.pageNumber;if(document.getElementById("pageNumber").value!=n){document.getElementById("pageNumber").value=n;var r=document.querySelector(".thumbnail.selected");r&&r.classList.remove("selected");var i=document.getElementById("thumbnailContainer"+n);i.classList.add("selected");var s=PDFView.getVisibleThumbs(),o=s.views.length;if(o>0){var u=s.first.id,a=o>1?s.last.id:u;(n<=u||n>=a)&&scrollIntoView(i)}}document.getElementById("previous").disabled=n<=1,document.getElementById("next").disabled=n>=PDFView.pages.length},!0),window.addEventListener("DOMMouseScroll",function(e){if(e.ctrlKey){e.preventDefault();var t=e.detail,n=t>0?"zoomOut":"zoomIn";for(var r=0,i=Math.abs(t);r<i;r++)PDFView[n]()}},!1),window.addEventListener("keydown",function(t){var n=!1,r=(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0);if(r==1||r==8)switch(t.keyCode){case 70:PDFFindBar.toggle(),n=!0;break;case 61:case 107:case 187:PDFView.zoomIn(),n=!0;break;case 173:case 109:case 189:PDFView.zoomOut(),n=!0;break;case 48:PDFView.parseScale(kDefaultScale,!0),n=!0}if(n){t.preventDefault();return}var i=document.activeElement;if(!(!i||i.tagName!="INPUT"&&i.tagName!="SELECT"))return;var s=document.getElementById("toolbar");while(i){if(i===s&&!PDFView.isFullscreen)return;i=i.parentNode}if(r==0)switch(t.keyCode){case 37:case 75:case 80:PDFView.page--,n=!0;break;case 39:case 74:case 78:PDFView.page++,n=!0;break;case 32:PDFView.isFullscreen&&(PDFView.page++,n=!0);break;case 82:PDFView.rotatePages(90)}if(r==4)switch(t.keyCode){case 82:PDFView.rotatePages(-90)}n&&t.preventDefault()}),window.addEventListener("beforeprint",function(t){PDFView.beforePrint()}),window.addEventListener("afterprint",function(t){PDFView.afterPrint()}),function(){function t(e){var t=document.fullscreenElement||document.mozFullScreen||document.webkitIsFullScreen;t||PDFView.exitFullscreen()}window.addEventListener("fullscreenchange",t,!1),window.addEventListener("mozfullscreenchange",t,!1),window.addEventListener("webkitfullscreenchange",t,!1)}();
View
1,331 public/tagger/locale.properties
@@ -0,0 +1,1331 @@
+[ar]
+# Main toolbar buttons (tooltips and alt text for images)
+previous.title=الصفحة السابقة
+previous_label=السابق
+next.title=الصفحة التاليه
+next_label=التالي
+
+# LOCALIZATION NOTE (page_label, page_of):
+# These strings are concatenated to form the "Page: X of Y" string.
+# Do not translate "{{pageCount}}", it will be substituted with a number
+# representing the total number of pages.
+page_label=الصفحة:
+page_of=من {{pageCount}}
+
+zoom_out.title=تصغير
+zoom_out_label=تصغير
+zoom_in.title=تكبير
+zoom_in_label=تكبير
+zoom.title=التكبير
+print.title=طباعة
+print_label=طباعة
+fullscreen.title=ملء الشاشة
+fullscreen_label=ملء الشاشة
+open_file.title=فتح الملف
+open_file_label=فتح
+download.title=تحميل
+download_label=تحميل
+bookmark.title=المشهد الحالي (نسخ أو فتح في نافذة جديدة)
+bookmark_label=المشهد الحالي
+
+# Tooltips and alt text for side panel toolbar buttons
+# (the _label strings are alt text for the buttons, the .title strings are
+# tooltips)
+toggle_slider.title=تبديل الزلاق
+toggle_slider_label=تبديل الزلاق
+outline.title=إظهار ملخص المستند
+outline_label=ملخص المستند
+thumbs.title=إظهار الصور المصغرة
+thumbs_label=الصور المصغرة
+find_panel.title=البحث في المستند
+find_panel_label=بحث
+
+# Document outline messages
+no_outline=لا يوجد ملخص
+
+# Thumbnails panel item (tooltip and alt text for images)
+# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
+# number.
+thumb_page_title=الصفحة {{page}}
+# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
+# number.
+thumb_page_canvas=صورة مصغرة من الصفحة {{page}}
+
+# Context menu
+page_rotate_cw.label=تدوير مع عقارب الساعة
+page_rotate_ccw.label=تدوير عكس عقارب الساعة
+
+# Find panel button title and messages
+find=بحث
+find_terms_not_found=(لا يوجد)
+
+# Error panel labels
+error_more_info=مزيد من المعلومات
+error_less_info=معلومات أقل
+error_close=إغلاق
+# LOCALIZATION NOTE (error_build): "{{build}}" will be replaced by the PDF.JS
+# build ID.
+error_build=بناء PDF.JS: {{build}}
+# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
+# english string describing the error.
+error_message=رسالة: {{message}}
+# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
+# trace.